[Gdal-dev] gdal_translate and Dynamic Range
Shawn.Gong at drdc-rddc.gc.ca
Wed Mar 7 16:55:12 EST 2007
I have similar question: is there a way to save the OpenEV enhanced
(after scaling) image onto a file, i.e. to capture
I have two images that loaded into OpenEV. I enhance them then fuse the
However after fusion all the enhancement is lost.
OpenEV has a substantially smarter set of scaling logic than the
gdal_translate -scale defaults. In particular I believe OpenEV
computes a histogram and then does tail trimming to pick end scaling
points. You can open the layer dialog (right click on the layer in
the layers list), and then select the "Raster Source" tab to see what
scaling min/max was selected by OpenEV. If you use those values with
gdal_translate -scale you should get similar results.
> The funny thing is that if I use gdla_translate to produce a geoTiff
> image then apply gdal_translate on that resultant image, as expected,
> the second image is somewhat better but not even close to that of the
> OpenEV produced.
This is presumably because gdal_translate will scale based on the
computed min/max of the whole image, not the area you are chipping out
with the -srcwin flags. By cutting it down first, you correct for this
> Can anybody share any ideas in how to get gdla_translate to produce
> same result as that of OpenEV? Or is it an impossible feat that I'm
> trying to accomplish?
gdal_translate isn't going to have the same logic as OpenEV. So you
either have to compute the scaling min/max by some other means (perhaps
inspecting it in OpenEV or a script) and use those with gdal_translate,
or you are going to have to emulate the logic of OpenEV in a script of
some sort. In fact, depending on the circumstances you might be able
to write a Python script that imports the OpenEV core, and use it to
do the operation, but does not actually create any user interface
components. This could be tricky though.
More information about the Gdal-dev