title: opencv c++ code error while applying some function to video file
body: <p>I get this error while trying to run OpenCV C++ code using qtcreator and the code used to 
  add some features to video file</p>
  
  <p><code>opencv error :assertion failed &lt;fixed type&lt;&gt; ::&lt;&lt;Mat*&gt;obj&gt;-&gt;type&lt;&gt;==m type&gt; in create file c:\opencv\sources\mogules\core\src\matrix.cpp</code></p>
  
  <p>I tried to add file <code>dWidth</code> and <code>dHeight</code> but it did not work.</p>
  
  <pre><code>int main(){
      Mat frame;
      Mat image;
      VideoCapture cap("file source");
      namedWindow("window",1);
      while(1){
          cap&gt;&gt;frame;
          GpyrTempIIR g;
          g.processOnFrame(frame,image); //this is the process i do on frame 
          imshow("window",image);
          waitKey(33);
      }
  }
    void GpyrTempIIR::processOnFrame(const Mat&amp; src, Mat&amp; out) {
      src.convertTo(src,CV_32F); //Convert to Float
      resize(srcFloat,blurred,blurredsize,0,0,CV_INTER_AREA);
      /* Method in openCv to resize a video
       * INTER_AREA is a fast method that gets the average of several pixels, which
       is good for shrinking an image but not so good for enlarging an image. */
      if(first){
          first=false;
          blurred.copyTo(LowPassHigh);    // Using Storing Method
          blurred.copyTo(LowPassLow);
          src.copyTo(out);
      } else {
          //apply Temporal filter substraction of two IIR LowPass Filters
          LowPassHigh = LowPassHigh * (1-fHigh) + fHigh * blurred;
          LowPassLow = LowPassLow * (1-fLow) + fLow * blurred;
          blurred = LowPassHigh - LowPassLow;
  
          blurred*=alpha; // amplify , multuplying by alpha value
  
  
         resize(blurred, outFloat, src.size(), 0, 0, CV_INTER_LINEAR);   // resize back                         
             outFloat += srcFloat;      // add back to original frame
           outFloat.convertTo(out, CV_8U);         // convert to 8 bit
      }
  }
  </code></pre>