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. How to get Raw image frame data (RGB) from webcamera (Webcam)
Forum Updated to NodeBB v4.3 + New Features

How to get Raw image frame data (RGB) from webcamera (Webcam)

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 599 Views 1 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.
  • C Offline
    C Offline
    cebuger
    wrote on last edited by
    #1

    Hi,
    Im doing a webstream demo application in desktop, hence I am using QT widgets (and not QML).
    I am learning on how to make QCamera work and I have made it work.

    Now I want to get the RGB image of the camera, so I can compress it using our own compression algorithm and send it to network using our own protocol.

    I want to do it explicitly as well so I can control the timing of capture (to prevent delay and timing issue).

    Most of the samples I see online is it captures image and dump to file.

    1. How can I do it? Capture the raw RGB image of the camera explicitly (manual triggered).
      Example
      rgbimage = capture()
      c = compress(rgb)
      sendToNetwork(c)
      rgbimage = capture();

    on the above pseudocode, i only capture the frame when processing is done so I can only capture fresh frame instead. That is the reason I want to manualy capture it instead of a callback trigger from the camera.

    Im using MediaWIdgets stuff like QCamera and QCameraViewFinder.
    I cant find a sample to do it, most captures and dump to a file.

    Thank you in advance!

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

      Hi and welcome to devnet,

      For that level of control, you will have to go lower level that what QCamera proposes. You also have to take into account that not all camera provides RGB data.

      In your case maybe OpenCV will be a better fit for that part of your code.

      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
      2

      • Login

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