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
33429208
Commit
33429208
authored
Oct 29, 2013
by
Roman Donchenko
Committed by
OpenCV Buildbot
Oct 29, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1629 from lluisgomez:er_tree_clean_bug_fix
parents
75087580
b50185e1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
19 deletions
+11
-19
erfilter.cpp
modules/objdetect/src/erfilter.cpp
+11
-19
No files found.
modules/objdetect/src/erfilter.cpp
View file @
33429208
...
...
@@ -126,8 +126,6 @@ private:
int
d_C1
,
int
d_C2
,
int
d_C3
);
// merge an ER with its nested parent
void
er_merge
(
ERStat
*
parent
,
ERStat
*
child
);
// recursively walk the tree and clean memory
void
er_tree_clean
(
ERStat
*
er
);
// copy extracted regions into the output vector
ERStat
*
er_save
(
ERStat
*
er
,
ERStat
*
parent
,
ERStat
*
prev
);
// recursively walk the tree and filter (remove) regions using the callback classifier
...
...
@@ -486,7 +484,17 @@ void ERFilterNM::er_tree_extract( InputArray image )
er_save
(
er_stack
.
back
(),
NULL
,
NULL
);
// clean memory
er_tree_clean
(
er_stack
.
back
());
for
(
size_t
r
=
0
;
r
<
er_stack
.
size
();
r
++
)
{
ERStat
*
stat
=
er_stack
.
at
(
r
);
if
(
stat
->
crossings
)
{
stat
->
crossings
->
clear
();
delete
(
stat
->
crossings
);
stat
->
crossings
=
NULL
;
}
delete
stat
;
}
er_stack
.
clear
();
return
;
...
...
@@ -678,22 +686,6 @@ void ERFilterNM::er_merge(ERStat *parent, ERStat *child)
}
// recursively walk the tree and clean memory
void
ERFilterNM
::
er_tree_clean
(
ERStat
*
stat
)
{
for
(
ERStat
*
child
=
stat
->
child
;
child
;
child
=
child
->
next
)
{
er_tree_clean
(
child
);
}
if
(
stat
->
crossings
)
{
stat
->
crossings
->
clear
();
delete
(
stat
->
crossings
);
stat
->
crossings
=
NULL
;
}
delete
stat
;
}
// copy extracted regions into the output vector
ERStat
*
ERFilterNM
::
er_save
(
ERStat
*
er
,
ERStat
*
parent
,
ERStat
*
prev
)
{
...
...
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