<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
I like to use gdal_contrast_stretch from <a
href="http://www.gina.alaska.edu/projects/gina-tools/">http://www.gina.alaska.edu/projects/gina-tools/</a>
<br>
<br>
Usage: gdal_contrast_stretch <src.tif> <dst.tif><br>
{ { -linear-stretch <target_avg> <target_stddev> } |<br>
{ -percentile-range <from: 0.0-1.0> <to: 0.0-1.0> }
|<br>
{ -histeq <target_stddev> } }<br>
[ -ndv <no_data_val> ]<br>
Input must be either 8-bit or 16-bit. Output is 8-bit.<br>
<br>
For example:<br>
<br>
gdal_contrast_stretch -percentile-range 0.02 0.98 input16bit.tif
output8bit.tif
<pre class="moz-signature" cols="72">Best Regards,
Brent Fraser</pre>
<br>
On 3/20/2012 9:55 AM, Saâd HESSANE wrote:
<blockquote
cite="mid:CAEcp1tAxdvk8oxnWnskmRSVHfm_WwO0JEsyw4FXu9BBywnQeCA@mail.gmail.com"
type="cite">Hi list,<br>
<br>
I use gdal_translate to convert 16bits images to 8bits images. The
gdal_translate have the -scale argument to specify the convertion
range (source->destination).<br>
If I change the destination range (dst_min and dst_max), I can do
manually a brightness correction (also a contrast correction).<br>
<br>
But is there any way to do that with a Photoshop like method?<br>
For example set a brightness to -50, a contrast to +8 and let
gdal_translate do the job ?<br>
<br>
Also can I apply a gamma correction?<br>
<br>
I saw the VRT format and there's a way to apply a LUT. But I don't
think a LUT of 65536 values is the best way to apply the
correction.<br>
<br>
Also the VRT have the scale ratio and scale offset elements. I
think it can be useful but I don't understand how use it...<br>
<br>
So simply put, my question : can I do a contrast, brightness or
gamma correction to a raster with gdal?<br>
<br>
Thank you !<br>
<br>
PS : <span id="result_box" class="short_text" lang="en"><span
class="hps">I apologize for</span> <span class="hps">my</span>
<span class="hps">broken English</span><span class=""> !<br>
</span></span>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/gdal-dev">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a></pre>
</blockquote>
</body>
</html>