开发者

GTKMM/GTK+/GLADE how to load video from webcam?

so I'm trying to create a GUI with gtk and glade and a I need to capture the video from my webcam . I have no idea how to do that or even if it's possible. Can somebody help me?


Update from probable OP:

It's Linux! Thanks but I switched to Qt it's user friendlier :)

Still, I have a problem now integrating opencv. I tried to implement a simple GUI in qt in which I press a button and load an image in a separate cvWindow.

I followed the simple tutorials on other forums but though it opens a cvWindow, it doesn't display the image.

Here is the source code:

widget::widget(QWidget *parent)
{
    开发者_JAVA百科 setupUi(this);
      //setGeometry(100,100,512,512);
     connect( b, SIGNAL( clicked() ), this, SLOT( imshow()) );

}

void widget::imshow()
{

    img=cvLoadImage("/home/vladutzee/Desktop/boo.gif",CV_WINDOW_AUTOSIZE);
   cvNamedWindow("window",1);
    cvShowImage("window",img);
    cvWaitKey(10);
    cvDestroyWindow("window");
    cvReleaseImage( &img );
}


You could use libcheese, the library used as the foundation for the GTK+-based, simple webcam software, Cheese.


Which platform ? Windows, Linux, other ? Libcheese can do the trick, but AFAIK it doesn't work on Windows.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