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