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
fc19e856
Commit
fc19e856
authored
Jun 01, 2011
by
Vincent Rabaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- fix a memory leak
parent
14f65f79
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
features2d.hpp
modules/features2d/include/opencv2/features2d/features2d.hpp
+3
-0
orb.cpp
modules/features2d/src/orb.cpp
+11
-1
No files found.
modules/features2d/include/opencv2/features2d/features2d.hpp
View file @
fc19e856
...
...
@@ -457,6 +457,9 @@ public:
*/
ORB
(
size_t
n_features
=
500
,
const
CommonParams
&
detector_params
=
CommonParams
());
/** destructor to empty the patterns */
~
ORB
();
/** returns the descriptor size in bytes */
int
descriptorSize
()
const
;
...
...
modules/features2d/src/orb.cpp
View file @
fc19e856
...
...
@@ -470,7 +470,8 @@ ORB::ORB(size_t n_features, const CommonParams & detector_params) :
{
// fill the extractors and descriptors for the corresponding scales
float
factor
=
1.0
/
params_
.
scale_factor_
/
params_
.
scale_factor_
;
int
n_desired_features_per_scale
=
cvRound
(
n_features
/
((
std
::
pow
(
factor
,
(
int
)
params_
.
n_levels_
)
-
1
)
/
(
factor
-
1
)));
int
n_desired_features_per_scale
=
cvRound
(
n_features
/
((
std
::
pow
(
factor
,
int
(
params_
.
n_levels_
))
-
1
)
/
(
factor
-
1
)));
n_features_per_level_
.
resize
(
detector_params
.
n_levels_
);
for
(
unsigned
int
level
=
0
;
level
<
detector_params
.
n_levels_
;
level
++
)
{
...
...
@@ -497,6 +498,15 @@ ORB::ORB(size_t n_features, const CommonParams & detector_params) :
}
}
/** destructor to empty the patterns */
ORB
::~
ORB
()
{
for
(
std
::
vector
<
OrbPatterns
*>::
const_iterator
pattern
=
patterns_
.
begin
(),
pattern_end
=
patterns_
.
end
();
pattern
!=
pattern_end
;
++
pattern
)
if
(
*
pattern
)
delete
*
pattern
;
}
/** returns the descriptor size in bytes */
int
ORB
::
descriptorSize
()
const
{
...
...
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