-
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
-
PSO_CESHI
经典的基本PSO粒子群优化算法的测试函数,包括主程序和测试函数,非常经典(The classic PSO basic particle swarm optimization test functions, including the main program and test functions, very classic)
- 2020-11-21 00:29:38下载
- 积分:1
-
FengLiJiFangZhen
风力机模型MATLAB仿真,叶尖速比,转矩,利用系数的MATLAB仿真,SIMULINK搭建仿真模型(MATLAB simulation of wind turbine model, the tip speed ratio, torque, utilization factor of MATLAB simulation, SIMULINK simulation model building)
- 2014-05-12 16:55:01下载
- 积分:1
-
Harris
用MATLAB编写Harris提取算子的具体算法(Harris prepared using MATLAB operator specific algorithm for extracting)
- 2020-10-22 19:47:23下载
- 积分:1
-
kalman-emulation
说明: 卡尔曼滤波仿真实例,内附word版实验报告(Kalman filter simulation, experimental version of the report containing a word)
- 2011-04-11 20:37:49下载
- 积分:1
-
GM11
说明: GM(1,1)的程序,要用就下啥,可以预测的,里面有详细的说明,很容易看懂的!(GM (1,1) procedures, to use on the next receivers, and can be predicted, there are detailed explanations, it is easy to read!)
- 2005-09-17 15:27:17下载
- 积分:1
-
queuetheory
排队论编程,单柜台,泊松分布到达,指数分布服务时间,求解平均等待队长(Queuing theory to programming, a single counter, Poisson arrival, exponential service time, average waiting queue length for solving)
- 2021-01-14 09:28:47下载
- 积分:1
-
aumerical-integ-ration
: 针对实际振动位移难以获取的问题, 利用振动位移与加速度信号之间的关系, 先对采样后的加速度信
号采用时域数值积分,得到含有趋势项的速度信号及位移信号,再采用拟合多项式极值的方法, 消除积分过程
中产生的趋势项,从而得到更为精确的速度和位移信号. 算例表明, 利用拟合多项式极值消除趋势项的方法,
得到的位移时程曲线拟合精度高(: In pract ical engineering , the collection of displacement data is mo re dif ficult than that of the
acceleratio n data in the time-domain .Displacement sig nals w as g ot f rom acceleration s ignals using
aumerical integrat ion , wi th the t rend o f erro r. Poly nomial fit ting method o f ex t reme value to eliminate
the trend of erro r w as proposed . More precise di splacement data can be acquired f rom thi s algo rithm.
The example show s that thi s alg orithm can get hig h accuracy displacement data f rom the acceleration
data mo re easi ly .)
- 2014-12-14 18:11:57下载
- 积分:1
-
anli21.5-4
北京航空航天大学出版的matlab从零进阶的原程序代码第1章案例21.4源代码(Beijing University of Aeronautics and Astronautics from zero Advanced matlab published the original program code in Chapter 1 Case 21.4 source code)
- 2014-01-17 21:48:01下载
- 积分:1
-
Signal-spectrum-analysis-and-MATLAB
信号的频谱分析及MATLAB实现_张登奇(2)(Signal spectrum analysis and MATLAB _ Zhang Dengqi (2))
- 2013-05-24 10:30:11下载
- 积分:1