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 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 depth map is stored in the DepthInM variable.