Super Resolution with 2.4.8: real time processing?

asked 2014-01-22 05:26:35 -0500

conceptgame gravatar image

updated 2014-01-22 05:27:08 -0500

Hi, I have read few other questions about Super Resolution and Video on this forum. But I did not find any tip about real time processing with super resolution. I wanted to test with a webcam but it seems that the algorithms, at least the BTV SuperResolution algorithm, need too many resources to be achieved real time and are supposed to have small input size.

  1. Is there a new alternative for real time processing?
  2. I tried the approach below but did not succeed. Did I make a programming mistake?

Code:

Mat newRawImage;
Ptr<SuperResolution> superRes;
Ptr<DenseOpticalFlowExt> of;
Ptr<FrameSource> frameSource;

And I call the following part in an infinite loop of a thread and use newRawImage:

if (of.empty())
{
  of = createOptFlow_DualTVL1_OCL();
}
if (!of.empty())
{
   superRes = createSuperResolution_BTVL1_OCL();
   superRes->set("opticalFlow", ext->of);
   superRes->set("scale", 4);
   superRes->set("iterations", 4);
   superRes->set("temporalAreaRadius", 4);
   if (frameSource.empty())
   {
     frameSource = createFrameSource_Camera(deviceId);
     superRes->setInput(frameSource);
   }
   cv::ocl::oclMat result_;
   superRes->nextFrame(result_);
   ocl::finish();
   if (!result_.empty())
   {
      result_.download(newRawImage);
   }
}
edit retag flag offensive close merge delete

Comments

Actually i think that getting superresolution on a system in real time will require some very fancy hardware. It isn't an algorithm that is supposed to run in real time performance, so why are you expecting it to be?

StevenPuttemans gravatar imageStevenPuttemans ( 2014-01-22 05:54:44 -0500 )edit

I gave this code example because I wondered if there are other errors but I did not know that this algorithm cannot do real time processing as I wrote it. I saw it afterwards on this forum. However I wonder if other algorithms can be used for Real Time processing. And what is a reasonable maximum resolution for it?

conceptgame gravatar imageconceptgame ( 2014-01-22 08:44:25 -0500 )edit

This topic also discusses the problem of the size for superresolution. I guess this feature is possible real time on small parts but not on larger scales.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-01-22 09:01:56 -0500 )edit