4.3.1.6. eqcorrscan.core.match_filter.normxcorr2

eqcorrscan.core.match_filter.normxcorr2(template, image)[source]

Thin wrapper on openCV match_template function. Base function to call the c++ correlation routine from the openCV image processing suite. Requires you to have installed the openCV python bindings.

Here we use the cv2.TM_CCOEFF_NORMED method within openCV to give the normalized cross-correlation. Documentation on this function can be found here: http://docs.opencv.org/modules/imgproc/doc/object_detection.html?highlight=matchtemplate#cv2.matchTemplate

Parameters:
  • template (numpy.ndarray) Template array
  • image (numpy.ndarray) image to scan the template through. The order of these matters, if you put the template after the image you will get a reversed correlation matrix
Returns:

New numpy.ndarray object of the correlation values for the correlation of the image with the template.