0
我正在使用作为第二个monobitor连接的空间光调制器(SLM)。 SLM有tzo recive 8位灰度图像。 我目前正在使用vispy在SLM上显示图像,但如果它们正确显示,我不会支持。 有没有可能使用vispy在灰度显示图像?使用vispy以灰度显示图像
我DISPLY使用此代码
import sys
from vispy import scene
from vispy import app
import numpy as np
canvas = scene.SceneCanvas(keys='interactive')
canvas.size = 800, 600
canvas.show()
# Set up a viewbox to display the image with interactive pan/zoom
view = canvas.central_widget.add_view()
# Create the image
img_data = *my image*
image = scene.visuals.Image(img_data, parent=view.scene)
# Set 2D camera (the camera will scale to the contents in the scene)
view.camera = scene.PanZoomCamera(aspect=1)
if __name__ == '__main__' and sys.flags.interactive == 0:
app.run()
的图片来自http://vispy.readthedocs.io/en/stable/examples/basics/scene/image.html
感谢您的帮助,并抱歉不好英语
它的工作原理!谢谢! – stanissse