Skip to content

Depth Map to Point Cloud

Operator Function

Convert the input 2D depth map to a point cloud.

Original Depth MapDepth Map to Point Cloud Result

Parameter Introduction

Input Parameters

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

Calculation Parameters

ParameterRangeDefault ValueDescriptionIllustration
AlgorithmProcess Integer Type Images, Process Integer or Float Type ImagesProcess Integer Type Images: Input image pixel data type is unsigned integer
Process Integer or Float Type Images: Input image pixel data type is float or double
Z Value when Pixel is Black0.000The height value corresponding to grayscale value 2 in the input imageDepth to Point Cloud_Z Value Conversion Method
Z Value when Pixel is White0.000The height value corresponding to grayscale value 2n2 in the input image, where n is the image bit depth.Depth to Point Cloud_Z Value Conversion Method
X-axis Resolution1.000Set the point spacing in X direction
Y-axis Resolution1.000Set the point spacing in Y direction
Z-axis Resolution1.000Set the point spacing in Z direction.
Note: Only displayed when using Process Integer or Float Type Images.
X Offset0.000Set the offset in X direction to shift the point cloud in X direction
Y Offset0.000Set the offset in Y direction to shift the point cloud in Y direction
Z Offset0.000Set the offset in Z direction to shift the point cloud in Z direction.
Note: Only displayed when using Process Integer or Float Type Images.
Output Image0-80The IM number for image output

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

Mapping Relationship Between Depth Value and Height Value

Depth ValueHeight Value
0Invalid point (nan)
2Z Value when Pixel is Black
2n2 n is bit depthZ Value when Pixel is White
1Invalid point (nan)
2n1 n is bit depthInvalid point (nan)

Exception Troubleshooting

No.Exception InformationCorresponding ParameterSolution
1Input image is emptyCheck if input image is empty
2Resolution cannot be 0Modify resolution value to be greater than 0
3Unsupported image type. Only 8-bit or 16-bit images supportedIn linear conversion range mode, only 8-bit, 16-bit images are supported
4Unsupported image channel countIn linear conversion range mode, only single-channel, 3-channel, 4-channel images of 8-bit, 16-bit are supported
5Z Value when Pixel is Black and Z Value when Pixel is White cannot be the sameModify the two values to be different
6Unsupported floating-point image typeIn custom resolution mode, only single-channel, 3-channel, 4-channel images of 8-bit, 16-bit are supported
7Input value {0} is invalid z value conversion methodz value conversion methodOnly Integer type images, Integer or Float type images are supported

Example Introduction

Engineering Design

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

  2. Select two Depth Map to Point Cloud tools and set different z value conversion methods.

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. Set the parameters.

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

  4. 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