4

I have some rasters I want to perform histogram stretching on, and I want to use only open source tools, preferably using shell/bash command line.

I was thinking of using gdal_translate with setting -scale for minimum and maximum, but maybe there is something else that can automatically set min and max, do you know about something like that, please?

Is there in gdal_translate possibility to scale with bigger color depth than 2^8?

  • 1
    I was going to suggest gdal_contrast_stretch but I see from your recent edit that you want >8 bit output (plus that requires compilation). – Steven Kay Jul 15 '17 at 20:48
  • 1
    -scale is not limited to 8-bit. Define a higher bit depth output format and you can use any values within the valid range. – user30184 Jul 16 '17 at 7:51
  • 1
    You can use gdal_translate or use VRT with look up tables for advanced stretching (LUT) – pLumo Jul 16 '17 at 18:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.