HALCON: Obtain Textured Point Cloud

This topic introduces how to obtain the textured point cloud in Windows using the HALCON sample programs provided by Mech-Mind.

Data Types

This sample program obtains the data in the Range and Intensity channels. The data in these channels are described below.

  • Range: a 2D image containing the X, Y and Z values of points. This channel cannot be disabled.

  • Intensity: The color or monochrome 2D image used to texture the point cloud.

The pixels of the images in the two channels are perfectly aligned and can be used to generate textured point cloud directly.

Attention

When you set capture regions for the images in the two channels (the Width, Height, OffsetX and OffsetY parameters), if the parameter values are not identical, the pixels of the two images will not be aligned, and the images cannot be used to generate textured point cloud directly.

Obtain Textured Point Cloud

Please follow these steps to obtain the textured point cloud.

  1. Download the obtain_textured_point_cloud sample program <https://github.com/MechMindRobotics/mecheye_halcon_samples>`_: select Code ‣ Download as ZIP.

  2. Open the sample program in HDevelop: Open HDevelop, and drag the sample program into HDevelop.

  3. Select the line containing the info_framegrabber operator in Program Windows, and click step_over in the toolbar or press the F6 key to run this line.

  4. In the Control Variables area, double-click DeviceInfos to display a list of all the available cameras.

    ../../_images/camera_information_1.png
  5. In the list, double-click the camera that you want to connect, and copy the camera name after unique_name: or user_name:.

    ../../_images/camera_information_3.png
  6. Locate the following line, and replace MechEye with the copied unique_name or user_name.

    DeviceInfo := 'MechEye'
    
  7. Run the sample program by clicking run or pressing the F5 key. The obtained textured point cloud will be displayed in HDevelop and saved to the ObjectModel3D variable.

Note

For LSR (V4) and DEEP (V4) series, the color 2D image is obtained for texturing the point cloud by default. If you want to use the monochrome 2D image instead, please locate the following line and activate (uncomment) it.

set_framegrabber_param (AcqHandle, 'SourceSelector', 'Monochrome')