Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

sure there is, look at the docs:

Mat result; // k result ids 
Mat responses; // raw responses
Mat distances; // 1/distance ~ confidence

knn->findNearest(sample, k, result, responses, distances);