Ask Your Question
4

Indexing hazard in OpenCV tutorial

asked 2013-03-15 10:59:03 -0500

godricly gravatar image

Hi ALL, I find a indexing problem in the tuitoral "Feature Matching with FLANN"Link is here

at the step //-- Quick calculation of max and min distances between keypoints

for( int i = 0; i < descriptors_1.rows; i++ )
 { if( matches[i].distance < 2*min_dist )
    { good_matches.push_back( matches[i]); }     
 }

the author uses the size of keypoints in the loop while indexing matching vector. This approach is not safe.

I changed the FLANN into BFmatcher,and the size of keypoints and match are different.

I don't know where to report this issue and the homepage of OpenCV leads me here. Any suggestion is appreciated.

Best

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-03-15 11:24:15 -0500

berak gravatar image

nice catch!

http://code.opencv.org/projects/opencv/issues

(needs yet another signup, but you'll do it for the community)

edit flag offensive delete link more

Comments

2

BTW, could you fix this bug and contribute a pull request to OpenCV (contribution process described here: http://code.opencv.org/projects/opencv/wiki/How_to_contribute)?

Daniil Osokin gravatar imageDaniil Osokin ( 2013-03-15 12:49:49 -0500 )edit

code in samples/cpp/tutorial_code/features2D/SURF_FlannMatcher.cpp is also affected ( literal copy)

berak gravatar imageberak ( 2013-03-15 15:20:31 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-03-15 10:59:03 -0500

Seen: 84 times

Last updated: Mar 15 '13