CORRECT USAGE OF SUBPIXELS
When working with AT cameras it is important to understand the influence of the camera’s subpixel parameter on the measurement precision and its calibration. A changing of the number of subpixels can result in wrong metric values if the calibration file wasn’t changed acoordingly.
How to choose matching number of subpixels
Rangemaps from AT are transmitted with a fixed bit depth (8Bit or 16Bit). In most applications 16Bit is the recommended data format, however, the choice of the format is a trade-off between a better height resolution or a higher data rate.
The bit depth of a range map limits the amount of information that can be stored for each pixel (height), whereas each height is described by the number of the row in the sensor and its subpixel position. The number of bits needed to unambiguously describe the sensor row as an integer value depends on the height of the used AOI set in the camera (see table below).
Once the AOI height is set, it defines the number of bits per pixel left for the subpixel information.
Parameter NumSubPixels has a valid range between 0 and 6 bits. This value describes the possible maximum resolution for the calculation of the laser line positions in the COG and FIR-Peak modes. More precisely, the resolution of those 3D modes is 1/(2^n), where n is the number of subpixel bits.
max. AOI height | max. subpixels (8Bit) | resolution (8Bit) | max. subpixels (16Bit) | resolution (16Bit) |
---|---|---|---|---|
3 | 6 | 0.015625 | 6 | 0.015625 |
7 | 5 | 0.03125 | 6 | 0.015625 |
15 | 4 | 0.0625 | 6 | 0.015625 |
31 | 3 | 0.125 | 6 | 0.015625 |
63 | 2 | 0.25 | 6 | 0.015625 |
127 | 1 | 0.5 | 6 | 0.015625 |
255 | 0 | 1 | 6 | 0.015625 |
511 | 0 | bit overflow | 6 | 0.015625 |
1023 | 0 | bit overflow | 6 | 0.015625 |
2047 | 0 | bit overflow | 5 | 0.03125 |
4095 | 0 | bit overflow | 4 | 0.0625 |
Conclusion: The smaller you can set your AOI height, the more subpixels you can use and therefore the more precisely you can theoretically calculate the heights. Using more rows than allowed will lead to bit overflow and ambiguity. Note that the sum of camera AOIHeight + AOIOffsetY must not exceed the maximum AOIHeight.
Calibration File
The knowledge of the number of used subpixels is required when applying a set of calibration parameters to a range map. For this reason it is included as a parameter in the calibration file. Hence, it is important that the number of used subpixels set in the camera matches the number of subpixels set in the calibration file!
This parameter can be changed in the different data formats of the calibration files as follows:
file format | parameter |
---|---|
.xml | < rangeScale> 0.015625 < /rangeScale> |
.txt | 10th parameter |