使用 pygtk 绘制像素数据的 2d numpy 数组的最快方法是什么?
我有一个 numpy 像素数据数组,我想在 pygtk 中以交互速度绘制它们。有没有一些简单、快速的方法可以将我的数据显示到屏幕上?
I have a numpy array of pixel data that I want to draw at interactive speeds in pygtk. Is there some simple, fast way to get my data onto the screen?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道 GTK 的具体内容,但请查看 glumpy 和 pygarrayimage 用于快速、基于 OpenGL 的 numpy 数组可视化(和动画)。
Pygarrayimage 更专注于将 numpy 数组作为 OpenGL 纹理获取。我对此了解不多,但据我所知,它的使用相当广泛。
尤其是 Glumpy,它有一些非常简洁的演示,很好地展示了它的用法。不幸的是,主页上的屏幕截图链接似乎已失效,但为了体验演示还是值得安装 glumpy 的。这是制作快速交互式动画的绝佳选择。
I'm not aware of anything GTK specific, but have a look at glumpy and pygarrayimage for fast, OpenGL based visualization (and animation) of numpy arrays.
Pygarrayimage is focused more on just getting numpy arrays as an OpenGL texture. I don't know a ton about it, but it is somewhat widely used, as far as I can tell.
Glumpy, in particular, has some really neat demos that show its usage rather well. Unfortunately, the links to the screenshots on the homepage seem to be dead, but it's worth installing glumpy just to play around with the demos. It's a great option for making quick interactive animations.