Table of Contents
Image Align
Aligns a depth image to another image.
Library
MATLAB Command Line
Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:
qc_open_library('quarc_library/Image Processing/Generic')Description
The Image Align block aligns a depth image to another image. It is typically used to align a depth image to an RGB image from the same RGBD camera so that depth information can be determined for each pixel of the RGB image.
The Image Align blocks needs the camera intrinsics for the depth image and the other image, as well as the depth scale factor that scales the depth image pixels to meters. This information is optionally provided by the Video3D Capture block. The intrinsics and depth scale must be fed as inputs to the Image Align block and must be valid in the first sampling instant. Since these inputs are not expected to change during execution they are only read at model start.
The other requirement for the Image Align block is the extrinsics mapping the depth camera to the other camera i.e., the homogeneous transformation (comprised of a rotation matrix and translation vector) mapping one camera to the other. This information is provided by the Video3D Extrinsics block. Note that the Video3D Extrinsics block requires that both image streams (e.g. depth and RGB) be available from Video3D Capture blocks. Like the camera intrinsics and depth scale, the extrinsics input must be valid in the first sampling instant and is only read at model start.
Input Ports
dimg
The depth image which will be aligned. This input must be a grayscale HxW image. The standard image data types are supported. The depth information may be provided directly in meters, in which case the depth scale should be 1.0.
dint
A 3x3 matrix representing the depth camera intrinsics. The matrix must take the form:
fx |
0 |
ppx |
0 |
fy |
ppy |
0 |
0 |
1 |
where fx and fy are the focal lengths in pixels, and ppx and ppy are the coordinates of the principal point in pixels.
dscl
A scalar representing the scale factor that maps pixels in the depth image, dimg, to meters.
oimg
The other image to which the depth image will be aligned. This input may be a grayscale HxW image or an RGB HxWx3 image. The standard image data types are supported.
oint
A 3x3 matrix representing the other camera intrinsics. The matrix must take the form:
fx |
0 |
ppx |
0 |
fy |
ppy |
0 |
0 |
1 |
where fx and fy are the focal lengths in pixels, and ppx and ppy are the coordinates of the principal point in pixels.
ext
A 4x4 homogeneous transformation matrix representing the extrinsic mapping from the depth camera to the other camera. It must take the form:
R |
d |
0 |
1 |
where R is a 3x3 rotation matrix, and d is a 3x1 translation vector.
Output Ports
image
The aligned depth image. It will have the same data type as the depth image, dimg, and the same dimensions as the other image, oimg.
The output is compatible with The MathWorks'
MATLAB Command Line
Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:
doc vision;Data Type Support
The depth and other images may be any of the standard image data types compatible with The MathWorks'
MATLAB Command Line
Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:
doc vision;Parameters and Dialog Box
Direction
Whether the depth image is being aligned to the other image or vice versa. Aligning the other image to the depth image is not currently supported and so this parameter is disabled.
Targets
Target Name |
Compatible* |
Model Referencing |
Comments |
---|---|---|---|
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
Last fully supported in QUARC 2018. |
|
Rapid Simulation (RSIM) Target |
Yes |
Yes |
|
S-Function Target |
No |
N/A |
Old technology. Use model referencing instead. |
Normal simulation |
Yes |
Yes |
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.