Start of trail Image Compare navigation bar

Table of Contents

Image Align

Aligns a depth image to another image.

Library

QUARC Targets/Image Processing/Generic

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

Image Align

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'

Computer Vision System Toolbox

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'

Computer Vision System Toolbox

MATLAB Command Line

Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:

doc vision;
, namely uint8, uint16, uint32, single or double.

Parameters and Dialog Box

Image Align

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

QUARC Win32 Target

Yes

Yes

QUARC Win64 Target

Yes

Yes

QUARC Linux Nvidia Target

Yes

Yes

QUARC Linux QBot Platform Target

Yes

Yes

QUARC Linux QCar 2 Target

Yes

Yes

QUARC Linux QDrone 2 Target

Yes

Yes

QUARC Linux Raspberry Pi 3 Target

Yes

Yes

QUARC Linux Raspberry Pi 4 Target

Yes

Yes

QUARC Linux RT ARMv7 Target

Yes

Yes

QUARC Linux x64 Target

Yes

Yes

QUARC Linux DuoVero Target

Yes

Yes

QUARC Linux DuoVero 2016 Target

Yes

Yes

QUARC Linux Verdex Target

Yes

Yes

QUARC QNX x86 Target

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

* Compatible means that the block can be compiled for the target.

 

navigation bar