[GRASS-user] Remove red lines from raster images

Daniel Victoria daniel.victoria at gmail.com
Fri Sep 7 07:17:26 PDT 2012


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 at 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  ?
>
> Thanks for any suggestions !
>
> Harry
>
>
>
> --
> View this message in context: http://osgeo-org.1560.n6.nabble.com/Remove-red-lines-from-raster-images-tp5000430.html
> Sent from the Grass - Users mailing list archive at Nabble.com.
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user


More information about the grass-user mailing list