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
1a8f4a89
Commit
1a8f4a89
authored
9 years ago
by
Vladimir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Transparent API Support
parent
07a2b55f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
12 deletions
+25
-12
tldDetector.cpp
modules/tracking/src/tldDetector.cpp
+3
-6
tldModel.cpp
modules/tracking/src/tldModel.cpp
+2
-2
tldTracker.cpp
modules/tracking/src/tldTracker.cpp
+20
-4
No files found.
modules/tracking/src/tldDetector.cpp
View file @
1a8f4a89
...
...
@@ -139,9 +139,8 @@ namespace cv
//printf("Mem Cpy GPU: %f\n", t);
size_t
globSize
=
1000
;
size_t
localSize
=
128
;
//e3 = getTickCount();
if
(
!
k
.
run
(
1
,
&
globSize
,
&
localSize
,
tru
e
))
if
(
!
k
.
run
(
1
,
&
globSize
,
NULL
,
fals
e
))
printf
(
"Kernel Run Error!!!"
);
//e4 = getTickCount();
//t = (e4 - e3) / getTickFrequency()*1000.0;
...
...
@@ -219,9 +218,8 @@ namespace cv
// 2 -> Pos&Neg
size_t
globSize
=
2
*
numOfPatches
*
MAX_EXAMPLES_IN_MODEL
;
size_t
localSize
=
1024
;
//e3 = getTickCount();
if
(
!
k
.
run
(
1
,
&
globSize
,
&
localSize
,
tru
e
))
if
(
!
k
.
run
(
1
,
&
globSize
,
NULL
,
fals
e
))
printf
(
"Kernel Run Error!!!"
);
//e4 = getTickCount();
//t = (e4 - e3) / getTickFrequency()*1000.0;
...
...
@@ -374,9 +372,8 @@ namespace cv
//printf("Mem Cpy GPU: %f\n", t);
size_t
globSize
=
1000
;
size_t
localSize
=
128
;
//e3 = getTickCount();
if
(
!
k
.
run
(
1
,
&
globSize
,
&
localSize
,
tru
e
))
if
(
!
k
.
run
(
1
,
&
globSize
,
NULL
,
fals
e
))
printf
(
"Kernel Run Error!!!"
);
//e4 = getTickCount();
//t = (e4 - e3) / getTickFrequency()*1000.0;
...
...
This diff is collapsed.
Click to expand it.
modules/tracking/src/tldModel.cpp
View file @
1a8f4a89
...
...
@@ -233,7 +233,7 @@ namespace cv
}
e2
=
getTickCount
();
t
=
(
e2
-
e1
)
/
getTickFrequency
()
*
1000
;
printf
(
"Integrate Additional: %fms
\n
"
,
t
);
//
printf("Integrate Additional: %fms\n", t);
/*
if( negativeIntoModel > 0 )
dfprintf((stdout, "negativeIntoModel = %d ", negativeIntoModel));
...
...
@@ -303,7 +303,7 @@ namespace cv
}
e2
=
getTickCount
();
t
=
(
e2
-
e1
)
/
getTickFrequency
()
*
1000
;
printf
(
"Integrate Additional OCL: %fms
\n
"
,
t
);
//
printf("Integrate Additional OCL: %fms\n", t);
/*
if( negativeIntoModel > 0 )
dfprintf((stdout, "negativeIntoModel = %d ", negativeIntoModel));
...
...
This diff is collapsed.
Click to expand it.
modules/tracking/src/tldTracker.cpp
View file @
1a8f4a89
...
...
@@ -116,11 +116,20 @@ bool TrackerTLDImpl::updateImpl(const Mat& image, Rect2d& boundingBox)
std
::
vector
<
Rect2d
>
candidates
;
std
::
vector
<
double
>
candidatesRes
;
bool
trackerNeedsReInit
=
false
;
bool
DETECT_FLG
=
false
;
for
(
int
i
=
0
;
i
<
2
;
i
++
)
{
Rect2d
tmpCandid
=
boundingBox
;
if
(
(
(
i
==
0
)
&&
!
data
->
failedLastTime
&&
trackerProxy
->
update
(
image
,
tmpCandid
)
)
||
((
i
==
1
)
&&
(
tldModel
->
detector
->
ocl_detect
(
imageForDetector
,
image_blurred
,
tmpCandid
,
detectorResults
,
tldModel
->
getMinSize
()))))
if
(
i
==
1
)
{
if
(
ocl
::
haveOpenCL
())
DETECT_FLG
=
tldModel
->
detector
->
ocl_detect
(
imageForDetector
,
image_blurred
,
tmpCandid
,
detectorResults
,
tldModel
->
getMinSize
());
else
DETECT_FLG
=
tldModel
->
detector
->
detect
(
imageForDetector
,
image_blurred
,
tmpCandid
,
detectorResults
,
tldModel
->
getMinSize
());
}
if
(
(
(
i
==
0
)
&&
!
data
->
failedLastTime
&&
trackerProxy
->
update
(
image
,
tmpCandid
)
)
||
(
DETECT_FLG
))
{
candidates
.
push_back
(
tmpCandid
);
if
(
i
==
0
)
...
...
@@ -202,10 +211,17 @@ bool TrackerTLDImpl::updateImpl(const Mat& image, Rect2d& boundingBox)
tldModel
->
integrateRelabeled
(
imageForDetector
,
image_blurred
,
detectorResults
);
//dprintf(("%d relabeled by nExpert\n", negRelabeled));
pExpert
.
additionalExamples
(
examplesForModel
,
examplesForEnsemble
);
tldModel
->
ocl_integrateAdditional
(
examplesForModel
,
examplesForEnsemble
,
true
);
if
(
ocl
::
haveOpenCL
())
tldModel
->
ocl_integrateAdditional
(
examplesForModel
,
examplesForEnsemble
,
true
);
else
tldModel
->
integrateAdditional
(
examplesForModel
,
examplesForEnsemble
,
true
);
examplesForModel
.
clear
();
examplesForEnsemble
.
clear
();
nExpert
.
additionalExamples
(
examplesForModel
,
examplesForEnsemble
);
tldModel
->
ocl_integrateAdditional
(
examplesForModel
,
examplesForEnsemble
,
false
);
if
(
ocl
::
haveOpenCL
())
tldModel
->
ocl_integrateAdditional
(
examplesForModel
,
examplesForEnsemble
,
false
);
else
tldModel
->
integrateAdditional
(
examplesForModel
,
examplesForEnsemble
,
false
);
}
else
{
...
...
This diff is collapsed.
Click to expand it.
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