Skip to content

Investigate Fixed Precision Disparity Maps #22

Closed
zmoratto opened this Issue Apr 27, 2012 · 1 comment

2 participants

@zmoratto
NeoGeographyToolkit member

I'm not sure we need the precision of a full floating point disparity in ASP. Possibly only a tenth or a hundredth precision is required.

What this would provide is better compression by TIFF for F and RD disparities. This would also allow lossless compression using JPEG 2000 and Jasper. Sadly, none of that is thread safe.

@oleg-alexandrov
NeoGeographyToolkit member

Given that a float has 8 digits, and that in principle an image of height of 200,000 pixels could use 6 of them just to represent the integer part of the disparity, that leaves two digits for the fractional part anyway. Of course, in practice disparities are not that crazy, but even so, a 4 digit disparity is probably not unheard of. So I am a bit skeptical of the improvement here.

A much simpler solution could be to eliminate the third band of the disparity, by setting the invalid disparities to -(flt_max, flt_max), though probably LZW already compresses the third band pretty well since it is essentially binary.

Note that the PC file is still larger than the RD file (e.g., I've seen 24 MB for PC vs 20 MB for RD). That even after we've done some optimization to bring the PC size down, e.g., using floats instead of doubles and a shift.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.