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]
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.
::: tip “Optional arguments”
* bandno: gint, band to search for features
* hwindow: gint, half window size
* harea: gint, half search size
* mblend: gint, maximum blend size
* dx0: gint, output, detected displacement
* dy0: gint, output, detected displacement
* scale1: gdouble, output, detected first order scale
* angle1: gdouble, output, detected first order rotation
* dx1: gdouble, output, detected first order displacement
* dy1: gdouble, output, detected first order displacement
::: seealso
vips_merge(), vips_insert().
Parameters
sec |
VipsImage |
Secondary image. |
|
| The data is owned by the caller of the function. | |
out |
VipsImage |
Output image. |
|
| The argument will be set by the function. | |
| The instance takes ownership of the data, and is responsible for freeing it. | |
direction |
VipsDirection |
Horizontal or vertical join. |
|
xref |
int |
Position in reference image. |
|
yref |
int |
Position in reference image. |
|
xsec |
int |
Position in secondary image. |
|
ysec |
int |
Position in secondary image. |
|
... |
none |
|