Issues Displaying a TIF image in Matlb

2 vues (au cours des 30 derniers jours)
shiffraw dagnechaw
shiffraw dagnechaw le 27 Juil 2018
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.

Réponses (1)

Walter Roberson
Walter Roberson le 27 Juil 2018
Modifié(e) : Walter Roberson le 27 Juil 2018
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.

Catégories

En savoir plus sur Convert Image Type dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by