Halcon 12: Thinning out 3D models

Thinning out 3D Models

Nowadays, point clouds representing a sampled version of real world objects or nodes of an artificial CAD model contain a large number of single points. However, the amount of points can be reduced significantly without loss of geometric information – or at least without substantial loss – depen­ding on the fraction and type of points that are removed. Therefore, this simplification of 3D models is desirable as computational costs of further processing operations in general are much lower for the resulting model.

Besides, many small structural details present in the point cloud might be irrelevant for certain tasks as well as for visualisation purposes, like shown in the following figure. Obviously, there is no significant difference at this scale between both models (left: about 184,000 points; right: about 18,400 points).

HALCON_thinning1

Model simplification with HALCON

In MVTec HALCON the operator simplify_object_model_3d is the tool at hand for the task of model simplification. In contrast to using the operator sample_object_model_3d the original model is simplified in a way that preserves its original geometry as good as possible. Consequently, the output model features the following properties. Firstly, edges are preserved as the edge points are preferably selected for the output (cf. figure below).

HALCON_thinning2

Secondly, the points included in the output model are a subset of the input points, i.e., no new points are created (by interpolation or similar). In general, points that are members of surfaces characterised by low curvature are removed at first as the loss of geometric information is low for these points if discarded. Just imagine a flat surface that is sampled at a certain minimum distance. This model will include many points that are not necessary for the geometric re­presen­tation of a flat surface. As an example, compare the points for a relatively flat area in between the step edges in the following pictures previous (left) and after (right) model simplification.

HALCON_thinning3

As you can see, the operator is more powerful for data reduction tasks than a sub-sampling-based one on a given fixed distance as the algorithm focuses on the preservation of the model geometry based on surface curvature. This kind of data reduction is beneficial for speeding up especially shape-based 3D matching, but also surface-based matching and other operations like 3D model intersection, projections, transformations, and distance calculations, to name just a few. Simply keep in mind that the level of detail of your model might be oversized for many tasks if you are working with the original 3D point cloud.