You're reading the documentation for a development version. For the latest released version, please have a look at master.

Scene Crop Node

Overview

The Scene Crop Node uses segmentation results to crop a Point Cloud and output a vector of clouds corresponding to each segment.

../../_images/scene_crop_overview_1.png ../../_images/scene_crop_overview_2.png ../../_images/scene_crop_overview_3.png

Input and Output

Input

Type

Description

Segment Results

vector<Segm>

Segmentation result of objects. Usually from DL Segment, Segmentation node.

Scene Cloud

pointCloud

The scene point cloud to be cropped. Usually from Camera, Cloud Process node.

Use Surface Centroid

bool

Whether to compute the centroid of the segmented point cloud when computing segmentPoses.

Output

Type

Description

segmentClouds

SVecCloud

A vector of point cloud, representing the cropped point cloud for each segment.

segmentPoses

vector<Pose>

Poses of each point cloud, if the scene cloud has normals (from cloud process node), this pose will represent the surface normal of the segment.


Node Settings

Data Source

../../_images/scene_crop_data_source.png
  • Segment Results

    Segmentation result of objects. Usually from DL Segment, Segmentation node.

  • Scene Cloud

    3D point cloud representing the scene. Usually from Camera, Cloud Process node.


Scene Crop Settings

../../_images/scene_crop_settings.png
  • Use Surface Centroid (Default: false)

    Whether to compute the centroid of the segmented point cloud when computing segmentPoses.


Procedure to Use

We will need a few more nodes to demonstrate Scene Crop node. Here are the files that you might need.

  1. Insret Camera, DL Segment, and Scene Crop.
    ../../_images/scene_crop_procedure_1.png
  2. Add a virtual camera with the daoai_0.dcf. See Camera Node for more detailed instructions.
    ../../_images/scene_crop_procedure_2.png
  3. Make sure the models are stored in the project’s Data folder.
    ../../_images/scene_crop_procedure_3.png
  4. In DL Segment, link camera’s image output to the Data Input, select the config file path, and run the node.
    ../../_images/scene_crop_procedure_4_1.png ../../_images/scene_crop_procedure_4_2.png ../../_images/scene_crop_procedure_4_3.png
  5. In Scene Crop, link DL Segment’s output as the Segment Results. Since there is only one class in this image, you can pick either one of the two outputs.
    ../../_images/scene_crop_procedure_5.png
  6. In Scene Crop, link Camera’s pointCloud output as the Scene Cloud.
    ../../_images/scene_crop_procedure_6.png
  7. Run the Scene Crop node, and you can see that the tee tubes are cropped out from the scene cloud.
    ../../_images/scene_crop_procedure_7.png

Exercise

Here is the link to files .

Try to crop out the two dark green boxes in the following scene.

../../_images/scene_crop_exercise_1.png

The flowchart should look the same as the one in Procedure to Use.
















Answers for Exercise

  1. Please refer to Procedure to Use for the Camera and DL Segment setup. They are very similar.
    ../../_images/scene_crop_exercise_1.png
  2. Run the DL Segment node, and check the object’s class in the label. The label is “cls 1: green 99.91”, so the class is 1.
    ../../_images/scene_crop_answer_2.png
  3. Since the it is class 1 (cls 1), we need segmentResultsOfLabel[1] as the Segment Results in Scene Crop.
    ../../_images/scene_crop_answer_3.png
  4. Link Camera’s pointCloud as the Scene Cloud.
    ../../_images/scene_crop_answer_4.png
  5. Run the node, and we will have the two green boxes.
    ../../_images/scene_crop_answer_5.png