Reference Manual Chapter 8
Ranger E/D
©SICK AG • Advanced Industrial Sensors • www.sick.com • All rights reserved 101
iCon API
[…]
// Apply the calibration filter to get calibrated data in world units.
// As input we use the IconBuffer inBuffer
// The result is stored in outBufferCalibrated
calibrationFilter.apply(*inBuffer, outBufferCalibrated);
If you would rather load the LUT from a file you would use the initFromFile function instead
of the flashGetUserData and initFromData functions:
calibrationFilter.initFromFile("calibrationFile", df, numberOfScans);
Remember that calibrated data is to be considered as a number of points (X, R) in the
laser plane rather than an image. The row (scan) number where an (X, R) point is located
tells us the point’s position in the (X, Y, Z) real-world space. R and Z are kept apart to
indicate that R is parallel to the laser plane rather than perpendicular to the conveyor
plane. If the physical geometry is reverse ordinary R and Z will however be the same.
8.5.4 Rectification Filter
A rectification filter is used to resample a set of calibrated points to an image where the
distance between two adjacent pixels of a scan is always the same. You can consider a
rectified image as a geometrically corrected image.
To set up a rectification filter you need an input buffer and its data format. You also need
an output buffer which you can define to be of arbitrary width. A minimum example may
look like this:
// Include file for calibration filter
#include "filter/rectification.h"
[…]
// Create an output buffer to store the filter result
IconBuffer outBufferRectified;
// Set a result image width (in pixels) and create a
// rectification filter.
unsigned long rectificationWidth = 1536;
RectificationFilter rectificationFilter(rectificationWidth);
// Configure the input of the filter to use the data format of the buffer we
will use as input and the number of scans per buffer used by the grabber
ret = rectificationFilter.setInput(*(outBufferCalibrated.getDataFormat()),
numberOfScans);
// Prepare the rectification filter to not let initiation and allocation slow
// down processing of the first buffer
ret = rectificationFilter.prepareResult(outBufferRectified);
[…]
// Filter the result from a calibration filter
rectificationFilter.apply(outBufferCalibrated, outBufferRectified);
The resulting buffer from rectification filtering can be seen as a set of geometrically correct
scans. The distance between profiles is not affected by the filter. For this to be a constant
distance you should use an encoder and trigger acquisition at regular distances.
Each row in the buffer is represented as a regular (X, R) coordinate system. Remember
that R is only perpendicular to the conveyor plane if you use a reverse ordinary geometry. If
not you will have to compensate for the fact that the coordinate system is skewed. See the
general calibration section in chapter 5.10 “Calibration” for more on this.
8.5.5 Color Registration filter
A registration filter is used for shifting the color channels according to the input registra-
tion parameters, to compensate for the fact that the measurement values for each color