title: how to keep the last frame in opencv in c++
body: <p>I need to keep the information in the last frame in a video file and then calculate PSNR between the last and whole frames.
  the video is running! when I get to the last frame I would miss all the previous frames information. so I can not calculate a formula between the last and the first frame :(</p>
  
  <pre><code>float *frames;   //this pointer points to the frames
  float *p;
  for(int i=0; i&lt;sizeof frames; i++){
     ... ;
  }
  </code></pre>
  
  <p>I do not know how to fill the for-loop :(</p>
  
  <p>thanks in advance.. </p>