Generate Point Cloud Model¶
Point cloud model can not only describe the whole target object, but also describe part of the target object, such as the object’s surface or edge. A good point cloud model should meet at least the following 3 requirements:
The point cloud contains little noise or no noise.
The points in the point cloud distribut evenly, and the number of points are neither too many or too few.
The point cloud can well represent the features of the target object.
There are two ways for you to generate a point cloud model in Matching Model and Pick Point Editor:
Generate from Images Acquired by the Camera¶
This feature generates a point cloud from depth map(s) acquired by the camera.
Hint
This feature is available only when the opened project contains the Capture Images from Camera Step whose the Camera Settings parameters are fully configured.
The procedure differs depending on whether the target object is easily movable. Click on the options below for detailed instructions.
Target object is easily movable (e.g.: light and small workpieces)
Place the target object in the camera’s field of view:
If you have NOT added pick point(s) by teaching, place your target object directly in the camera’s field of view.
If you have already added pick point(s) by teaching, make sure the target object has not moved since (otherwise please redo adding pick point by teaching and ensure that the object doesn’t move afterwards).
Click on in the toolbar, and check the Remove background option.
Click on Capture target object to acquire a depth map containing the target object, and then click on Next.
Remove all target objects in the camera’s field of view. If the robot picks from a bin, then you need to remove all the target objects from the bin but keep the bin in place.
Click on Capture background to acquire a depth map of the background, and then click on Next.
Click on Remove background to generate a point cloud model of the target object.
Adjust Point count threshold:
If the target object in the point cloud is not intact, you can decrease the value here and then click on Remove background to check the result.
If the point cloud contains too many points of the background, you can increase the value here and then click on Remove background to check the result.
Click on Generate model to exit the window. Now you can see the newly generated point cloud model in the visualizing space and in the Model files list on the left.
Hint
If you reached this page through clicking on the link in Add Pick Point by Teaching, you can use the Back button on your browser to return and continue reading the instructions of Add Pick Point by Teaching.
Target object is NOT easily movable (e.g.: wheel hub)
Make sure the target object is in the camera’s field of view:
If you have already added pick point(s) by teaching, make sure the target object has not moved since (otherwise please redo adding pick point by teaching and ensure that the object doesn’t move afterwards).
Click on in the toolbar.
Click on Capture target object to acquire a depth map.
Click on Generate Model to generate a point cloud model.
Hint
If you reached this page through clicking on the link in Add Pick Point by Teaching, you can use the Back button on your browser to return and continue reading the instructions of Add Pick Point by Teaching.
If you are not connected to a real camera and would like to use saved images to generate a point cloud model, please complete the settings below, and then follow the instructions above to generate a point cloud model.
Use the virtual camera to import saved images
When using the virtual camera, since you will not be able to acquire images in real time, you need to get images collected previously ready for use.
In the graphical programming workspace, select the Capture Images from Camera Step, and adjust the following in the Step Parameters tab:
For Data Path, select the parent folder of the folder containing the depth maps. For detailed instructions, please see Capture Images from Camera.
Set Play Mode to Repeat All, so that you can return to the first depth map when you reach the end.
Tip
If you’d like to use the Remove background option, both the background depth map and depth map containing the target object must be prepared.
The background depth map doesn’t have to contain no target objects at all; it just needs to contain one fewer target object than the depth map of the target object. For example, in the figure below, the left image can be used as the background depth map, and the right one as the depth map of the target object.
Tip
Due to factors like lighting variations in the images, the point cloud model generated from saved images is likely to contain unwanted points. You can trim the model during editing.
Generate from imported CAD files¶
If you already have the CAD model file of the target object, you can import this file into Matching Model and Pick Point Editor, and generate a point cloud model from the CAD file.
Hint
Currently, only STL format is supported.
Click here for detailed instructions
Click on in the toolbar, locate the CAD file you need, select this file and click on Open.
Select the measurement unit of the CAD model in the pop-up window.
The imported CAD file will show up in the CAD files list on the left.
Hint
Only one CAD file can be imported at a time. If you need to import multiple CAD files, please repeat steps 1 to 2.
Select the CAD file for point cloud model generation in the CAD files list, and then click on or in the toolbar to generate a point cloud model.
: generate a point cloud of the entire surface of the CAD model.
After clicking, you will need to adjust the sampling interval for the point cloud in the pop-up window, and then click on OK to generate the point cloud model.
: generate a point cloud of only the part visible in the current view.
In the figure below, the left image is the view used for point cloud generation, and the right image is the generated point cloud. You can see that the point cloud doesn’t contain points from the part that is not visible in the left image.
Hint
Occasionally, and may become disabled if you already have point cloud model(s) generated.
In such cases, please click on anywhere in the Editor interface to deselect the file in the CAD files list, and then reselect it. The above buttons should become enabled.
Hint
Other than generating point cloud models through the methods described above, you can also import existing point cloud files in PLY format directly by clicking on in the toolbar.
The following are some actions you can take once you have generated a point cloud model:
Save all the files in the Lists: click on
or use the shortcut Ctrl+S.Hint
Files are save to the following directory: Project Folder/resource/model_editor.
Delete a point cloud model: right-click on the point cloud you wish to delete in the Model files list, and select Delete in the pop-up menu.
Toggle the visibility of a file: click on to the right of the file name will make the file invisible in the visualizing space. Clicking again makes the file visible.
Show the bounding box: select a file in the Files List, and then check the box in front of Show bounding box below the CAD files list.
Change the display color of a point cloud: select a point cloud model in the Model files list, double-click on the white rectangle next to Cloud color below the CAD files list, and then change the color in the pop-up window.
Hint
The display color of an imported color point cloud cannot be changed.
Now that you have a point cloud model, you can start editing it to meet your actual needs. Please click on Next in the lower right for a detailed instruction for editing a point cloud model.