c++ - How to calculate Frame Per Second in opencv? -


here code display video @ high fps. want original fps here don't know how it. watching tutorials , using videocapture , tried use giving me linker error undefined reference 'cv::videocapture::videocapture(std::string const&)'.. though linking libraries error same. using dev-c++ 5.11 (gcc 4.9.2) , idea how use (cv_cap_prop_fps)here -

#include <windows.h> #include <opencv/cv.hpp> #include <opencv/highgui.h> 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 use this]     while(1)    {        frame = cvqueryframe( capture );        if( !frame ) break;        cvshowimage( "movie", frame );        char c = cvwaitkey(27);        if( c == 27 ) break; //esc    }    cvreleasecapture( &capture );    cvdestroywindow( "movie" ); } 

thnx :)

double fps=cvgetcaptureproperty(capture, cv_cap_prop_fps);  

Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -