Borrar filtros
Borrar filtros

Issues Displaying a TIF image in Matlb

3 visualizaciones (últimos 30 días)
shiffraw dagnechaw
shiffraw dagnechaw el 27 de Jul. de 2018
Editada: Walter Roberson el 27 de Jul. de 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.

Respuestas (1)

Walter Roberson
Walter Roberson el 27 de Jul. de 2018
Editada: Walter Roberson el 27 de Jul. de 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.

Categorías

Más información sobre Convert Image Type en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by