I have a couple of raster maps (RGB PNG images) where I need to remove the
red grid lines. What would be the best way to do this with Grass ? I thought
about using r.mapcalc to turn the red pixels (RGB value 255 0 0) to NULL
data and then use r.fillnulls to interpolate the NULL data. I now how to do
this for elevation data, but how to do this with RGB data ?
Not sure if it will work but here is something to try. When you import
your PNG image into grass it will be split in 3 bands (RGB). You can
then use r.mapcalc to identify where the red lines are and convert
those places to null in all three bands. Then, for each band you run
r.fillnulls and compose the image back. Or you could create a coarser
resolution image for each band by applying a smoothing filter
(probably a 3x3 window) and substitute the nulls with the result of
the smoothed image.
Another option is to try something with GIMP... You can select based
on color and use a blurred image to fill the nulls.
Cheers
Daniel
On Fri, Sep 7, 2012 at 10:11 AM, kaipi <mapcollect@gmx.net> wrote:
Dear Users,
I have a couple of raster maps (RGB PNG images) where I need to remove the
red grid lines. What would be the best way to do this with Grass ? I thought
about using r.mapcalc to turn the red pixels (RGB value 255 0 0) to NULL
data and then use r.fillnulls to interpolate the NULL data. I now how to do
this for elevation data, but how to do this with RGB data ?