title: How to calculate Frame Per Second in opencv?
body: <p>Here is my code it display video but at high fps. I want original fps here but don't know how to do it. Watching some tutorials , they are using <code>VideoCapture</code> , I tried to use it but this is giving me linker error <code>undefined reference to 'cv::VideoCapture::VideoCapture(std::string const&amp;)'..</code> though I am linking all libraries but error is same. I am using <code>Dev-C++ 5.11 (GCC 4.9.2)</code> , so any idea how to use <code>(CV_CAP_PROP_FPS)</code>here -</p>
  
  <pre><code>#include &lt;windows.h&gt;
  #include &lt;opencv/cv.hpp&gt;
  #include &lt;opencv/highgui.h&gt;
  using namespace cv;
  using namespace std;
  
  int main( int argc, char** argv )
  {
     double fps=0;
     cvNamedWindow( "Movie", CV_WINDOW_NORMAL );
     CvCapture* capture = cvCreateFileCapture( "G:\\movie\\Journey.2.The.Mysterious.Island.2012.avi" );
     IplImage* frame;
  
     //cv::VideoCapture cap("G:\\movie\\Journey.2.The.Mysterious.Island.2012.avi" ); [giving me error]
     //fps=cap.get(CV_CAP_PROP_FPS); [How to use this]
  
     while(1)
     {
         frame = cvQueryFrame( capture );
         if( !frame ) break;
         cvShowImage( "Movie", frame );
         char c = cvWaitKey(27);
         if( c == 27 ) break; //esc
     }
     cvReleaseCapture( &amp;capture );
     cvDestroyWindow( "Movie" );
  }
  </code></pre>
  
  <p>Thnx :)</p>