summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_pt/camera.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-07-25 11:43:10 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-07-25 11:43:10 +0200
commit10ac081b3c4ebb9b29b81b30f5efe6622f4212bc (patch)
treefedfe7efc494145d0b46e91ba5a94c47cb0c1b6f /ftnoir_tracker_pt/camera.cpp
parent6baa8ca1070612e5d7cbae7aa62cbe4a9e51ad40 (diff)
parent24538cf3a3a91481851618791b11be81437563e4 (diff)
Merge branch 'unstable' into trackhat-ui
Diffstat (limited to 'ftnoir_tracker_pt/camera.cpp')
-rw-r--r--ftnoir_tracker_pt/camera.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/ftnoir_tracker_pt/camera.cpp b/ftnoir_tracker_pt/camera.cpp
index 2989c1fe..9e11b815 100644
--- a/ftnoir_tracker_pt/camera.cpp
+++ b/ftnoir_tracker_pt/camera.cpp
@@ -8,9 +8,7 @@
#include "camera.h"
#include <string>
#include <QDebug>
-#include "opentrack/sleep.hpp"
-
-using namespace cv;
+#include "opentrack-compat/sleep.hpp"
void Camera::set_device_index(int index)
{
@@ -74,7 +72,7 @@ void CVCamera::start()
{
if (cap)
delete cap;
- cap = new VideoCapture(desired_index);
+ cap = new cv::VideoCapture(desired_index);
_set_res();
_set_fps();
// extract camera info
@@ -103,11 +101,11 @@ void CVCamera::stop()
active = false;
}
-bool CVCamera::_get_frame(Mat* frame)
+bool CVCamera::_get_frame(cv::Mat* frame)
{
if (cap && cap->isOpened())
{
- Mat img;
+ cv::Mat img;
for (int i = 0; i < 100 && !cap->read(img); i++)
;;
@@ -142,5 +140,5 @@ void CVCamera::_set_device_index()
cap->release();
delete cap;
}
- cap = new VideoCapture(desired_index);
+ cap = new cv::VideoCapture(desired_index);
}