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
923698d7
Commit
923698d7
authored
Nov 19, 2013
by
Piotr Miecielica
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes of some memory leaks
parent
e69d2c1b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
5 deletions
+18
-5
chamfermatching.cpp
modules/contrib/src/chamfermatching.cpp
+7
-0
fuzzymeanshifttracker.cpp
modules/contrib/src/fuzzymeanshifttracker.cpp
+1
-3
data.cpp
modules/ml/src/data.cpp
+1
-0
hog.cpp
modules/objdetect/src/hog.cpp
+3
-1
latentsvmdetector.cpp
modules/objdetect/src/latentsvmdetector.cpp
+1
-0
lsvmparser.cpp
modules/objdetect/src/lsvmparser.cpp
+5
-1
No files found.
modules/contrib/src/chamfermatching.cpp
View file @
923698d7
...
...
@@ -476,12 +476,19 @@ public:
chamfer_
=
new
Matching
(
true
);
}
~
ChamferMatcher
()
{
delete
chamfer_
;
}
void
showMatch
(
Mat
&
img
,
int
index
=
0
);
void
showMatch
(
Mat
&
img
,
Match
match_
);
const
Matches
&
matching
(
Template
&
,
Mat
&
);
private
:
ChamferMatcher
(
const
ChamferMatcher
&
);
ChamferMatcher
&
operator
=
(
const
ChamferMatcher
&
);
void
addMatch
(
float
cost
,
Point
offset
,
const
Template
*
tpl
);
...
...
modules/contrib/src/fuzzymeanshifttracker.cpp
View file @
923698d7
...
...
@@ -79,9 +79,7 @@ void CvFuzzyCurve::clear()
void
CvFuzzyCurve
::
addPoint
(
double
x
,
double
y
)
{
CvFuzzyPoint
*
point
;
point
=
new
CvFuzzyPoint
(
x
,
y
);
points
.
push_back
(
*
point
);
points
.
push_back
(
CvFuzzyPoint
(
x
,
y
));
};
double
CvFuzzyCurve
::
calcValue
(
double
param
)
...
...
modules/ml/src/data.cpp
View file @
923698d7
...
...
@@ -209,6 +209,7 @@ int CvMLData::read_csv(const char* filename)
if
(
!
token
)
{
fclose
(
file
);
delete
[]
el_ptr
;
return
-
1
;
}
}
...
...
modules/objdetect/src/hog.cpp
View file @
923698d7
...
...
@@ -2619,8 +2619,10 @@ void HOGDescriptor::readALTModel(std::string modelfile)
double
*
linearwt
=
new
double
[
totwords
+
1
];
int
length
=
totwords
;
nread
=
fread
(
linearwt
,
sizeof
(
double
),
totwords
+
1
,
modelfl
);
if
(
nread
!=
static_cast
<
size_t
>
(
length
)
+
1
)
if
(
nread
!=
static_cast
<
size_t
>
(
length
)
+
1
)
{
delete
[]
linearwt
;
throw
Exception
();
}
for
(
int
i
=
0
;
i
<
length
;
i
++
)
detector
.
push_back
((
float
)
linearwt
[
i
]);
...
...
modules/objdetect/src/latentsvmdetector.cpp
View file @
923698d7
...
...
@@ -142,6 +142,7 @@ CvSeq* cvLatentSvmDetectObjects(IplImage* image,
free
(
points
);
free
(
oppPoints
);
free
(
score
);
free
(
scoreOut
);
return
result_seq
;
}
...
...
modules/objdetect/src/lsvmparser.cpp
View file @
923698d7
...
...
@@ -741,8 +741,11 @@ int LSVMparser(const char * filename, CvLSVMFilterObject *** model, int *last, i
//printf("parse : %s\n", filename);
xmlf
=
fopen
(
filename
,
"rb"
);
if
(
xmlf
==
NULL
)
if
(
xmlf
==
NULL
)
{
free
(
*
model
);
*
model
=
NULL
;
return
LSVM_PARSER_FILE_NOT_FOUND
;
}
//i = 0;
j
=
0
;
...
...
@@ -808,6 +811,7 @@ int loadModel(
(
*
kPartFilters
)[
i
]
=
(
comp
[
i
]
-
comp
[
i
-
1
])
-
1
;
}
(
*
kPartFilters
)[
0
]
=
comp
[
0
];
free
(
comp
);
return
0
;
}
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