From ce79d1556bf8d43665694d7dd75571a79d175615 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 29 Apr 2019 18:34:46 +0200 Subject: cv: gather common init code --- tracker-pt/ftnoir_tracker_pt.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tracker-pt/ftnoir_tracker_pt.cpp') diff --git a/tracker-pt/ftnoir_tracker_pt.cpp b/tracker-pt/ftnoir_tracker_pt.cpp index d7484e9c..ea5346f6 100644 --- a/tracker-pt/ftnoir_tracker_pt.cpp +++ b/tracker-pt/ftnoir_tracker_pt.cpp @@ -7,13 +7,13 @@ */ #include "ftnoir_tracker_pt.h" +#include "pt-api.hpp" +#include "cv/init.hpp" #include "video/video-widget.hpp" #include "compat/math-imports.hpp" #include "compat/check-visible.hpp" #include "compat/thread-name.hpp" -#include "pt-api.hpp" - #include #include #include @@ -31,8 +31,7 @@ Tracker_PT::Tracker_PT(pointer const& traits) : frame { traits->make_frame() }, preview_frame { traits->make_preview(preview_width, preview_height) } { - cv::setBreakOnError(true); - cv::setNumThreads(1); + opencv_init(); connect(s.b.get(), &bundle_::saving, this, &Tracker_PT::maybe_reopen_camera, Qt::DirectConnection); connect(s.b.get(), &bundle_::reloading, this, &Tracker_PT::maybe_reopen_camera, Qt::DirectConnection); -- cgit v1.2.3