correlation_function

correlation_function#

scarlet2.measure.correlation_function(img, maxlength=2, threshold=0)[source]#

Computes the 2D correlation function of the image.

Parameters:
  • img (numpy.ndarray) – Image array, 2D or 3D. Masked pixels must be set to 0 in img.

  • maxlength (int) – Maximum length of the correlation function

  • threshold (float) – Minimum correlation coefficient to maintain

Return type:

dict, with keys (dy,dx) specifying the 2D offset in image pixels