Results 1 to 10 of 10

Thread: How to interface with WebCam ? ( configurating acquisition parameters )

  1. #1
    Join Date
    Jul 2011
    Location
    BRAZIL-RIO DE JANEIRO
    Posts
    47
    Thanks
    33
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default How to interface with WebCam ? ( configurating acquisition parameters )

    Dear friends,


    I´m already working with a Webcam, acquiring images in QT, using OpenCV library.
    It´s working fine.

    However, my doubt regard to setup the internal camera parameters ( contrast, hue, disable automatic gain, optimize speed, etc... ).
    I know that is possible to do by DLL access, but I have no idea about.

    Does anybody could provide some reference ?
    I heard about DirectShow, avicap32.dll, but have no idea abot how to start to research.


    Thanks in advance.

    +++

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to interface with WebCam ? ( configurating acquisition parameters )

    Do you have a reference manual for your webcam? Does it tell you how to set these parameters?

  3. #3
    Join Date
    Jul 2011
    Location
    BRAZIL-RIO DE JANEIRO
    Posts
    47
    Thanks
    33
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How to interface with WebCam ? ( configurating acquisition parameters )

    hi squidge,

    I´m using a WINXP compatible one, wich doesn´t requires some particular driver instalation.
    The Webcam, even doesn´t bring a CD included.
    I guess it implies in some standardization, and access must be done by some API of Windows, at some system DLL.

    I´m wrong ?

    +++

  4. #4
    Join Date
    Aug 2011
    Posts
    24
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to interface with WebCam ? ( configurating acquisition parameters )

    andre you can send me your webcam code? and explain how you configure opencv with qt

  5. #5
    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: How to interface with WebCam ? ( configurating acquisition parameters )

    I´m using a WINXP compatible one, wich doesn´t requires some particular driver instalation.
    Never the less you are using some lib to access the camera.
    Have a look if this lib is offering such functionality and try calling them and see if it has influence on the image you get.
    I guess it implies in some standardization,
    Not necessarily.
    It can just as well imply that this camera does not allow settings these parameters.
    ==========================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.

  6. #6
    Join Date
    Jul 2011
    Location
    BRAZIL-RIO DE JANEIRO
    Posts
    47
    Thanks
    33
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How to interface with WebCam ? ( configurating acquisition parameters )

    Hi,

    I reveived a sugestion of a friend to use function :
    cv::VideoCapture::set ( http://opencv.willowgarage.com/docum...and_video.html ).

    However, I´m facing with a big problem.
    I,m using the image handler type CvCapture instead VideoCapture.

    Even if I instantiate a function to set that parameters, those changes does not persists on the Webcam.
    What could I doing wrong ?


    +++

  7. #7
    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: How to interface with WebCam ? ( configurating acquisition parameters )

    What do you mean with "not persists"?
    Does it mean that the camera does set the parameters, but when you start it again, it has lost the settings?
    If so, first make sure the camera actually does have persistent settings, maybe it doesn't, in which case you are not doing anything wrong.
    If it does, maybe you can find in the camera documentation what is needed to be done to make the settings persistent.
    ==========================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.

  8. The following user says thank you to high_flyer for this useful post:

    andre_teprom (27th August 2011)

  9. #8
    Join Date
    Jul 2011
    Location
    BRAZIL-RIO DE JANEIRO
    Posts
    47
    Thanks
    33
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How to interface with WebCam ? ( configurating acquisition parameters )

    Quote Originally Posted by high_flyer View Post
    What do you mean with "not persists"?
    Dear high_flyer,


    Sorry for not clear problem description.

    That is not possible even to set those values on camera.
    After I execute the cvSetCaptureProperty, I read it by cvGetCaptureProperty.
    However returned values are every time zero ("0").

    I performed all tests with different cameras :
    - Windows Legacy : No proprietary driver required to install
    - Others : Working only if specific drivers were instaled

    Unnaforunatelly, the driver for the target camera, despite be excelent - with a lot of features - I can´t find its documentation on the web ( SG310 - SIGma ).
    Also, I noticed on Google thousands of occurences of similar problem ( keyword : "cvSetCaptureProperty not working" )

    Do you have some sugestion to workaround ?


    +++

  10. #9
    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: How to interface with WebCam ? ( configurating acquisition parameters )

    Well, this is off topic here.
    However, with out proper documentation it can be anything.
    Most likely, the driver is not implementing the standard calls of the windows driver.
    Maybe it has its own user domain lib for that, which you need to interface too.
    But all this is guess work, with out documentation.
    You will probably be more helped in forums where this camera is discussed.
    ==========================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.

  11. #10
    Join Date
    Jul 2011
    Location
    BRAZIL-RIO DE JANEIRO
    Posts
    47
    Thanks
    33
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How to interface with WebCam ? ( configurating acquisition parameters )

    Hi friends,


    Despite original problem regarding this (old) thread had been resolved using DirectShow, now I´m facing to a similar issue.
    I need perform access to those Webcam parameters ( also under QT ), but now on LINUX operational system.

    Could anybody provide some guidelines ?


    +++

Similar Threads

  1. Record from webcam
    By skizzik in forum General Programming
    Replies: 11
    Last Post: 1st August 2011, 10:00
  2. Replies: 0
    Last Post: 18th May 2011, 09:18
  3. Replies: 0
    Last Post: 17th December 2010, 15:55
  4. QTCreator phonon accessing audio acquisition device
    By rahul2047 in forum Qt Programming
    Replies: 4
    Last Post: 19th February 2009, 06:23
  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.