Determine the number of points¶
Determine the number of points from the last recording.
Hint
To count points in a specific region, first use the ‘Set active ROI’ task. The ‘Logical operation’ task can be used for evaluation, for example.
This task can be used, for example, to check whether unexpected objects or obstacles have appeared in a certain area. The Z value of the highest and lowest point found is output as an aid for the check. This can be useful, for example, when putting a part back into the box so that the part is not dropped from an unchecked height. Or to check whether an object/obstacle is located in a certain area.
Variablen¶
Name |
Typ |
Description |
|---|---|---|
Minimum number |
Integer |
Input variable: Minimum number of points per shift to be considered the highest Z value. (Default: 1, minimum: 1) |
Quantity |
Integer, Double |
Output variable: Number of 3D points in the active ROI of the active camera is written to this variable |
Highest Z |
Double |
Output variable: Specifies the value of the point with the highest Z value. A region of interest (ROI) is taken into account. |
Lowest Z |
Double |
Output variable: Specifies the value of the point with the smallest Z value. A region of interest (ROI) is taken into account. |
Detailed description¶
Reflections can cause the highest point in the point cloud to deviate significantly from the actual highest point. Isolated scraps of point clouds located in the search area above the products can lead to unexpected results. If problems occur with a noisy point cloud, the calculation of the highest point can be changed by setting the input variable Minimum number. If the value of this input variable is greater than 1, a histogram of all Z values is calculated. The search area is divided into 0.5 mm thick layers. Each point within the search area is assigned to a layer. The return value for the highest Z value is the upper edge of the first layer from the top that counts at least the minimum number of points. The lowest Z value is determined in the same way. The following figure outlines the principle of calculating the highest point.
Principle sketch of the task Determine number of points¶
Warning
Due to the calculation method when the input variable Minimum number is set, the return value for the highest or lowest point can have an inaccuracy of up to 0.5 mm.
Note
If no ROI is active, Minimum number has no effect.