scanned maps for mosaicking

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

scanned maps for mosaicking

Juan Ignacio
Hi to everybody,

I am using gdal to create a mosaic composed of scanned maps in tiff format.
When I create this file the colour table of the first file in order to
create the output mosaick. The problem is that not all the imagery have the
same colour table therefore when you visualise the mosaic the only image
which remains the same in the one of the colour table but the colours of the
others have changed as the obviously had a different colour table. Does
anybody know if it is possible to circumvent this problem and create a
mosaic where all the colours look ok? Does the tiff format allow to include
all the colour tables? I would not like to re-scan all the imagery to the
same colour table.

Thanks in advance,
Juan Cicuéndez

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Data Processing & On-Board Software Business Unit
Email: [hidden email]
Tel:    34-91-807-33-39    **Visit our webpage at http://www.gmv.com
Tel:    34-91-807-21-00 (switchboard)
Fax:    34-91-807-21-99
Isaac Newton 11, Tres Cantos, 28760 Madrid, SPAIN
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


______________________
Este mensaje, y en su caso, cualquier fichero anexo al mismo,
 puede contener informacion clasificada por su emisor como confidencial
 en el marco de su Sistema de Gestion de Seguridad de la
Informacion siendo para uso exclusivo del destinatario, quedando
prohibida su divulgacion copia o distribucion a terceros sin la
autorizacion expresa del remitente. Si Vd. ha recibido este mensaje
 erroneamente, se ruega lo notifique al remitente y proceda a su borrado.
Gracias por su colaboracion.
______________________
This message including any attachments may contain confidential
information, according to our Information Security Management System,
 and intended solely for a specific individual to whom they are addressed.
 Any unauthorised copy, disclosure or distribution of this message
 is strictly forbidden. If you have received this transmission in error,
 please notify the sender immediately and delete it.
______________________
_______________________________________________
Gdal-dev mailing list
[hidden email]
http://xserve.flids.com/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: scanned maps for mosaicking

Andrey Kiselev
On Mon, Jun 06, 2005 at 04:30:06PM +0200, Juan Ignacio wrote:

> I am using gdal to create a mosaic composed of scanned maps in tiff
> format. When I create this file the colour table of the first file in
> order to create the output mosaick. The problem is that not all the
> imagery have the same colour table therefore when you visualise the
> mosaic the only image which remains the same in the one of the colour
> table but the colours of the others have changed as the obviously had
> a different colour table. Does anybody know if it is possible to
> circumvent this problem and create a mosaic where all the colours look
> ok? Does the tiff format allow to include all the colour tables? I
> would not like to re-scan all the imagery to the same colour table.

Juan,

The simplest solution is to convert all your scans in the 24-bit RGB
format. You can do that with the tiff2rgba utility from the libtiff
package. Be ready that resulting images will be larger than original
ones, but not too much if you will use compression.

Best regards,
Andrey


--
Andrey V. Kiselev
Home phone:  +7 812 5970603  ICQ# 26871517
_______________________________________________
Gdal-dev mailing list
[hidden email]
http://xserve.flids.com/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: scanned maps for mosaicking

Juan Ignacio
Andrey Kiselev <dron <at> ak4719.spb.edu> writes:

>
> On Mon, Jun 06, 2005 at 04:30:06PM +0200, Juan Ignacio wrote:
> > I am using gdal to create a mosaic composed of scanned maps in tiff
> > format. When I create this file the colour table of the first file in
> > order to create the output mosaick. The problem is that not all the
> > imagery have the same colour table therefore when you visualise the
> > mosaic the only image which remains the same in the one of the colour
> > table but the colours of the others have changed as the obviously had
> > a different colour table. Does anybody know if it is possible to
> > circumvent this problem and create a mosaic where all the colours look
> > ok? Does the tiff format allow to include all the colour tables? I
> > would not like to re-scan all the imagery to the same colour table.
>
> Juan,
>
> The simplest solution is to convert all your scans in the 24-bit RGB
> format. You can do that with the tiff2rgba utility from the libtiff
> package. Be ready that resulting images will be larger than original
> ones, but not too much if you will use compression.
>
> Best regards,
> Andrey
>
Thank you very much Andrey,

I tried to convert the imagery from normal tiff with colour table to RGB tiff
with tiff2rgba. Somehow I obtain 4-banded files. Should it not be 3 bands
instead? Is this normal?

Besides my program used to includ a line
fileInfoArr[i] = new FileInfo(filename, oTargetSRS, temp_dir);

that fails now with the RGB tiff files; this might be related to my previous
comment.

Any clue about what's going on or workarounds?

Cheers,
Juan



_______________________________________________
Gdal-dev mailing list
[hidden email]
http://xserve.flids.com/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Re: scanned maps for mosaicking

Andrey Kiselev
On Tue, Jun 07, 2005 at 11:58:22AM +0000, Juan Cicuéndez wrote:
> > The simplest solution is to convert all your scans in the 24-bit RGB
> > format. You can do that with the tiff2rgba utility from the libtiff
> > package. Be ready that resulting images will be larger than original
> > ones, but not too much if you will use compression.
>
> I tried to convert the imagery from normal tiff with colour table to
> RGB tiff with tiff2rgba. Somehow I obtain 4-banded files. Should it
> not be 3 bands instead? Is this normal?

Yes, that is normal (default) behaviour of the tiff2rgba utility. You
need the -n switch to disable the forth channel generation. The
following is taken from the tiff2rgba manual:

       -n     Drop  the alpha component from the output file, producing
              a pure RGB file.  Currently this does not work if the -b
              flag  is  also in effect.


> Besides my program used to includ a line
> fileInfoArr[i] = new FileInfo(filename, oTargetSRS, temp_dir);
>
> that fails now with the RGB tiff files; this might be related to my
> previous comment.

Sorry, but I didn't understand what that line does. Could you describe
your problem in more details?

Best regards,
Andrey


--
Andrey V. Kiselev
Home phone:  +7 812 5970603  ICQ# 26871517
_______________________________________________
Gdal-dev mailing list
[hidden email]
http://xserve.flids.com/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

quick one: gdal info one band in multiband image

Jon Saints
how can I tell gdalinfo gdal_translate to access a
specific band of a multiband Erdas IMG file?

Thanks
_______________________________________________
Gdal-dev mailing list
[hidden email]
http://xserve.flids.com/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

RE: quick one: gdal info one band in multiband image

Norman Vine
Jon Saints writes:
>
> how can I tell gdalinfo gdal_translate to access a
> specific band of a multiband Erdas IMG file?

http://www.gdal.org/gdal_utilities.html#gdal_translate

see the -b option

HTH

Norman
_______________________________________________
Gdal-dev mailing list
[hidden email]
http://xserve.flids.com/mailman/listinfo/gdal-dev