any alternative of corr2 in opencv to measure similarity of two images

asked 2018-07-03 07:19:44 -0600

Sanaullah gravatar image

i have used corr2 in matlab. it shows similarity in correlation coefficient between 1 to -1. i need a cross correlation function in java openCV through which image similarity can be measured.

edit retag flag offensive close merge delete

Comments

1

matchTemplate() with TM_CCOEFF_NORMED?

You have a tutorial in Java here: Template Matching.

Eduardo gravatar imageEduardo ( 2018-07-03 07:59:16 -0600 )edit

I hope template matching is working for your use case as its easy to use.

If not and u got some time and/or knowledge about dnn / cnn: You could also google for "triplet loss function" or "siamese networks" . These are neuronal networks explicitly trained to detect similarities between objects(faces for example).

holger gravatar imageholger ( 2018-07-03 13:25:46 -0600 )edit