How to get every frame of a video and save it as a .jpg picture by OpenCV
This article is about how OpenCV takes every frame of the video and saves it as a .jpg picture. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
The details are as follows
# include#include # include#include using namespace std;using namespace cv;// to obtain the face int main () {/ / Open the video file: actually create a VideoCapture structure VideoCapture capture ("1.mp4"); / / check whether it is opened normally: when it is successfully opened, isOpened returns ture if (! capture.isOpened ()) cout