You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
511 B
Matlab
20 lines
511 B
Matlab
function LoG=filter_definitions_LGN(sigma)
|
|
if nargin<1, sigma=1.5; end
|
|
|
|
%Laplacian of Gaussians
|
|
LoG=-fspecial('log',odd(9*sigma),sigma);
|
|
%To avoid using Image Processing toolbox try:
|
|
%LoG=gauss2D(sigma-0.0001,0,1,1,odd(9*sigma))-gauss2D(sigma+0.0001,0,1,1,odd(9*sigma));
|
|
|
|
%Difference of Gaussians
|
|
%disp('DoG')
|
|
%LoG=gauss2D(sigma,0,1,1,odd(15*sigma))-gauss2D(3*sigma,0,1,1,odd(15*sigma));
|
|
|
|
%use single precision for speed
|
|
LoG=single(LoG);
|
|
|
|
%normalise weights
|
|
tmp=LoG;
|
|
tmp(find(tmp<0))=0;
|
|
LoG=LoG./sum(sum(tmp));
|