what is the difference between imshow(im) or imshow(im, [])
3 次查看(过去 30 天)
显示 更早的评论
回答(1 个)
David Young
2015-3-16
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.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!