Ask Your Question

TerryS's profile - activity

2014-02-13 11:47:04 -0500 commented question create FrameSource for super-res using createFrameSource_Empty

It is possible to call createFrameSource_Video on individual image files. However, each time it returns a new frameSource. Is it possible to append one frameSource to another? Note also that frame_source.cpp contains useful classes such as CaptureFrameSource and VideoFrameSource. However, I have been unable to call them without compiler errors. Is there a way to include these classes into my code?

2014-02-11 08:55:10 -0500 asked a question SuperResolution parameters

I have a question about the parameters 'Iterations' and 'Temporal Radius' set during a super-resolution. superRes->set("iterations", iterations); superRes->set("temporalAreaRadius", temporalAreaRadius); Does the temporalAreaRadius define the number of images used in the super-resolution? Or is it part of the optical flow defining the area that it allows a pixel to move? One of the white papers referenced mentions using 5 images in a sliding window being used for super-resolution. If so, how come we usually skip the first frame as opposed to the first two? Is the 'iterations' parameter part of the optical flow, or defining a limit to the number of tries to obtain a super-resolution solution? Thanks for your help!

2014-02-07 13:53:12 -0500 asked a question create FrameSource for super-res using createFrameSource_Empty

I am looking to perform SuperResolution in OpenCV using an image stack as opposed to a video file. Due to the number of images/file size I would prefer to not have an intermediate step creating a video file from the images. I created a function that calls createFrameSource_Empty and return a pointer to the main super-res code. However, I keep getting seg faults later on. Here is my function. Any help is appreciated.

// Creates a frame source from an image stack Ptr<framesource> createFrameSource_imageStack() { VideoCapture g_cap; Mat frame; int i = 270330; // should include leading zero int d = 1; char filename[1024];

// Generate an empty frame source structure
Ptr<FrameSource> frameSource;
frameSource = createFrameSource_Empty();

// Process 20 frames
    // Get frame from capture
    //cout << "Variable i is " << i << endl;
    sprintf(filename, "/Users/terry/Documents/video_product_20frame/1_1_%07d.tif",i);;
    g_cap >> frame;

    // Check if the frame was retrieved
        cerr << "Could not retrieve frame.";
        exit (-1);

    // quit after the 20th frame
    if (d == 20)
return frameSource;