-
li9_23
clear all
I=imread( lena.bmp )
figure imshow(I)
I2=imrotate(I,-4, bilinear ) 逆时针旋转4度
figure imshow(I2)
I3=fliplr(I) 垂直镜像
figure imshow(I3)
I4=imresize(I,0.5, bilinear ) 缩小为原图的1/2
figure imshow(I4)
A=double(I) 转换为double类型
计算7个不变矩
[nc,nr]=size(A)
[x,y]=meshgrid(1:nr,1:nc) 得到网格
x=x(:)
y=y(:)
A=A(:)
m.m00=sum(A)
if m.m00==0
m.m00=eps
end
m.m10=sum(x.*A)
m.m01=sum(y.*A)
计算均值
xmean=m.m10/m.m00
ymean=m.m01/m.m00
计算中心矩(li9_23.rar
cm.cm00=m.m00
cm.cm02=(sum((y-ymean).^2.*A))/(m.m00^2)
cm.cm03=(sum((y-ymean).^3.*A))/(m.m00^2.5)
cm.cm11=(sum((x-xmean).*(y-ymean).*A))/(m.m00^2)
cm.cm12=(sum((x-xmean).*(y-ymean).^2.*A))/(m.m00^2.5)
cm.cm20=(sum((x-xmean).^2.*A))/(m.m00^2)
cm.cm21=(sum((x-xmean).^2.*(y-ymean).*A))/(m.m00^2.5)
cm.cm30=(sum((x-xmean).^3.*A))/(m.m00^2.5)
im(1)=cm.cm20+cm.cm02
im(2)=(cm.cm20-cm.cm02)^2+4*cm.cm11^2
im(3)=(cm.cm30-3*cm.cm12)^2+(3*cm.cm21-cm.cm03)^2
im(4)=(cm.cm30+cm.cm12)^2+(cm.cm21+cm.cm03)^2
im(5)=(cm.cm30-3*cm.cm12)*(cm.cm30+cm.cm12)...
*((cm.cm30+cm.cm12)^2-3*(cm.cm21+cm.cm03)^2)...
+(3*cm.cm21-cm.cm03)*(cm.cm21+cm.cm03)...
+(3*(cm.cm30+cm.cm12)^2-(cm.cm21+cm.cm03)^2)
im(6)=(cm.cm20-cm.cm02)*((cm.cm30+cm.cm12)^2-(cm.cm21+cm.cm03)^2)...
+4*cm.cm11*(cm.cm30+cm.cm12)*(cm.cm21+cm.cm03)
im(7)=(3*cm.cm21-cm.cm03)*(cm.cm30+cm.cm12)...
*((cm.cm30+cm.cm12)^2-3*(cm.cm21+cm.cm03)^2)...
+(3*cm.cm12-cm.cm30)*(cm.cm21+cm.cm03)...
*()
- 2010-10-17 21:53:14下载
- 积分:1
-
RandomQSort
随机快速算法与确定性快速算法的比较,可设置数组大,小包含有实验报告(Fast Algorithm for Stochastic Fast Algorithms and certainty, you can set an array of big and small contain Experimental Report)
- 2010-02-10 17:53:34下载
- 积分:1
-
matlabencyclopediach6-8
matlab宝典,电子工业出版社,包含该书的源码4-6章,第4章数据分析第5章符号计算第6章数据和函数的可视化(Matlab, the book electronics industry Press, the book contains chapters 4-6 source, Chapter 4 Data Analysis Chapter 5 Symbolic Computation Chapter 6 of the data and visual function)
- 2007-05-30 17:36:20下载
- 积分:1
-
matlab_ipt_tutorial
ce turorial presente le finctionnement du matlab 6.5
- 2013-02-04 19:24:49下载
- 积分:1
-
PCA_classifier_version1b
PCA is used for data classification
- 2018-01-28 21:53:46下载
- 积分:1
-
zhixinxingwei
这是一个用Matlab编写的用于WSN中质心算法计算节点位置的源程序(this resource is used to calculate the locationof the nodes in WSN)
- 2011-07-05 11:35:01下载
- 积分:1
-
exam1
clark,s transformation using matlab
- 2014-09-16 12:54:59下载
- 积分:1
-
AP_code
Affinity Propagation聚类算法源码(Matlab)。內附两个测试用例(ToyProblem.mat,FaceClusteringSimilarities.zip)(Affinity Propagation Clustering algorithm source code and two dataset for testing)
- 2020-11-26 12:19:31下载
- 积分:1
-
Imagespatialfiltering
以Matlab为平台实现图像3*3和7*7空域平滑滤波,附有程序流程图、源代码以及运行结果截图。(In Matlab as a platform for image 3* 3 and 7* 7 spatial filtering, with a process flow diagram, source code and run the result screenshot.)
- 2010-07-14 16:30:01下载
- 积分:1
-
Pinhole-array
用于生成3D显示所需的针孔阵列,每个针孔为正方形。(for 3D displays.)
- 2014-11-17 21:02:51下载
- 积分:1