Setting up a new product for object recognition¶
In this Mikado tutorial, you will learn how to set up a new product using the Mikado interface. All you need is a suitable CAD model in STL file format. You can find out how to optimally prepare your CAD model in a separate tutorial.
Note
This tutorial refers to the search algorithm Ensenso PartFinder.
Set up new product / product list¶
Switch to the “Edit” → “Products” page
Product page: Empty view if no products have been created yet¶
The “New product” button adds a new product with the name “Product1” to the product list
Product page: View when a new product has been created¶
The product name is entered in the “Name” field
The CAD model in STL format can be specified under “STL file”. To do this, press the corresponding selection button labeled “…”. The loaded product model is now displayed in the visualization.
Product page: View when a CAD model has been selected¶
Adjust the parameters that are relevant for object recognition:
Min. recognition score: Initially select a very low value (approx. 10-25%). A suitable value will be determined in a later step using the object recognition tool.
Minimum distance: Robustness and performance improve with a suitable minimum distance. Set the largest possible value at which adjacent products can still be recognized.
Details on all product parameters are described in the Product management chapter.
Save
First save the product (floppy disk symbol in the product list) and select a suitable file name
Now you can also save the product list (upper diskette symbol directly below the main navigation bar)
Prepare object recognition¶
Set product active
Switch to the “Edit” → “Products” page
Select the desired product from the product list
Click the “Set Active Product” button
In the Status bar you can check whether the correct product is now active
Switch to the “Tune” → “Recognition” page
Select “Capture Pointcloud” to display a current point cloud for the quality check.
Check the quality of the point cloud before adjusting the PartFinder parameters. All product features that are important for recognition and pose estimation must be represented with sufficient completeness. Thin product surfaces, surfaces that are nearly perpendicular to the camera, and reflective surfaces can result in missing data. Missing geometry cannot be reliably compensated for by adjusting the PartFinder parameters and can cause false positives or inaccurate position and orientation.
Vertical product surfaces are not represented completely in the point cloud.¶
Reflections from a glossy product surface cause missing data in the point cloud.¶
Hint
If important product features are missing or the point cloud is very noisy, optimize the camera configuration first.
Mikado offers buttons for selecting presets for the object recognition parameters. A distinction is made here between ‘Model-Generation’ and ‘Search-Parameters’, whereby the default settings ‘Fast’, ‘Medium’ and ‘Accurate’ are available. We recommend setting both parameter sets to ‘Fast’ to start with.
Restrict viewpoints. During model generation, the product is viewed from different viewpoints. PartFinder uses the selected viewpoints to create internal templates of the CAD model. During the search, these templates are matched against the 3D data of the captured point cloud. If a product has rotational symmetries or is visible only from a certain direction, it is useful to restrict the viewpoints accordingly. This reduces the computation time and avoids false matches.
Apply ROI → Select the desired ROI so that background data is pre-filtered.
Hint
An ROI is not mandatory, but can have a strong influence on search duration and reliability. Define the ROI within the usable volume of the load carrier and exclude its walls, floor, and surroundings from the object search. The ROI should not intersect the walls of the load carrier. If an ROI has not yet been set up, see chapter Region of Interest (ROI) for more information.
Evaluate object recognition¶
“Capture Pointcloud” → “Apply & Find Objects”
The detections returned by object recognition meet the configured minimum recognition score and are visualized. The number of returned detections can additionally be limited by the ‘Expected object count’ and ‘Cluster Count’ parameters. The recognition score is displayed above each recognized object instance.
Object recognition: Recognized products are shown in gray/transparent¶
The PartFinder coloring shows how closely the product surface matches the point cloud. Areas with a high degree of correspondence are shown in green; as the correspondence decreases, the coloring changes through yellow toward orange. Always also evaluate the numerical recognition score and the determined position and orientation.
PartFinder coloring for detections with different degrees of correspondence between the product model and the point cloud.¶
Determine a suitable minimum recognition score using positive and negative test scenes:
Use different fill levels, product arrangements, orientations, and occlusions as positive test scenes.
Use an empty load carrier and other scenes in which no product may be detected as negative test scenes.
Record the lowest recognition score of a valid detection and the highest recognition score of a false positive. Select a minimum recognition score with an adequate margin between these values.
If valid detections and false positives cannot be separated reliably based on their recognition scores, first optimize the point cloud, ROI, viewpoints, or search parameters.
In our example with the “worm gears”, the recognition scores for products without occlusion are above 75%. This is therefore a suitable minimum recognition score in this example.
If situations arise in your application in which no product is recognized, the recognition score can be set lower in this example. However, ensure that the value is not set too low.
The parameters can also be adjusted based on the presets. If the detections obtained with ‘Fast’ are not sufficiently accurate, select ‘Medium’ and then ‘Accurate’.
You can also adjust the parameters individually. Many PartFinder parameters in the Mikado interface have an info button that links to the corresponding documentation. At the top right is the ‘Advanced Options’ button, which displays additional parameters when enabled.
Note
The ‘Cluster Count’ parameter sets the maximum number of hypothesis clusters and thereby limits the number of returned poses; a value of 0 disables clustering. Use the maximum number of products that must be detected simultaneously as a starting point and verify the setting with representative scenes. If too few detections are returned, try a higher value because not every hypothesis cluster produces a valid detection.
Check repeatability using multiple acquisitions of an unchanged scene. For the same physical product, compare the recognition score and the determined position and orientation. The order of the detections can change between object searches and is therefore not suitable for associating the results with the products.
During optimization, consider the ‘Last computation time’ displayed below the buttons. First reduce the object-search computation time by using a suitable ROI, restricted viewpoints, and the fastest sufficiently robust parameter set. If the acquisition time must also be reduced, adjust FlexView and camera binning in NxView. After every change, check the quality of the point cloud and the reliability of object recognition again. The acquisition time and computation time together affect the achievable cycle time of the application.
Finally, repeat the positive and negative tests using different fill levels, product arrangements, orientations, and occlusions. The selected settings must reliably recognize all required products, avoid false positives, and provide sufficiently stable positions and orientations.