📄 convexplpiccis.m~
字号:
% Function to create images for the convolution explanation
function convexplpiccis
rows = 128; cols = 128;
wavelength = 8;
sigmaOnf = 0.55;
[x,y] = meshgrid([-cols/2:(cols/2-1)]/cols,...
[-rows/2:(rows/2-1)]/rows);
radius = sqrt(x.^2 + y.^2); % Matrix values contain *normalised* radius
% values ranging from 0 at the centre to
% 0.5 at the boundary.
radius(rows/2+1, cols/2+1) = 1; % Get rid of the 0 radius value in the middle
% so that taking the log of the radius will
% not cause trouble.
fo = 1.0/wavelength; % Centre frequency of filter.
% The following implements the log-gabor transfer function.
logGabor = exp((-(log(radius/fo)).^2) / (2 * log(sigmaOnf)^2));
logGabor(rows/2+1, cols/2+1) = 0; % Set the value at the 0 frequency point
% of the filter back to zero
% (undo the radius fudge).
show(logGabor,1), imwritesc(logGabor, 'loggabor.jpg');
lp = lowpassfilter([rows,cols],.4,10); % Radius .4, 'sharpness' 10
logGabor = logGabor{s}.*lp; % Apply low-pass filter
imwritesc(lp, 'lp.jpg');
show(logGabor,2), imwritesc(logGabor, 'loggaborlp.jpg');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -