Getting data from a video stream for building graphs
-
Hello,
my idea is to write an application that analyze as one segment the brightness and the color values of a videostream. With that values I want to build graphs like a rgb-parade and an histogram. In the last hours I had learned about the functionality of
QVideoFrame
,QImage
,QAbstractVideoBuffer
,QColor
,QCustomPlot
and some more.
I wrote a short working Qt test program that read the pixel data of an single image withQImage
. Now my idea is to convert the videostream I got from the capture card to anQImage
and with this image I analyze the data and build the graphs.
It's my first project on this subject, so I prefer to ask if the described way is a useful solution? Or is it better to use OpenCV or something else for this?Kind regards
-
Hi,
Things to take into account:
- stream format and color space
- stream bit rate
- stream image size
These will heavily influence the power you will need to do your math.
You should consider using OpenGL to speed things up.
You should also not do everything within a single pipeline because you are going to kill your performance and also if you don't show the RGB parade it makes no sense to do the processing for them.
-
It depends on the performance you are after but I would say it's likely the better approach.