Realtime Video with Plot Overlay

963 views
Skip to first unread message

radix

unread,
Nov 5, 2015, 11:39:08 AM11/5/15
to pyqtgraph
I am curious how feasible something like this would be using pyqtgraph...

Looks like the guy in this link is using Qt, OpenCV, and a webcam to process it all in real time at the C level. I would be happy being able to just post process this for my uses.

I am able overlay videos and static plots from PyQtGraph just fine and I can plot live data from data sources in PyQtGraph, but I am curious what the suggested way would be to merge the frames from OpenCV with the current display of PyQtGraph... I think exporting individual images from the API and merging them into the video could be a bit slow... Is there a better way?

Thanks

Samuel Garcia

unread,
Nov 5, 2015, 3:27:35 PM11/5/15
to pyqt...@googlegroups.com
If you want to grab image from webcam in python, you should try : https://mikeboers.github.io/PyAV/
It is very well documented yet but it is reallya good module for wrapping ffmep video stuff.
I prefer it over opencv.

Samuel
--
You received this message because you are subscribed to the Google Groups "pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyqtgraph+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/843605c5-c2e9-4a3d-befd-b58567de252c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

radix

unread,
Nov 5, 2015, 3:45:05 PM11/5/15
to pyqtgraph
That looks interesting, I will check it out.

I was able to get an openCV image stream from a video to show up alongside my other running plots, but the quality was very degraded and the colors were all off or black and white. Also brought my computer to a crawl trying do it all at once (I doubt my is terribly effcient at this point).  I wasn't able to get the video to look like the original for whatever reason, seems like the data formats are somewhat different. But I was surprised I was able to get something close to what I was attempting to do.

Although maybe these tools are not the best to use for what I am trying to do. 

radix

unread,
Nov 5, 2015, 4:08:23 PM11/5/15
to pyqtgraph
I think my initial performance/colorizing problem stems from starting by trying to put a video into PyQtGraph and not PyQtGraph into a video. Are there any ideas on how to go about doing this using PyAV, OpenCV or others? Doing it with a webcam or or existing video is just fine for this...  I still have the problem of capturing an instance of the plot from PyQtGraph and overlaying it onto a video stream.
Reply all
Reply to author
Forward
0 new messages