imshow(image) and imshow(image,[])

5 views (last 30 days)
AJAY LADKAT
AJAY LADKAT on 16 Mar 2016
Commented: Rik on 10 Jul 2018
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
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.
Somaye Ahmadi
Somaye Ahmadi on 23 Oct 2017
@Jan Simon: Thanks for your comment. I didn't know. I'm so sorry.

Sign in to comment.

Accepted Answer

Rik
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
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
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.

Sign in to comment.

More Answers (0)

Categories

Find more on Image Processing Toolbox in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!