-
Notifications
You must be signed in to change notification settings - Fork 26
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
Continuous animations #17
Comments
What kind of frame rates do you think CV2 could support? For example do you think it could plot 1024 points on a graph at 10 fps? It'd be kind of cool if the Artist generator could fail safely. Say there's no data available when it polls for input, there could be a timeout and if the timeout hits then it could assume a default image. That leads to another question I had, does the Artist generator grab data or does it wait for data? Yet a third possibility is that the Artist generator is a class object, and if you want to use it you create a derived child class that somehow has a mechanism to get data itself. |
I think if you do it properly, you could easily get 10fps. CV2 can plot and annotate that much coming from a live webcam. I'll mock up a simple Artist and Canvas method that shows random data and we can go from there. |
Whoa, that was super easy to write! Check out the branch With an image of |
@apsistech if you want to play with this, you could come up with a more complicated Artist that computes in the background while waiting for a poll. Or you could implement the poll/wait/blank method that gets beyond a simple block (that's what's done now). Honestly, this is all the live animation is now: class LiveAnimation(Animation):
def show(self, delay=1):
while True:
img = self.render(0)
self.has_rendered[0] = False
img.show(delay=delay) |
Also, without the full pixel write, I get about 50fps just writing to text and blank rectangle to the screen with |
Oh cool, that's great to hear, I'll git clone your repo and try messing around myself soon! |
Multiple people expressed interest in creating animations that do not have a fixed time schedule, but rather run with a generator. I envision an Artist generator that takes input continuously and keeps rendering until broken by the user. cc @ehaengel
The text was updated successfully, but these errors were encountered: