Results 1 to 5 of 5

Thread: Software with webcam viewer

  1. #1
    Join Date
    Jun 2011
    Location
    Porto Alegre, Brazil
    Posts
    482
    Thanks
    165
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Software with webcam viewer

    Hello!

    I would like to know the steps to include a usb-webcam viewer inside a software.

    I did some research already and I noticed that most guys who run with this end up using OpenCV, but I would like not to take this approach - to use an external library to do the job. Personally, I have some problems with external libraries ^^

    But anyway, my question is how could I do this using Qt alone. You know, put a QWidget inside the mainwindow .ui and read the webcam's info and plot the video (its video, not simple images (photos)). I noticed the class QCamera and the camera example that comes with Qt, but I wasn't able to include QCamera inside my software as well as I wasn't able to run the example because some classes were missing. And I guess that thoose classes (as with QCamera) were made for mobile applications, while what I want is a webcam viewer for Windows-Desktop.

    Please could somebody give me some light in this? If there is no other way, than I'll use OpenCV, but I would really love to avoid it. Besides, I must do this at best in one weak, so no much time to learn about new libraries

    Thanks,

    Momergil

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Software with webcam viewer

    But anyway, my question is how could I do this using Qt alone.
    You cannot do this on a desktop machine with Qt alone, which is why people use external libraries (including QtMobility). QCamera's support is, AFAIK, still limited to mobile phone devices.

    If you have to do this within a week then you will be using OpenCV or something similar.

  3. #3
    Join Date
    Jun 2011
    Location
    Porto Alegre, Brazil
    Posts
    482
    Thanks
    165
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Software with webcam viewer

    Quote Originally Posted by ChrisW67 View Post
    You cannot do this on a desktop machine with Qt alone, which is why people use external libraries (including QtMobility). QCamera's support is, AFAIK, still limited to mobile phone devices.

    If you have to do this within a week then you will be using OpenCV or something similar.
    Hmm, sad that Qt haven't got yet proper functioning with cameras :T

    well, I'll see what I can do about OpenCV.

    Thanks!

    Momergil

  4. #4
    Join Date
    Jun 2011
    Location
    Porto Alegre, Brazil
    Posts
    482
    Thanks
    165
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Software with webcam viewer

    Well in that case, could you please redirect me to some link with a GOOD tutorial about how to use OpenCV + Qt? I found some videos on youtube etc.. but all of them don't show the process fully, i.e. either the library building is not shown, or else when its shown its not complete (just throwing some tips but actually never saying how exactly it should be done - e.g. in opencv's installation tutorial). And when I try different steps, always some kind of error appears.

  5. #5
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Software with webcam viewer

    What is the point of a blow-by-blow tutorial that is almost 110% guaranteed to be wrong in some detail and have you back asking for a "GOOD" tutorial again?

    The process is simple enough:
    • Download OpenCV
    • Download any required dependencies as detailed in the Install Guide
    • Build OpenCV using the same tool chain as you intend to use for your Qt project.
    • Adapt your Qt project file INCLUDEPATH and LIBS variable to reference OpenCV as an external library.
    • Build your Qt project


    Sure, you need to know how to use your tools to fill in the blanks but:
    • You must know how to use your tools if you intend to do anything more serious than "Hello World"
    • Any attempt to fill the blanks by a third party will almost certainly be wrong in some detail and you will need to know your tools to work out how/what/why?

    Invest in understanding and you will find doing much easier.

Similar Threads

  1. Map viewer
    By spud in forum Qt-based Software
    Replies: 2
    Last Post: 28th April 2016, 07:54
  2. map viewer
    By qt_develop in forum Qt for Embedded and Mobile
    Replies: 4
    Last Post: 24th January 2013, 16:44
  3. QT-QML viewer in FB
    By grezly in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 27th May 2010, 07:31
  4. SVG Viewer
    By nemmartins in forum Qt Programming
    Replies: 0
    Last Post: 14th April 2010, 13:35
  5. use Webcam
    By sabeesh in forum Qt Programming
    Replies: 1
    Last Post: 21st August 2007, 07:52

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