Debian Codegraph @

examples/io_examples/pyglet_imshow.py

raw symbols SCIP
1 #!/usr/bin/env python
2
3 import imgviz
4
5
6 def get_images():
7 data = imgviz.data.arc2017()
8 yield data["rgb"]
9 yield imgviz.depth2rgb(data["depth"], min_value=0.3, max_value=1)
10 yield imgviz.label2rgb(data["class_label"])
11
12
13 def main():
14 imgviz.io.pyglet_imshow(next(get_images()), "ndarray")
15 imgviz.io.pyglet_run()
16
17 imgviz.io.pyglet_imshow(get_images(), "generator")
18 imgviz.io.pyglet_run()
19
20 imgviz.io.pyglet_imshow(list(get_images()), "list")
21 imgviz.io.pyglet_run()
22
23
24 if __name__ == "__main__":
25 main()