32bits save as int32
이전 댓글 표시
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
2020년 6월 14일
편집: Ameer Hamza
2020년 6월 14일
In R2020a, MATLAB reads the image as uint32, and imshow shows it correctly as a grayscale image
img = imread('lh.average.CURVATURE.tif');
imshow(img);
Can you show the code to read the image? Also, can you show the output of
class(img)
where img is variable in which image is loaded.
Pamela Garcia
2020년 6월 14일
편집: Pamela Garcia
2020년 6월 14일
Ameer Hamza
2020년 6월 14일
Which MATLAB release are you using?
Pamela Garcia
2020년 6월 14일
Ameer Hamza
2020년 6월 14일
I am also using R2020a, and it reads the tiff image as uint32. Also, does the tiff and png files you shared corresponds to the same image?
Pamela Garcia
2020년 6월 14일
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
2020년 6월 14일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Convert Image Type에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!