gen_projective_mosaic
— Combine multiple images into a mosaic image.
gen_projective_mosaic(Images : MosaicImage : StartImage, MappingSource, MappingDest, HomMatrices2D, StackingOrder, TransformDomain : MosaicMatrices2D)
gen_projective_mosaic
combines the input images contained in
the object Images
into a mosaic image MosaicImage
.
The relative positions of the images are defined by
3x3 projective transformation matrices. The array
HomMatrices2D
contains a sequence of these linearized
matrices. The values in MappingSource
and
MappingDest
are the indices of the images that the
corresponding matrix applies to. MappingSource
=4
and MappingDest
=7 means that the matrix describes
the transformation of the image number 4 into the
projective plane of image 7. The transformation matrices
between the respective image pairs given by MappingSource
and MappingDest
are typically determined with
proj_match_points_ransac
.
As usual for operators that access image objects (e.g.,
select_obj
), the images are numbered starting from 1, i.e.,
MappingSource
, MappingDest
, StartImage
,
and StackingOrder
) must contain values between 1 and the
number of images passed in Images
.
The parameter StartImage
states which image defines the
image plane of the final image, that is, which input image remains
unchanged in the output image. This is usually an image that is
located near the center of the image mosaic.
The origin of MosaicImage
and its size are automatically
chosen so that all of the input images are completely visible.
The order in which the images are added to the mosaic is given by
the array StackingOrder
. The first index in this array
will end up at the bottom of the image stack while the last one will
be on top. If 'default' is given instead of an array of
integers, the canonical order (images in the order used in
Images
) will be used.
The parameter TransformDomain
can be used to determine
whether the domains of Images
are also transformed. Since
the transformation of the domains costs runtime, this parameter
should be used to specify whether this is desired or not. If
TransformDomain
is set to 'false' the domain of
the input images is ignored and the complete images are
transformed.
On output, the parameter MosaicMatrices2D
contains a set of
3x3 projective transformation matrices that describe
for each image in Images
the mapping of the image to its
position in the mosaic.
Images
(input_object) (multichannel-)image-array →
object (byte / uint2 / real)
Input images.
MosaicImage
(output_object) (multichannel-)image →
object (byte / uint2 / real)
Output image.
StartImage
(input_control) integer →
(integer)
Index of the central input image.
MappingSource
(input_control) integer-array →
(integer)
Indices of the source images of the transformations.
MappingDest
(input_control) integer-array →
(integer)
Indices of the target images of the transformations.
HomMatrices2D
(input_control) hom_mat2d-array →
(real)
Array of 3x3 projective transformation matrices.
StackingOrder
(input_control) string(-array) →
(string / integer)
Stacking order of the images in the mosaic.
Default value: 'default'
Suggested values: 'default'
TransformDomain
(input_control) string →
(string)
Should the domains of the input images also be transformed?
Default value: 'false'
List of values: 'false' , 'true'
MosaicMatrices2D
(output_control) hom_mat2d-array →
(real)
Array of 3x3 projective transformation matrices that determine the position of the images in the mosaic.
gen_empty_obj (Images) for J := 1 to 6 by 1 read_image (Image, 'mosaic/pcb_'+J$'02') concat_obj (Images, Image, Images) endfor From := [1,2,3,4,5] To := [2,3,4,5,6] Num := |From| ProjMatrices := [] for J := 0 to Num-1 by 1 F := From[J] T := To[J] select_obj (Images, ImageF, F) select_obj (Images, ImageT, T) points_foerstner (ImageF, 1, 2, 3, 200, 0.3, 'gauss', 'false', \ RowJunctionsF, ColJunctionsF, CoRRJunctionsF, \ CoRCJunctionsF, CoCCJunctionsF, RowAreaF, \ ColAreaF, CoRRAreaF, CoRCAreaF, CoCCAreaF) points_foerstner (ImageT, 1, 2, 3, 200, 0.3, 'gauss', 'false', \ RowJunctionsT, ColJunctionsT, CoRRJunctionsT, \ CoRCJunctionsT, CoCCJunctionsT, RowAreaT, \ ColAreaT, CoRRAreaT, CoRCAreaT, CoCCAreaT) proj_match_points_ransac (ImageF, ImageT, RowJunctionsF, \ ColJunctionsF, RowJunctionsT, \ ColJunctionsT, 'ncc', 21, 0, 0, 480, 640, \ 0, 0.5, 'gold_standard', 1, 4364537, \ ProjMatrix, Points1, Points2) ProjMatrices := [ProjMatrices,ProjMatrix] endfor gen_projective_mosaic (Images, MosaicImage, 2, From, To, ProjMatrices, \ 'default', 'false', MosaicMatrices2D)
proj_match_points_ransac
,
proj_match_points_ransac_guided
,
vector_to_proj_hom_mat2d
,
hom_vector_to_proj_hom_mat2d
projective_trans_image
,
projective_trans_image_size
,
projective_trans_region
,
projective_trans_contour_xld
,
projective_trans_point_2d
,
projective_trans_pixel
Richard Hartley, Andrew Zisserman: “Multiple View Geometry in
Computer Vision”; Cambridge University Press, Cambridge; 2000.
Olivier Faugeras, Quang-Tuan Luong: “The Geometry of Multiple
Images: The Laws That Govern the Formation of Multiple Images of a
Scene and Some of Their Applications”; MIT Press, Cambridge, MA;
2001.
Matching