[GRASSLIST:700] Re: patching together aerial photographs
Glynn Clements
glynn at gclements.plus.com
Thu Apr 13 06:02:18 EDT 2006
Jeroen Wortel wrote:
> I have a series of georeferenced aerial photographs as 8 bit tiff files.
> I have imported these into Grass using r.in.gdal and can visualize
> them with d.rast
> Now I want to patch them together in order to use them in NVIZ as color raster.
>
> Because the images are 8 bit indexed colours I can't use r.patch to
> patch the images together in one go.
> I suppose I have to split the images first into red, green and blue
> bands, patch each band together with r.patch, and combine the patched
> red, green and blue bands again.
>
> I can't find the Grass command to split the raster image in to red,
> green and blue rasters. How do I do this in Grass?
r.mapcalc 'map.r = r#map ; map.g = g#map ; map.b = b#map'
> Is there another way of achieving a patched image of the aerial
> photographs?
You could convert the separate R/G/B maps to a single composite colour
map before patching, although this will degrade the colour resolution
(24-bpp composite images aren't practical).
You could convert the images to either RGB or to a common palette
using image-processing software prior to importing. If you import an
RGB image with r.in.gdal, it will import it as separate R/G/B
channels.
The ideal solution would be to get hold of the original RGB images.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user
mailing list