Forum

Author Topic: Improve visualization of 16bit TIFF images  (Read 5690 times)

jmsuomal

  • Newbie
  • *
  • Posts: 17
    • View Profile
Improve visualization of 16bit TIFF images
« on: November 24, 2016, 06:24:56 PM »
Background:
We are using PhotoScan Pro to georeference our drone based remote sensing data. We do our own radiometric calibration from Canon DLSR raw images to reflectance factor images prior to georeferencing them in PhotoScan.

The reflectance factors are numbers typically in agricultural fields being between 0.00 and 0.40. Our data contains more information than an 8bit image can handle so we must use something else than standard 8bit images to store it. We could of course store the reflectance factor images using floating point numbers in TIFF files but these take 32bits per pixel so that is not preferable. Instead of floating points, in our standard processing we output the images as 16bit unsigned integer TIFF files with a scaling factor of 10 000. This way the file size is only 50% of the floating points while we still can keep practically full radiometric resolution in the data. This means that for example in a typical scenery with reflectance factors ranging between 0.00 and 0.40 the image has uint16 DN values ranging between 0DN and 4000DN.

What is nice, is that PhotoScan is capable of processing these images fine and we can produce georeferenced outputs in basic processing scenarios without any problems.

Problem:
The problem is that PhotoScan fails to visualize the 16bit images properly. The PhotoScan shows the images, but visualizes only the 8 top bits of the 16bit of data. Effectively this mean that it divides the 16bit DN values by 256 and then shows the image. So the example image mentioned above ends up showing an image with 8bit DNs in range from 0 to 16. That is basically black and you cannot see anything useful there.

This is a serious problem in the cases when the image GPS based georeferencing is not enough and we need to use ground control markers. The markers cannot be seen or pointed out in the black images.

Solution:
Could you add to the loading of the visualization images an automated min/max scaling if the file is a 16bit TIFF? I believe with the floating point images you already have implemented something like this.

If you want to test the scaling/problem, with this link you can download an example of our 16bit reflectance factor images. I will keep the link alive at least a couple of weeks.





Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15407
    • View Profile
Re: Improve visualization of 16bit TIFF images
« Reply #1 on: November 24, 2016, 06:52:18 PM »
Hello jmsuomal,

For such kind of images (as provided by the), I see two workarounds:

1. Use Image Brightness option to adjust the range of the colors used (for the given image 4900% worked fine).
2. Use Raster Calculator, where input formula for one band only (like B1) and adjust the range used (for the sample data I've used 475 - 770 on Palette tab), then select the grayscale representation and Enable transform.

In case you are using second approach, keep in mind that for the export you need to turn off raster transform option, if you need to get proper original values.

Best regards,
Alexey Pasumansky,
Agisoft LLC