Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

saving video with log-polar has some error..

i like to save 'movie.mkv' file with log-polar so that make 'saved_movie.avi'. but its occurred error. here is my codes.

include <iostream>

include <opencv2\highgui\highgui.hpp>

include <opencv\cv.hpp>

using namespace cv; using namespace std;

int main(int argc, char** argv) {

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.

saving video with log-polar has some error..

i like to save 'movie.mkv' file with log-polar so that make 'saved_movie.avi'. 'saved_movie.avi'.

but its occurred error. error.

here is my codes.

include <iostream>

include <opencv2\highgui\highgui.hpp>

include <opencv\cv.hpp>

using namespace cv; using namespace std;

int main(int argc, char** argv) {

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.