matlab中 图像A的显示 image(A), imshow(A),imshow(A,[])分别有什么作用

同一幅图像,为什么用三个函数显示出来,会很不一样呢?
这三个函数分别有什么特点啊?
求教高人指点

首先,MATLAB中image和imshow都可以用来图像显示,image函数的语法调用常有以下几种格式:image(A);image(x,y,A);
其中,image(A)是将矩阵A 作为一个图像显示,A中的每一个元素都被指定一种颜色;image(x,y,A)其中的x,y分别表示显示图像左上角的坐标,其它与image(A)含义相同。当然image还有别的调用格式,这里先不一一介绍了。
对于imshow函数,它的调用格式常见的有:imshow(A,n);imshow(A,[low high]);imshow(BW)等。
其中,imshow(A,n)表示利用n个灰度等级来显示一幅灰度图像A,当忽略n时,对于24位显示系统来说n的默认值是256,对于其他系统n默认值是64.
imshow(A,[low high])表示显示灰度图像A,并且指定A的数据范围。A中的数据小于或者等于low的数值被显示为黑的,大于或者等于high的数值被显示为白的,属于区间[low high]的数值自动按照灰度等级进行显示。如果使用空矩阵‘[]’来代替[low high]的话,imshow函数此时自动设置为[min(A) max(A)]就是说,A中最小的值显示为黑色,最大值显示为白色。
imshow(BW)用于显示二进制图像BW,BW中数值为0的像素显示为黑色,数值为1的像素显示为白色。
所以,你说的这三种格式的函数处理图像的时候效果是不一样的,而且要注意处理的图像格式也有区别。
纯手打,望采纳,谢谢!
温馨提示:答案为网友推荐,仅供参考
第1个回答  2008-12-02
matlab中 图像A的显示 image(A), imshow(A),imshow(A,[])分别有什么作用
悬赏分:20 - 离问题结束还有 14 天 21 小时
同一幅图像,为什么用三个函数显示出来,会很不一样呢?
这三个函数分别有什么特点啊?
求教高人指点
回答:论坛里有人问过,其实没有区别的,再说帮助里说的很清楚了阿
IMSHOW Display image.
IMSHOW(I,N) displays the intensity image I with N discrete
levels of gray. If you omit N, IMSHOW uses 256 gray levels on
24-bit displays, or 64 gray levels on other systems.

IMSHOW(I,[LOW HIGH]) displays I as a grayscale intensity
image, specifying the data range for I. The value LOW (and
any value less than LOW) displays as black, the value HIGH
(and any value greater than HIGH) displays as white, and
values in between display as intermediate shades of
gray. IMSHOW uses the default number of gray levels. If you
use an empty matrix ([]) for [LOW HIGH], IMSHOW uses
[min(I(:)) max(I(:))]; the minimum value in I displays as
black, and the maximum value displays as white.

IMSHOW(BW) displays the binary image BW. Values of 0 display
as black, and values of 1 display as white.

IMSHOW(X,MAP) displays the indexed image X with the colormap
MAP.

IMSHOW(RGB) displays the truecolor image RGB.

IMSHOW(...,DISPLAY_OPTION) displays the image, calling
TRUESIZE if DISPLAY_OPTION is 'truesize', or suppressing the
call to TRUESIZE if DISPLAY_OPTION is 'notruesize'. Either
option string can be abbreviated. If you do not supply this
argument, IMSHOW determines whether to call TRUESIZE based on
the setting of the 'ImshowTruesize' preference.

IMSHOW(x,y,A,...) uses the 2-element vectors x and y to
establish a nondefault spatial coordinate system, by
specifying the image XData and YData. Note that x and y can
have more than 2 elements, but only the first and last
elements are actually used.

IMSHOW(FILENAME) displays the image stored in the graphics
file FILENAME. IMSHOW calls IMREAD to read the image from the
file, but the image data is not stored in the MATLAB
workspace. The file must be in the current directory or on
the MATLAB path.

H = IMSHOW(...) returns the handle to the image object
created by IMSHOW.

Class Support
-------------
The input image can be of class logical, uint8, uint16,
or double, and it must be nonsparse.

Remarks
-------
You can use the IPTSETPREF function to set several toolbox
preferences that modify the behavior of IMSHOW:

- 'ImshowBorder' controls whether IMSHOW displays the image
with a border around it.

- 'ImshowAxesVisible' controls whether IMSHOW displays the
image with the axes box and tick labels.

- 'ImshowTruesize' controls whether IMSHOW calls the TRUESIZE
function.

For more information about these preferences, see the
reference entry for IPTSETPREF.

See also imread, imview, iptgetpref, iptsetpref, subimage, truesize, warp, image, imagesc.

Reference page in Help browser
doc imshow本回答被网友采纳
相似回答