Scale raw depth by 65535 to use full 16-bit dynamic range

#10

Scale raw depth by 65535 to use full 16-bit dynamic range

mcnabbd changed pull request status to closed
mcnabbd changed pull request status to open

The raw depth output uses only a fraction of the available 16-bit dynamic range. The range for 16-bits is 0..65535 (0xFFFF), instead of 0..255(0xFF) for 8-bits. So, change scale factor to 65535. Note: the input range is 0..1, if we scaled by 65536 (or 256 for 8-bit), then an input of 1.0 overflows the output 65536(0x10000), or 256(0x100).

Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment