% KERNEL = binomialFilter(size)
%
% Returns a vector of binomial coefficients of order (size−1) .
% Eero Simoncelli, 2/97.
function [kernel] = binomialFilter(sz)
if (sz < 2)
error(’size argument must be larger than 1’);
end
kernel = [0.5 0.5]’;
for n=1:sz−2
kernel = conv([0.5 0.5]’, kernel);
end
Apr 26, 97 12:48 Page 1/1binomialFilter.m
% RES = blurDn(IM, LEVELS, FILT)
%
% Blur and downsample an image. The blurring is done with filter
% kernel specified by FILT (default = ’binom5’), which can be a string
% (to be passed to namedFilter), a vector (applied separably as a 1D
% convolution kernel in X and Y), or a matrix (applied as a 2D
% convolution kernel). The downsampling is always by 2 in each
% direction.
%
% The procedure is applied recursively LEVELS times (default=1).
% Eero Simoncelli, 3/97.
function res = blurDn(im, nlevs, filt)
%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
%% OPTIONAL ARGS:
if (exist(’nlevs’) ~= 1)
nlevs = 1;
end
if (exist(’filt’) ~= 1)
filt = ’binom5’;
end
%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
if isstr(filt)
filt = namedFilter(filt);
end
filt = filt/sum(filt(:));
if nlevs > 1
im = blurDn(im,nlevs−1,filt);
end
if (nlevs >= 1)
if (any(size(im)==1))
if (~any(size(filt)==1))
error(’Cant apply 2D filter to 1D signal’);
end
if (size(im,2)==1)
filt = filt(:);
else
filt = filt(:)’;
end
res = corrDn(im,filt,’reflect1’,(size(im)~=1)+1);
elseif (any(size(filt)==1))
filt = filt(:);
res = corrDn(im,filt,’reflect1’,[2 1]);
res = corrDn(res,filt’,’reflect1’,[1 2]);
else
res = corrDn(im,filt,’reflect1’,[2 2]);
end
else
res = im;
end
Aug 06, 03 18:04 Page 1/1blurDn.m
Printed by Rob Dotson
Friday April 30, 2004 1/47
% [PYR, INDICES] = buildGpyr(IM, HEIGHT, FILT, EDGES)
%
% Construct a Gaussian pyramid on matrix IM.
%
% HEIGHT (optional) specifies the number of pyramid levels to build. Default
% is 1+maxPyrHt(size(IM),size(FILT)).
% You can also specify ’auto’ to use this value.
%
% FILT (optional) can be a string naming a standard filter (see
% namedFilter), or a vector which will be used for (separable)
% convolution. Default = ’binom5’. EDGES specifies edge−handling, and
% defaults to ’reflect1’ (see corrDn).
%
% PYR is a vector containing the N pyramid subbands, ordered from fine
% to coarse. INDICES is an Nx2 matrix containing the sizes of
% each subband. This is compatible with the MatLab Wavelet toolbox.
% Eero Simoncelli, 6/96.
function [pyr,pind] = buildGpyr(im, ht, filt, edges)
if (nargin < 1)
error(’First argument (IM) is required’);
end
im_sz = size(im);
%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
%% OPTIONAL ARGS:
if (exist(’filt’) ~= 1)
filt = ’binom5’;
end
if isstr(filt)
filt = namedFilter(filt);
end
if ( (size(filt,1) > 1) & (size(filt,2) > 1) )
error(’FILT should be a 1D filter (i.e., a vector)’);
else
filt = filt(:);
end
max_ht = 1 + maxPyrHt(im_sz, size(filt,1));
if ( (exist(’ht’) ~= 1) | (ht == ’auto’) )
ht = max_ht;
else
if (ht > max_ht)
error(sprintf(’Cannot build pyramid higher than %d levels.’,max_ht));
end
end
if (exist(’edges’) ~= 1)
edges= ’reflect1’;
end
%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
if (ht <= 1)
pyr = im(:);
pind = im_sz;
else
if (im_sz(2) == 1)
lo2 = corrDn(im, filt, edges, [2 1], [1 1]);
elseif (im_sz(1) == 1)
lo2 = corrDn(im, filt’, edges, [1 2], [1 1]);
else
lo = corrDn(im, filt’, edges, [1 2], [1 1]);
lo2 = corrDn(lo, filt, edges, [2 1], [1 1]);
end
[npyr,nind] = buildGpyr(lo2, ht−1, filt, edges);
pyr = [im(:); npyr];
pind = [im_sz; nind];
end
Apr 16, 98 17:43 Page 1/1buildGpyr.m
% [PYR, INDICES] = buildLpyr(IM, HEIGHT, FILT1, FILT2, EDGES)
%
% Construct a Laplacian pyramid on matrix (or vector) IM.
%
% HEIGHT (optional) specifies the number of pyramid levels to build. Default
% is 1+maxPyrHt(size(IM),size(FILT)). You can also specify ’auto’ to
% use this value.
%
% FILT1 (optional) can be a string naming a standard filter (see
% namedFilter), or a vector which will be used for (separable)
% convolution. Default = ’binom5’. FILT2 specifies the "expansion"
% filter (default = filt1). EDGES specifies edge−handling, and
% defaults to ’reflect1’ (see corrDn).
%
% PYR is a vector containing the N pyramid subbands, ordered from fine
% to coarse. INDICES is an Nx2 matrix containing the sizes of
% each subband. This is compatible with the MatLab Wavelet toolbox.
% Eero Simoncelli, 6/96.
function [pyr,pind] = buildLpyr(im, ht, filt1, filt2, edges)
if (nargin < 1)
error(’First argument (IM) is required’);
end
im_sz = size(im);
%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
%% OPTIONAL ARGS:
if (exist(’filt1’) ~= 1)
filt1 = ’binom5’;
end
if isstr(filt1)
filt1 = namedFilter(filt1);
end
if ( (size(filt1,1) > 1) & (size(filt1,2) > 1) )
error(’FILT1 should be a 1D filter (i.e., a vector)’);
else
filt1 = filt1(:);
end
if (exist(’filt2’) ~= 1)
filt2 = filt1;
end
if isstr(filt2)
filt2 = namedFilter(filt2);
end
if ( (size(filt2,1) > 1) & (size(filt2,2) > 1) )
error(’FILT2 should be a 1D filter (i.e., a vector)’);
else
filt2 = filt2(:);
end
max_ht = 1 + maxPyrHt(im_sz, max(size(filt1,1), size(filt2,1)));
if ( (exist(’ht’) ~= 1) | (ht == ’auto’) )
ht = max_ht;
else
if (ht > max_ht)
error(sprintf(’Cannot build pyramid higher than %d levels.’,max_ht));
end
end
if (exist(’edges’) ~= 1)
edges= ’reflect1’;
end
%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
if (ht <= 1)
pyr = im(:);
pind = im_sz;
else
if (im_sz(2) == 1)
lo2 = corrDn(im, filt1, edges, [2 1], [1 1]);
elseif (im_sz(1) == 1)
lo2 = corrDn(im, filt1’, edges, [1 2], [1 1]);
else
lo = corrDn(im, filt1’, edges, [1 2], [1 1]);
int_sz = size(lo);
lo2 = corrDn(lo, filt1, edges, [2 1], [1 1]);
end
[npyr,nind] = buildLpyr(lo2, ht−1, filt1, filt2, edges);
if (im_sz(1) == 1)
hi2 = upConv(lo2, filt2’, edges, [1 2], [1 1], im_sz);
elseif (im_sz(2) == 1)
hi2 = upConv(lo2, filt2, edges, [2 1], [1 1], im_sz);
else
hi = upConv(lo2, filt2, edges, [2 1], [1 1], int_sz);
hi2 = upConv(hi, filt2’, edges, [1 2], [1 1], im_sz);
end
hi2 = im − hi2;
pyr = [hi2(:); npyr];
pind = [im_sz; nind];
end
Apr 16, 98 17:42 Page 1/1buildLpyr.m
Printed by Rob Dotson
2/47 Friday April 30, 2004
% [PYR, INDICES] = buildSFpyrLevs(LODFT, LOGRAD, XRCOS, YRCOS, ANGLE, HEIGHT, NB
ANDS)
%
% Recursive function for constructing levels of a steerable pyramid. This
% is called by buildSFpyr, and is not usually called directly.
% Eero Simoncelli, 5/97.
function [pyr,pind] = buildSFpyrLevs(lodft,log_rad,Xrcos,Yrcos,angle,ht,nbands);
if (ht <= 0)
lo0 = ifft2(ifftshift(lodft));
pyr = real(lo0(:));
pind = size(lo0);
else
bands = zeros(prod(size(lodft)), nbands);
bind = zeros(nbands,2);
% log_rad = log_rad + 1;
Xrcos = Xrcos − log2(2); % shift origin of lut by 1 octave.
lutsize = 1024;
Xcosn = pi*[−(2*lutsize+1):(lutsize+1)]/lutsize; % [−2*pi:pi]
order = nbands−1;
%% divide by sqrt(sum_(n=0)^(N−1) cos(pi*n/N)^(2(N−1)) )
%% Thanks to Patrick Teo for writing this out :)
const = (2^(2*order))*(factorial(order)^2)/(nbands*factorial(2*order));
Ycosn = sqrt(const) * (cos(Xcosn)).^order;
himask = pointOp(log_rad, Yrcos, Xrcos(1), Xrcos(2)−Xrcos(1), 0);
for b = 1:nbands
anglemask = pointOp(angle, Ycosn, Xcosn(1)+pi*(b−1)/nbands, Xcosn(2)−Xcosn(1
));
banddft = ((−sqrt(−1))^(nbands−1)) .* lodft .* anglemask .* himask;
band = ifft2(ifftshift(banddft));
bands(:,b) = real(band(:));
bind(b,:) = size(band);
end
dims = size(lodft);
ctr = ceil((dims+0.5)/2);
lodims = ceil((dims−0.5)/2);
loctr = ceil((lodims+0.5)/2);
lostart = ctr−loctr+1;
loend = lostart+lodims−1;
log_rad = log_rad(lostart(1):loend(1),lostart(2):loend(2));
angle = angle(lostart(1):loend(1),lostart(2):loend(2));
lodft = lodft(lostart(1):loend(1),lostart(2):loend(2));
YIrcos = abs(sqrt(1.0 − Yrcos.^2));
lomask = pointOp(log_rad, YIrcos, Xrcos(1), Xrcos(2)−Xrcos(1), 0);
lodft = lomask .* lodft;
[npyr,nind] = buildSFpyrLevs(lodft, log_rad, Xrcos, Yrcos, angle, ht−1, nbands
);
pyr = [bands(:); npyr];
pind = [bind; nind];
end
Aug 28, 02 21:57 Page 1/1buildSFpyrLevs.m
% [PYR, INDICES, STEERMTX, HARMONICS] = buildSFpyr(IM, HEIGHT, ORDER, TWIDTH)
%
% Construct a steerable pyramid on matrix IM, in the Fourier domain.
% This is similar to buildSpyr, except that:
%
% + Reconstruction is exact (within floating point errors)
% + It can produce any number of orientation bands.
% − Typically slower, especially for non−power−of−two sizes.
% − Boundary−handling is circular.
%
% HEIGHT (optional) specifies the number of pyramid levels to build. Default
% is maxPyrHt(size(IM),size(FILT));
%
% The squared radial functions tile the Fourier plane, with a raised−cosine
% falloff. Angular functions are cos(theta−k\pi/(K+1))^K, where K is
% the ORDER (one less than the number of orientation bands, default= 3).
%
% TWIDTH is the width of the transition region of the radial lowpass
% function, in octaves (default = 1, which gives a raised cosine for
% the bandpass filters).
%
% PYR is a vector containing the N pyramid subbands, ordered from fine
% to coarse. INDICES is an Nx2 matrix containing the sizes of
% each subband. This is compatible with the MatLab Wavelet toolbox.
% See the function STEER for a description of STEERMTX and HARMONICS.
% Eero Simoncelli, 5/97.
% See http://www.cis.upenn.edu/~eero/steerpyr.html for more
% information about the Steerable Pyramid image decomposition.
function [pyr,pind,steermtx,harmonics] = buildSFpyr(im, ht, order, twidth)
%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
%% DEFAULTS:
max_ht = floor(log2(min(size(im)))) − 2;
if (exist(’ht’) ~= 1)
ht = max_ht;
else
if (ht > max_ht)
error(sprintf(’Cannot build pyramid higher than %d levels.’,max_ht));
end
end
if (exist(’order’) ~= 1)
order = 3;
elseif ((order > 15) | (order < 0))
fprintf(1,’Warning: ORDER must be an integer in the range [0,15]. Truncating.\
n’);
order = min(max(order,0),15);
else
order = round(order);
end
nbands = order+1;
if (exist(’twidth’) ~= 1)
twidth = 1;
elseif (twidth <= 0)
fprintf(1,’Warning: TWIDTH must be positive. Setting to 1.\n’);
twidth = 1;
end
%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
%% Steering stuff:
if (mod((nbands),2) == 0)
harmonics = [0:(nbands/2)−1]’*2 + 1;
else
harmonics = [0:(nbands−1)/2]’*2;
end
steermtx = steer2HarmMtx(harmonics, pi*[0:nbands−1]/nbands, ’even’);
%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
dims = size(im);
ctr = ceil((dims+0.5)/2);
[xramp,yramp] = meshgrid( ([1:dims(2)]−ctr(2))./(dims(2)/2), ...
([1:dims(1)]−ctr(1))./(dims(1)/2) );
angle = atan2(yramp,xramp);
log_rad = sqrt(xramp.^2 + yramp.^2);
log_rad(ctr(1),ctr(2)) = log_rad(ctr(1),ctr(2)−1);
log_rad = log2(log_rad);
%% Radial transition function (a raised cosine in log−frequency):
[Xrcos,Yrcos] = rcosFn(twidth,(−twidth/2),[0 1]);
Yrcos = sqrt(Yrcos);
YIrcos = sqrt(1.0 − Yrcos.^2);
lo0mask = pointOp(log_rad, YIrcos, Xrcos(1), Xrcos(2)−Xrcos(1), 0);
imdft = fftshift(fft2(im));
lo0dft = imdft .* lo0mask;
[pyr,pind] = buildSFpyrLevs(lo0dft, log_rad, Xrcos, Yrcos, angle, ht, nbands);
hi0mask = pointOp(log_rad, Yrcos, Xrcos(1), Xrcos(2)−Xrcos(1), 0);
hi0dft = imdft .* hi0mask;
hi0 = ifft2(ifftshift(hi0dft));
pyr = [real(hi0(:)) ; pyr];
pind = [size(hi0); pind];
Aug 14, 03 15:49 Page 1/1buildSFpyr.m
Printed by Rob Dotson
Friday April 30, 2004 3/47
% [PYR, INDICES] = buildSpyrLevs(LOIM, HEIGHT, LOFILT, BFILTS, EDGES)
%
% Recursive function for constructing levels of a steerable pyramid. This
% is called by buildSpyr, and is not usually called directly.
% Eero Simoncelli, 6/96.
function [pyr,pind] = buildSpyrLevs(lo0,ht,lofilt,bfilts,edges);
if (ht <= 0)
pyr = lo0(:);
pind = size(lo0);
else
% Assume square filters:
bfiltsz = round(sqrt(size(bfilts,1)));
bands = zeros(prod(size(lo0)),size(bfilts,2));
bind = zeros(size(bfilts,2),2);
for b = 1:size(bfilts,2)
filt = reshape(bfilts(:,b),bfiltsz,bfiltsz);
band = corrDn(lo0, filt, edges);
bands(:,b) = band(:);
bind(b,:) = size(band);
end
lo = corrDn(lo0, lofilt, edges, [2 2], [1 1]);
[npyr,nind] = buildSpyrLevs(lo, ht−1, lofilt, bfilts, edges);
pyr = [bands(:); npyr];
pind = [bind; nind];
end
May 01, 97 18:56 Page 1/1buildSpyrLevs.m
% [PYR, INDICES, STEERMTX, HARMONICS] = buildSpyr(IM, HEIGHT, FILTFILE, EDGES)
%
% Construct a steerable pyramid on matrix IM.
%
% HEIGHT (optional) specifies the number of pyramid levels to build. Default
% is maxPyrHt(size(IM),size(FILT)).
% You can also specify ’auto’ to use this value.
%
% FILTFILE (optional) should be a string referring to an m−file that
% returns the rfilters. (examples: ’sp0Filters’, ’sp1Filters’,
% ’sp3Filters’,’sp5Filters’. default = ’sp1Filters’). EDGES specifies
% edge−handling, and defaults to ’reflect1’ (see corrDn).
%
% PYR is a vector containing the N pyramid subbands, ordered from fine
% to coarse. INDICES is an Nx2 matrix containing the sizes of
% each subband. This is compatible with the MatLab Wavelet toolbox.
% See the function STEER for a description of STEERMTX and HARMONICS.
% Eero Simoncelli, 6/96.
% See http://www.cis.upenn.edu/~eero/steerpyr.html for more
% information about the Steerable Pyramid image decomposition.
function [pyr,pind,steermtx,harmonics] = buildSpyr(im, ht, filtfile, edges)
%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
%% DEFAULTS:
if (exist(’filtfile’) ~= 1)
filtfile = ’sp1Filters’;
end
if (exist(’edges’) ~= 1)
edges= ’reflect1’;
end
if (isstr(filtfile) & (exist(filtfile) == 2))
[lo0filt,hi0filt,lofilt,bfilts,steermtx,harmonics] = eval(filtfile);
else
fprintf(1,’\nUse buildSFpyr for pyramids with arbitrary numbers of orientation
bands.\n’);
error(’FILTFILE argument must be the name of an M−file containing SPYR filters
.’);
end
max_ht = maxPyrHt(size(im), size(lofilt,1));
if ( (exist(’ht’) ~= 1) | (ht == ’auto’) )
ht = max_ht;
else
if (ht > max_ht)
error(sprintf(’Cannot build pyramid higher than %d levels.’,max_ht));
end
end
%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
hi0 = corrDn(im, hi0filt, edges);
lo0 = corrDn(im, lo0filt, edges);
[pyr,pind] = buildSpyrLevs(lo0, ht, lofilt, bfilts, edges);
pyr = [hi0(:) ; pyr];
pind = [size(hi0); pind];
Apr 16, 98 17:44 Page 1/1buildSpyr.m
Printed by Rob Dotson
4/47 Friday April 30, 2004
% [PYR, INDICES] = buildWpyr(IM, HEIGHT, FILT, EDGES)
%
% Construct a separable orthonormal QMF/wavelet pyramid on matrix (or vector) IM
.
%
% HEIGHT (optional) specifies the number of pyramid levels to build. Default
% is maxPyrHt(IM,FILT). You can also specify ’auto’ to use this value.
%
% FILT (optional) can be a string naming a standard filter (see
% namedFilter), or a vector which will be used for (separable)
% convolution. Filter can be of even or odd length, but should be symmetric.
% Default = ’qmf9’. EDGES specifies edge−handling, and
% defaults to ’reflect1’ (see corrDn).
%
% PYR is a vector containing the N pyramid subbands, ordered from fine
% to coarse. INDICES is an Nx2 matrix containing the sizes of
% each subband. This is compatible with the MatLab Wavelet toolbox.
% Eero Simoncelli, 6/96.
function [pyr,pind] = buildWpyr(im, ht, filt, edges)
if (nargin < 1)
error(’First argument (IM) is required’);
end
%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
%% OPTIONAL ARGS:
if (exist(’filt’) ~= 1)
filt = ’qmf9’;
end
if (exist(’edges’) ~= 1)
edges= ’reflect1’;
end
if isstr(filt)
filt = namedFilter(filt);
end
if ( (size(filt,1) > 1) & (size(filt,2) > 1) )
error(’FILT should be a 1D filter (i.e., a vector)’);
else
filt = filt(:);
end
hfilt = modulateFlip(filt);
% Stagger sampling if filter is odd−length:
if (mod(size(filt,1),2) == 0)
stag = 2;
else
stag = 1;
end
im_sz = size(im);
max_ht = maxPyrHt(im_sz, size(filt,1));
if ( (exist(’ht’) ~= 1) | (ht == ’auto’) )
ht = max_ht;
else
if (ht > max_ht)
error(sprintf(’Cannot build pyramid higher than %d levels.’,max_ht));
end
end
if (ht <= 0)
pyr = im(:);
pind = im_sz;
else
if (im_sz(2) == 1)
lolo = corrDn(im, filt, edges, [2 1], [stag 1]);
hihi = corrDn(im, hfilt, edges, [2 1], [2 1]);
elseif (im_sz(1) == 1)
lolo = corrDn(im, filt’, edges, [1 2], [1 stag]);
hihi = corrDn(im, hfilt’, edges, [1 2], [1 2]);
else
lo = corrDn(im, filt, edges, [2 1], [stag 1]);
hi = corrDn(im, hfilt, edges, [2 1], [2 1]);
lolo = corrDn(lo, filt’, edges, [1 2], [1 stag]);
lohi = corrDn(hi, filt’, edges, [1 2], [1 stag]); % horizontal
hilo = corrDn(lo, hfilt’, edges, [1 2], [1 2]); % vertical
hihi = corrDn(hi, hfilt’, edges, [1 2], [1 2]); % diagonal
end
[npyr,nind] = buildWpyr(lolo, ht−1, filt, edges);
if ((im_sz(1) == 1) | (im_sz(2) == 1))
pyr = [hihi(:); npyr];
pind = [size(hihi); nind];
else
pyr = [lohi(:); hilo(:); hihi(:); npyr];
pind = [size(lohi); size(hilo); size(hihi); nind];
end
end
Apr 16, 98 17:43 Page 1/1buildWpyr.m
% RES = CCONV2(MTX1, MTX2, CTR)
%
% Circular convolution of two matrices. Result will be of size of
% LARGER vector.
%
% The origin of the smaller matrix is assumed to be its center.
% For even dimensions, the origin is determined by the CTR (optional)
% argument:
% CTR origin
% 0 DIM/2 (default)
% 1 (DIM/2)+1
% Eero Simoncelli, 6/96. Modified 2/97.
function c = cconv2(a,b,ctr)
if (exist(’ctr’) ~= 1)
ctr = 0;
end
if (( size(a,1) >= size(b,1) ) & ( size(a,2) >= size(b,2) ))
large = a; small = b;
elseif (( size(a,1) <= size(b,1) ) & ( size(a,2) <= size(b,2) ))
large = b; small = a;
else
error(’one arg must be larger than the other in both dimensions!’);
end
ly = size(large,1);
lx = size(large,2);
sy = size(small,1);
sx = size(small,2);
%% These values are the index of the small mtx that falls on the
%% border pixel of the large matrix when computing the first
%% convolution response sample:
sy2 = floor((sy+ctr+1)/2);
sx2 = floor((sx+ctr+1)/2);
% pad:
clarge = [ ...
large(ly−sy+sy2+1:ly,lx−sx+sx2+1:lx), large(ly−sy+sy2+1:ly,:), ...
large(ly−sy+sy2+1:ly,1:sx2−1); ...
large(:,lx−sx+sx2+1:lx), large, large(:,1:sx2−1); ...
large(1:sy2−1,lx−sx+sx2+1:lx), ...
large(1:sy2−1,:), ...
large(1:sy2−1,1:sx2−1) ];
c = conv2(clarge,small,’valid’);
Apr 26, 97 12:49 Page 1/1cconv2.m
Printed by Rob Dotson
Friday April 30, 2004 5/47