Hugin trunk
0.1
Loading...
Searching...
No Matches
hugin_cpfind
localfeatures
KeyPointDetector.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2007-2008 Anael Orlinski
3
*
4
* This file is part of Panomatic.
5
*
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.
10
*
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.
15
*
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
* <http://www.gnu.org/licenses/>.
19
*/
20
21
#ifndef __lfeat_keypointdetector_h
22
#define __lfeat_keypointdetector_h
23
24
#include "
Image.h
"
25
#include "
KeyPoint.h
"
26
27
namespace
lfeat
28
{
29
30
class
KeyPointInsertor
31
{
32
public
:
33
virtual
void
operator()
(
const
KeyPoint
&
k
) = 0;
34
};
35
36
class
LFIMPEX
KeyPointDetector
37
{
38
public
:
39
// default constructor
40
KeyPointDetector
();
41
42
// setters for various parameters
43
inline
void
setMaxScales
(
unsigned
int
iMaxScales
)
44
{
45
_maxScales =
iMaxScales
;
46
}
47
inline
void
setMaxOctaves
(
unsigned
int
iMaxOctaves
)
48
{
49
_maxOctaves =
iMaxOctaves
;
50
}
51
inline
void
setScoreThreshold
(
double
iThreshold
)
52
{
53
_scoreThreshold =
iThreshold
;
54
}
55
56
// detect keypoints and put them in the insertor
57
void
detectKeypoints(
Image
&
iImage
,
KeyPointInsertor
&
iInsertor
);
58
59
private
:
60
61
// internal values of the keypoint detector
62
63
// number of scales
64
unsigned
int
_maxScales
;
65
66
// number of octaves
67
unsigned
int
_maxOctaves
;
68
69
// detection score threshold
70
double
_scoreThreshold
;
71
72
// initial box filter size
73
unsigned
int
_initialBoxFilterSize
;
74
75
// scale overlapping : how many filter sizes to overlap
76
// with default value 3 : [3,5,7,9,11][7,11,15,19,23][...
77
unsigned
int
_scaleOverlap
;
78
79
// some default values.
80
const
static
double
kBaseSigma
;
81
82
bool
fineTuneExtrema(
double
** *
iSH
,
unsigned
int
iX
,
unsigned
int
iY
,
unsigned
int
iS
,
83
double
&
oX
,
double
&
oY
,
double
&
oS
,
double
&
oScore
,
84
unsigned
int
iOctaveWidth
,
unsigned
int
iOctaveHeight
,
unsigned
int
iBorder
);
85
86
bool
calcTrace(
Image
&
iImage
,
double
iX
,
double
iY
,
double
iScale
,
int
&
oTrace
);
87
88
unsigned
int
getFilterSize(
unsigned
int
iOctave
,
unsigned
int
iScale
);
89
unsigned
int
getBorderSize(
unsigned
int
iOctave
,
unsigned
int
iScale
);
90
91
};
92
93
}
94
95
#endif
//__lfeat_keypointdetector_h
Image.h
KeyPoint.h
lfeat::Image
Definition
Image.h:34
lfeat::KeyPointDetector
Definition
KeyPointDetector.h:37
lfeat::KeyPointDetector::_initialBoxFilterSize
unsigned int _initialBoxFilterSize
Definition
KeyPointDetector.h:73
lfeat::KeyPointDetector::setScoreThreshold
void setScoreThreshold(double iThreshold)
Definition
KeyPointDetector.h:51
lfeat::KeyPointDetector::_scaleOverlap
unsigned int _scaleOverlap
Definition
KeyPointDetector.h:77
lfeat::KeyPointDetector::_maxScales
unsigned int _maxScales
Definition
KeyPointDetector.h:64
lfeat::KeyPointDetector::_maxOctaves
unsigned int _maxOctaves
Definition
KeyPointDetector.h:67
lfeat::KeyPointDetector::_scoreThreshold
double _scoreThreshold
Definition
KeyPointDetector.h:70
lfeat::KeyPointDetector::setMaxOctaves
void setMaxOctaves(unsigned int iMaxOctaves)
Definition
KeyPointDetector.h:47
lfeat::KeyPointDetector::kBaseSigma
static const double kBaseSigma
Definition
KeyPointDetector.h:80
lfeat::KeyPointDetector::setMaxScales
void setMaxScales(unsigned int iMaxScales)
Definition
KeyPointDetector.h:43
lfeat::KeyPointInsertor
Definition
KeyPointDetector.h:31
lfeat::KeyPointInsertor::operator()
virtual void operator()(const KeyPoint &k)=0
lfeat::KeyPoint
Definition
KeyPoint.h:33
LFIMPEX
#define LFIMPEX
Definition
hugin_shared.h:41
lfeat
Definition
TestCode.h:27
threshold
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.
Definition
threshold.h:41
Generated on Tue Sep 1 2026 20:52:07 for Hugin trunk by
1.9.8