My goal is to capture frames from a webcam as efficiently as possible using OpenCV. At the moment I'm able to capture 30FPS 6408*480 drawing directly onto a wxPython panel using the standard drawing context (BufferedPaintDC), with about 15% CPU usage (older Core Duo processor). What I'm curious is what sort of performance boost (if any) I'll see if I embed a PyGame canvas within a wxPython frame, and draw directly to the PyGame canvas.
What I'm not sure about is whether the bottleneck is the wxPython frame, and if embedding a PyGame canvas will actually do anything. Or does the wxPython frame act simply like a container and has no influence on the PyGame canvas? I'm hoping I'm making sense here.
The other option would be to use PyGame exclusively, however I really like the functionality of the wxPython widgets, so I'd hate to lose that.
Or is there a faster canvas that I can integrate into wxPython that I'm not aware of?
Thoughts? Thanks.
I don't know why you'd want to embed a gaming library into wxPython in the hopes of gaining a performance boost. Personally, I don't think that will happen. You should take a look at the currently supported drawing canvases that wxPython provides instead or explain what you're trying to do. People have done in games in wxPython...
Anyway, the main drawing interfaces for wx today are wx.GCDC / wx.GraphicsContext, cairo, FloatCanvas, or GLCanvas. Of course, there are also wx.DC, wx.PaintDC and the one you found as well.
wxPython, or PyGame canvas within wxPython -> which is faster?