setup Meson project, get the server to read a video feed from a local camera
This commit is contained in:
16
server.cpp
Normal file
16
server.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#include <opencv2/highgui.hpp>
|
||||
#include <opencv2/core/mat.hpp>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
cv::VideoCapture cap = cv::VideoCapture(0);
|
||||
bool running = true;
|
||||
cv::Mat image = cv::Mat::zeros(480, 640, CV_8UC3);
|
||||
while (running) {
|
||||
cap.read(image);
|
||||
imshow("image", image);
|
||||
running = cv::waitKey(30) != 27;
|
||||
}
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user