原文写于2013年3月22日
写入原始视频可以正常保存,现在frame经过灰度化处理之后想保存视频,但是不知怎地就是无法保存,难道cvWriteFrame只支持3通道的image保存吗?等待解决...
#include "stdafx.h"
#include "cv.h"
#include "highgui.h"
int main( ) {
CvCapture* capture = cvCaptureFromFile( "E:\\test.avi" );
if (!capture)
{printf("unable to load a video");
cvWaitKey(0);
exit(0);
}
cvNamedWindow("haha", 1);
IplImage* frame;
double fps = cvGetCaptureProperty (
capture,
CV_CAP_PROP_FPS);
printf("fp