There was a need to process frames from the webcam, chose OpenCV . So, this reading program gives an error:
Unhandled exception at 0x00007FF959C7E5BC (ntdll.dll) in CaptureVideo.exe: 0xC000000D: Invalid parameter passed to the service or function.
The window can be seen instead of the image strip.
Code:
#include <opencv\cv.h> #include <opencv\highgui.h> int main() { cvNamedWindow("Output", 0); CvCapture* capture = cvCreateCameraCapture(0); //assert(capture != NULL); IplImage* frame = cvQueryFrame(capture); cvShowImage("Output", frame); //cvSaveImage("filename.png", frame); cvWaitKey (2000); cvDestroyWindow("Output"); return 0; } Problem in line:
CvCapture* capture = cvCreateCameraCapture(0); With a zero value, an error occurs, and with other constants ( СV_CAP_* ) there is neither an image nor an error. For everyone: a laptop camera. In Skype as well as on the sites, the camera works.