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

Rolling average window #276

Open
HagaiHargil opened this issue May 9, 2021 · 0 comments
Open

Rolling average window #276

HagaiHargil opened this issue May 9, 2021 · 0 comments

Comments

@HagaiHargil
Copy link

Hello and thanks for this great library.

I wish to render two windows - the first shows the raw data coming from a data stream, and the second is a rolling average of a few frames from that first window. I already have the raw data renderer working, but I'm struggling to decide on the best way to implement that moving average part.

Naively I can snap_image() the first window to receive the data of each frame and average it with some existing buffer, but I'm not sure how to convert the ImageBuffer I'll have back to a renderable image. Would I need to iterate over every pixel and call add_point() on it?

Another option is to do everything on the GPU, since my data is already there. However I'm not quite sure that the GPU API kiss3d exposes is sufficient for this task (and probably for a good reason!). I'm not sure how to allocate a mutable GPU buffer as my new window's buffer and use an averaging kernel to update it with data from a different window, which has its own buffer.

How would you recommend approaching this task?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant