感悟网 导航

matlab中 图像A的显示 image(A), imshow(A),imshow(A,[])分别有什么作用 Matlab中图像显示函数imshow与image有何异同

作者&投稿:琴育 (若有异议请与网页底部的电邮联系)
Matlab里 hi=image([0.2 5 50 0.4 0.5 9 20 0.2 11])中的数字分别是用来设置什么的参数~

一个matlab图像显示图像(A),imshow(A),imshow(A,[]),分别有什么作用
悬赏分:20 - 离问题结束14天内,以及相同的21小时

图像,为什么有三种功能展现出来,会有很大的不同?这三个功能都

有什么特点啊?



社区专家建议答案:论坛上有人问,其实,有没有什么区别,说的很清楚说要帮阿

IMSHOW显示图像

IMSHOW(我, N)显示强度图像I与N个离散

的灰度级。如果省略N,IMSHOW使用256级灰度上

24位显示器,或在其他系统上64级灰度。



IMSHOW(I,[低日高])显示我作为一个灰阶强度

图像,指定的数据范围为一,价值低(与

任何值比低减)显示为黑,白值高

(大于HIGH任何值)显示,与

值?在显示器之间为

灰色的中间阴影。 IMSHOW使用灰阶数为缺省值。如果你

使用一个空矩阵([])为[低高],IMSHOW使用

[分钟(我(:))最大(I(:))];在我显示的最小值为

黑色,最大值显示为白色。



IMSHOW(BW)显示二值图像BW。值0显示

为黑色,和值?1显示为白色的??

IMSHOW(X,MAP)与颜色表

地图显示的索引图像的X。



IMSHOW(RGB)显示真彩色图像的RGB。

IMSHOW(...,DISPLAY_OPTION)显示图像,调用

TRUESIZE如果DISPLAY_OPTION是'truesize“,或抑制

调用TRUESIZE如果DISPLAY_OPTION是'notruesize”。无论是

选项字符串可以缩写。如果你不提供这个

说法,IMSHOW决定是否根据

了“ImshowTruesize”偏好设置来调用TRUESIZE。



IMSHOW(X,Y,A,...)使用2个元素向量x和y以

建立一个非默认的空间坐标系,通过

指定图像XDATA和YDATA。注意,x和y可以

有2个以上的元素,但是只有第一个和最后一个

元件被实际使用。



IMSHOW(文件名)显示存储在图形图像

文件的文件名。 IMSHOW调用IMREAD从

文件读出的图像,但图像数据不存储在MATLAB

工作区。该文件必须在当前目录或

MATLAB的路径。



H = IMSHOW(...)返回的句柄图像对象

由IMSHOW创建。



类支持

-------。 ------

输入图像可以是类的逻辑,UINT8,UINT16,

或双,并且它必须是满阵线



- -----

您可以使用IPTSETPREF函数来设置IMSHOW的行为几个工具箱

喜好:



- “ImshowBorder'控制是否IMSHOW显示图像 BR />与它周围的边框



- ..'ImshowAxesVisible'控制是否IMSHOW显示与轴框

图像和刻度标记



- “ImshowTruesize “控制IMSHOW是否调用TRUESIZE

功能。



有关这些首选项的详细信息,请参阅IPTSETPREF的

参考条目。



又见imread,imview,iptgetpref,iptsetpref,子图像,truesize,翘曲,图像,于imagesc。



参考页在帮助浏览器
文档imshow

imshow(X,map)
其功能等同于:
image(X)
colormap(map)
但是,inshow的功能要强大一些,比如用于灰度图像,RGB图像,二进制图像,都可以应用.
imagesc属于图像缩放函数
具体说一些例子:
要显示一副灰度图像,可以调用函数 imshow 或 imagesc (即
imagescale,图像缩放函数)
(1) imshow 函数显示灰度图像
使用 imshow(I) 或 使用明确指定的灰度级书目:imshow(I,32)
由于Matlab自动对灰度图像进行标度以适合调色板的范围,因而可以使用自定义
大小的调色板.其调用格式如下:
imshow(I,[low,high])
其中,low 和 high 分别为数据数组的最小值和最大值.
(2) imagesc 函数显示灰度图像
下面的代码是具有两个输入参数的 imagesc 函数显示一副灰度图像imshow(X,map)
其功能等同于:
image(X)
colormap(map)
但是,inshow的功能要强大一些,比如用于灰度图像,RGB图像,二进制图像,都可以应用.
imagesc属于图像缩放函数
具体说一些例子:
要显示一副灰度图像,可以调用函数 imshow 或 imagesc (即
imagescale,图像缩放函数)
(1) imshow 函数显示灰度图像
使用 imshow(I) 或 使用明确指定的灰度级书目:imshow(I,32)
由于Matlab自动对灰度图像进行标度以适合调色板的范围,因而可以使用自定义
大小的调色板.其调用格式如下:
imshow(I,[low,high])
其中,low 和 high 分别为数据数组的最小值和最大值.
(2) imagesc 函数显示灰度图像
下面的代码是具有两个输入参数的 imagesc 函数显示一副灰度图像

首先,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的像素显示为白色。
所以,你说的这三种格式的函数处理图像的时候效果是不一样的,而且要注意处理的图像格式也有区别。
纯手打,望采纳,谢谢!

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

   

返回顶部
本页内容来自于网友发表,若有相关事宜请照下面的电邮联系
感悟网