|
|
reading 64-bit TIF image
Hi,
I'd like to read 64-bit TIF Image with imread function. Is there any easy way? I know that it should be possible in my version (7.10.0 R2010a).
Thanks a lot
Marek
__
TIF file description:
Filename: [1x51 char]
FileModDate: '12-IX-2010 16:21:34'
FileSize: 2097374
Format: 'tif'
FormatVersion: []
Width: 1024
Height: 256
BitDepth: 64
ColorType: 'grayscale'
FormatSignature: [73 73 42 0]
ByteOrder: 'little-endian'
NewSubFileType: 0
BitsPerSample: 64
Compression: 'Uncompressed'
PhotometricInterpretation: 'BlackIsZero'
StripOffsets: 222
SamplesPerPixel: 1
RowsPerStrip: 256
StripByteCounts: 2097152
XResolution: 256
YResolution: 256
ResolutionUnit: 'Inch'
Colormap: []
PlanarConfiguration: 'Chunky'
TileWidth: []
TileLength: []
TileOffsets: []
TileByteCounts: []
Orientation: 1
FillOrder: 1
GrayResponseUnit: 0.0100
MaxSampleValue: 1.8447e+019
MinSampleValue: 0
Thresholding: 1
Offset: 8
SampleFormat: 'IEEE floating point'
UnknownTags: [1x1 struct]
|
|
0
|
|
|
|
Reply
|
Marek
|
9/15/2010 9:11:15 AM |
|
"Marek " <nahradniucet@gmail.com> wrote in message
news:i6q2jj$8jv$1@fred.mathworks.com...
> Hi,
>
> I'd like to read 64-bit TIF Image with imread function. Is there any easy
> way? I know that it should be possible in my version (7.10.0 R2010a).
Did you try just calling IMREAD on the image file? If so, what happened?
Did it throw a warning? Did it error? Did it return the wrong data?
--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com
|
|
0
|
|
|
|
Reply
|
Steven_Lord
|
9/15/2010 1:45:17 PM
|
|
On 9/15/2010 9:45 AM, Steven_Lord wrote:
>
>
> "Marek " <nahradniucet@gmail.com> wrote in message
> news:i6q2jj$8jv$1@fred.mathworks.com...
>> Hi,
>>
>> I'd like to read 64-bit TIF Image with imread function. Is there any
>> easy way? I know that it should be possible in my version (7.10.0
>> R2010a).
>
> Did you try just calling IMREAD on the image file? If so, what happened?
> Did it throw a warning? Did it error? Did it return the wrong data?
>
Where did you get a "64-bit" TIFF file? There is no indication in the
TIFF spec (http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf)
that this is allowed. If you search the entire spec for information
about the BitsPerSample tag, you'll find that it is restricted to 1, 4,
or 8 for baseline TIFF images. In the extensions section the additional
values of 16 and 32 are mentioned.
There's nothing about 64 being valid for BitsPerSample.
---
Steve Eddins
http://blogs.mathworks.com/steve/
|
|
0
|
|
|
|
Reply
|
Steve
|
9/15/2010 3:35:29 PM
|
|
Calling imread doesn't throw warning nor error, but maximum of resulting matrix is 32767. The image is output of VSpec, program for handling camera and spectrograph.
Yeh, you are right that 64-bit TIF doesn't correspond specification. Program VSpec was probably from some reason forced to save image in double precision, which may cause the problem.
Thank you for your advices and comments.
Marek
|
|
0
|
|
|
|
Reply
|
Marek
|
9/15/2010 8:05:03 PM
|
|
On 9/15/2010 4:05 PM, Marek wrote:
> Calling imread doesn't throw warning nor error, but maximum of resulting
> matrix is 32767. The image is output of VSpec, program for handling
> camera and spectrograph.
>
> Yeh, you are right that 64-bit TIF doesn't correspond specification.
> Program VSpec was probably from some reason forced to save image in
> double precision, which may cause the problem.
>
> Thank you for your advices and comments.
> Marek
How do you know the file is "64-bit"? What is the output of imfinfo for
the file?
---
Steve Eddins
http://blogs.mathworks.com/steve/
|
|
0
|
|
|
|
Reply
|
Steve
|
9/16/2010 5:09:42 AM
|
|
Hi Marek,
Even though it's a bit odd, IMREAD should be able to handle 64-bit floating point MinIsBlack images. Since you have 2010a, the Tiff object is also available, can read such images, and the results should agree, i.e.
d1 = imread(file);
t = Tiff(file);
d2 = t.read(); % d1 and d2 should be identical for this kind of image
"Marek " <nahradniucet@gmail.com> wrote in message <i6r8tf$14b$1@fred.mathworks.com>...
> Calling imread doesn't throw warning nor error, but maximum of resulting matrix is 32767. The image is output of VSpec, program for handling camera and spectrograph.
>
> Yeh, you are right that 64-bit TIF doesn't correspond specification. Program VSpec was probably from some reason forced to save image in double precision, which may cause the problem.
>
> Thank you for your advices and comments.
> Marek
|
|
0
|
|
|
|
Reply
|
John
|
9/16/2010 12:30:27 PM
|
|
|
5 Replies
426 Views
(page loaded in 0.05 seconds)
|
|
|
|
|
|
|
|
|