[gdal-dev] Calibrating colors of a series of maps
Jan Hartmann
j.l.h.hartmann at uva.nl
Sat Dec 26 12:46:50 EST 2009
Hi Frank, I didn't know about that predefined palette, because that is
just what I was looking for! If it's not too much trouble to add the
non-dither option, you'll have solved again a problem of mine.
A late merry Christmas from a white Amsterdam, although the snow is
melting here.
Jan
On 26-12-2009 17:51, Frank Warmerdam wrote:
> Jan Hartmann wrote:
>> Hi,
>>
>> I put the following question on the GRASS user list. It isn't
>> possible with GRASS (or the programs mentioned by Glynn), but if
>> someone on this list can help me further, I would be very grateful. I
>> have been struggling for some time with this problem, and I'll have
>> to process lots of scanned old maps in the near future.
>
> Jan,
>
> The rgb2pct.py script can be used to downsample 24bit images to 8bit
> paletted form. I see it now supports providing a predefined palette.
> It might be best to pick a representative map, and use it for the first
> downsampling - restricting the number of colors with the -n flag - and
> then use the resulting palette for the other maps.
>
> If the discoloring is not too severe, and if you restrict the palette
> to a very distinct set of colors, you might find this reduces things to
> a sufficiently similar set of images.
>
> Doh! I just looked and rgb2pct.py always does dithering which means
> it will end up using speckled pixels of the available colors to
> try and approximate the original. This will be quite unsuitable for
> your purposes.
>
> If you would like, I'd be willing to expose a non-dithered option in
> rgb2pct.py which might be useful.
>
> Note that if the discoloring is too severe some additional sorts of
> image processing might be required to get a good result.
>
> Best regards,
>
>>> > I am working with series of old topographical maps, ranging from
>>> 10 to > 600 map sheets per map. Each sheet is discolored a bit from
>>> age. How can > I process a complete series in such a way that there
>>> are no differences > visible any more between map sheets? Preferably
>>> I would like to > downsample them to 8 bits color table, as the
>>> originals only have a > small set of colors. In other words: how do
>>> I calibrate set of maps to > the same optimal color table?
>> This is probably better done with general image-processing software,
>> e.g. pnmquant (from the Netpbm package) or "convert -colors ..." (from
>> ImageMagick).
>>
>> -- Glynn Clements <glynn at gclements.plus.com>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>
More information about the gdal-dev
mailing list