int im_fastcor(in, ref, out)
IMAGE *in, *ref, *out;
int im_spcor(in, ref, out)
IMAGE *in, *ref, *out;
The output image is the same size as the input. The edge pixels are calculated by expanding the input image using im_embed(3) in mode 1 (replicating edge pixels) just enough so that the output can match the input.
im_spcor(3) 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(3) simply returns the sum of squares of differences between in and ref. This is much faster, but less useful. The resultant coefficients are written as unsigned int numbers in out which has a size of in.