Results 1 to 4 of 4

Thread: How can I access webcam in Qt?

  1. #1
    Join Date
    May 2011
    Posts
    16
    Thanks
    4
    Qt products
    Qt4

    Question How can I access webcam in Qt?

    Is there any way to access list of installed webcam on system and select among them? (I'm working in windows environment, my laptop has a built-in webcam, and I also have a USB webcam. I would like to access them and select them from a drop down)

  2. #2
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: How can I access webcam in Qt?

    I guess you need to use separate framework for capturing, like OpenCV (the easy way) or DirectShow (the hard way). OpenCV has beed discussed many times on the forum, just search for threads.

  3. #3
    Join Date
    May 2011
    Posts
    16
    Thanks
    4
    Qt products
    Qt4

    Default Re: How can I access webcam in Qt?

    Quote Originally Posted by stampede View Post
    I guess you need to use separate framework for capturing, like OpenCV (the easy way) or DirectShow (the hard way). OpenCV has beed discussed many times on the forum, just search for threads.
    Actually I'm using OpenCV! I want to be able to know about each system webcams and in a drop down menu select one of them. In OpenCV I can say the program the id of webcam (0,1,...). I want to choose the webcam from a dropdown and this dropdown provide camera id in the program behind the scene.

  4. #4
    Join Date
    May 2011
    Posts
    16
    Thanks
    4
    Qt products
    Qt4

    Default [SOLVED] How can I access webcam in Qt?

    I found the solution and because I know it is the question of many users I share my solution:
    First of all, for working with camera and webcams, use OpenCV library. There are a lot of tutorials for using OpenCV library inside Qt.
    It is completely possible to find how many webcams in the system using OpenCV. In this page you can find out how to do this.

Similar Threads

  1. Webcam DirectShow
    By Sahab in forum General Programming
    Replies: 4
    Last Post: 27th August 2011, 19:34
  2. Record from webcam
    By skizzik in forum General Programming
    Replies: 11
    Last Post: 1st August 2011, 10:00
  3. Webcam Output
    By leoalvesmachado in forum Newbie
    Replies: 1
    Last Post: 13th September 2010, 11:11
  4. use Webcam
    By sabeesh in forum Qt Programming
    Replies: 1
    Last Post: 21st August 2007, 07:52
  5. Qthreads and webcam app
    By Schizo in forum Qt Programming
    Replies: 1
    Last Post: 21st June 2007, 09:17

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.