MATLAB中imshow()和image():

IMSHOW Display image in Handle Graphics figure.

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

IMSHOW(RGB) displays the truecolor image RGB.

IMSHOW(BW) displays the binary image BW. IMSHOW displays pixels with the
value 0 (zero) as black and pixels with the value 1 as white.

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

IMSHOW(FILENAME) displays the image stored in the graphics file FILENAME.
The file must contain an image that can be read by IMREAD or
DICOMREAD. IMSHOW calls IMREAD or DICOMREAD to read the image from the file,
but does not store the image data in the MATLAB workspace. If the file
contains multiple images, the first one will be displayed. The file must be
in the current directory or on the MATLAB path.

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

IMSHOW(...,PARAM1,VAL1,PARAM2,VAL2,...) displays the image, specifying
parameters and corresponding values that control various aspects of the
image display. Parameter names can be abbreviated, and case does not matter.

Parameters include:

'Border' String that controls whether
a border is displayed around the image in the
figure window. Valid strings are 'tight' and
'loose'.

Note: There can still be a border if the image
is very small, or if there are other objects
besides the image and its axes in the figure.

By default, the border is set to the value
returned by
IPTGETPREF('ImshowBorder').

'Colormap' 2-D, real, M-by-3 matrix specifying a colormap.
IMSHOW uses this to set the figure's colormap
property. Use this parameter to view grayscale
images in false color.

'DisplayRange' Two-element vector [LOW HIGH] that controls the
display range of a grayscale image. See above
for more details about how to set [LOW HIGH].

Including the parameter name is optional, except
when the image is specified by a filename.
The syntax IMSHOW(I,[LOW HIGH]) is equivalent to
IMSHOW(I,'DisplayRange',[LOW HIGH]).
The parameter name must be specified when
using IMSHOW with a filename, as in the syntax
IMSHOW(FILENAME,'DisplayRange'[LOW HIGH]).

'InitialMagnification' A numeric scalar value, or the text string 'fit',
that specifies the initial magnification used to
display the image. When set to 100, the image is
displayed at 100% magnification. When set to
'fit' IMSHOW scales the entire image to fit in
the window.

On initial display, the entire image is visible.
If the magnification value would create an image
that is too large to display on the screen,
IMSHOW warns and displays the image at the
largest magnification that fits on the screen.

By default, the initial magnification is set to
the value returned by
IPTGETPREF('ImshowInitialMagnification').

If the image is displayed in a figure with its
'WindowStyle' property set to 'docked', then
IMSHOW warns and displays the image at the
largest magnification that fits in the figure.

Note: If you specify the axes position (using
subplot or axes), imshow ignores any initial
magnification you might have specified and
defaults to the 'fit' behavior.

When used with the 'Reduce' parameter, only
'fit' is allowed as an initial magnification.

'Parent' Handle of an axes that specifies
the parent of the image object created
by IMSHOW.

'Reduce' Logical value that specifies whether IMSHOW
subsamples the image in FILENAME. The 'Reduce'
parameter is only valid for TIFF images and
you must specify a filename. Use this
parameter to display overviews of very large
images.

'XData' Two-element vector that establishes a
nondefault spatial coordinate system by
specifying the image XData. The value can
have more than 2 elements, but only the first
and last elements are actually used.

'YData' Two-element vector that establishes a
nondefault spatial coordinate system by
specifying the image YData. The value can
have more than 2 elements, but only the first
and last elements are actually used.

Class Support
-------------
A truecolor image can be uint8, uint16, single, or double. An indexed
image can be logical, uint8, single, or double. A grayscale image can
be any numeric datatype. A binary image is of class logical.

If your grayscale image is single or double, the default display range is
[0 1]. If your image's data range is much larger or smaller than the default
display range, you may need to experiment with setting the display range to
see features in the image that would not be visible using the default
display range. For all grayscale images having integer types, the default
display range is [intmin(class(I)) intmax(class(I))].

If your image is int8, int16, uint32, int32, or single, the CData in
the resulting image object will be double. For all other classes, the
CData matches the input image class.

Related Toolbox Preferences
---------------------------
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.

- 'ImshowInitialMagnification' controls the initial magnification for
image display, unless you override it in a particular call by
specifying IMSHOW(...,'InitialMagnification',INITIAL_MAG).

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

