[Radiance-general] difference between ascii and binary output
Alexa I. Ruppertsberg
[email protected]
Fri, 20 Feb 2004 13:25:52 +0000
Hi there,
before I despair I ask the RADIANCE-world (maybe there is a difference
even if there shouldn't be one):
When writing out data with 'pvalue' you can write ascii or binary files.
I chose 'pvalue -o -h -df ' for a binary file
and 'pvalue -o -h ' for an ascii file.
I then read both files into Matlab (under MS Windows): The ascii files
are fine, they show the exact same values as when viewing the
corresponding pic-image with ximage, or when just looking at the
ascii-file itself. (The world is consistent! Great!)
Then I read the binary file in (I have taken into account that the files
were generated on a big-endian machine and are now read on a
little-endian machine).
And: The numbers that you yield look reasonable, similar to what you
would expect, BUT they are not the same, even though the binary and the
ascii file were generated from the very same pic-file.
I looked at the minimum and the maximum values of either file, I
computed the sum over all pixel values: they are just not the same!
(just in case the matrix I deal with is in a different orientation)
WHY???? Please help!
Thanks!!!!!!!!!!!!!!!
Alexa
P.S. yes, I could use ascii-files, but they are huge and it takes longer
to read them in. So, that's why I want to store them as binaries.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dr. Alexa I. Ruppertsberg
Department of Optometry
University of Bradford
Bradford
BD7 1DP
UK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~