Ask Your Question
0

Superresolution in video: no scale change in output

asked May 21 '13

student gravatar image

updated May 21 '13

Hi

I'm testing the super-resolution functionality of opencv 2.4.5. The program runs but I don't see any scale changes in the output frames (after calling nextFrame). For example:

    Ptr<SuperResolution> srobj = createSuperResolution_BTVL1();
Ptr<DenseOpticalFlowExt> opflow = createOptFlow_Farneback();
srobj->set("scale", 6);
srobj->set("opticalFlow", opflow);

Ptr<FrameSource> frameSource = createFrameSource_Video("myvid.avi");
srobj->setInput(frameSource);

Mat frame_super;

for(;;)
{
    frameSource->nextFrame(frame_super);
    imshow("output", frame_super);  

    waitKey(1);

}

I'm expecting the output "frame_super" would then be images which are 6 times larger than original frames but this isn't the case. Why are they of the same size as original frames?! Any help would be appreciated.

Preview: (hide)

1 answer

Sort by » oldest newest most voted
2

answered May 22 '13

Vladislav Vinogradov gravatar image

You didn't call SuperResolution algorithm, you called frameSource. It should be:

Mat frame_super;

for(;;)
{
    srobj->nextFrame(frame_super);
    imshow("output", frame_super);  

    waitKey(1);
}
Preview: (hide)

Comments

Does algorithm takes as a input only video, or we can give and image sequence? My research shows the 1st one(video only). Thank you

dashah gravatar imagedashah (Aug 16 '15)edit

Question Tools

Stats

Asked: May 21 '13

Seen: 962 times

Last updated: May 22 '13