Results 1 to 7 of 7

Thread: Capturing VIDEO from USB Camera

  1. #1
    Join Date
    Sep 2009
    Posts
    39
    Thanks
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Question Capturing VIDEO from USB Camera

    HI to all.......
    I need to interface USB Camera in Qt Code to Display captured video from USB Camera on Q MainWindow.How to get video from USB camera and Display on Window.

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

    Default Re: Capturing VIDEO from USB Camera

    .How to get video from USB camera and Display on Window.
    This information is supplied with the camera driver and DLL, and differs from camera to camera, there is no universal way, unless the camera is using the windows general purpose usb driver (I forgot the acronym), in that case MSDN can help you.
    Talking to the camera has nothing to do with Qt.

    EDIT:
    here is the link for the PTP driver documentationI mentioned:
    http://msdn.microsoft.com/en-us/library/ms792271.aspx
    Last edited by high_flyer; 9th March 2010 at 09:38.
    ==========================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
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Capturing VIDEO from USB Camera

    You can also try using OpenCV

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

    Default Re: Capturing VIDEO from USB Camera

    @aamer4yu:

    can openCV do low level device access??
    As far as I know it can only do image manipulation, but getting the image is one level lower.
    ==========================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
    Sep 2009
    Posts
    39
    Thanks
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Capturing VIDEO from USB Camera

    Thanks For replying.. Im using LINUX SUSE platform. I downloaded Qt 4.6.1 which is having phonon support. So i need to get data from webcam mounted on USB Driveof my ARM i.MX31 BOARD. By using Qt programming i need to scan data from USB and display that on my ARM board LCD. This is the required thing. In the kernel of Board some cameras which are supported we mounted on USB tried to get the video of camera to QMainwindow but it didnt suceed.

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

    Default Re: Capturing VIDEO from USB Camera

    For some reason I understood you were on windows.
    The answer stays the same though:
    getting the data from the camera is done through the camera driver, and a user level lib if one is supplied (and usually, there is one, or you can use a general purpose libs for that matter under linux, you will have to google for that) - this part has nothing to do with Qt.
    You can use Qt to display and manipulate the image.
    Phnon, AFAIK, at the moment, does not support media streaming from a device, but I might be wrong - the Phonon docs should confirm/refute this.
    I think it will be easier to paint the image buffer directly (not using phonon), preferably using a QGLWidget and a texture (for performance)
    If performance is not an issue, than usual painting is no problem.
    ==========================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.

  7. #7
    Join Date
    Sep 2009
    Posts
    39
    Thanks
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Capturing VIDEO from USB Camera

    Thanks for reply, I will try it on my Board and get you back with results........

Similar Threads

  1. capture video from DV camera
    By ekkondela in forum Newbie
    Replies: 1
    Last Post: 7th March 2010, 10:38
  2. Playing video using Phonon video widget
    By Leolander in forum Newbie
    Replies: 0
    Last Post: 26th February 2010, 07:15
  3. Capturing Video
    By ashkan in forum Newbie
    Replies: 0
    Last Post: 4th February 2009, 12:15
  4. Video freezes during mpeg video playback using Phonon
    By davejames in forum Qt Programming
    Replies: 2
    Last Post: 12th January 2009, 09:45

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.