Remarks
-------
IMSHOW is the toolbox's fundamental image display function, optimizing
figure, axes, and image object property settings for image display. IMTOOL
provides all the image display capabilities of IMSHOW but also provides
access to several other tools for navigating and exploring images, such as
the Pixel Region tool, Image Information tool, and the Adjust Contrast
tool. IMTOOL presents an integrated environment for displaying images and
performing some common image processing tasks.

The imshow function is not supported when MATLAB is started with the
-nojvm option.

Examples
--------
% Display an image from a file
imshow('board.tif')

% Display an indexed image
[X,map] = imread('trees.tif');
imshow(X,map)

% Display a grayscale image
I = imread('cameraman.tif');
imshow(I)

% Display a grayscale image, adjust the display range
h = imshow(I,[0 80]);

See also imread, imtool, iptprefs, subimage, truesize, warp, image,
imagesc.

IMAGE Display image.

IMAGE(C) displays matrix C as an image. Each element of C
specifies the color of a rectilinear patch in the image. C can be
a matrix of dimension MxN or MxNx3, and can contain double, uint8,
or uint16 data.

When C is a 2-dimensional MxN matrix, the elements of C are used
as indices into the current COLORMAP to determine the color. The
value of the image object's CDataMapping property determines the
method used to select a colormap entry. For 'direct' CDataMapping
(the default), values in C are treated as colormap indices
(1-based if double, 0-based if uint8 or uint16). For 'scaled'
CDataMapping, values in C are first scaled according to the axes
CLim and then the result is treated as a colormap index. When C is
a 3-dimensional MxNx3 matrix, the elements in C(:,:,1) are
interpreted as red intensities, in C(:,:,2) as green intensities,
and in C(:,:,3) as blue intensities, and the CDataMapping property
of image is ignored. For matrices containing doubles, color
intensities are on the range [0.0, 1.0]. For uint8 and uint16
matrices, color intensities are on the range [0, 255].

IMAGE(C) places the center of element C(1,1) at (1,1) in the axes,
and the center of element (M,N) at (M,N) in the axes, and draws
each rectilinear patch as 1 unit in width and height. As a
result, the outer extent of the image occupies [0.5 N+0.5 0.5 M+0.5]
of the axes, and each pixel center of the image lies at integer
coordinates ranging between 1 and M or N.

IMAGE(X,Y,C), where X and Y are vectors, specifies the locations
of the pixel centers of C(1,1) and C(M,N). Element C(1,1) is
centered over (X(1), Y(1)), element C(M,N) is centered over
(X(end), Y(end)), and the pixel centers of the remaining elements
of C are spread out evenly between those two points, so that the
rectilinear patches are all of equal width and height.

IMAGE returns a handle to an IMAGE object.

C or the X,Y,C triple can be followed by property/value
pairs to specify additional properties of the image.
C or the X,Y,C triple can be omitted entirely, and all
properties specified using property/value pairs.

IMAGE(...,'Parent',AX) specifies AX as the parent axes for the
image object during creation.

When called with C or X,Y,C, IMAGE sets the axes limits to tightly
enclose the image, sets the axes YDir property to 'reverse', and
sets the axes View property to [0 90].

The image object will not render at axes View angles other than
[0 90]. To get a similar effect to rotating an image, use SURF
with texture mapping or PCOLOR.

Execute GET(H), where H is an image handle, to see a list of image
object properties and their current values. Execute SET(H) to see a
list of image object properties and legal property values.

See also imagesc, colormap, pcolor, surf, imread, imwrite.

