[FWTools] gdal translate - air photo seems washed out after converting image
Brent Fraser
bfraser at geoanalytic.com
Fri Jul 12 10:24:48 EST 2013
Mark,
You could try doing a "gdalinfo -stats" to get the min/max pixel
values, then do a "gdal_translate -scale" to stretch the min/max values
to 0 255 (the full range of an 8-bit band).
You may be able to do the same thing in mapserver by referencing a
GDAL vrt file with a LUT entry to do the exact same thing as the above
gdal_translate command, but it would be [almost] pointless (and there
would be a performance hit).
Best Regards,
Brent Fraser
On 7/11/2013 8:07 AM, Mark Volz wrote:
>
> Richard,
>
> I partially figured it out, but I still could use some help.
>
> The problem that I had was not with the created image itself, but how
> ESRI displayed it. By default ArcMap uses no stretch to display the
> SID image while it uses a percent clip stretch for the created tif .
> After I changed the stretch from percent clip to none the images
> appeared almost the same, but there was still some differences. Next,
> I changed the stretch to minimum-maximum on the created tif image and
> I could not tell any difference between the sid file and the tif image.
>
> Questions:
>
> 1)When creating a tiff file in gdal_translate, can I adjust settings
> so that the new image will appear exactly like the old image without
> having to turn stretch to minimum-maximum?
>
> 2)Is there a way in mapserver to change the stretch from none to
> minimum maximum (or other types of stretches if desired) and if so is
> there a performance hit?
>
> 3)Is there a way to modify a tiff file so that any GIS program
> including ArcGIS that opens up the file will use the correct stretch
> type, or is there a setting within ArcGIS that will always use a
> certain type of stretch when it opens up tiff images?
>
> Thanks
>
> Mark Volz, GISP
>
> GIS Specialist
>
> *From:*Richard Greenwood [mailto:richard.greenwood at gmail.com]
> *Sent:* Wednesday, July 10, 2013 6:32 PM
> *To:* Mark Volz
> *Cc:* fwtools at lists.maptools.org
> *Subject:* Re: [FWTools] gdal translate - air photo seems washed out
> after converting image
>
> On Wed, Jul 10, 2013 at 3:08 PM, Mark Volz <MarkVolz at co.lyon.mn.us
> <mailto:MarkVolz at co.lyon.mn.us>> wrote:
>
> Hello,
>
> I converted a mr sid air photo to a tif file. The colors appear
> washed out and too bright compared to the mr sid file.
>
>
> I would like to create an image file that has the following three
> characteristics:
>
> 1) Fast for Mapserver to read.
> 2) Relatively the same size as the MrSID file. - I would prefer a
> file size that is no larger than twice the size of the Mr SID file,
> even if it means that I have to take a small hit by using compression
> 3) retains the same image quality as the original MrSID file
>
> The following two commands made the image fast for mapserver, and
> relatively small. But the colors were washed out...
>
> c:\ms4w\apps\PipestoneMaps\Raster\Picto2013>gdal_translate -CO
> TILED=YES -CO PHOTOMETRIC=YCBCR -CO TFW=YES -CO COMPRESS=JPEG -CO
> BIGTIFF=YES MNPIPE13-SID-9INCH.sid New.tif
> c:\ms4w\apps\PipestoneMaps\Raster\Picto2013>gdaladdo -r average
> --config compress_overview JPEG --config photometric_overview YCBCR
> New.tif 2 4 8 16 32 64 128 256
>
>
> What can I do to improve the image quality, while retaining the speed
> and a moderate file size?
>
> Thanks
>
> Mark Volz, GISP
> GIS Specialist
>
> Mark,
>
> Those are pretty much the commands that I regularly use to prepare
> imagery for mapserver. I have never experienced any noticeable color
> distortion. What does it look like with a straight
> gdal_translate MNPIPE13-SID-9INCH.sid New.tif
>
> obviously that's not what you want for a final product, but it would
> be my first step toward 'debugging' the problem.
>
> Rich
>
>
> --
> Richard Greenwood
> richard.greenwood at gmail.com <mailto:richard.greenwood at gmail.com>
> www.greenwoodmap.com <http://www.greenwoodmap.com>
>
>
>
> _______________________________________________
> FWTools mailing list
> FWTools at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/fwtools
> http://fwtools.maptools.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/fwtools/attachments/20130712/cb07356e/attachment.htm
More information about the FWTools
mailing list