Issues Displaying a TIF image in Matlb
2 ビュー (過去 30 日間)
古いコメントを表示
I'm trying to display a TIF image on matlab, but it's showing me an all black image. I've tried converting the file to both png and jpg, but the same things happen. It's a grayscale image (uint16). Byte: 2895360 and size 1040 x 1392.
0 件のコメント
回答 (1 件)
Walter Roberson
2018 年 7 月 27 日
編集済み: Walter Roberson
2018 年 7 月 27 日
If it is a medical image, it would not be uncommon for the maximum value to be around 6000, which is only about 10% of the 65535 maximum for uint16 . It is common with uint16 that you need to restrict the range of values to be displayed over. Often you would use imagesc() or use imshow() with [] as the second parameter, but if you want to know about internal mechanisms then see caxis()
Note: if you use imagesc() and do not specify a range, it is common to not be able to make out much detail. This is because it is common for the data to be concentrated in a band such as 4000 to 6500, so you might need to specify a range of values for imagesc() . You might want to use imhist() to get an idea of where the values are concentrated.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!