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

3 vues (au cours des 30 derniers jours)
tina jain
tina jain le 16 Mar 2015
where im=imread('lena256.bmp');

Réponses (1)

David Young
David Young le 16 Mar 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.

Catégories

En savoir plus sur Display Image dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by