Skip to content

Point Cloud to Depth Map

Operator Function

Convert the input 3D point cloud image into a 2D depth map. Map the z-value of each point to the grayscale value in the 2D depth map.

Parameter Introduction

Input Parameters

ParameterRangeDefault ValueDescriptionIllustration
Input Image0-80The IM number for image input

Calculation Parameters

ParameterRangeDefault ValueDescriptionIllustration
Output Depth Map TypeGrayscale Image/Floating Point ImageGrayscale ImageGrayscale Image: Each pixel value corresponds to the normalized grayscale value of height
Floating Point Image: Each pixel value corresponds to the actual height value
Auto Detect Windowtrue/falsetrueIf selected, automatically calculate the point cloud range to be converted, which is the bounding box range of the point cloud image; if deselected, the Region option appears for manually setting the conversion area.
RegionOnly effective when Auto Detect Window is deselected, requires manual setting of the conversion region.
InterpolationNoneNoneInterpolation methods not currently provided
Precision8-bit/16-bit8-bitChoose 8-bit or 16-bit. 8-bit grayscale range is [0, 255], 16-bit grayscale range is [0, 65535].
Auto Detect Z-value Rangetrue/falsetrueIf selected, automatically correspond the maximum height value in the current conversion region to black pixels, and the minimum height value to white pixels.
Height Value Corresponding to Black Pixel0.000Required when Auto Detect Z-value Range is deselected.
Height Value Corresponding to White Pixel0.000Required when Auto Detect Z-value Range is deselected.
Auto Detectiontrue/falsetrueWhen enabled, the input point cloud must be an ordered point cloud, and the X Resolution and Y Resolution of the point cloud will be calculated based on the row and column count of the ordered point cloud.
X Resolution0.100Set the width of a single pixel in the converted depth map. The point spacing should be set as close as possible to the precision of the depth map camera's z-axis direction. Too small will cause many stripes in the image, too large will blur the image.
Note: Requires manual setting when Auto Detection is turned off.
Y Resolution0.100Set the height of a single pixel in the converted depth map. The resolution should be set as close as possible to the point spacing set when the point cloud image was captured by the camera. Too small will cause many stripes in the image, too large will blur the image.
Note: Requires manual setting when Auto Detection is turned off.
Output Image0-80The IM number for image output

Note: In manual mode, setting the resolution too small will cause black stripes in the output depth image, as shown below. Solution: adjust the resolution to be slightly larger than the actual point spacing. Point Cloud to Depth_Black Stripes when Resolution is Too Small

Result Display

ParameterRangeDefault ValueDescriptionIllustration
ROI Point SetOnly effective when Auto Detect Window is deselected, displays the point set in the ROI-selected area if enabled

Output Parameters

NameTypeRangeDescription
Resultbooltrue/falsetrue for success
false for failure
Warningbooltrue/falsetrue indicates a warning
false indicates none
MessagestringOutput success, error, or warning messages. Empty if no error or warning
TimefloatOperator execution time, unit: ms
offset_xfloatX-axis offset
offset_yfloatY-axis offset
resolution_xfloatX-axis resolution
resolution_yfloatY-axis resolution

Mapping Relationship Between Height Value and Depth Value

Height ValueDepth Value
Invalid point (nan)0
Height Value Corresponding to Black Pixel2
Height Value Corresponding to White Pixel2n2 n is bit depth
Greater than Height Value Corresponding to Black Pixel1
Less than Height Value Corresponding to White Pixel2n1 n is bit depth

Exception Troubleshooting

No.Exception InformationCorresponding ParameterSolution
1Input point cloud is emptyCheck if input point cloud is empty
2Auto detection resolution mode requires ordered point cloud inputAuto detection resolution mode requires ordered point cloud input
3Input value {0} is invalid output depth map typeOutput Depth Map TypeOnly supports grayscale image, floating image
4Point cloud to depth map conversion failedCheck if both xy resolutions are greater than 0

Example Introduction

Engineering Design

  1. Select the Load Point Cloud tool to load the required 3D point cloud image into IM0.

  2. Select the Point Cloud to Depth Map tool.

Tool Usage

  1. Select the input image for operation. The image number must match the IM number where the image is located in the project.

  2. Select Auto Detect Window.

  3. Set the parameters.

  4. Check the desired display content in the Result Display section.

  5. Click Test to check if the image window and parameters meet expectations.

  6. If everything is correct, click Save, then run the operator in the run list. You can view the results in the corresponding IM.

Local image

AI-Vision, Making 3D Measurement Easier