How can I get the actual neighbours using knn in opencv 3.0.0

asked 2016-01-19 06:20:42 -0600

Elid gravatar image

I'm trying to adapt code using opencv 2.4.6 to use opencv 3.0.0. In 2.4.6 I could use : find_nearest(const Mat& samples, int k, Mat* results=0, const float* neighbors=0, Mat neighborResponses=0, Mat* dist=0 ) const to get the neighbors. How can I do it using opencv 3.0.0

edit retag flag offensive close merge delete



Seriously, in the future, start with a decent look in the docs for 3.1.

StevenPuttemans gravatar imageStevenPuttemans ( 2016-01-19 06:47:01 -0600 )edit

neighborResponses is not the same as neighbors

Elid gravatar imageElid ( 2016-01-20 04:10:37 -0600 )edit