You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

26 lines
597 B

#include "opencv2/opencv.hpp"
#include <iostream>
int main(){
cv::VideoCapture cap(0);
std::cout<<"isdfjodjfio"<<std::endl;
cv::VideoWriter writer("app0.mp4",cv::VideoWriter::fourcc('M','P','4','V'),30,cv::Size(1280,720));
cv::Mat image;
int i = 0;
while (cap.read(image))
{
cv::imshow("default",image);
writer.write(image);
if(cv::waitKey(20) == 'q'){
break;
}
if(i++>100){
break;
}
std::cout<<"i = "<<i<<std::endl;
}
writer.release();
cap.release();
image.release();
}