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. Best way to draw on an RGB24 bitmap from camera and then display on screen ?
Forum Updated to NodeBB v4.3 + New Features

Best way to draw on an RGB24 bitmap from camera and then display on screen ?

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.1k 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.
  • E Offline
    E Offline
    elpidiovaldez5
    wrote on last edited by
    #1

    I'm confused by the array of onscreen and offscreen drawing surfaces and would appreciate some advice.

    Problem1) I want to take the 24bit rgb data from a camera and draw some 2D elements on it (landmark features, groundplane region etc.) There may be quite a lot of landmarks and the video comes in quickly so I want the system to be as fast as possible.

    I have rejected the QGraphicsView/QGraphicsScene route as it seems like overkill. I am thinking of constructing a QImage from the 24bit rgb data provided by the camera using:

    QImage(const uchar * data, int width, int height, Format format, QImageCleanupFunction cleanupFunction = 0, void * cleanupInfo = 0)

    When I am ready to draw on the image I think that I should convert it to a QOpenGLFramebufferObject (how??) in order to get hardware acceleration for the drawing. I then need to put the QOpenGLFramebufferObject onto the screen in a QWidget or QGlGraphicsWidget. Alternatively perhaps I should try to put the QImage onto the screen and draw directly on the screen (hopefully with hardware acceleration).

    Problem 2) This is probably not so different from problem 1, but there is no rgb image as a background. I need to construct a 2D image from scratch, which will involve drawing a lot(thousands or tens of thousands) of identical circular blobs + a few other items and then displaying it on the screen. The updates are at video frequencies 10 - 30 fps.

    I imagined using a QGlWidget with some trick to draw a blob at a lot of different positions.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      Aros
      wrote on last edited by
      #2

      Hi, have you ever found a solution to this problem? Seems I am facing the same problem... I need to make it as fast as possible.

      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