Getting a Camera image from your Computer

  1. Make a CameraWidget
  2. display it
  3. turn it into a Picture
In [2]:
w = calico.makeCameraWidget()
In [4]:
from Graphics import Picture
def f(value_name, value):
    calico.animate(Picture(w.imageuri))
    
w.on_value_change(f, "imageuri")
In [24]:
calico.display(w)
In [29]:
picture = Picture(w.imageuri)
In [30]:
picture
Out[30]:
In [31]:
import Myro
for pixel in Myro.getPixels(picture):
    pixel.setRed(255)
In [32]:
picture
Out[32]: