Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
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_contrib
Commits
cb3e51f9
Commit
cb3e51f9
authored
Jan 22, 2016
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #524 from epfl-lts2:fix_memory_leaks_in_graphsegmentation
parents
bd971fd7
530dfb79
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
graphsegmentation.cpp
modules/ximgproc/src/graphsegmentation.cpp
+12
-0
No files found.
modules/ximgproc/src/graphsegmentation.cpp
View file @
cb3e51f9
...
...
@@ -243,6 +243,8 @@ namespace cv {
}
}
}
free
(
thresholds
);
}
void
GraphSegmentationImpl
::
filterSmallAreas
(
Edge
*
edges
,
const
int
&
nb_edges
,
PointSet
*
es
)
{
...
...
@@ -297,6 +299,8 @@ namespace cv {
p
[
j
]
=
mapped_id
[
point
];
}
}
free
(
mapped_id
);
}
void
GraphSegmentationImpl
::
processImage
(
InputArray
src
,
OutputArray
dst
)
{
...
...
@@ -328,6 +332,9 @@ namespace cv {
// Map to final output
finalMapping
(
es
,
output
);
free
(
edges
);
delete
es
;
}
Ptr
<
GraphSegmentation
>
createGraphSegmentation
(
double
sigma
,
float
k
,
int
min_size
)
{
...
...
@@ -351,6 +358,10 @@ namespace cv {
}
}
PointSet
::~
PointSet
()
{
free
(
mapping
);
}
int
PointSet
::
getBasePoint
(
int
p
)
{
int
base_p
=
p
;
...
...
@@ -376,6 +387,7 @@ namespace cv {
nb_elements
--
;
}
}
}
}
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