HALCON: Obtain Depth Values Only

This topic introduces how to obtain the depth map that contains only the object depth information in Windows using the HALCON sample programs provided by Mech-Mind. Obtaining only the depth information can speed up the data transmission and improve efficiency.

Obtain Depth Map

Please follow these steps to obtain the depth map:

  1. Download the obtain_depth_map sample program: select Code  Download 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.

    camera information 1
  5. In the list, double-click the camera that you want to connect, and copy the camera name after unique_name: or user_name:.

    camera information 3
    user_name is the custom camera name. You can customize the camera name in Mech-Eye Viewer.
  6. Locate the following line, and replace MechEye with the copied unique_name or user_name.

    DeviceInfo := 'MechEye'
  7. The obtained depth map is stored in the DepthInM variable.