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
ada3e6e6
Commit
ada3e6e6
authored
Jun 15, 2011
by
Maria Dimashova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed erasing class_id and response members in sift (#1130)
parent
29207968
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
sift.cpp
modules/features2d/src/sift.cpp
+7
-1
No files found.
modules/features2d/src/sift.cpp
View file @
ada3e6e6
...
...
@@ -165,6 +165,9 @@ struct feature
double
descr
[
FEATURE_MAX_D
];
/**< descriptor */
detection_data
*
feature_data
;
/**< user-definable data */
int
class_id
;
float
response
;
};
/******************************* Defs and macros *****************************/
...
...
@@ -1480,7 +1483,7 @@ inline KeyPoint featureToKeyPoint( const feature& feat )
{
float
size
=
(
float
)(
feat
.
scl
*
SIFT
::
DescriptorParams
::
GET_DEFAULT_MAGNIFICATION
()
*
4
);
// 4==NBP
float
angle
=
(
float
)(
feat
.
ori
*
a_180divPI
);
return
KeyPoint
(
(
float
)
feat
.
x
,
(
float
)
feat
.
y
,
size
,
angle
,
0
,
feat
.
feature_data
->
octv
,
0
);
return
KeyPoint
(
(
float
)
feat
.
x
,
(
float
)
feat
.
y
,
size
,
angle
,
feat
.
response
,
feat
.
feature_data
->
octv
,
feat
.
class_id
);
}
static
void
fillFeatureData
(
feature
&
feat
,
const
SiftParams
&
params
)
...
...
@@ -1585,6 +1588,9 @@ inline void keyPointToFeature( const KeyPoint& keypoint, feature& feat, const Si
feat
.
scl
=
keypoint
.
size
/
(
SIFT
::
DescriptorParams
::
GET_DEFAULT_MAGNIFICATION
()
*
4
);
// 4==NBP
feat
.
ori
=
keypoint
.
angle
*
a_PIdiv180
;
feat
.
response
=
keypoint
.
response
;
feat
.
class_id
=
keypoint
.
class_id
;
feat
.
feature_data
=
(
detection_data
*
)
calloc
(
1
,
sizeof
(
detection_data
)
);
fillFeatureData
(
feat
,
params
);
}
...
...
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