aboutsummaryrefslogtreecommitdiffstats
path: root/app/camera.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'app/camera.cpp')
-rw-r--r--app/camera.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/camera.cpp b/app/camera.cpp
index 107880c..bd3dd99 100644
--- a/app/camera.cpp
+++ b/app/camera.cpp
@@ -16,7 +16,7 @@
#include "camera.h"
#include <QPainter>
-#include <opencv2/imgproc.hpp>
+#include <opencv2/imgproc/imgproc.hpp>
#include <linux/videodev2.h>
#include <fcntl.h>
@@ -47,8 +47,8 @@ void Camera::paint(QPainter *painter) {
}
void Camera::enumerateCameras() {
- int maxID = 10;
- for (int idx = 0; idx <maxID; idx++){
+ int maxID = 20;
+ for (int idx = 2; idx <maxID; idx++){
std::stringstream no;
no << "/dev/video" << idx;
qDebug() << idx;
@@ -80,8 +80,8 @@ void Camera::start(int no, int fps, QString res) {
}
if (capture && capture->open(no)){
- capture->set(CAP_PROP_FRAME_WIDTH, res.section("*", 0, 0).toInt());
- capture->set(CAP_PROP_FRAME_HEIGHT, res.section("*", 1, 1).toInt());
+ capture->set(CV_CAP_PROP_FRAME_WIDTH, res.section("*", 0, 0).toInt());
+ capture->set(CV_CAP_PROP_FRAME_HEIGHT, res.section("*", 1, 1).toInt());
if (fps > 0){
timer->start(1000/fps);