MATLAB中imshow()和image()的更多相关文章

  1. Matlab 中 imshow 函数

    转自: https://blog.csdn.net/xiaochou87/article/details/43488829 matlab中显示图像的语句是:                       ...

  2. Matlab中imshow()函数的使用

    imread() 返回的图像类型是uint8类型, 这时用imshow显示图像的时候, imshow会认为输入矩阵的范围在0-255, 如果imshow的参数为double类型的,那么imshow认为 ...

  3. Matlab中image、imagesc和imshow函数用法解析

    来源:https://blog.csdn.net/zhuiyuanzhongjia/article/details/79621813 1.显示RGB图像 相同点:这三个函数都是把m*n*3的矩阵中的数 ...

  4. matlab中图片数据类型转换uint8与double

    matlab中处理图像像素点数据: img1=double(imread('lenna.bmp')); matlab中imshow图片,要先转换成uint8: subplot(1,2,1),imsho ...

  5. paper 121 :matlab中imresize函数

    转自:http://www.cnblogs.com/rong86/p/3558344.html matlab中函数imresize简介: 函数功能:该函数用于对图像做缩放处理. 调用格式: B = i ...

  6. matlab中imresize

    matlab中函数imresize简介: 函数功能:该函数用于对图像做缩放处理. 调用格式: B = imresize(A, m) 返回的图像B的长宽是图像A的长宽的m倍,即缩放图像. m大于1, 则 ...

  7. 在matlab中进行遥感影像地理坐标的相互转换

    在matlab中进行图像处理,一般使用的都是图像本地坐标,以左上角(1,1)开始.处理完成后,如果要将结果在带地理坐标的遥感影像中显示,或者需要输出成shp文件,就需要涉及到本地坐标和地理坐标的转换, ...

  8. 【caffe-windows】 caffe-master 之Matlab中model的分类应用

    此篇讲述在matlab中,如何将训练好的model用于图像分类.将以mnist为例,主要用到caffe-master\matlab\demo 下的classification_demo.m ,可参考我 ...

  9. MATLAB中文件的读写和数据的导入导出

    http://blog.163.com/tawney_daylily/blog/static/13614643620111117853933/ 在编写一个程序时,经常需要从外部读入数据,或者将程序运行 ...

随机推荐

  1. 再度分(tu)析(cao)Egret这个年轻人

    写在最前 笔者用Egret来开发游戏已经有2年多之久了,从它出现到如今的3.2.x版本,经历了很多很多,也做了很多类型的游戏了,关键是踩了很多很多坑. 很多网友问我Egret有哪些优劣,我也只是说了一 ...

  2. process有个env属性,env属性就是环境变量,里面可以访问到NODE_ENV;NODE_ENV是在启动nodejs时添加上去的;

    添加命令 为export NODE_ENV=production:

  3. maven项目打包

    配置 你的pom.xml文件,配置 packaging为 war ,然后点击 pom.xml右键,run as 选择 install 或是 package: 如果项目没问题,配置没问题,就会在项目的t ...

  4. php这样实现伪静态

    mod_rewrite是Apache的一个非常强大的功能,它可以实现伪静态页面.下面我详细说说它的使用方法 1.检测Apache是否支持mod_rewrite 通过php提供的phpinfo()函数查 ...

  5. win下vm10+mac os 10.9安装遇到问题

    在windows 8下安装vm10.0.0+mac os 10.9遇到问题记录例如以下: 一.因为之前我装的vm9+mac os 10.7: 二.准备安装mac os 10.9,把vm9换成vm10: ...

  6. 3种SQL语句分页写法

    在开发中经常会使用到数据分页查询,一般的分页可以直接用SQL语句分页,当然也可以把分页写在存储过程里,下面是三种比较常用的SQL语句分页方法,下面以每页5条数据,查询第3页为例子: 第一种:使用not ...

  7. 创建基于maven的项目模版

    我们在实际工作中 ,有些项目的架构是相似的,例如基于 restful的接口项目,如果每次都重新搭建一套架构或者通过拷贝建立一个项目难免有些得不偿失,这里我们可以用maven的archtype建立项目模 ...

  8. Window Server 2012无线网卡和声卡驱动解决方法

    刚开始安装server2012时,驱动一直装不上以为是驱动的问题,后来在网上找了一下才明白是为啥,由于服务器默认不会开启无线LAN功能.和声卡服务,下面简单的方式给大家介绍一下解决方法: 无线网卡解决 ...

  9. static和extern关键字 对函数的作用

    本文目录 • 一.extern与函数 • 二.static与函数 • 三.static.extern与函数的总结说明:这个C语言专题,是学习iOS开发的前奏.也为了让有面向对象语言开发经验的程序员,能 ...

  10. Struts2配置问题java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter

    方法一:右键点击项目--->build path-->configure build path-->左侧菜单栏就会看到Deployment Assembly-->右侧点击add ...