图像处理和图像识别中常用的matlab函数
2012年03月28日 星期三 9:42
下面仅给出函数的大概意思,详细用法见: help 函数名 matlab help
1imreadread image from graphics file
2imshowdisplay image in Handle Graphics figure
3imwritewrite image to graphics file
4rgb2grayconvert RGB image or colormap to grayscale
5im2bwconvert image to binary image, based on threshold
6existcheck existence of variable, function, directory, or class
7sizesize of array,用此函数可以获得图像的高和宽;
8minsmallest elements in array
9maxlargest elements in array
10fprintfwrite data to text file;将信息显示到屏幕上或将数据写到指定的文件中;
11conv2two dimensional convolution;二维卷积(图像滤波)
12ones(m, n)create array of all ones
13zeros(m, n)create array of all zeros
14interp22-D data interpolation;二维插值(图像插值),多和meshgrid一起用;
15meshgridgenerate X and Y arrays for 3-D plots;用于产生网格,将向量区域转换成矩阵;
16clfclear current figure window;清除当前的图像,图像窗口仍存在;
17pausehalt execution temporarily;暂停;
18figurecreate figure graphics object
19pinvMoore-Penrose pseudoinverse of matrix;求矩阵的伪逆;
20hold onholds the current plot and all axis properties so that subsequent graphingcommands add to the existing graph
21hold offreturns to the default mode whereby PLOT commands erase the previousplots and reset all axis properties before drawing new plots
22errordisplay message and abort function
23isemptydetermine whether array is empty
24closeremove specified figure
25repmatreplicate and tile an array
26findfind indices and values of nonzero elements
27cellconstruct cell array
28atan2 four quadrant inverse tangent
29prodproduct(乘积) of array elements,对于向量返回的是其所有元素的积、对于矩阵返回的是按列向量的所有元素的积,然后组成 一行向量;
30absabsolute value and complex magnitude
31dispDisplay text or array
32clearremove items from workspace, freeing up system memory
33clcclear command window
34deletedelete file or graphics object
35diarysave text of MATLAB session(a copy of all subsequent command window input and most of the resulting command window output to be appended to the named file)
36savesaves all workspace variables to the binary "MAT-file"(disk)
37randuniformly distributed pseudo-random numbers;均匀分布的伪随机数;
38memorydisplay memory information
39packconsolidate workspace memory
40pwddisplays the current working directory
41feature('memstats'):可以用来查看内存的使用情况;
42lengthlength of vector or largest array dimension
43floorround towards minus infinity;朝负无穷方向靠近最近的整数;
44ceilround towards plus infinity;朝正无穷方向靠近最近的整数;
45roundround towards nearest integer;取最近的整数(相当于四舍五入)
46fixround towards zero;取离0最近的整数;
47normmatrix or vector norms(范数)
48modmodulus after division;求余数;
49reshapereshape array;改变指定矩阵的形状,元素个数不变;
50graythreshglobal image threshold using Otsu's method
51xorlogical exclusive OR;逻辑异或;
52imopenmorphologically open image;形态学开运算;
53imclosemorphologically close image;形态学闭运算;
54imerodeerode image;图像腐蚀;
55imdilatedilate image;图像膨胀;
56bwlabellabel connected components in 2-D binary image
ignore subsequent bad blocks57cpselectis a graphical user interface that enables you to select control points from two related images;手动在两幅图像中选取配准控制点;它会自动存到两个points 数组里面
58cp2tformtakes pairs of control points and uses them to infer spatial transformation;图象配准一个求坐标转换参数的函数;能修正6种变形;
59imcropcrops an image to a specified rectangle;图像剪切;
60imresizeresize image
61imrotaterotate image
62imtransformapply 2-D spatial transformation to image;图像空间变换;多与cp2tformmaketform 起用;
63maketformcreate spatial transformation structure (TFORM)
64edgefind edges in grayscale image;包括SobelPrewittRobertsLaplacian of GaussianZero-crossCanny
65cpcorrtune control point locations using cross-correlation;采用互相关法协调控制点位置,在图像配准中,对已选定的控制点进行微调;
66isnanarray elements that are NaN
67ischardetermine whether item is character array
68strcmpcompare strings
69colstyleparse color and style from string
70gcfget handle to current figure
71printprint figure or model save to disk as image or M-file
72warningdisplay warning messagedisable or enable warning messages
73nargoutnumber of function output arguments
74narginnumber of function input arguments
75anydetermine whether any array elements are nonzero
76medianmedian value of array
77imfinfoinformation about graphics file
78filter2two-dimensional digital filter;在计算filter2时先将卷积核旋转180度,再调用conv2函数进行计算,其实filter2conv2是等价的;
79fspecialcreate predefined 2-D filters
80detmatrix determinant(行列式)
81tracesum of diagonal(对角线) elements;矩阵的迹;
82plot2-D line plot;用于在指定位置标注;
83eyeidentity matrix(单位矩阵)
84meanaverage or mean value of array
85expexponential(指数)
86imagescscale data and display as image
87alldetermine whether all array elements are nonzero or true
88sortsort array elements in ascending or descending order
89sparsecreate sparse matrix
90setset Handle Graphics object properties
91invmatrix inverse(逆矩阵)
92drawnowflush event queue and update figure window
93remremainder after division(取余数)
94trilextract lower triangular part of matrix
95nargchkvalidate number of input arguments
96ordfilt22-D order-statistic filtering
97im2doubleconvert image to double precision
98pdistpairwise distance between pairs of objects
99versionversion number for MATLAB and libraries
100nargchkvalidate number of input arguments
101isadetermine whether input is object of given class(类型,如:charint8)
102vararginvariable length input argument list
103varargoutvariable length output argument list
104strcmpicompare strings ignoring case(忽略大小写)
105ndimsnumber of array dimensions
106assertgenerate an error when a condition is violated
107strcmpcompare strings
108ordfilt22-D order-statistic filtering(类似于形态学灰度图像膨胀)
109epsfloating-point relative accuracy
110randsamplerandom sample, with or without replacement
111fevalexecute the specified function
112dotvector dot product(向量点积)
113crossvector cross product(向量叉积)
114svdsingular value decomposition(奇异值分解)
115numelnumber of elements in an array or subscripted array expression
116nnznumber of nonzero matrix elements;可以用来计算某矩阵中某元素的个数;
117wiener22-D adaptive noise-removal filtering(二维自适应维纳滤波)
118medfilt22-D median filtering
119wavedec2multilevel 2-D wavelet decomposition
120wrcoef2reconstruct single branch from 2-D wavelet coefficients
121wpdencmpde-noising or compression using wavelet packets
122adjustadjust image intensity values or colormap
123moveguimove a figure window to a specified position on the screen
124uicontrolcreate user interface control
125waitforbuttonpresswait for key/buttonpress over figure
126imhistdisplay histogram of image data
127smoothsmooth response data
128cputimereturns the CPU time in seconds
129bitsetset bit at specified position;设置数的某一位二进制位为10
130bitgetget bit at specified position;取的数的某一位二进制位(只能是01)
131loadload workspace variables from disk
132axiscontrol axis scaling and appearance
133subplotcreate axes in tiled positions
134uimenucreate user interface menu
135evalexecute string with MATLAB expression
136segmentsegments data and estimate models for each segment(分割字符)
137strcatconcatenate strings horizontally
138num2strconvert numbers to string
139diffdifference and approximate derivative(导数)
140imcomplementcomplement image(图像反处理)
141bwmorphmorphological operations on binary image(二值图像形态学运算)
142strelcreate morphological structuring element
143regionpropsmeasure properties of image regions
144rectanglecreate rectangle, rounded-rectangle, or ellipse
145textcreate text object in current axes
146radonradon transform(用于检测图像中的线)
147ind2submultiple subscripts from linear index(把数组的单索引值(按列进行排列)转化相应的下标值(行列值))
148uigetfileopen standard dialog box for retrieving files
149im2colrearrange image blocks into columns(按列重新排列图像块)
150simsimulate dynamic system(仿真动态系统,如仿真神经网络)
151newffcreate feed-forward backpropagation network(生成一个BP网络)
152imadjustadjust image intensity values or colormap
153stretchlimfind limits to contrast stretch an image(获得图像对比度拉伸范围)
154inputrequest user input
155msemean squared normalized error performance function(可用来计算神经网络的均方误差)
156legendgraph legend for lines and patches(图例的线条和patches)
157initinitialize neural network(初始化一个神经网络)
158traintrain neural network(训练一个神经网络)
159dirfolder listing(列举当前文件夹里(或指定文件夹)所有的文件与文件夹)

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。