Difficulties with Matlab12b function imshow()

前端 未结 1 1892
清歌不尽
清歌不尽 2021-01-25 09:29

I\'m using MATLAB for image processing and I came across a code with the instruction:

imshow(pixel_labels,[]); 

when executed it give a binar

相关标签:
1条回答
  • 2021-01-25 10:01

    If I type help imshow in MATLAB, the first paragraph reads:

    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. If you use an empty matrix ([]) for [LOW HIGH], IMSHOW uses [min(I(:)) max(I(:))]; that is, the minimum value in I is displayed as black, and the maximum value is displayed as white.

    so [] is simply shorthand for [min(pixel_labels(:)) max(pixel_labels(:))].

    0 讨论(0)
提交回复
热议问题