资源简介
树叶识别GUI语音播报文字识别.zip
代码片段和文件信息
function phi = invmoments(F)
%INVMOMENTS Compute invariant moments of image.
% PHI = INVMOMENTS(F) computes the moment invariants of the image
% F. PHI is a seven-element row vector containing the moment
% invariants as defined in equations (11.3-17) through (11.3-23) of
% Gonzalez and Woods Digital Image Processing 2nd Ed.
%
% F must be a 2-D real nonsparse numeric or logical matrix.
% Copyright 2002-2004 R. C. Gonzalez R. E. Woods & S. L. Eddins
% Digital Image Processing Using MATLAB Prentice-Hall 2004
% $Revision: 1.5 $ $Date: 2003/11/21 14:39:19 $
if (ndims(F) ~= 2) | issparse(F) | ~isreal(F) | ~(isnumeric(F) | ...
islogical(F))
error([‘F must be a 2-D real nonsparse numeric or logical ‘ ...
‘matrix.‘]);
end
F = double(F);
phi = compute_phi(compute_eta(compute_m(F)));
%-------------------------------------------------------------------%
function m = compute_m(F)
[M N] = size(F);
[x y] = meshgrid(1:N 1:M);
% Turn x y and F into column vectors to make the summations a bit
% easier to compute in the following.
x = x(:);
y = y(:);
F = F(:);
% DIP equation (11.3-12)
m.m00 = sum(F);
% Protect against divide-by-zero warnings.
if (m.m00 == 0)
m.m00 = eps;
end
% The other central moments:
m.m10 = sum(x .* F);
m.m01 = sum(y .* F);
m.m11 = sum(x .* y .* F);
m.m20 = sum(x.^2 .* F);
m.m02 = sum(y.^2 .* F);
m.m30 = sum(x.^3 .* F);
m.m03 = sum(y.^3 .* F);
m.m12 = sum(x .* y.^2 .* F);
m.m21 = sum(x.^2 .* y .* F);
%-------------------------------------------------------------------%
function e = compute_eta(m)
% DIP equations (11.3-14) through (11.3-16).
xbar = m.m10 / m.m00;
ybar = m.m01 / m.m00;
e.eta11 = (m.m11 - ybar*m.m10) / m.m00^2;
e.eta20 = (m.m20 - xbar*m.m10) / m.m00^2;
e.eta02 = (m.m02 - ybar*m.m01) / m.m00^2;
e.eta30 = (m.m30 - 3 * xbar * m.m20 + 2 * xbar^2 * m.m10) / m.m00^2.5;
e.eta03 = (m.m03 - 3 * ybar * m.m02 + 2 * ybar^2 * m.m01) / m.m00^2.5;
e.eta21 = (m.m21 - 2 * xbar * m.m11 - ybar * m.m20 + ...
2 * xbar^2 * m.m01) / m.m00^2.5;
e.eta12 = (m.m12 - 2 * ybar * m.m11 - xbar * m.m02 + ...
2 * ybar^2 * m.m10) / m.m00^2.5;
%-------------------------------------------------------------------%
function phi = compute_phi(e)
% DIP equations (11.3-17) through (11.3-23).
phi(1) = e.eta20 + e.eta02;
phi(2) = (e.eta20 - e.eta02)^2 + 4*e.eta11^2;
phi(3) = (e.eta30 - 3*e.eta12)^2 + (3*e.eta21 - e.eta03)^2;
phi(4) = (e.eta30 + e.eta12)^2 + (e.eta21 + e.eta03)^2;
phi(5) = (e.eta30 - 3*e.eta12) * (e.eta30 + e.eta12) * ...
( (e.eta30 + e.eta12)^2 - 3*(e.eta21 + e.eta03)^2 ) + ...
(3*e.eta21 - e.eta03) * (e.eta21 + e.eta03) * ...
( 3*(e.eta30 + e.eta12)^2 - (e.eta21 + e.eta03)^2 );
phi(6) = (e.eta20 - e.eta02) * ( (e.eta30 + e.eta12)^2 - ...
(e.eta21 + e.eta03)^2 ) + ...
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2013-03-13 00:50 树叶识别GUI+语音播报+文字识别\
文件 20255 2017-02-14 15:19 树叶识别GUI+语音播报+文字识别\1.png
文件 11175 2017-02-14 15:55 树叶识别GUI+语音播报+文字识别\2.png
文件 11290 2017-02-14 16:00 树叶识别GUI+语音播报+文字识别\3.png
文件 26114 2017-02-15 11:48 树叶识别GUI+语音播报+文字识别\4.png
文件 62539 2017-02-15 11:49 树叶识别GUI+语音播报+文字识别\5.png
文件 44190 2017-02-15 11:50 树叶识别GUI+语音播报+文字识别\6.png
文件 23552 2019-03-13 00:09 树叶识别GUI+语音播报+文字识别\Matlab课题说明推荐.doc
文件 80044 2017-02-14 15:52 树叶识别GUI+语音播报+文字识别\baiheye.wav
文件 41526 2013-03-13 00:23 树叶识别GUI+语音播报+文字识别\f.mat
文件 80044 2017-02-14 15:49 树叶识别GUI+语音播报+文字识别\fengye.wav
文件 3319 2012-12-12 15:37 树叶识别GUI+语音播报+文字识别\invmoments.m
文件 80044 2017-02-14 15:51 树叶识别GUI+语音播报+文字识别\lingye.wav
文件 13485 2013-03-13 00:25 树叶识别GUI+语音播报+文字识别\shuyeshibie.fig
文件 7318 2013-03-13 00:25 树叶识别GUI+语音播报+文字识别\shuyeshibie.m
文件 456772 2006-12-29 18:54 树叶识别GUI+语音播报+文字识别\train_1.tif
文件 98456 2006-12-29 19:11 树叶识别GUI+语音播报+文字识别\train_2.tif
文件 1156394 2006-12-30 16:11 树叶识别GUI+语音播报+文字识别\train_3.tif
文件 162316 2013-03-13 00:20 树叶识别GUI+语音播报+文字识别\运行截图.png
相关资源
- 尚硅谷1024专用全套视频打包地址不对
- 2018年百度地图poi数据.zip
- 近世代数基础习题指导.rar
- privateshell_中文版.exe
- www.yimuhe.com-双色球霸主软件V6.0破解版
- layimDemo.rar
- 阿西网站推广系统破解版.zip
- Trinamic芯片选型手册2018.pdf
- IPCJ-STD-002CCHINESE-2008.rar
- DLL2LIB3破解版修复查找符号bug.rar
- 新冠疫情如何影响世界经济-毕马威
- 079登陆器源码.rar
- STM32红外遥控实验.zip
- 17.zip
- 易飞科技算法注册机v5.22.rar
- 机器码工具.zip
- sl-cms.zip
- SpringBoot2.0教程.pdf
- iec61850-7-4{ed2.0}.pdf
- wav_pcm.zip
- zhupenghui1_10466937.zip
- EditPlus3.zip
- OpenCVdemo6by浅墨.rar
- 20170106202228721.zip
- 无线视频传输.zip
- 最优化理论与算法_习题解答.pdf
- gw53kr.pdf
- yunbaozhibosong_9884748.zip
- optisystem7.0破解包.rar
- v.tar.gz
评论
共有 条评论