Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyqtgraphViewer #303

Closed
wants to merge 3 commits into from
Closed

PyqtgraphViewer #303

wants to merge 3 commits into from

Conversation

prybalko
Copy link
Collaborator

@prybalko prybalko commented Sep 5, 2014

Image viewer based on Pyqtgraph lib

@prybalko
Copy link
Collaborator Author

prybalko commented Sep 5, 2014

There are couple issues:

  • it's slow for unknown reason
  • can't leave session properly

@tfarago
Copy link
Contributor

tfarago commented Oct 9, 2014

@pavel-rybalko I took the liberty to try to use remote graphics which offloads the rendering to a separate process. However, there are two problems:

  • the RemoteGraphicsView doesn't seem to integrate with the ImageView nicely (you cannot put there the whole view, only the image view without historgram)
  • it is not working with gevent, I suspect there are too many event loops, because we have one from gevent and one from qt, maybe it is not the best idea to use both at the same time, on the other hand, I don't know how to circumvent it now.

@matze
Copy link
Contributor

matze commented Oct 9, 2014

As far as I can see there is no problem integrating both event loops. But it seems that PyQtGraph implicitly starts the loop.

@tfarago tfarago modified the milestones: Concert 1.0, Concert 0.10 Nov 18, 2014
@prybalko
Copy link
Collaborator Author

I've added a gevent support for the viewer, but it's kinda dirty and still under development

@prybalko prybalko force-pushed the viewer branch 3 times, most recently from 8f3cc21 to 4b82ae6 Compare March 3, 2015 10:31
@prybalko
Copy link
Collaborator Author

I've done some tests and measurements regarding performance of Pyqtgraph library.
I wrote a script, which creates a viewer and updates it in another thread / process as fast as it can. The results of performance are presented in the following table (clickable).
selection_052
As you can see, the results are not really impressive and comparable with Matplatlib.

However, I found another library for visualization , which is OpenGL-based library called Vispy. And it works pretty fast (here is my script):
selection_051
But this library is still under development and has some crucial problems with memory leakage (issue 1, issue 2)

Comparing all 3 libraries:
selection_055
Vispy looks promising, but we have to wait till all bugs will be fixed.

@tfarago
Copy link
Contributor

tfarago commented Mar 10, 2015

Nice summary, thanks. I would not go for Pyqtgraph and wait for vispy.

@prybalko
Copy link
Collaborator Author

ToDo:
latency test vs Matplotlib

@campagnola
Copy link

Sorry to interrupt; I got here by way of a related discussion on vispy. Your pyqtgraph test uses ImageView, which is not intended for video performance (the histogram computation and plotting is quite expensive). I recommend looking at examples/VideoSpeedTest.py for examples of the kind of framerates you can expect.

@matze
Copy link
Contributor

matze commented Mar 26, 2015

Thanks for the pointer. I hope @pavel-rybalko could redo the test before leaving back?

@prybalko
Copy link
Collaborator Author

Here is an updated graph:
selection_012
I didn't write my own script for testing, just trustfully used examples/VideoSpeedTest.py

Note: I limited FPS axis on the graph by 100

@campagnola
Copy link

That looks about right. Also note that the vispy framerates are probably limited by the GUI toolkit; their theoretical maxima should be much higher (so you will need much less CPU time to achieve the same framerate on vispy than other libraries).

@prybalko
Copy link
Collaborator Author

I wrote a script, which uses GraphicsView and update images in another process. It works fine, but we need to integrate it into RemoteGraphicsView (which implements multithreading) or to implement it like in my script (explicit multiprocessing). But already I don't have time for that though.

@tfarago tfarago closed this Apr 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants