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 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: 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 of the correlation values for the correlation of the image with the template.

Return type:

numpy.ndarray