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. Advice on modifying display from QCameraViewfinder

Advice on modifying display from QCameraViewfinder

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 848 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.
  • Chris HennesC Offline
    Chris HennesC Offline
    Chris Hennes
    wrote on last edited by
    #1

    I'm writing a stop-motion animation package and right now I'm displaying the output from the live camera feed to a QCameraViewfinder. I need to add a modifier to this feed (it will show a half-opacity version of the previously captured frame blended with the current live feed when a certain key is held down, used to line up your next shot). What is the best way to do this? Should I subclass QCameraViewfinder and override its draw function, or is there a better, more "Qt" way of doing this sort of thing via a filter of some kind, etc.?

    Chris Hennes, Pioneer Library System

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

      Hi,

      Not a direct answer but if QtQuick is an option, it could be easier to get the kind of effect you are after.

      Other wise you could use an overlay widget with a transparent background.

      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
      • Chris HennesC Offline
        Chris HennesC Offline
        Chris Hennes
        wrote on last edited by
        #3

        QtQuick isn't an option, but I'm not really worried about the actual calculation of the effect: just how to implement an effect in general. It looks like the answer is actually to subclass QGraphicsEffect and implement my code in that draw() function, rather than directly in the QCameraView's draw() function. I can then install that effect at startup, and enable/disable it based on a keydown state.

        Chris Hennes, Pioneer Library System

        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