Class CorrCoeffMatcher

java.lang.Object
imagingbook.common.image.matching.CorrCoeffMatcher

public class CorrCoeffMatcher extends Object

Instances of this class perform matching on scalar-valued images based on the correlation coefficient. The "search" image I (to be searched for matches of the "reference" image R) is initially associated with the CorrCoeffMatcher. The assumption is, that the search image I is fixed and the matcher tries to match multiple reference images R. See Sec. 23.1.1 (Alg. 23.1) of [1] for additional details.

[1] W. Burger, M.J. Burge, Digital Image Processing – An Algorithmic Introduction, 3rd ed, Springer (2022).

Version:
2022/09/16
  • Constructor Details

    • CorrCoeffMatcher

      Constructor, accepts an ImageProcessor instance. Color images are converted to grayscale.
      Parameters:
      I - the search image (to be matched to)
    • CorrCoeffMatcher

      public CorrCoeffMatcher(float[][] fI)
      Constructor, accepts a 2D float array.
      Parameters:
      fI - the search image (to be matched to)
  • Method Details

    • getMatch

      public float[][] getMatch(ImageProcessor R)
      Matches the specified reference image R to the (fixed) search image I. Resulting score values are in [-1, 1], the score for the optimal match is +1. The returned score matrix has the size of the search image I reduced by the size of the reference image R.
      Parameters:
      R - a scalar-valued reference image
      Returns:
      a 2D array Q[r][s] of match scores in [-1,1]
    • getMatch

      public float[][] getMatch(float[][] fR)
      Matches the specified reference image R to the (fixed) search image I. Resulting score values are in [-1, 1], the score for the optimal match is +1. The returned score matrix has the size of the search image I reduced by the size of the reference image R.
      Parameters:
      fR - a scalar-valued reference image
      Returns:
      a 2D array Q[r][s] of match scores in [-1,1]