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

Home » Public Forums » archive » Re: Conversion floating point to byte or integer
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: Conversion floating point to byte or integer [message #56320 is a reply to message #56316] Thu, 11 October 2007 01:05 Go to previous messageGo to previous message
Maarten[1] is currently offline  Maarten[1]
Messages: 176
Registered: November 2005
Senior Member
On Oct 10, 11:32 pm, go cats <beardown...@gmail.com> wrote:
> Hello Gurus,
>
> I've been trying to write a code to correct imagery data. Original
> imagery data format is byte format.
> Steps for the processing includes reading the original data,
> subtracting dark current, and multiplying calibration coefficients and
> saving the results. The two values; dark current and calibration
> coefficients are given by arrays with floationg point format.
> The code seemes to work without any problem. But in the resulting
> image saved in binary format , numbers higher than 255 store only
> remants of what is subtracted from 256. The reason I want to convert
> to byte is to save some disk space. In the image saved as floating
> point format pixel values look ok.
> Could you give some advice what part of program I have to look at? and
> what causes this problem?

Why bother with dark-current correction and calibration, if you are
destructing the data afterwards by scaling to byte again? I'd suggest
to save as floating point in a format that supports internal
compression (hdf4/hdf5), and play with the compression settings. You'l
still end up with the minimal data set on disk, but you won't
introduce artefacts.

Maarten
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Minor IDL code changes cause large slowdowns elsewhere in code
Next Topic: Re: Problem while deleting shape file

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

Current Time: Sat Oct 11 12:54:38 PDT 2025

Total time taken to generate the page: 2.15899 seconds