summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-06-22 12:58:13 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-06-26 23:01:53 +0200
commit3cf0308c6487ae917b064e49569e5c9684d61978 (patch)
tree81a782c90e5d4716e2b575afd376f5a06cb73009
parentf50ac3549d6a7f1199fa012e4b03f581bc8d305b (diff)
tracker/{pt,aruco}: change cv::setNumThreads call site
-rw-r--r--tracker-aruco/ftnoir_tracker_aruco.cpp4
-rw-r--r--tracker-pt/ftnoir_tracker_pt.cpp3
2 files changed, 3 insertions, 4 deletions
diff --git a/tracker-aruco/ftnoir_tracker_aruco.cpp b/tracker-aruco/ftnoir_tracker_aruco.cpp
index 28eea60e..a3d58c88 100644
--- a/tracker-aruco/ftnoir_tracker_aruco.cpp
+++ b/tracker-aruco/ftnoir_tracker_aruco.cpp
@@ -63,6 +63,8 @@ static const resolution_tuple resolution_choices[] =
aruco_tracker::aruco_tracker()
{
cv::setBreakOnError(true);
+ cv::setNumThreads(1);
+
// param 2 ignored for Otsu thresholding. it's required to use our fork of Aruco.
set_detector_params();
}
@@ -359,8 +361,6 @@ void aruco_tracker::cycle_detection_params()
void aruco_tracker::run()
{
- cv::setNumThreads(1);
-
if (!open_camera())
return;
diff --git a/tracker-pt/ftnoir_tracker_pt.cpp b/tracker-pt/ftnoir_tracker_pt.cpp
index e6cbb6ba..7435e6d7 100644
--- a/tracker-pt/ftnoir_tracker_pt.cpp
+++ b/tracker-pt/ftnoir_tracker_pt.cpp
@@ -31,6 +31,7 @@ Tracker_PT::Tracker_PT(pointer<pt_runtime_traits> const& traits) :
preview_frame { traits->make_preview(preview_width, preview_height) }
{
cv::setBreakOnError(true);
+ cv::setNumThreads(1);
connect(s.b.get(), SIGNAL(saving()), this, SLOT(maybe_reopen_camera()), Qt::DirectConnection);
connect(&s.fov, SIGNAL(valueChanged(int)), this, SLOT(set_fov(int)), Qt::DirectConnection);
@@ -48,8 +49,6 @@ Tracker_PT::~Tracker_PT()
void Tracker_PT::run()
{
- cv::setNumThreads(1);
-
#ifdef PT_PERF_LOG
QFile log_file(OPENTRACK_BASE_PATH + "/PointTrackerPerformance.txt");
if (!log_file.open(QIODevice::WriteOnly | QIODevice::Text)) return;