Template matching with zero mean normalized cross-correlation

asked 2019-08-12 08:01:54 -0500

I wonder how to compute zero mean normalized cross-correlation in opencv? According to this answer cv::matchTemplate with TM_COEFF_NORMED should do the trick. Answer states that

According to the documentation CV_TM_CCOEFF and CV_TM_CCOEFF_NORMED both subtract the mean from the window and the template

however I can not see that mean is subtracted in formula given in the documentation.

So is there any built-in way to compute zncc in opencv?

edit retag flag offensive close merge delete

Comments

_NORMED only means range normalized values in the case of the opencv cross correlation implementation. If I have a look at the formula for ZNCC I do not think this is available in OpenCV.

StevenPuttemans gravatar imageStevenPuttemans ( 2019-08-20 08:44:34 -0500 )edit