Correlation Searching
RSI Search determines the degree to which features in a run-time image are similar to the features in a training image by computing the correlation coefficient of the two sets of pixel values. The correlation coefficient is expressed as a number between -1.0 and 1.0. A correlation coefficient of 1.0 means that the pixel values in the two images are perfectly matched. A correlation coefficient of -1.0 means that the pixel values in the two images are perfectly mismatched. A correlation coefficient of 0 means that pixel values in the two images are randomly different.
The figure below shows three sets of image pairs, one pair with a positive correlation (a), one pair with a negative correlation (b), and one pair with an insignificant correlation (c).
Image pairs showing different correlation coefficients
Mathematically, the correlation coefficient r of a model and a corresponding portion of an image at image offset (u,v) is given by
where
N is the total number of pixels.
Ii is the value of the image pixel at (u+xi, v+yi).
Mi is the value of the corresponding model pixel at the relative offset (xi, yi).
The value of r is always in the range ‑1.0 to 1.0, inclusive. A value of 1.0 signifies a perfect match between the area of the image and the model. Specifically, if r = 1.0, there exist some values a and b such that for all i: