Issues Displaying a TIF image in Matlb
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
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.
0 commentaires
Voir également
Catégories
En savoir plus sur Image Processing Toolbox 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!