i'm working with a spatial light modulator (SLM) which is connected as a second monbitor. The SLM has tzo recive 8-bit grayscale images. I am currently working with vispy to display the images on the SLM, but i'm not shore if they are diplayed correctly. Is there any possibility to display an image on grayscale using vispy?
I disply the images using this code
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()
from http://vispy.readthedocs.io/en/stable/examples/basics/scene/image.html
thanks for your help, and sorry for bad english