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
9aedc612
Commit
9aedc612
authored
Aug 10, 2015
by
Vladimir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added MO-TLD NN Classifier optimization on GPU
parent
b3636fe5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
12 deletions
+8
-12
multiTracker_test.cpp
modules/tracking/samples/multiTracker_test.cpp
+7
-11
multiTracker.cpp
modules/tracking/src/multiTracker.cpp
+0
-0
tldTracker.cpp
modules/tracking/src/tldTracker.cpp
+1
-1
No files found.
modules/tracking/samples/multiTracker_test.cpp
View file @
9aedc612
...
...
@@ -120,11 +120,7 @@ int main()
//From TLD dataset
selectObject
=
true
;
Rect2d
boundingBox1
=
tld
::
tld_InitDataset
(
TEST_VIDEO_INDEX
,
"D:/opencv/VOT 2015"
,
1
);
Rect2d
boundingBox2
;
boundingBox2
.
x
=
470
;
boundingBox2
.
y
=
500
;
boundingBox2
.
width
=
50
;
boundingBox2
.
height
=
100
;
Rect2d
boundingBox2
(
470
,
490
,
50
,
120
);
frame
=
tld
::
tld_getNextDatasetFrame
();
frame
.
copyTo
(
image
);
...
...
@@ -133,13 +129,13 @@ int main()
#ifdef RECORD_VIDEO_FLG
String
outputFilename
=
"test.avi"
;
VideoWriter
outputVideo
;
outputVideo
.
open
(
outputFilename
,
-
1
,
30
,
Size
(
image
.
cols
,
image
.
rows
));
outputVideo
.
open
(
outputFilename
,
-
1
,
15
,
Size
(
image
.
cols
,
image
.
rows
));
if
(
!
outputVideo
.
isOpened
())
{
std
::
cout
<<
"!!! Output video could not be opened"
<<
std
::
endl
;
getchar
();
return
;
return
0
;
}
#endif
...
...
@@ -184,17 +180,17 @@ int main()
{
//initializes the tracker
mt
.
addTarget
(
frame
,
boundingBox1
,
tracker_algorithm_name
);
rectangle
(
imag
e
,
boundingBox1
,
mt
.
colors
[
0
],
2
,
1
);
rectangle
(
fram
e
,
boundingBox1
,
mt
.
colors
[
0
],
2
,
1
);
mt
.
addTarget
(
frame
,
boundingBox2
,
tracker_algorithm_name
);
rectangle
(
imag
e
,
boundingBox2
,
mt
.
colors
[
1
],
2
,
1
);
rectangle
(
fram
e
,
boundingBox2
,
mt
.
colors
[
1
],
2
,
1
);
initialized
=
true
;
}
else
{
//updates the tracker
if
(
mt
.
update
_opt
(
frame
))
if
(
mt
.
update
(
frame
))
{
for
(
int
i
=
0
;
i
<
mt
.
targetNum
;
i
++
)
rectangle
(
frame
,
mt
.
boundingBoxes
[
i
],
mt
.
colors
[
i
],
2
,
1
);
...
...
@@ -204,7 +200,7 @@ int main()
imshow
(
"Tracking API"
,
frame
);
#ifdef RECORD_VIDEO_FLG
outputVideo
<<
imag
e
;
outputVideo
<<
fram
e
;
#endif
...
...
modules/tracking/src/multiTracker.cpp
View file @
9aedc612
This diff is collapsed.
Click to expand it.
modules/tracking/src/tldTracker.cpp
View file @
9aedc612
...
...
@@ -129,7 +129,7 @@ bool TrackerTLDImpl::updateImpl(const Mat& image, Rect2d& boundingBox)
if
(
i
==
1
)
{
if
(
!
ocl
::
haveOpenCL
())
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
());
...
...
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