Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Most performant way to show and record camera images
Forum Updated to NodeBB v4.3 + New Features

Most performant way to show and record camera images

Scheduled Pinned Locked Moved General and Desktop
camerarecording
2 Posts 2 Posters 1.2k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mbaa
    wrote on last edited by mbaa
    #1

    Hello,

    I'm looking for the most perfomant way to connect to a Webcam and display the frames in a widget.
    So far I've tried updating a label via pixmap.
    Then I've tried to show the frames in a QOpenGlWidget (with subTexImage2d() - which seems to lead to problems in the paintGl() function).
    With the above approaches my cpu has a workload of about 10%.
    I also tried a camera example from qt which uses the QtCamera and ViewFinder class.
    Comparing the software which comes with the webcam to my approaches the webcam software seems to be much more performant (almost 2% cpu workload).
    I could use QCamera as well but I need to record my frames and the QCamera class tells me that it is not possible to record from my webcam (isCaptureModeSupported).
    At the Moment I'm using opencv to grab the frames and to record images/videos as a mockup function. To view the frames I went back to update a Label on the MainWindow.
    Is there a more efficient way to grab images from a camera and show them except updating Labels (maybe inherit from QMediaObject directly)?
    The only thing I can think of is to directly "talk" to the webcams API to grab the Images - so I can avoid opencv internal overload (if there is any).
    Thanks.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      You could consider implementing you own QtMultimedia backend, that way you can also manage the file writing.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved