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
296a864a
Commit
296a864a
authored
Jul 08, 2014
by
Alex Leontiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Vadim
parent
a5b8a0a1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
5 deletions
+20
-5
benchmark.cpp
modules/tracking/samples/benchmark.cpp
+2
-2
trackerTLD.cpp
modules/tracking/src/trackerTLD.cpp
+18
-3
No files found.
modules/tracking/samples/benchmark.cpp
View file @
296a864a
...
...
@@ -7,7 +7,7 @@
#include <climits>
#define CMDLINEMAX 10
#define ASSESS_TILL
INT_MAX
#define ASSESS_TILL
100
#define LINEMAX 40
using
namespace
std
;
...
...
@@ -333,7 +333,7 @@ static AssessmentRes assessment(char* video,char* gt_str, char* algorithms[],cha
}
imshow
(
"Tracking API"
,
image
);
if
(
frameCounter
>=
ASSESS_TILL
){
if
(
(
frameCounter
+
1
)
>=
ASSESS_TILL
){
break
;
}
...
...
modules/tracking/src/trackerTLD.cpp
View file @
296a864a
...
...
@@ -53,6 +53,8 @@
#define NEG_EXAMPLES_IN_INIT_MODEL 300
#define MAX_EXAMPLES_IN_MODEL 500
#define MEASURES_PER_CLASSIFIER 13
#define BLUR_AS_VADIM
#undef CLOSED_LOOP
static
const
cv
::
Size
GaussBlurKernelSize
(
3
,
3
);
using
namespace
cv
;
...
...
@@ -73,7 +75,7 @@ using namespace tld;
* vadim:
*
* blurred in TrackerTLDModel()
* private members
* private members
: pull_approval --> update master --> merge --> redo --> report
*
* warpAffine -- ?
*/
...
...
@@ -382,7 +384,9 @@ bool TrackerTLD::updateImpl(const Mat& image, Rect2d& boundingBox){
nExpert
.
additionalExamples
(
examplesForModel
,
examplesForEnsemble
);
tldModel
->
integrateAdditional
(
examplesForModel
,
examplesForEnsemble
,
false
);
}
else
{
#ifdef CLOSED_LOOP
tldModel
->
integrateRelabeled
(
imageForDetector
,
image_blurred
,
detectorResults
,
isObject
,
shouldBeIntegrated
);
#endif
}
return
true
;
...
...
@@ -425,9 +429,12 @@ timeStampPositiveNext(0),timeStampNegativeNext(0),params_(params){
}
}
#ifdef BLUR_AS_VADIM
GaussianBlur
(
standardPatch
,
blurredPatch
,
GaussBlurKernelSize
,
0.0
);
#else
resample
(
blurredImg
,
RotatedRect
(
center
,
size
,
angle
),
blurredPatch
);
#endif
pushIntoModel
(
standardPatch
,
true
);
resample
(
blurredImg
,
closest
[
i
],
blurredPatch
);
for
(
int
k
=
0
;
k
<
(
int
)
classifiers
.
size
();
k
++
){
classifiers
[
k
].
integrate
(
blurredPatch
,
true
);
}
...
...
@@ -655,7 +662,11 @@ void TrackerTLDModel::integrateRelabeled(Mat& img,Mat& imgBlurred,const std::vec
}
}
#ifdef CLOSED_LOOP
if
(
alsoIntoModel
[
k
]
||
(
isPositive
[
k
]
==
false
)){
#else
if
(
alsoIntoModel
[
k
]){
#endif
resample
(
imgBlurred
,
box
[
k
],
blurredPatch
);
if
(
isPositive
[
k
]){
positiveIntoEnsemble
++
;
...
...
@@ -740,8 +751,12 @@ int Pexpert::additionalExamples(std::vector<Mat_<uchar> >& examplesForModel,std:
size
.
height
=
(
float
)(
closest
[
i
].
height
*
rng
.
uniform
((
double
)
0.99
,(
double
)
1.01
));
float
angle
=
(
float
)
rng
.
uniform
(
-
5.0
,
5.0
);
resample
(
scaledImg
,
RotatedRect
(
center
,
size
,
angle
),
standardPatch
);
#ifdef BLUR_AS_VADIM
GaussianBlur
(
standardPatch
,
blurredPatch
,
GaussBlurKernelSize
,
0.0
);
#else
resample
(
blurredImg
,
RotatedRect
(
center
,
size
,
angle
),
blurredPatch
);
#endif
resample
(
scaledImg
,
RotatedRect
(
center
,
size
,
angle
),
standardPatch
);
for
(
int
y
=
0
;
y
<
standardPatch
.
rows
;
y
++
){
for
(
int
x
=
0
;
x
<
standardPatch
.
cols
;
x
++
){
standardPatch
(
x
,
y
)
+=
(
uchar
)
rng
.
gaussian
(
5.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