Open GretaCB opened 10 years ago
Rescaling is the best option.
For background, almost no instrument actually uses the whole 16 bit range. E.g. Landast 8 is 12bits (0-4096) rescaled to 16bit (actually 0-55000, less than 2^16), so when doing gdal_translate -ot Byte -scale 0 55000 0 255
you are ok. Landsat 7 is 8bit but after LEDAPS is 12 bit, ...
The longer answer is that we could safely cap at 10000
(~of 100% reflectivity, nothing that we usually care reflects more than ~80-100%) or even lower depending on the instrument and using the metadata. This is good becuase we keep as much dynamic range as possible.
Notes for myself:
node-gdal
for gdal_translate implementationgdal_contrast_stretch
Tried uploading a local 16-bit tiff and no good:
@kapadia suggested scaling the pixel values into 8-bit values before displaying, since computer screens can't display all values in a 16-bit image.