summaryrefslogtreecommitdiffhomepage
path: root/tracker-aruco
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-06-14 11:45:53 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-06-14 18:14:46 +0200
commita8da0d997048007d3feb2e3814ba93bbfd4d4ef8 (patch)
treec4042dd751232a2c759ab68c9bcf372e1a2861fb /tracker-aruco
parent2f0d5047d3fbe3958f2663c1ac7e7a2ecccc9336 (diff)
tracker/{aruco,pt}: disable opencv multithreading
Less overhead this way.
Diffstat (limited to 'tracker-aruco')
-rw-r--r--tracker-aruco/ftnoir_tracker_aruco.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/tracker-aruco/ftnoir_tracker_aruco.cpp b/tracker-aruco/ftnoir_tracker_aruco.cpp
index 30f53485..b222ebbb 100644
--- a/tracker-aruco/ftnoir_tracker_aruco.cpp
+++ b/tracker-aruco/ftnoir_tracker_aruco.cpp
@@ -24,14 +24,18 @@ typedef struct {
int height;
} resolution_tuple;
-static resolution_tuple resolution_choices[] = {
+static resolution_tuple resolution_choices[] =
+{
{ 640, 480 },
{ 320, 240 },
{ 320, 200 },
{ 0, 0 }
};
-Tracker::Tracker() : stop(false), layout(nullptr), videoWidget(nullptr)
+Tracker::Tracker() :
+ stop(false),
+ layout(nullptr),
+ videoWidget(nullptr)
{
}
@@ -77,6 +81,8 @@ void Tracker::getRT(cv::Matx33d& r_, cv::Vec3d& t_)
void Tracker::run()
{
+ cv::setNumThreads(0);
+
int rint = s.resolution;
if (rint < 0 || rint >= (int)(sizeof(resolution_choices) / sizeof(resolution_tuple)))
rint = 0;