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
01aa6593
Commit
01aa6593
authored
Aug 05, 2014
by
Alex Leontiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coding style: vadim comments
parent
4e14e8c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
tld_tracker.cpp
modules/tracking/src/tld_tracker.cpp
+13
-8
No files found.
modules/tracking/src/tld_tracker.cpp
View file @
01aa6593
...
...
@@ -88,12 +88,11 @@ using namespace tld;
* 11. group decls logically, order of statements
*
* ?10. all in one class
* todo: initializer lists; const methods
* todo:
* initializer lists;
* const methods
*
* ?( )
*
* ?vadim: for{1command} can omit {}; if( a != (b + c) ) vs ( a != ( b + c ) ); if{} for{} method{} oneline:spaces, omit{};
* 1-statement for/if without {}
*/
/* design decisions:
...
...
@@ -178,7 +177,7 @@ public:
void
setBoudingBox
(
Rect2d
boundingBox
){
boundingBox_
=
boundingBox
;
}
double
getOriginalVariance
(){
return
originalVariance_
;
}
inline
double
ensembleClassifierNum
(
const
uchar
*
data
);
inline
void
prepareClassifiers
(
int
rowstep
)
{
for
(
int
i
=
0
;
i
<
(
int
)
classifiers
.
size
();
i
++
)
classifiers
[
i
].
prepareClassifier
(
rowstep
);
}
inline
void
prepareClassifiers
(
int
rowstep
)
;
double
Sr
(
const
Mat_
<
uchar
>&
patch
);
double
Sc
(
const
Mat_
<
uchar
>&
patch
);
void
integrateRelabeled
(
Mat
&
img
,
Mat
&
imgBlurred
,
const
std
::
vector
<
TLDDetector
::
LabeledPatch
>&
patches
);
...
...
@@ -326,7 +325,7 @@ bool TrackerTLDImpl::updateImpl(const Mat& image, Rect2d& boundingBox)
for
(
int
i
=
0
;
i
<
2
;
i
++
)
{
Rect2d
tmpCandid
=
boundingBox
;
if
(
(
(
i
==
0
)
&&
!
(
data
->
failedLastTime
)
&&
trackerProxy
->
update
(
image
,
tmpCandid
)
)
||
if
(
(
(
i
==
0
)
&&
!
data
->
failedLastTime
&&
trackerProxy
->
update
(
image
,
tmpCandid
)
)
||
(
(
i
==
1
)
&&
detector
->
detect
(
imageForDetector
,
image_blurred
,
tmpCandid
,
detectorResults
)
)
)
{
candidates
.
push_back
(
tmpCandid
);
...
...
@@ -395,7 +394,8 @@ bool TrackerTLDImpl::updateImpl(const Mat& image, Rect2d& boundingBox)
if
(
detectorResults
[
i
].
isObject
)
{
expertResult
=
nExpert
(
detectorResults
[
i
].
rect
);
if
(
expertResult
!=
detectorResults
[
i
].
isObject
){
negRelabeled
++
;
}
if
(
expertResult
!=
detectorResults
[
i
].
isObject
)
negRelabeled
++
;
}
else
{
...
...
@@ -758,7 +758,7 @@ void TrackerTLDModel::integrateAdditional(const std::vector<Mat_<uchar> >& eForM
for
(
int
i
=
0
;
i
<
(
int
)
classifiers
.
size
();
i
++
)
p
+=
classifiers
[
i
].
posteriorProbability
(
eForEnsemble
[
k
].
data
,
(
int
)
eForEnsemble
[
k
].
step
[
0
]);
p
/=
classifiers
.
size
();
if
(
(
p
>
ENSEMBLE_THRESHOLD
)
!=
isPositive
)
if
(
(
p
>
ENSEMBLE_THRESHOLD
)
!=
isPositive
)
{
if
(
isPositive
)
positiveIntoEnsemble
++
;
...
...
@@ -935,5 +935,10 @@ void TrackerTLDModel::pushIntoModel(const Mat_<uchar>& example, bool positive)
}
(
*
proxyN
)
++
;
}
void
TrackerTLDModel
::
prepareClassifiers
(
int
rowstep
)
{
for
(
int
i
=
0
;
i
<
(
int
)
classifiers
.
size
();
i
++
)
classifiers
[
i
].
prepareClassifier
(
rowstep
);
}
}
/* namespace cv */
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