Format of Triclops 16bit subpixel results

Last Revision Date: 5/26/2014

The top 8 bits of the 16 bit results represents the integer disparity, and the bottom 8 bits represent the sub-pixel value. All invalid pixels are represented by 255 in the top 8 bits. For example, value 0x1080 means 0x10 = 16 integer disparity and 0x80 = 128 sub-pixel disparities, i.e. 128/256 = 0.5 integer disparities. Therefore 0x1080 = 16.5 disparities.

0x1080 is a big-endian format number. This means that if you access the image data on a little-endian machine (virtually all PC systems) you have to either convert the 'unsigned short' value to big-endian (eg. using the 'htons()' function) or adjust your calculation formula to account for the fact that the number will be read as '0x8010' when accessed directly using the 'unsigned short' format.

Understanding the format of the subpixel results is not particularly important if you use the RCDtoXYZ functions which takes care of the formatting. 

Note that the disparity mapping function doesn't affect sub-pixel processing.

Articoli correlati