I am using the Knn findNearest function in OpenCV, which takes in the following parameters:
Mat response;
Mat dist;
knn->findNearest(testFeature, K, noArray(), response, dist);
The output returned from response and dist is of type OutputArray.
How do I access the results of response and dist in this format? Ideally I would like to convert to Mat int.