h.264 ストリームから jpeg 画像を保存することは可能ですか。私はウェブカメラからストリームを取得し、キーを押すと画像を保存する小さなヘルパーをプログラムしたいと考えています。
お役に立てば幸いです。
OpenCVはこれを行うことができます。これは良い参考資料です。以下は私が私のために働いた私が素早く書いたものです:
#include <cv.h>
#include <highgui.h>
using namespace cv;
int main(int argc, char ** argv){
VideoCapture capture(0);
namedWindow("video",1);
while(capture.isOpened()){
Mat frame;
capture >> frame;
imshow("video",frame);
if (waitKey(30) > 0){
imwrite("image.jpg",frame);
}
}
return 0;
}