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. Live video and crosshair overlay
Forum Updated to NodeBB v4.3 + New Features

Live video and crosshair overlay

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 547 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.
  • B Offline
    B Offline
    Bengt 0
    wrote on last edited by
    #1

    Hi!

    I am writing a live video desktop application, very simple function, a live window with digital zoom..
    I am putting the video handle from the USB camera SDK into a GraphicsView ui element. This is working fine.

    But now I need to put a cross-hair marker in the live video frame to identify the exact center.
    What is the best/simplest way to do this?

    BN

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

      Hi,

      What are you using to show the video feed on the QGraphicsView ?

      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
      • B Offline
        B Offline
        Bengt 0
        wrote on last edited by
        #3

        HWND display;
        HIDS m_hCam;

        The graphicsView is defined in the ui file.

        display = (HWND)ui->graphicsView->winId();
        is_InitCamera(&m_hCam, (void*)&display); // supplied from the camera API

        Is this what you are asking for?

        1 Reply Last reply
        0
        • B Offline
          B Offline
          Bengt 0
          wrote on last edited by
          #4

          I try to follow https://stackoverflow.com/questions/54802254/qt-making-a-panel-that-overlaps-a-qgraphicsview
          but none of the added items are visible in the video. If I start the application with the camera unplugged, the added items show up as expected. So locking a graphicsview to an video feed seems to override everything else.
          Is there any way to control the foreground/background relation for the widgets?

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

            You are overwriting the graphics view painting. I would rather move that part to a dedicated widget. However mixing native windows painting and Qt painting is not something I have done so I don't know at which level of feasibility it can be found.

            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