saving video with log-polar has some error.. [closed]
i like to save 'movie.mkv' file with log-polar so that make 'saved_movie.avi'.
but its occurred error.
here is my codes.
CvCapture* capture = cvCreateFileCapture("movie.mkv");
if (!capture) { cout << "capture error" << endl; return -1; }
IplImage* bgrFrame = cvQueryFrame(capture);
double fps = cvGetCaptureProperty(capture, CV_CAP_PROP_FPS);
CvSize size = cvSize((int)cvGetCaptureProperty(capture, CV_CAP_PROP_FRAME_WIDTH),
(int)cvGetCaptureProperty(capture, CV_CAP_PROP_FRAME_HEIGHT));
CvVideoWriter* writer = cvCreateVideoWriter("saved_movie.avi", -1, fps, size);
IplImage* logPolarFrame = cvCreateImage(size, IPL_DEPTH_8U, 3);
while ((bgrFrame = cvQueryFrame(capture)) != NULL) {
cvLogPolar(bgrFrame, logPolarFrame, cvPoint2D32f(bgrFrame->width / 2,
bgrFrame->height / 2),
40,
CV_INTER_LINEAR + CV_WARP_FILL_OUTLIERS);
cvWriteFrame(writer, logPolarFrame);
}
cvReleaseVideoWriter(&writer);
cvReleaseImage(&logPolarFrame);
cvReleaseCapture(&capture);
return 0;
and console show this.
openCV: FFMPEG: tag 0xffffff/' ' is not found (format 'avi / AVI (audio Vidio interleaved)')'
i download ffmpeg in c: and set enviroment path c:/ffmpeg/bin but nothing was changed.
i think it's codec prablems but i have no idea.. :( and i using os(window10) and visual studio2017.
opencv's c-api is no more maintained since 2010, you MUST NOT USE it !