-
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
-
matlab-web-service
实现了基于matlab web server的虚拟试验平台的程序,实现了部分信号与系统的验证性试验(Implementation of virtual experimental platform of Matlab Web based on server program, realized the confirmatory test signals and systems Part)
- 2014-12-19 10:07:11下载
- 积分:1
-
play-movie
the code is read the video frame, then using the movie() function to play automatically
- 2013-12-27 11:08:43下载
- 积分:1
-
jisuanxuliedeDFT
计算序列的DFT,并画出其幅度和频谱曲线(Computing the DFT of the sequence, and draw the magnitude and spectrum curve)
- 2012-06-17 15:26:27下载
- 积分:1
-
eofscale
matlab计算气象专业常用EOFscale程序,经测试可以使用(Common EOFscale meteorological computing matlab procedures)
- 2013-12-19 14:14:31下载
- 积分:1
-
00018
基于matlab开发的特征选择算法,提取ECG(心电信号)的最有特征组合,降低特征维度。(Based matlab developed feature selection algorithm the extracted ECG (ECG) is the most feature combination to reduce the feature dimension.)
- 2012-11-14 17:55:11下载
- 积分:1
-
two_line_array_ok
二元线阵复加权的小程序,输出不同条件的方向图波束,很好的概念展示(The two yuan line array of complex weighting applet, the output beam pattern of the different conditions, the concept of good show)
- 2012-11-28 23:07:21下载
- 积分:1
-
che
说明: 一个简单的运动目标检测程序,适合初学者看的,环境matlab,,(A simple moving target detection procedure, suitable for beginners look at the environment matlab,,)
- 2009-08-27 15:22:57下载
- 积分:1
-
fuzzy_logic
a set of packages fuzzy logic in various applications: fluid applications, fuzzy logic, Kalman filter and movement of mobile
- 2013-08-29 05:01:46下载
- 积分:1
-
perception
感知机学习的源代码,希望能对大家有学习上的帮助!(Perception of the source code of machine learning, we hope to help learning!)
- 2012-08-28 17:45:24下载
- 积分:1