MATCH_LINEAR(3)

NAME
im_match_linear_search, im_match_linear - resample to make a match

SYNOPSIS
#include <vips/vips.h> int
im_match_linear( IMAGE *ref, IMAGE *sec, IMAGE *out,
   int xr1, int yr1, int xs1, int ys1,
   int xr2, int yr2, int xs2, int ys2 ) int
im_match_linear_search( IMAGE *ref, IMAGE *sec, IMAGE *out,
   int xr1, int yr1, int xs1, int ys1,
   int xr2, int yr2, int xs2, int ys2,
   int hwindowsize, int hsearchsize )

DESCRIPTION
im_match_linear_search() attempts to transform sec to make it match ref. The transformation is linear, that is, it only involves scale, rotate and translate. im_match_linear_search() requires a pair of tie points to fix the parameters of its transformation. You should pick points as far apart as possible to increase accuracy. im_match_linear_search() will search the area in the image around each tie point for a good fit, so your selection of points need not be exact. WARNING! This searching process will fail for rotations of more than about 10 degrees or for scales of more than about 10 percent. The best you can hope for is < 1 pixel error, since the command does not attempt sub-pixel correlation. hwindowsize and hsearchsize set the size of the area to be searched: we recommend values of 5 and 14. The output image is positioned and clipped so that you can immediately subtract it from orig to obtain pixel difference images. im_match_linear() works exactly as im_match_linear_search(), but does not attempt to correlate to correct your tie points. It can thus be used for any angle and any scale, but you must be far more careful in your selection.

SEE ALSO
im_lrmosaic().

AUTHORS
J.Ph.Laurent - 12/12/92
J.Cupitt - 22/02/93