xcpowp.m
来自「用matlab实现图像融合」· M 代码 · 共 39 行
M
39 行
function xcp = xcpowp(F, p, c)%------------------------------------------------------------------------------%% This function computes the gridfunction xcp of size F with values (x-c)^p at% its gridpoints. Piecewise constant approximation is assumed.%% Orientation%% x% o---->% |% y |% v% % % 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 1999-2000 Stichting CWI, Amsterdam%------------------------------------------------------------------------------if isempty(F) error(' xcpowp - gridfunction is empty ')else [n, m] = size(F); if p == 0 xcp = ones(n,m); else [hx, dummy1, lx, dummy2] = gridfdims(F); xfirst = 0 + hx/2 - c; xlast = lx - hx/2 - c; lineofxcp = linspace(xfirst, xlast, m); xcp = lineofxcp(ones(1,n),:); % Tony's trick if p ~= 1 xcp = xcp.^p; end endend %------------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?