⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mupq.m

📁 用matlab实现图像融合
💻 M
字号:
function val = mupq(F, p, q, Center)%------------------------------------------------------------------------------%% This function computes the central moments mu_{pq} of the gridfunction F% (seen as a density distribution).%% F      = input gridfunction (discrete density distribution).%% p, q   = input, order of the central moment (p in x-dir, q in y-dir).%% Center = input (optional argument), center of mass%% Note: calls mupq(F,1,0) and mupq(F,0,1) should result into zero (apart from%       rounding error).%% See also m00, m01, m10%% Design and implementation by:% Dr. Paul M. de Zeeuw <Paul.de.Zeeuw@cwi.nl>  http://homepages.cwi.nl/~pauldz/% Last Revision: November 27, 2000.% Copyright 2000 Stichting CWI, Amsterdam%------------------------------------------------------------------------------if nargin == 4  c = Center;  o=[0 0];  if ~all(size(o) == size(Center))    error(' mupq - unexpected dimensions of Center ')  else    clear o;  endelseif nargin == 3  c = masscenter(F);else  error(' mupq - number of arguments should be either 3 or 4 ')end[hx, hy] = gridfdims(F);val = sum(sum(  xcpowp(F, p, c(1)) ...              .*ycpowp(F, q, c(2)).*F ))*(hx*hy);%------------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -