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
565d3dde
Commit
565d3dde
authored
9 years ago
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4055 from rajithr:patch-1
parents
85c08dd1
7658c2e2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
19 deletions
+9
-19
detection_based_tracker.cpp
modules/objdetect/src/detection_based_tracker.cpp
+9
-19
No files found.
modules/objdetect/src/detection_based_tracker.cpp
View file @
565d3dde
...
...
@@ -284,7 +284,16 @@ void* cv::workcycleObjectDetectorFunction(void* p)
{
CATCH_ALL_AND_LOG
({
((
cv
::
DetectionBasedTracker
::
SeparateDetectionWork
*
)
p
)
->
workcycleObjectDetector
();
});
try
{
((
cv
::
DetectionBasedTracker
::
SeparateDetectionWork
*
)
p
)
->
lock
();
((
cv
::
DetectionBasedTracker
::
SeparateDetectionWork
*
)
p
)
->
stateThread
=
cv
::
DetectionBasedTracker
::
SeparateDetectionWork
::
STATE_THREAD_STOPPED
;
((
cv
::
DetectionBasedTracker
::
SeparateDetectionWork
*
)
p
)
->
isObjectDetectingReady
=
false
;
((
cv
::
DetectionBasedTracker
::
SeparateDetectionWork
*
)
p
)
->
shouldObjectDetectingResultsBeForgot
=
false
;
#ifdef USE_STD_THREADS
((
cv
::
DetectionBasedTracker
::
SeparateDetectionWork
*
)
p
)
->
objectDetectorThreadStartStop
.
notify_one
();
#else
pthread_cond_signal
(
&
(((
cv
::
DetectionBasedTracker
::
SeparateDetectionWork
*
)
p
)
->
objectDetectorThreadStartStop
));
#endif
((
cv
::
DetectionBasedTracker
::
SeparateDetectionWork
*
)
p
)
->
unlock
();
}
catch
(...)
{
LOGE0
(
"DetectionBasedTracker: workcycleObjectDetectorFunction: ERROR concerning pointer, received as the function parameter"
);
}
...
...
@@ -437,25 +446,6 @@ void cv::DetectionBasedTracker::SeparateDetectionWork::workcycleObjectDetector()
objects
.
clear
();
}
// while(isWorking())
#ifdef USE_STD_THREADS
mtx_lock
.
lock
();
#else
pthread_mutex_lock
(
&
mutex
);
#endif
stateThread
=
STATE_THREAD_STOPPED
;
isObjectDetectingReady
=
false
;
shouldObjectDetectingResultsBeForgot
=
false
;
#ifdef USE_STD_THREADS
objectDetectorThreadStartStop
.
notify_one
();
mtx_lock
.
unlock
();
#else
pthread_cond_signal
(
&
objectDetectorThreadStartStop
);
pthread_mutex_unlock
(
&
mutex
);
#endif
LOGI
(
"DetectionBasedTracker::SeparateDetectionWork::workcycleObjectDetector: Returning"
);
}
...
...
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