Reputation: 3
I am trying to implement code from here: http://docs.opencv.org/doc/tutorials/features2d/feature_flann_matcher/feature_flann_matcher.html#feature-flann-matcher
into an Android app. I've added nonfree modules which I complied according to this tutorial: http://web.guohuiwang.com/technical-notes/sift_surf_opencv_android
but I'm getting errors in:
for
( int i = 0; i < descriptors_object.rows; i++ )
{ if( matches[i].distance < 3*min_dist )
{ good_matches.push_back( matches[i]); }
}
Field 'distance' could not be resolved
Invalid arguments ' // for push_back
Any ideas how to fix it?
Upvotes: 0
Views: 219
Reputation: 18477
I have faced the similar problems with jni. I don't know why this happens but this seems to work.
DMatch match;
match = matches[i];
if( match.distance < 3*min_dist )
{ good_matches.push_back( match); }
This would work. I have been getting similar vector indexing errors.
Upvotes: 1