Results 1 to 9 of 9

Thread: capture iamge form webcam

  1. #1
    Join Date
    Mar 2011
    Posts
    120
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanked 1 Time in 1 Post

    Default capture iamge form webcam

    Hi everyone ,
    I want to capture images form webcam.I have not any idea about this thing.
    Can any one tell how i display video streaming and capturing image using QT.
    thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    21
    Thanked 418 Times in 411 Posts

    Default Re: capture iamge form webcam

    There are tow different tasks here:
    1. Getting data form camera
    2. Displaying the data.

    With 1 we can't help you other than to say, that your Camera provider provides also a driver and a lib to which you can link, and operate the camera, and retrieve data from it.
    We can help you with 2, once you have got 1 sorted out first.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Mar 2011
    Posts
    120
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanked 1 Time in 1 Post

    Default Re: capture iamge form webcam

    Thanks for replay.
    I am using logitech webcam 120.I have a software though which i am able to capture image.But how i know which libraries are required ?

  4. #4
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    21
    Thanked 418 Times in 411 Posts

    Default Re: capture iamge form webcam

    But how i know which libraries are required ?
    These libs are part of the software you mentioned.
    Read the documentation you got with the camera, see if there is anything that talks about libs and headers to be used in apps that want to operate the camera.
    Google can help you with it as well.
    You need the Dlls, the corresponding lib files and the header files.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  5. #5
    Join Date
    Feb 2011
    Location
    Romania
    Posts
    53
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    1
    Thanked 11 Times in 9 Posts

    Default Re: capture iamge form webcam

    For windows only, see http://www.quickcamteam.net/document...wn-application

    For cross-platform you can use OpenCV (is slightly more difficult to use, but this effort is worth ) http://opencv.willowgarage.com/wiki/

    Also, you can check http://www.quickcamteam.net/documentation/

  6. #6
    Join Date
    Mar 2011
    Posts
    120
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanked 1 Time in 1 Post

    Default Re: capture iamge form webcam

    Now i am trying same thing in linux.I download camorama.Using this i am able to connect to webcam.Can you give some hints how i will add this things in my program.
    Is phonon help me ?

  7. #7
    Join Date
    Feb 2011
    Location
    Romania
    Posts
    53
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    1
    Thanked 11 Times in 9 Posts

    Default Re: capture iamge form webcam

    For linux only, you can use V4L (Video4Linux). Their headers and libraries are included in almost all linux distro. Documentation can be found here

  8. #8
    Join Date
    Mar 2011
    Posts
    120
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanked 1 Time in 1 Post

    Default Re: capture iamge form webcam

    can any one tell me how to display the frame in qt ?
    I am using opencv.

  9. #9
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    21
    Thanked 418 Times in 411 Posts

    Default Re: capture iamge form webcam

    Load the frame data into a QImage and use QPainter::drawImage() to draw the frame.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. How to hide from taskbar a form showed form mainwindow
    By tonnot in forum Qt Programming
    Replies: 1
    Last Post: 10th February 2011, 14:36
  2. how to make the background iamge scale to fullscreen?
    By xhsoldier in forum Qt Programming
    Replies: 1
    Last Post: 20th October 2010, 08:54
  3. Replies: 3
    Last Post: 5th July 2009, 17:22
  4. synchronise QLabel display and webcam capture
    By fbmfbm in forum Qt Programming
    Replies: 2
    Last Post: 24th February 2009, 11:10
  5. use Webcam
    By sabeesh in forum Qt Programming
    Replies: 1
    Last Post: 21st August 2007, 07:52

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.