我用QMediaPlayer获得了一个视频输入,然后我想逐帧读取帧并用其他视觉算法处理所有帧。但我不知道如何从视频逐帧获取帧并访问帧的每个像素...在OpenCV库中,我可以很轻松地使用cv :: VideoCapture解决这个问题, CV ::垫。如何从Qt框架中的视频逐帧获取帧?
cv::VideoCapture capture(filename);
cv::Mat img;
capture >> img; // 'img' contains the first frame of the video.
capture >> img; // 'img' contains the second frame of the video.
如果有人已经处理了这种问题,请帮助我。
非常感谢。
使用OpenCV没有问题,如果它适合你当然:) –