enhancing display of image
    3 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
Dear All, I have a very simple question for gray scale image. I want to display an image from 8 bit to 16 bit.
0 Kommentare
Antworten (1)
  Image Analyst
      
      
 am 10 Jul. 2016
        The contrast in the image does not change when you change the number of bits. Contrast is defined by ratios of dark and brightest values.
imshow() maps the full display range of the class of the image. So if you have a uint8 image with a range of 0-40 then displaying it with imshow(img) will show it in a display range of 0-255. If the image is uint16, then it will show it with a display range of 0-65535. Either way it will look dark - darkest with the uint16 class.
Now if you took the uint8 image and multiplied it by 256 then it would go from 0-10240 but would still look dark. There's no increase in contrast despite casting to uint16 and multiplying by 256.
To have the actual image range get mapped to the display range of the display, you need to use [] in imshow
imshow(img, []);
Now it will map 40 to 255 and the uint8 will look brighter. Or if it's a uint16 image, it will map 40 to 65535 and will also be brighter. It will look the same no matter if you multiplied by 256 or not, so the image with 10240 gray levels will look the same as the uint16 image with 40 gray levels and the uint8 image with 40 gray levels.
1 Kommentar
Siehe auch
Kategorien
				Mehr zu Image Preview and Device Configuration finden Sie in Help Center und File Exchange
			
	Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

