Easy3DObjectExtract

Support

Required licenses

Easy3DObject

Recommended images

The images from the folder Sample Images/3D/Easy3DObject

Location

3D Processing/Easy3DObjectExtract

Purpose

This sample program demonstrates how to:

  • Load an ZMap image.

  • Set the X, Y and Z resolutions.

  • Display the corresponding point cloud and the extracted 3D objects.

Code highlights

  1. Create a ZMap from the given image file.

    Zmap.LoadImage(fileName);
    
  2. Set the resolution of the ZMap along the X, Y and Z axis.

    Zmap.SetResolution(rx, ry, rz);
    
  3. Convert the ZMap to a point cloud.

    EPointCloud pc;
    EZMapToPointCloudConverter converter;
    converter.Convert(Zmap, pc);
    
  4. Process the ZMap and extracts a list of 3D objects.

    E3DObjectExtractor extractor;
    extractor.Extract(Zmap);
    
  5. Set how the E3DObjectFeature of all the registered E3DObjects should be rendered.

    viewer.SetFeatureStyleForAll3DObjects(renderStyle);
    
  6. Set the E3DObjectFeature of all the registered E3DObjects to be rendered or hidden.

    viewer.ShowFeatureForAll3DObjects(objectFeature);
    viewer.HideFeatureForAll3DObjects(objectFeature);