Power & Source of Big Ideas

Need Help for OpenCV using Camera

Moderators: chensy, FATechsupport

I installed Qt desktop version to my NanoPc T4

I cann not connect cam(0) from OpenCv c++ neither python.

Is there any tutorial ? how we can use camera from OpenCV ?

exactly the same way, as an any other platform:

Code: Select all

cv::VideoCapture capture(0); // open the first camera

you may need to make some tuning, like select Video 4 Linux or any other API

Code: Select all

cv::VideoCapture capture("/dev/video0", cv::CAP_V4L); // open the first camera
capture.set(cv::CAP_PROP_FRAME_WIDTH, 640);
capture.set(cv::CAP_PROP_FRAME_HEIGHT, 480);

for USB cameras it can be issue with second camera - it's not a /dev/video1, but /dev/video2

In case if you need to use qt way to get to camera, you may look in QtWidgetStub and QtQuickStub as examples.

Who is online

In total there are 3 users online :: 0 registered, 0 hidden and 3 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 3 guests