32bits save as int32

조회 수: 9 (최근 30일)
Pamela Garcia
Pamela Garcia 2020년 6월 14일
댓글: Pamela Garcia 2020년 6월 14일
Hi there,
I have a 32bit tif image https://we.tl/t-H0WliT3O50 . This image is 'single' but Matlab assumes by default 32bit means int32 and when the image is open with imread() the image is binary. I would to read the image using grey scale. How can I do this? I´ve tried itconvert in double but the image is open as binary image.
Any help would be very much appreciated , thanks
  댓글 수: 8
Ameer Hamza
Ameer Hamza 2020년 6월 14일
This tiff file seems to have very unusual encoding. How did you generate the png file from the tiff file?
Pamela Garcia
Pamela Garcia 2020년 6월 14일
It is the result of windows photo visualizer

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2020년 6월 14일
If you look at imfinfo() of the file, you can see that the headers say it is a collection of nine images with 32 bit signed integer. If it is intended to be single instead, then the metadata is wrong.
for IDX = 1 : 9
imgint32 = imread('lh.average.CURVATURE.tif','index',IDX);
imgsingle{IDX} = reshape(typecast(imgint32(:), 'single'), size(img32));
end
  댓글 수: 1
Pamela Garcia
Pamela Garcia 2020년 6월 14일
Thank's a lot !

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by