[IPython-dev] Camera widget
Jason Grout
jason-sage at creativetrax.com
Tue Feb 25 13:30:33 EST 2014
For your enjoyment, here's a basic camera widget that allows you to snap
pictures and then process them.
The user-level part of the code is:
c=Camera()
display(c)
# snap picture
%matplotlib inline
from skimage import io, filter, color
io.imshow(filter.roberts(color.rgb2gray(c.image)))
It could easily be extended to grab video and audio as well:
http://nbviewer.ipython.org/gist/jasongrout/9210458
You can also see a tweaked version here:
http://sagecell.sagemath.org/?q=htlcsf
(you'll probably have to allow the browser to use your camera...)
Thanks,
Jason
More information about the IPython-dev
mailing list