Read an 16 unsigned bits image...
Show older comments
Hello Everybody,
I have a question really stupid but I do not know how how to open a 16 unsigned bit image.
To do that, I use the following program:
f = fopen('ucam.dat','r');
part_corr = fread(f, 80*60, 'ubit16','ieee-be');
fclose (f);
im=reshape(part_corr,80,60);
imagesc(im')
I hope you will find a good representation. In my doc, it is written:
16 bit color and resolution: 80x60
Thanks for advance!!!
4 Comments
Image Analyst
on 9 Aug 2012
Well it looks like your result is what you wanted to obtain, or more likely you just pasted the wrong link.
freluque
on 9 Aug 2012
Image Analyst
on 9 Aug 2012
No you didn't.
freluque
on 10 Aug 2012
Accepted Answer
More Answers (1)
Image Analyst
on 9 Aug 2012
Did you try it like this, to avoid having to reshape:
fread(fid, [80, 60], '*uint16', 'ieee-be');
and are you sure there are no header bytes you need to skip?
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!