Obtaining nearest neighbors using knn on Android

asked 2013-05-26 11:09:48 -0500

user1446598 gravatar image

There's a question here that asks about how to obtain the nearest neighbors using knn, which as far as I know could be retreived using the optional parameter neighbors. However, on Android, OpenCV doesn't offer the neighbors parameter, as can be seen in its documentation here), the function's signature is as follows:

public float find_nearest(Mat samples, int k, Mat results, Mat neighborResponses, Mat dists)

As far as I know, I don't suppose the distances values, dists, are useful to reverse engineer into finding the actual neighbors' parameters.

Is there a certain way to obtain the neighbors original values, in Android, without using Android NDK - just using the java API?

Thank you in advance.

edit retag flag offensive close merge delete