summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_pt/camera.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ftnoir_tracker_pt/camera.cpp')
-rw-r--r--ftnoir_tracker_pt/camera.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/ftnoir_tracker_pt/camera.cpp b/ftnoir_tracker_pt/camera.cpp
index 2989c1fe..4619f695 100644
--- a/ftnoir_tracker_pt/camera.cpp
+++ b/ftnoir_tracker_pt/camera.cpp
@@ -10,8 +10,6 @@
#include <QDebug>
#include "opentrack/sleep.hpp"
-using namespace cv;
-
void Camera::set_device_index(int index)
{
if (desired_index != 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);
}