imshow(image) and imshow(image,[])
5 views (last 30 days)
Show older comments
what is the difference between imshow(image) and imshow(image,[]) I am getting different images for this different lines, but I am not getting the logic behind it, can anybody help me for this...
4 Comments
Jan
on 2 Oct 2017
@Somaye Ahmadi: Flags are used to inform the admins and editors about contributions, which might conflict with the terms of use, e.g. by rudeness or illegal content. Please do not use them to post comments. Thanks.
Accepted Answer
Rik
on 9 Feb 2017
If you type "help imshow" or "doc imshow", you can read what Al Bashir said in his comment. In my copy of Matlab the first lines of the help read:
imshow(I) displays the grayscale image I.
imshow(I,[LOW HIGH]) displays the grayscale image I, specifying the display
range for I in [LOW HIGH]. The value LOW (and any value less than LOW)
displays as black, the value HIGH (and any value greater than HIGH) displays
as white. Values in between are displayed as intermediate shades of gray,
using the default number of gray levels.
imshow(I,[]) displays the grayscale image I scaling the display based
on the range of pixel values in I. imshow uses [min(I(:)) max(I(:))] as
the display range, that is, the minimum value in I is displayed as
black, and the maximum value is displayed as white.
imshow(RGB) displays the truecolor image RGB.
10 Comments
Adam
on 10 Jul 2018
imshow is part of base Matlab. Maybe it was in the Image Processing Toolbox once, but I don't remember it being.
Rik
on 10 Jul 2018
There is indeed also a doc page for the base Matlab function: here. Interesting to see the differences with the IPT version of the doc. Anyway, either contains the part I quoted.
More Answers (0)
See Also
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!