Conversion floating point to byte or integer [message #56326] |
Wed, 10 October 2007 16:32 |
beardown911
Messages: 21 Registered: March 2007
|
Junior Member |
|
|
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?
Thank you in advance,
Kim
|
|
|