title: OpenCV SuperResolution OutputArray frame
body: <p>In the documentation for <a href="http://docs.opencv.org/2.4/modules/superres/doc/super_resolution.html" rel="nofollow">SuperResolution</a>
  <br>
  The code required to output the nextframe is :
  <br> <code>void superres::SuperResolution::nextFrame(OutputArray frame)</code>
  <br><br>
  The input frame source has to be set with :
  <br>
  <code>void superres::SuperResolution::setInput(const Ptr&lt;FrameSource&gt;&amp; frameSource)</code>
  <br><br></p>
  
  <p>I have a code that takes frames from a video :</p>
  
  <pre><code>#include "opencv2/opencv.hpp"
  #include "iostream"
  
  using namespace cv;
  using namespace std;
  int main(int, char**)
  {
      VideoCapture cap ( "video1.mp4" ); // open the default camera
      if( ! cap.isOpened () )  // check if we succeeded
          return -1;
  
      /* Mat edges; */
      namedWindow ( "Video" , 1 );
      double frnb ( cap.get ( CV_CAP_PROP_FRAME_COUNT ) );
      std::cout &lt;&lt; "frame count = " &lt;&lt; frnb &lt;&lt; endl;
  
      for(;;) 
      {
          Mat frame;
          double fIdx;
  
          std::cout &lt;&lt; "frame index ? ";
          std::cin &gt;&gt; fIdx;
          if ( fIdx &lt; 0 || fIdx &gt;= frnb ) break;
          cap.set ( CV_CAP_PROP_POS_FRAMES , fIdx );
          bool success = cap.read(frame); 
          if ( ! success ) 
          {
              cout &lt;&lt; "Cannot read  frame " &lt;&lt; endl;
              break;
          }
          /* cap &gt;&gt; frame; // get a new frame from camera */
          imshow("Video", frame);
          if ( waitKey (0) == 27 ) break;
      }
      // the camera will be deinitialized automatically in VideoCapture destructor
      return 0;
  }
  </code></pre>
  
  <p><br>
  Given this I can use the <code>frame</code> variable as the parameter for the <code>setInput</code> method, but how can I initialize the <code>OutputArray frame</code> needed to generate the output ?</p>