int
im_correl( IMAGE *ref, IMAGE *sec,
int xref, int yref, int xsec, int ysec,
int hwindowsize, int hsearchsize,
double *correlation, int *x, int *y )
It finds the position of the secondary image sec within ref. It searches the area around xsec , ysec for the best match for the area around xref , yref. It searches an area of size hsearchsize for a match of size hwindowsize. The position of the best match is returned, together with the correlation at that point.
Only the first band of each image is correlated. ref and sec may be very large --- the function extracts and generated just the parts needed. Correlation is done with im_spcor(); the position of the maximum is found with im_maxpos().