Created
August 3, 2020 11:00
-
-
Save reiji1020/364fbb7ae0b9d8d88f99fcd9effc53eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <opencv2/opencv.hpp> | |
#include <opencv2/opencv_lib.hpp> | |
#include <opencv2/highgui/highgui.hpp> | |
using namespace cv; | |
using namespace std; | |
int main(void) | |
{ | |
Mat frame, src_video; | |
char windowName[] = "enbeded gist"; | |
namedWindow(windowName, CV_WINDOW_AUTOSIZE); | |
VideoCapture capture(0); | |
if(!capture.isOpened()) | |
return -1; | |
while(waitKey(1) == -1){ | |
do{ | |
capture >> frame; | |
}while(frame.empty()); | |
src_video = frame; | |
imshow(windowName,src_video); | |
} | |
destroyAllWindows(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment