c++ - opencv qt display Video -


this code display video using opencv visual studio

i have been looking everywhere tutorial how use qt opencv display video couldn't find :/

is there here knows how that?

#include <opencv\highgui.h> #include <opencv\cv.h>  int main(int argc, char** argv) { cvcapture* capture1 = cvcreatefilecapture("c:\\videosamples\\song.avi");  iplimage* frame1; cvnamedwindow( "display video1", cv_window_autosize );    while(1)   {  frame1 = cvqueryframe( capture1 );   cvsmooth( frame1, out, cv_gaussian, 17, 17 );  if( !frame1 ) break;  cvshowimage( "display video1", frame1 );    char c = cvwaitkey(33);  if( c == 27 ) break;   }  cvreleasecapture( &capture1 );  cvdestroywindow( "display video1" );   } 

for starters, you've got make sure opencv libraries using have been built qt support.

you need download source code (available on github), configure build using cmake, , re-build them yourself. here link guide on how build opencv libraries source.

once done, this example of how capture frames camera (just swap camera file case) , display frames window, making use of qt framework.

hope helps you.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -