code: def __init__(self):
      app.Canvas.__init__(self, size=(640, 480), keys="interactive")
      self.program = gloo.Program(vertex, fragment, count=4)
      self.program["position"] = [
          (-1, -1),
          (-1, +1),
          (+1, -1),
          (+1, +1),
      ]
      self.program["texcoord"] = [(1, 1), (1, 0), (0, 1), (0, 0)]
      self.program["texture"] = np.zeros((480, 640, 3)).astype(np.uint8)
  
      width, height = self.physical_size
      gloo.set_viewport(0, 0, width, height)
  
      self.cap = cv2.VideoCapture(0)
      if not self.cap.isOpened():
          raise Exception("There's no available camera.")
      self._timer = app.Timer("auto", connect=self.on_timer, start=True)
  
      self.show()
  
file_path: vispy/examples/demo/gloo/camera.py
imports: import numpy
  from vispy import app
  from vispy import gloo
label_desc: Use image node_id 1 to create a new Canvas object from inherited base classes: app with example: obj = Canvas()