Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cross Correlation of two arrays in OpenCV

Is there a way to calculate the normalized cross correlation of two arrays in OpenCV (C++)? http://local.wasp.uwa.edu.au/~pbourke/miscellaneous/correlate/

I have a CvMat and I want to get a correlation matrix of all the cols. I saw cvCalcCovarMatrix but I can't see a way to normalize it to get the correlation.

like image 755
pablo Avatar asked Dec 29 '22 03:12

pablo


1 Answers

You should use cvMatchTemplate() with method=CV_TM_CCORR_NORMED.

like image 140
Adi Shavit Avatar answered Jan 06 '23 17:01

Adi Shavit