gen_cube_map_mosaic — 创建球形拼接的 6 个立方体映射图像。
gen_cube_map_mosaic(Images : Front, Rear, Left, Right, Top, Bottom : CameraMatrices, RotationMatrices, CubeMapDimension, StackingOrder, Interpolation : )
gen_cube_map_mosaic creates 6 cube map images of a spherical
mosaic Front, Left, Rear, Right,
Top 和 Bottom from the input images passed in
Images. The pose of the images in space, which is used to
compute the position of the images with respect to the surface of
the sphere, can be determined with
stationary_camera_self_calibration。The camera and rotation
matrices computed with stationary_camera_self_calibration
can be used in CameraMatrices 和 RotationMatrices. A spherical mosaic can only be created
from images that were taken with a stationary camera (see
stationary_camera_self_calibration)。
The width and height of the output cube map images can be selected by
setting the parameter CubeMapDimension. The value represents
the width and height in pixels.
The mode in which the images are added to the mosaic is given by
StackingOrder. For StackingOrder =
'voronoi', the points in the mosaic image are determined
from the Voronoi cell of the respective input image. This means
that the gray values are taken from the points of the input image to
whose center the pixel in the mosaic image has the smallest distance
on the sphere. This mode has the advantage that vignetting and
uncorrected radial distortions are less noticeable in the mosaic
image because they typically are symmetric with respect to the image
center. Alternatively, with the choice of parameters described
in the following, a mode can be selected that has the same
effect as if the images were painted successively into the mosaic
image. Here, the order in which the images are added to the mosaic
image is important. Therefore, an array of integer values can be
passed in 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. Hence, if neither 'voronoi'
nor 'default' are used, StackingOrder must contain
a permutation of the numbers 1,...,n, where n is the number of
images passed in Images. It should be noted that the mode
'voronoi' cannot always be used. For example, at least
two images must be passed to use this mode. Furthermore, for very
special configurations of the positions of the image centers on the
sphere, the Voronoi cells cannot be determined uniquely. With
StackingOrder = 'blend', an additional mode is
available, which blends the images of the mosaic smoothly. This way seams
between the images become less apparent. The seam lines between the images
are the same as in 'voronoi'. This mode leads to visually more
appealing images, but requires significantly more resources. If the
mode 'voronoi' or 'blend' cannot be used for whatever
reason the mode is switched internally to 'default' automatically.
The parameter Interpolation selects the desired interpolation mode
for creating the cube maps. 'bilinear' 和
'bicubic'
interpolation is available for all modes of StackingOrder.
'nearest_neighbor' is only available if StackingOrder is
set to 'default' or 'voronoi'.
Images (输入对象) (multichannel-)image-array → object (byte / uint2 / real)
输入图像。
Front (输出对象) (multichannel-)image → object (byte / uint2 / real)
Front cube map.
Rear (输出对象) (multichannel-)image → object (byte / uint2 / real)
Rear cube map.
Left (输出对象) (multichannel-)image → object (byte / uint2 / real)
Left cube map.
Right (输出对象) (multichannel-)image → object (byte / uint2 / real)
Right cube map.
Top (输出对象) (multichannel-)image → object (byte / uint2 / real)
Top cube map.
Bottom (输出对象) (multichannel-)image → object (byte / uint2 / real)
Bottom cube map.
CameraMatrices (输入控制) hom_mat2d-array → (real)
(Array of) 3x3 projective camera matrices that determine the internal camera parameters.
RotationMatrices (输入控制) hom_mat2d-array → (real)
Array of 3x3 transformation matrices that determine rotation of the camera in the respective image.
CubeMapDimension (输入控制) number → (integer)
Width and height of the resulting cube maps.
默认值: 1000
限制:
CubeMapDimension >= 0
StackingOrder (输入控制) string(-array) → (string / integer)
Mode of adding the images to the mosaic image.
默认值: 'voronoi'
建议值: 'blend', 'voronoi', 'default'
Interpolation (输入控制) string → (string)
Mode of image interpolation.
默认值: 'bilinear'
建议值: 'nearest_neighbor', 'bilinear', 'bicubic'
* For the input data to stationary_camera_self_calibration, please
* refer to the example for stationary_camera_self_calibration.
stationary_camera_self_calibration (4, 640, 480, 1, From, To, \
HomMatrices2D, Rows1, Cols1, \
Rows2, Cols2, NumMatches, \
'gold_standard', \
['focus','principal_point'], \
'true', CameraMatrix, Kappa, \
RotationMatrices, X, Y, Z, Error)
gen_cube_map_mosaic (Images, Front, Left, Rear, Right, Top, Bottom, \
CameraMatrix, RotationMatrices, 1000, 'default', \
'bicubic')
* Alternatively, if kappa should be determined, the following calls
* can be made:
stationary_camera_self_calibration (4, 640, 480, 1, From, To, \
HomMatrices2D, Rows1, Cols1, \
Rows2, Cols2, NumMatches, \
'gold_standard', \
['focus','principal_point','kappa'], \
'true', CameraMatrix, Kappa, \
RotationMatrices, X, Y, Z, Error)
cam_mat_to_cam_par (CameraMatrix, Kappa, 640, 480, CamParam)
change_radial_distortion_cam_par ('fixed', CamParam, 0, CamParOut)
gen_radial_distortion_map (Map, CamParam, CamParOut, 'bilinear')
map_image (Images, Map, ImagesRect)
gen_cube_map_mosaic (Images, Front, Left, Rear, Right, Top, Bottom, \
CameraMatrix, RotationMatrices, 1000, 'default', \
'bicubic')
如果参数有效,算子
gen_cube_map_mosaic 返回值 2 (H_MSG_TRUE)。如有必要,则抛出异常。
stationary_camera_self_calibration
gen_spherical_mosaic,
gen_projective_mosaic
Lourdes Agapito, E. Hayman, I. Reid: “Self-Calibration of Rotating
and Zooming Cameras”; International Journal of Computer Vision;
vol. 45, no. 2; pp. 107--127; 2001.
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.
匹配