int im_fastcor(in, ref, out)
IMAGE *in, *ref, *out;
int im_spcor(in, ref, out)
IMAGE *in, *ref, *out;
im_spcor() calculates the spatial correlation between in and ref using the correlation coefficient from Niblack "An Introduction to Digital Image Processing,", Prentice/Hall, pp 138. The resultant coefficients are written as float numbers in out. The images must be char, short or ushort.
im_fastcor() calculates the spatial correlation between in and ref. The correlation is calculated by overlapping the ref on the top left corner of in and moving it all over in, pixel by pixel. The correlation is calculated by taking absolute differences pixel by pixel without calculating the correlation coefficient. The resultant coefficients are written as unsigned int numbers in out which has a size of in.