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

📄 mkangularsine.m

📁 PDTDFB toolbox The filter bank is described in: The Shiftable Complex Directional Pyramid—Pa
💻 M
字号:
% IM = mkAngularSine(SIZE, HARMONIC, AMPL, PHASE, ORIGIN)
%
% Make an angular sinusoidal image:
%     AMPL * sin( HARMONIC*theta + PHASE),
% where theta is the angle about the origin.
% SIZE specifies the matrix size, as for zeros().  
% AMPL (default = 1) and PHASE (default = 0) are optional.

% Eero Simoncelli, 2/97.

function [res] = mkAngularSine(sz, harmonic, ampl, ph, origin)

sz = sz(:);
if (size(sz,1) == 1)
  sz = [sz,sz];
end

mxsz = max(sz(1),sz(2));

%------------------------------------------------------------
%% OPTIONAL ARGS:

if (exist('harmonic') ~= 1)
  harmonic = 1;
end

if (exist('ampl') ~= 1)
  ampl = 1;
end

if (exist('ph') ~= 1)
  ph = 0;
end

if (exist('origin') ~= 1)
  origin = (sz+1)/2;
end

%------------------------------------------------------------

res = ampl * sin(harmonic*mkAngle(sz,ph,origin) + ph);

⌨️ 快捷键说明

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