[Master Index]
[Index for gaborpyr]
conv2b
(gaborpyr/conv2b.m)
Function Synopsis
imf=conv2b(im, ker, border);
Help text
CONV2B Two-dimensional convolution with border handling
Performs 2-D convolution returning an image with the same
dimensions as the input image.
The border handling is specified by border:
0 -> pad with zeros
1 -> periodic convolution
2 -> specular borders
imf=conv2b(im, ker, border);
This function is not yet prepared for even sized kernels
ONG - 10/96
Cross-Reference Information
This function calls
This function is called by
Listing of function gaborpyr/conv2b.m
function imf=conv2b(im, ker, border);
% CONV2B Two-dimensional convolution with border handling
% Performs 2-D convolution returning an image with the same
% dimensions as the input image.
% The border handling is specified by border:
% 0 -> pad with zeros
% 1 -> periodic convolution
% 2 -> specular borders
%
% imf=conv2b(im, ker, border);
%
% This function is not yet prepared for even sized kernels
%
% ONG - 10/96
%
% checking dimensions
[nky nkx]=size(ker);
if (~rem(nkx,2))|(~rem(nky,2))
fprintf(1,'\n\t CONV2B WARNING: not specific handling for even sized kernels\n\n');
end
% proper treatment for each value of border
if border==0
sh='same';
elseif (border==1)|(border==2)|(border==3)
sh='valid';
Bx=(nkx-1)/2;
By=(nky-1)/2;
im=putborde(im,Bx,By,border);
else
error('Not a valid value for border')
end
% convolving the image
imf=conv2(im,ker,sh);
Produced by mat2html on Mon May 25 10:25:30 1998
Cross-Directory links are: ON