---
name: "im_correl"
section: "3"
platform: "linux"
package: "libvips-dev"
version: "7.20.7-1+b3"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/im_correl"
---

# im\_correl(3)

search for image match

## NAME

im\_correl - search for image match

## SYNOPSIS

\#include \<vips/vips.h\>

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 )

## DESCRIPTION

im\_correl() is the base image-searching function used by the mosaicing functions im\_lrmosaic() and im\_tbmosaic(), and by the matching funtions im\_match\_linear() and im\_match\_linear\_search().

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().

## SEE ALSO

[im\_fastcor(3)](/im_fastcor/3.md), [im\_spcor(3)](/im_spcor/3.md), [im\_maxpos(3)](/im_maxpos/3.md), [im\_match\_linear(3)](/im_match_linear/3.md), [im\_lrmosaic(3)](/im_lrmosaic/3.md).

## AUTHOR

J.Cupitt - 22/02/93

## COPYRIGHT

The National Gallery and Birkbeck College, 1989-1996.
