Issues Displaying a TIF image in Matlb
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Walter Roberson
il 27 Lug 2018
Modificato: Walter Roberson
il 27 Lug 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 Commenti
Vedere anche
Categorie
Scopri di più su Image Processing Toolbox in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!