Reference Manual
Chapter
3
Ruler E
Configuring the Ruler
Center-of-gravity
Center-of-gravity (Cog) is another method of finding the impact position of the laser line in
a sensor column. With this method typical resolution of 1/16
th
of a pixel is achieved. The
Hi3D algorithm is based on calculations similar to Cog.
In the Center-of-gravity method one threshold is used, but compared to ordinary threshold-
ing the sensor data above the threshold is digitized to a 5 – 8-bit representation. The
sensor data below the threshold is set to 0 as in the ordinary thresholding. The center-of-
gravity is then calculated through two sums:
Cog =
(x * f (x))
(f (x))
Where x is the sensor row and f(x) the digitized intensity level in the sensor data.
Figure 3.9 – Calculating the center-of-gravity
Median Filter
The Median filter calculates a median value on the binary data of 3-columns of the binary
image (actual column and its left and right neighbors) before the range algorithm is ap-
plied. This filter pre-process the binary image data used in the profile detection of the
Horizontal Threshold and Horizontal Max and Threshold components. The calculation does
not increase the time for the processing.
In cases when using two thresholds this filter is applied to both binary results independ-
ently, but with the same parameters.
If both median filter and morphological is used, the morphological filter is applied before
the median filter.
Morphology Filter
The morphology parameter is used for reducing noise in the sensor image before the laser
line is detected. It can be used with the Horizontal Threshold and Horizontal Max and
Threshold components.
Ideally the laser peak on the sensor is a smooth peak without any noise present. However,
due to different noise sources the peak may be affected by noise peaks. The morphology
filters are designed to reduce the effect of these noise peaks. If, when studying a Ruler
profile, the resulting profile appears to have two distinct levels, or have profile points that
appear at more or less random positions, the morphological filters can help the situation.
There are two basic binary morphology filters, shrink (erode) and expand (dilate), and both
those are implemented.
Intensity
Threshold
Sensor row
ROI end
ROI start
Intensity
Sensor row
ROI end
ROI start
SICK IVP • Industrial Sensors • www.sickivp.com • All rights reserved
29