imshow(image) and imshow(image,[])
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
imshow(I) (I = image) imshow(I) displays the image I in a graphics figure, where I is a grayscale, RGB (truecolor), or binary image. For binary images, imshow displays pixels with the value 0 (zero) as black and 1 as white.
imshow(I,[]) imshow(I,[low high]) displays the grayscale image I, specifying the display range as a two-element vector, [low high]. For more information, see the DisplayRange parameter .
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, the minimum value in I is black, and the maximum value is white.
Al Bashir, you should post your answer as an actual answer below. That way, Ajay can accept your answer and you get reputation. Plus, Ajay will be notified that an answer has been posted. Comments don't get notified, so he/she probably doesn't even know you've answered his question.
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
on 23 Oct 2017
@Jan Simon: Thanks for your comment. I didn't know. I'm so sorry.
Accepted Answer
More Answers (0)
Categories
Find more on Display Image 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!