% A = is_local_extremum(N)  
%  takes a 3x3x3 neighbourhood from a DoG and 
%  determines whether the center pixels is an
%  extremum (local min or max); returns 1 (true) 
%  or 0 (false) accordingly.

function A = is_local_extremum(N)

A = 0;

[m i] = max(N(:));
if i == 14 && sum(N(:)==m)==1,
  A = 1;
end

[m i] = min(N(:));
if i == 14 && sum(N(:)==m)==1,
  A = 1;
end


