Closed vk8051 closed 4 years ago
VideoCapture cap; // open the default camera if(videoFile != "") cap.open(videoFile); else cap.open("Recording3.webm"); <<==========Here can not open default camera if(!cap.isOpened()) // check if we succeeded return -1;
The correct would be
if(videoFile != "") cap.open(videoFile); else cap.open(0); if(!cap.isOpened()) // check if we succeeded return -1;
Fixed in the source code.
VideoCapture cap; // open the default camera if(videoFile != "") cap.open(videoFile); else cap.open("Recording3.webm"); <<==========Here can not open default camera if(!cap.isOpened()) // check if we succeeded return -1;