-
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
-
attachmentsBPSK-AWGNPRAY
Important simulations in digital communication BPSK AWGN+RAY channels.
- 2015-03-04 23:44:42下载
- 积分:1
-
regress-137
base is now HeapNumber with valid Smi value.
- 2014-09-22 08:54:44下载
- 积分:1
-
threemachines
电力系统下微电网在MATLAB中的仿真建模,模型已经搭建好(Power system three-machine nine-node model, simulation based on module construction, simulink)
- 2021-01-27 15:58:40下载
- 积分:1
-
MATLABbijin
最小二乘法、最佳均方逼近、随机拟合及其MATLAB程序(Least square method, the best mean square approximation, random process fitting and MATLAB)
- 2010-05-17 22:18:37下载
- 积分:1
-
Homography-based-image-rectification
matlab实现图像的 Homography 矫正,有图片和示例,具体程序见 RectifyImg.m(the iamge Homography rectification based matlab, the sample including code and images are given. run the main program RectifyImg.m)
- 2012-04-25 22:47:14下载
- 积分:1
-
jidianouhe_dtc
永磁同步电机直接转矩控制的matlab/simlink仿真图(Permanent Magnet Synchronous Motor Direct Torque Control matlab/simlink simulation map)
- 2014-11-18 14:28:27下载
- 积分:1
-
IIR
MATLAB平台实现FIR的滤波器设计
利用双线性变换法设计IIR数字Butterworth低通滤波器(MATLAB platform design FIR filter design using bilinear transform IIR digital Butterworth low-pass filter)
- 2009-06-12 15:12:59下载
- 积分:1
-
equation
Matlab系列。线性方程计算算法比较分析(Matlab series. Linear equation comparative analysis algorithm)
- 2007-07-09 17:09:23下载
- 积分:1
-
yanshe
這是本人自己寫的基於matlab的夫瑯禾費衍射仿真程序,希望能夠幫到有需要的人(This is my own writing based on the matlab Fraunhofer diffraction simulation program, hoping to help the needy。)
- 2011-12-22 14:15:07下载
- 积分:1