Method
VipsImagemosaic
Declaration [src]
int
vips_mosaic (
VipsImage* ref,
VipsImage* sec,
VipsImage** out,
VipsDirection direction,
int xref,
int yref,
int xsec,
int ysec,
...
)
Description [src]
Optional arguments:
bandno
: %gint, band to search for featureshwindow
: %gint, half window sizeharea
: %gint, half search sizemblend
: %gint, maximum blend sizedx0
: %gint, output, detected displacementdy0
: %gint, output, detected displacementscale1
: %gdouble, output, detected first order scaleangle1
: %gdouble, output, detected first order rotationdx1
: %gdouble, output, detected first order displacementdy1
: %gdouble, output, detected first order displacement
This operation joins two images left-right (with ref
on the left) or
top-bottom (with ref
above) given an approximate overlap.
sec
is positioned so that the pixel (xsec
, ysec
) in sec
lies on top of
the pixel (xref
, yref
) in ref
. The overlap area is divided into three
sections, 20 high-contrast points in band bandno
of image ref
are found
in each, and a window of pixels of size hwindow
around each high-contrast
point is searched for in sec
over an area of harea
.
A linear model is fitted to the 60 tie-points, points a long way from the fit are discarded, and the model refitted until either too few points remain or the model reaches good agreement.
The detected displacement is used with vips_merge()
to join the two images together.
You can read out the detected transform with dx0
, dy0
, scale1
, angle1
,
dx1
, dy1
.
See also: vips_merge(), vips_insert().
This method is not directly available to language bindings.
Parameters
sec
-
Type:
VipsImage
Secondary image.
The data is owned by the caller of the method. out
-
Type:
VipsImage
Output image.
The argument will be set by the function. The caller of the method takes ownership of the returned data, and is responsible for freeing it. direction
-
Type:
VipsDirection
Horizontal or vertical join.
xref
-
Type:
int
Position in reference image.
yref
-
Type:
int
Position in reference image.
xsec
-
Type:
int
Position in secondary image.
ysec
-
Type:
int
Position in secondary image.
...
-
Type:
NULL
-terminated list of optional named arguments.