You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is the accepted answer, which you can work into the code:
#include"opencv2/opencv.hpp"usingnamespacecv;intmain(int argc, char** argv)
{
VideoCapture cap;
// open the default camera, use something different from 0 otherwise;// Check VideoCapture documentation.if(!cap.open(0))
return0;
for(;;)
{
Mat frame;
cap >> frame;
if( frame.empty() ) break; // end of video streamimshow("this is you, smile! :)", frame);
if( waitKey(10) == 27 ) break; // stop capturing by pressing ESC
}
// the camera will be closed automatically upon exit// cap.close();return0;
}
I wanna use a webcam to detect(real-time)
what can I do?
The text was updated successfully, but these errors were encountered: