-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDoGdetector.m
32 lines (31 loc) · 1.26 KB
/
DoGdetector.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
function [locsDoG, GaussianPyramid] = DoGdetector(im, sigma0, k, ...
levels, th_contrast, th_r)
%%DoGdetector
% Putting it all together
%
% Inputs Description
%--------------------------------------------------------------------------
% im Grayscale image with range [0,1].
%
% sigma0 Scale of the 0th image pyramid.
%
% k Pyramid Factor. Suggest sqrt(2).
%
% levels Levels of pyramid to construct. Suggest -1:4.
%
% th_contrast DoG contrast threshold. Suggest 0.03.
%
% th_r Principal Ratio threshold. Suggest 13
%
% Outputs Description
%--------------------------------------------------------------------------
%
% locsDoG N x 3 matrix where the DoG pyramid achieves a local extrema
% in both scale and space, and satisfies the two thresholds.
%
% GaussianPyramid A matrix of grayscale images of size (size(im),numel(levels))
GaussianPyramid = createGaussianPyramid(im, sigma0, k, levels);
[DoGPyramid, DoGLevels] = createDoGPyramid(GaussianPyramid, levels);
PrincipalCurvature = computePrincipalCurvature(DoGPyramid);
locsDoG = getLocalExtrema(DoGPyramid, DoGLevels, PrincipalCurvature, th_contrast, th_r);
end