What returns CvMatchShapes?

I have these two images.

small size

AND... larger size

I made them graysclae images and then transferred two images to cvMatchImages so

 Double someValue = cvMatchShapes(grayImage, grayImage2, CV_CONTOURS_MATCH_I2, 0); System.out.println(someValue); 

The value that was printed by sysout was 1.465496453484283. What is this meaning? How can I use it to match other images, and also how can I refuse those that donโ€™t?

+4
source share
1 answer

value means how different are both objects, it represents the distance between two moments between two figures. the smaller, the more similar the two objects. The threshold can be used to perform this correspondence: if the output value is less than the threshold value, two objects are the same or both objects are different. As for the choice of the threshold, it depends. You can use some examples to learn the threshold. I highly recommend that you normalize objects in images with the same size. This will give you better accuracy.

+2
source

Source: https://habr.com/ru/post/1402958/


All Articles