comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » what is an efficient lossless compression way to store a gray-scale image
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: what is an efficient lossless compression way to store a gray-scale image [message #36248 is a reply to message #36121] Wed, 27 August 2003 15:52 Go to previous messageGo to previous message
George N. White III is currently offline  George N. White III
Messages: 56
Registered: September 2000
Member
On Tue, 26 Aug 2003, Xiaoying Jin wrote:

> Hi, there,
>
> For a gray-scale image, I haven't found a good way to store it yet. It
> seems that there is no way to store gray-scale images in IDL
> efficiently. If so, that will be too bad, because all the satellite
> images we processed are very large and occupy a lot of space.
>
> I tried 'tiff' format with Packbits compression, but it does not help
> for gray-scale image. Sometimes the file size of the compressed image
> is even larger than the original raw data!!!
>
> Can anyone give me some hint? Thank you very much!

In general, rather than creating image for viewing data, it is preferrable
to preserve the original data and provide tools to view the data
"directly". You may, however, want some low-resolution "browse" images.
By viewing the actual data files you reduce the disk space devoted to
multiple copies of the same information in different formats, but also the
problems that arise in trying to interprete images when you don't have
ready access to the actual data values or geographical coordinates.

In retrospect, the smart approach would have been to define satellite data
formats (e.g. TDF, HDF) as a "subset" of TIFF and then provide Photoshop
plugins. This would have satisfied the people who "just want some images"
to look at".

Some compression methods require a non-free license, but the PNG format
uses a "free" algorithm. You can use an image format without compression
or write a raw data file and then apply one of the many file compression
tools (zip, gzip, etc.). IDL has a /compress keyword that supports gzip
compression, but (on a decent OS) you can use other methods by writing
data to a named pipe "connected" to an external compression program.

How much compression you get depends on the data, so it may pay to run
tests on your images. Satellite images are often noisy. You may get 12
bits-per-pixel (bpp), but if the bottom 4 bits are random the file won't
compress well. In that case, converting the file to 8 bpp may not loose
much information, but would substantially decrease the raw file size and
producing better compression.

--
George N. White III <gnw3@acm.org>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [HELP] My program is not running in IDL 5.6
Next Topic: Re: [HELP] My program is not running in IDL 5.6

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 23:00:53 PDT 2025

Total time taken to generate the page: 0.88188 seconds