-
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
-
MultiMon
在window里多个显示器输出,并实现显示控制的代码。(In window multiple monitor output, and realize the display control code.)
- 2014-10-17 16:45:10下载
- 积分:1
-
NE39bus
说明: 新英格兰10机39节点系统,用于电力系统仿真(New England 10-machine 39 node system for power system simulation)
- 2021-02-21 01:19:43下载
- 积分:1
-
matlab
matlab
电力系统设计与分析 (matlab power system design and analysis)
- 2012-12-29 13:59:34下载
- 积分:1
-
mSequences
Maximum Length PN sequences are binary sequence generators that are capable of outputting all possible combinations of binary sequences in 2^m-1 cyclic shifts, where m is the size of the LFSR (Linear Feedback Shift Registers ) used in generating such sequences. Terms like Psuedorandom binary sequences (PRBS) or psuedonoise sequences are also used to refer m-sequences.
- 2012-05-01 13:46:39下载
- 积分:1
-
cwfac
利用matlab编程计算矩阵的协方差,对数学建模很有用(slove mathematics things)
- 2012-06-09 20:08:53下载
- 积分:1
-
MPPT
最大功率跟踪控制,适用于风电、海流能发电等控制系统(max power point track)
- 2018-11-13 09:41:06下载
- 积分:1
-
PIDcontrol
This simple program help you to calculate parameters for a pid controller for first order systems wiith delay using different method: Ziegler Nichols,Cohen coon,IMC...
(This simple program to help you calculate p arameters for a controller for pid's first order ystems wiith delay using different method : Ziegler Nichols, Cohen coon, and IMC ...)
- 2021-03-03 10:19:33下载
- 积分:1
-
ceshichengxv
小波包4级分解及特征向量空间的建立,希望对大家有用(4 wavelet packet decomposition and feature vector space for the establishment, in the hope that useful to everybody)
- 2007-08-31 17:04:29下载
- 积分:1
-
MATLAB
运用MATLAB编程实现计算两序列x1(n)={1,2,3,4,5},x2(n)={1,2,3,4,5,4,3,2,1}的圆周卷积(Calculated using MATLAB programming to achieve the two sequences x1 (n) = (1,2,3,4,5), x2 (n) = (1,2,3,4,5,4,3,2,1) of circular convolution)
- 2009-06-17 12:54:05下载
- 积分:1