Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
93dc0dba
Commit
93dc0dba
authored
Jun 09, 2010
by
Maria Dimashova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved sift parameters implementation from hpp file
parent
11f9dafd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
16 deletions
+39
-16
features2d.hpp
modules/features2d/include/opencv2/features2d/features2d.hpp
+11
-16
sift.cpp
modules/features2d/src/sift.cpp
+28
-0
No files found.
modules/features2d/include/opencv2/features2d/features2d.hpp
View file @
93dc0dba
...
...
@@ -253,11 +253,8 @@ public:
static
const
int
DEFAULT_FIRST_OCTAVE
=
-
1
;
enum
{
FIRST_ANGLE
=
0
,
AVERAGE_ANGLE
=
1
};
CommonParams
()
:
nOctaves
(
DEFAULT_NOCTAVES
),
nOctaveLayers
(
DEFAULT_NOCTAVE_LAYERS
),
firstOctave
(
DEFAULT_FIRST_OCTAVE
),
angleMode
(
FIRST_ANGLE
)
{}
CommonParams
(
int
_nOctaves
,
int
_nOctaveLayers
,
int
_firstOctave
,
int
_angleMode
)
:
nOctaves
(
_nOctaves
),
nOctaveLayers
(
_nOctaveLayers
),
firstOctave
(
_firstOctave
),
angleMode
(
_angleMode
)
{}
CommonParams
();
CommonParams
(
int
_nOctaves
,
int
_nOctaveLayers
,
int
_firstOctave
,
int
_angleMode
);
int
nOctaves
,
nOctaveLayers
,
firstOctave
;
int
angleMode
;
};
...
...
@@ -267,9 +264,8 @@ public:
static
double
GET_DEFAULT_THRESHOLD
()
{
return
0.04
/
SIFT
::
CommonParams
::
DEFAULT_NOCTAVE_LAYERS
/
2.0
;
}
static
double
GET_DEFAULT_EDGE_THRESHOLD
()
{
return
10.0
;
}
DetectorParams
()
:
threshold
(
GET_DEFAULT_THRESHOLD
()),
edgeThreshold
(
GET_DEFAULT_EDGE_THRESHOLD
())
{}
DetectorParams
(
double
_threshold
,
double
_edgeThreshold
)
:
threshold
(
_threshold
),
edgeThreshold
(
_edgeThreshold
)
{}
DetectorParams
();
DetectorParams
(
double
_threshold
,
double
_edgeThreshold
);
double
threshold
,
edgeThreshold
;
};
...
...
@@ -278,11 +274,9 @@ public:
static
double
GET_DEFAULT_MAGNIFICATION
()
{
return
3.0
;
}
static
const
bool
DEFAULT_IS_NORMALIZE
=
true
;
static
const
int
DESCRIPTOR_SIZE
=
128
;
DescriptorParams
()
:
magnification
(
GET_DEFAULT_MAGNIFICATION
()),
isNormalize
(
DEFAULT_IS_NORMALIZE
),
recalculateAngles
(
true
)
{}
DescriptorParams
(
double
_magnification
,
bool
_isNormalize
,
bool
_recalculateAngles
)
:
magnification
(
_magnification
),
isNormalize
(
_isNormalize
),
recalculateAngles
(
_recalculateAngles
)
{}
DescriptorParams
();
DescriptorParams
(
double
_magnification
,
bool
_isNormalize
,
bool
_recalculateAngles
);
double
magnification
;
bool
isNormalize
;
bool
recalculateAngles
;
...
...
@@ -311,7 +305,8 @@ public:
//! finds the keypoints using SIFT algorithm
void
operator
()(
const
Mat
&
img
,
const
Mat
&
mask
,
vector
<
KeyPoint
>&
keypoints
)
const
;
//! finds the keypoints and computes descriptors for them using SIFT algorithm. Optionally it can compute descriptors for the user-provided keypoints
//! finds the keypoints and computes descriptors for them using SIFT algorithm.
//! Optionally it can compute descriptors for the user-provided keypoints
void
operator
()(
const
Mat
&
img
,
const
Mat
&
mask
,
vector
<
KeyPoint
>&
keypoints
,
Mat
&
descriptors
,
...
...
@@ -1284,8 +1279,8 @@ public:
detectImpl
(
image
,
mask
,
keypoints
);
}
virtual
void
read
(
const
FileNode
&
fn
)
{};
virtual
void
write
(
FileStorage
&
fs
)
const
{};
virtual
void
read
(
const
FileNode
&
fn
)
{};
virtual
void
write
(
FileStorage
&
fs
)
const
{};
protected
:
/*
...
...
modules/features2d/src/sift.cpp
View file @
93dc0dba
...
...
@@ -1978,6 +1978,34 @@ Sift::computeKeypointDescriptor
using
namespace
cv
;
SIFT
::
CommonParams
::
CommonParams
()
:
nOctaves
(
DEFAULT_NOCTAVES
),
nOctaveLayers
(
DEFAULT_NOCTAVE_LAYERS
),
firstOctave
(
DEFAULT_FIRST_OCTAVE
),
angleMode
(
FIRST_ANGLE
)
{}
SIFT
::
CommonParams
::
CommonParams
(
int
_nOctaves
,
int
_nOctaveLayers
,
int
_firstOctave
,
int
_angleMode
)
:
nOctaves
(
_nOctaves
),
nOctaveLayers
(
_nOctaveLayers
),
firstOctave
(
_firstOctave
),
angleMode
(
_angleMode
)
{}
SIFT
::
DetectorParams
::
DetectorParams
()
:
threshold
(
GET_DEFAULT_THRESHOLD
()),
edgeThreshold
(
GET_DEFAULT_EDGE_THRESHOLD
())
{}
SIFT
::
DetectorParams
::
DetectorParams
(
double
_threshold
,
double
_edgeThreshold
)
:
threshold
(
_threshold
),
edgeThreshold
(
_edgeThreshold
)
{}
SIFT
::
DescriptorParams
::
DescriptorParams
()
:
magnification
(
GET_DEFAULT_MAGNIFICATION
()),
isNormalize
(
DEFAULT_IS_NORMALIZE
),
recalculateAngles
(
true
)
{}
SIFT
::
DescriptorParams
::
DescriptorParams
(
double
_magnification
,
bool
_isNormalize
,
bool
_recalculateAngles
)
:
magnification
(
_magnification
),
isNormalize
(
_isNormalize
),
recalculateAngles
(
_recalculateAngles
)
{}
SIFT
::
SIFT
()
{}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment