Documentation on the match shapes return result [closed]

asked 2017-04-03 09:36:21 -0600

enxdtw gravatar image

updated 2017-04-03 09:49:29 -0600

I have been looking through the OpenCV documentation and I cant find any mention of the cv::matchShapes return value. There seem to be three methods cv::CONTOURS_MATCH_I1, cv::CONTOURS_MATCH_I2, cv::CONTOURS_MATCH_I3. They are a sum of distances so I guess a perfect match is 0, however what is the possible value range? maybe its not possible to give this, but cv::CONTOURS_MATCH_I3 seems to scale the moments at least. In either case the documentation should give information on at least the fact that a perfect match has a result of zero.

The thing is, if you want to look for matches better than a certain score, which score can you choose? IMHO the scores should be normalised somehow eg. 0-100 or 0-1.

(It seems that log moments are better for matching purposes)

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by enxdtw
close date 2017-04-05 04:48:47.664896

Comments

source code is here

You can make an issue and a pull request to improve doc

LBerger gravatar imageLBerger ( 2017-04-03 09:51:32 -0600 )edit
1

Thanks for the link to the source. It seems to me that source code has some statements that really don't make sense, such as line 155 (the IF is redundant) and 156 (which doesn't sum the moments values), also the IF statement on line 167 is outside the loop so its also strange, I also don't get the logic. Anyway I asked a question on the github issues page.

enxdtw gravatar imageenxdtw ( 2017-04-04 03:41:27 -0600 )edit

Seems my OpenCV 3 book had an error for the equation and the source code is fine.

enxdtw gravatar imageenxdtw ( 2017-04-05 04:48:23 -0600 )edit