what is the difference between imshow(im) or imshow(im, [])

4 visualizaciones (últimos 30 días)
tina jain
tina jain el 16 de Mzo. de 2015
Respondida: David Young el 16 de Mzo. de 2015
where im=imread('lena256.bmp');

Respuestas (1)

David Young
David Young el 16 de Mzo. de 2015
If the second argument is not a spatial referencing object, a colormap or a string, it specifies the display range. From the documentation :
"'DisplayRange' — Display range of grayscale image[min(I(:)) max(I(:))] (default) | two-element vector
"Display range of a grayscale image, specified as a two-element vector [LOW HIGH]. imshow displays the value low (and any value less than low) as black, and the value high (and any value greater than high) as white. Values in between are displayed as intermediate shades of gray, using the default number of gray levels. If you specify an empty matrix ([]), imshow uses [min(I(:)) max(I(:))]; that is, use the minimum value in I as black, and the maximum value as white."
The last sentence describes your case. I think the documentation is a little unhelpful, in that the description of the display range argument does not give full details, and does not refer forwards to the description of the display range given as a name-value pair.

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by