-
Notifications
You must be signed in to change notification settings - Fork 64
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
Flickering when displaying canvas with image stream after updating to 0.12.0 #273
Comments
Thanks for opening an issue. Can you please share a code sample that shows this? |
This is a cut out of the code:
|
Thanks. That's interesting, it should not flicker IMO. You can probably remove the flickering by removing the call to |
You are right! The flickering disappeared but the lag is still there. |
Are you saying the lag was smaller with 0.11 compared to 0.12? |
Sorry that I am being unclear! |
Ok :) No worries. You might want to try reducing the resolution of the image you're passing to ipycanvas. |
The resolution of the original image is reduced to 640 by 535 so I think it is fairly low. |
I think it's fair to say that ipycanvas is responsible for the lag. I don't see any reason for the ipywidgets container to bring more slowness. Appart from image resolution you can also try compressing the image data, though ipycanvas is already trying to do it a bit so I'm not sure it will change it much. You can also try reducing the number of images you send per-second. Now if we leave ipycanvas aside, you can also look at ipywebrtc which allows you to play with the camera stream as well, though the stream lives in the JavaScript world so it's more difficult to process the image Python-side. But I thought it could be interesting depending on what you are trying to achieve. |
I actually started with ipywebrtc but couldn't make it work with my Basler machine vision camera (using Basler pypylon package) so I switched to ipycanvas. |
I use ipycanvas to show a camera stream from a machine vision camera in a jupyter notebook.
After updating to 0.12.0 the image has started flickering and the delay in the displayed image has increased.
Downgrading to 0.11.0 solves the problem.
Is this a bug or are there new settings and functionality that one should use.
The text was updated successfully, but these errors were encountered: