2
* Copyright (C) 2007-2008 Anael Orlinski
4
* This file is part of Panomatic.
6
* Panomatic is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
11
* Panomatic is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with Panomatic; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
#ifndef __lfeat_keypointdetector_h
22
#define __lfeat_keypointdetector_h
29
class KeyPointInsertor
32
virtual void operator()(const KeyPoint &k) = 0;
35
class LFIMPEX KeyPointDetector
38
// default constructor
41
// setters for various parameters
42
inline void setMaxScales(unsigned int iMaxScales) { _maxScales = iMaxScales; }
43
inline void setMaxOctaves(unsigned int iMaxOctaves) { _maxOctaves = iMaxOctaves; }
44
inline void setScoreThreshold(double iThreshold) { _scoreThreshold = iThreshold; }
46
// detect keypoints and put them in the insertor
47
void detectKeypoints(Image& iImage, KeyPointInsertor& iInsertor);
51
// internal values of the keypoint detector
54
unsigned int _maxScales;
57
unsigned int _maxOctaves;
59
// detection score threshold
60
double _scoreThreshold;
62
// initial box filter size
63
unsigned int _initialBoxFilterSize;
65
// scale overlapping : how many filter sizes to overlap
66
// with default value 3 : [3,5,7,9,11][7,11,15,19,23][...
67
unsigned int _scaleOverlap;
69
// some default values.
70
const static double kBaseSigma;
72
bool fineTuneExtrema(double *** iSH, unsigned int iX, unsigned int iY, unsigned int iS,
73
double& oX, double& oY, double& oS, double& oScore,
74
unsigned int iOctaveWidth, unsigned int iOctaveHeight, unsigned int iBorder);
76
bool calcTrace(Image& iImage, double iX, double iY, double iScale, int& oTrace);
78
unsigned int getFilterSize(unsigned int iOctave, unsigned int iScale);
79
unsigned int getBorderSize(unsigned int iOctave, unsigned int iScale);
85
#endif //__lfeat_keypointdetector_h