im_match_linear_search3
Resample to make a match
Usage
int
int xr1,
int
yr1,
int
xs1,
int
ys1,
int xr2,
int
yr2,
int
xs2,
int
ys2
)
int
int xr1,
int
yr1,
int
xs1,
int
ys1,
int xr2,
int
yr2,
int
xs2,
int
ys2,
Overview
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.