I have a point camera USB3 type and connect the camera to my computer using USB 3.0 port.
I came across this code recently. But not sure how to use.
#include "opencv2\opencv.hpp"
#include <stdint.h>
using namespace cv;
using namespace std;
const int fps = 20;
int main(int argv, char** argc) {
Mat frame;
VideoCapture vid(0);
if (!vid.isOpened()) {
return -1;
}
while (vid.read(frame)) {
imshow("Webcam", frame);
if (waitKey(1000 / fps) >= 0)
break;
}
return 1;
}
I am not sure how to use this code with my camera. Please help.