Ask Your Question

Super resolution video format?

asked 2015-06-11 09:10:07 -0500

pursang gravatar image


I can't find a list of possible video formats for super resolution. I've only seen people use .avi on forums. Would it work with .mp4 as well?

Where can I find documentation for this? ( doesn't quite cut it).

Thanks in advance for your reply!

edit retag flag offensive close merge delete


LBerger gravatar imageLBerger ( 2015-06-11 13:14:03 -0500 )edit

Indeed I know this example, but it doesn't provide any clues as to what the inputVideoName is...

pursang gravatar imagepursang ( 2015-06-16 04:47:08 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2015-06-17 13:43:09 -0500

LBerger gravatar image

updated 2015-06-17 13:49:13 -0500

Have you solve your problem? It's not really an answer but may be it could help you. After you can change cv::superres::createFrameSource_Camera(0) in createFrameSource_Video(name); where name is pathname to your file. I think that's video format can be any format that opencv (ffmpeg ) can read .

I start working on Superres my program is (very slow) (using samples/gpu/super_resolution.cpp). Becarefull I use twice usb device 0 (my webcam). It works on windows but I'm not sure that's good on all platform.

#include <opencv2/opencv.hpp> 
#include "opencv2/superres.hpp"

using namespace cv;
using namespace std;
using namespace cv::superres;

int main(int argc, char** argv)

    Ptr<cv::superres::FrameSource> f;
    f = cv::superres::createFrameSource_Camera(0);
    Ptr<cv::superres::SuperResolution >sr;

    VideoCapture vid;;

    sr = cv::superres::createSuperResolution_BTVL1();
    Ptr<DenseOpticalFlowExt> of = cv::superres::createOptFlow_Farneback();

    int scale = 2;
    Mat frame;
    char c;
    Mat frameZoom;
    Mat mZoom;
    Mat v;
        //if (vid.grab())
            imshow("Video SuperRes", frame);
            if (vid.grab())
                vid >> v;
                resize(v, mZoom, Size(0, 0), scale, scale);
                imshow("Video Scale", mZoom);

                imshow("Video SuperRes", frame);
            c = waitKey(20);

    } while (c != 27);
    return 0;
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-06-11 09:10:07 -0500

Seen: 1,023 times

Last updated: Jun 17 '15