Visualisation and Debugging Procedures for (Edge-Supported) Surface Based Matching

Surface-based matching is an important 3D localisation method required especially for surface comparison tasks or bin-picking. Since users often run into similar problems, such as;

1. Duplicated scene points
2. The X or Y image of scene not being aligned with coordinate axis
3. Normal directions
4. The origin being inside scene data, from HALCON 18.05 onwards the helper procedure debug_find_surface model is available.

How to use it:

  • Create a surface model with create_surface_model and perform one call to find_surface_model with CreateResultHandle set to true.
  • Pass the surface model, the 3D model, the scene, and the result handle to this procedure.

What the procedure does:

The procedure opens a menu window, in which further instructions are noted, see fig. 1 a) and b)

Fig. 1 a): Menu window for standard surface-based matching

 

 

 

Fig. 1 b): Menu window for edge-supported surface-based matching

 

 

 

 

After having selected one of the menu items, an additional window will open up that is used for inspecting, debugging, or modifying parameters. Once complete, the parameters set within the procedures will be returned by the procedure in

CreateSurfaceModelParamName, CreateSurfaceModelParamValue, FindSurfaceModelParamName,
FindSurfaceModelParamValue.

Use those to adapt the surface-based matching accordingly.

How to identify the above-mentioned major problems:

To identify duplicated scene points, select the menu item Automatic Value Check. If duplicated points are detected, an error message will appear. Duplicated points slow down the processing time and may lead to wrong matches.

To inspect X and Y image alignment, select the item Automatic Value Check. If the X or Y image is not aligned correctly, an error message will appear. A correct X and Y image alignment is required for computing correct 3D edge directions.

The normal directions can be inspected visually by selecting the item Normal Directions. It is important that model- and scene-normals point in a similar direction, otherwise wrong matching results will be returned.

The edge-supported surface-based matching computes its 3D edges based on the given view point. Therefore, if the scene coordinate system is located within the scene, a view point should be set close to the origin of the sensor’s coordinate system, otherwise wired edge directions are returned; see red normal in fig 2 a). Correct edge directions point outwards, see fig. 2 b).

Fig. 2 a): Wrong view point

Fig. 2 b): Correct view point

Note: This procedure is mainly meant for debugging the parameters of surface-based matching applications. Since the root causes for potential issues can vary greatly, this procedure cannot always recommend appropriate steps.