[Gdal-dev] LUT colour correction to GDAL

Rahkonen Jukka Jukka.Rahkonen at mmmtike.fi
Tue Aug 21 06:48:05 EDT 2007


> Jukka,
> 
> What sort of lut color correction are you wanting?  I have 
> recently introduced a new "gdalenhance" utility but for now 
> it is really mostly useful for applying histogram 
> equalization to images - including as part of a 16 to 8 bit 
> conversion.
> 
> Are you wanting to create enhancement definitions in an 
> external tool like gimp?

Hi Frank,

Well, I experimented by creating a mosaic out of 159 GeoCover Landsat
scenes without performing any enhancements.  My aim is to make a
reasonable large 7-channel jpeg2000 image so that there will be some
multichannel image of realistic size to be used in further play  with
both JPIP image server and MapServer. But the image I got is so ugly
that I won't show it to anybody.

The original images have very low and uneven contrast and they need to
be adjusted before mosaicing. However, I am not aiming to visually
seamless result nor am I willing to do a lot of hand work.  Bare linear
stretch between max and min values does not give satisfactory result
because scenes with even small snowy areas or clouds gets too dark, but
I tested that at least most images would be good enough if pushed
through linear standard deviation stretch with two std. dev. widths.  I
made my test by taking the mean and deviation values from another tool
and feeding those to Open EV viewer.  Result is otherwise OK but I
cannot save it to disk because I have 7 channels and Open EV keeps only
three open at the same time, and it does not remember the setting I have
made to other channels.

What I might want to do is to colour correct the original images by
creating just external LUT tables for them in text format. Next I would
like to mosaic the original images directly to the final, colour
corrected target file with just nominal computional extra cost by
runnign them through gdalwarp with '-wo LUT_COLOR_CORRECTION=YES' option
set :)

In my case I could create LUT tables manually. Perhaps some clever
programmer could even integrate the creation on LUT tables for usual
tasks, like linear or standard deviation stretch, into some program that
counts histograms?  For more sophisticated adjustments an external tool
like GIMP showing preview of the result would be nice.

Regards,

-Jukka Rahkonen-




More information about the Gdal-dev mailing list