[sugar] Simple camera API/Pippy fun scripts

Yoshiki Ohshima yoshiki at vpri.org
Tue Nov 13 12:04:49 EST 2007


  Hello,

  I can't answer the question Gabriel asked, but...

  I think Gabriel is on the right track (I don't know the details of
low-level code he wrote, though).  Because this is an education
project, many parts of the system should be presented to
children/users in a form that they can understand.  Revealing the fact
that a movie is just a series of still pictures is a great one, and
letting the user to write the code (that creates such still pictures)
is great.

  Incidentally, Etoys has a binding to camera.  (To get one go to
"treasure box" in the menu, grab "Object Catalog", go toMultimedia
category in the Catalog, and grab "Camera".)  The Camera object has a
property called "lastFrame", and that can be assigned to another
Sketch object.  You can make the equivalent code that Gabriel wrote
(but no need to store the pictures into files) with tiles.

  Ah, and text overlay and audio output can be done in Etoys with Text
objects and SoundRecoder objects in it.

-- Yoshiki

At Tue, 13 Nov 2007 08:20:52 -0800,
Peter Krenesky wrote:
> 
> Hi Gabriel,
> 
> My team is working on porting helix producer to python for use on the olpc.  
> It will do video capture but since its an encoding platform its not that 
> simple to use.
> 
> Have you checked out the gstreamer bindings and the Record activity?  I'm not 
> sure if it will do what you need but it does video recording as well.
> 
> -Peter
> 
> On Tuesday 13 November 2007 1:03:37 am Gabriel Burt wrote:
> > Hey,
> >
> > After using Pippy and loving it, I wanted to make similar, simple
> > scripts controlling the camera.  I wrote a couple simple python
> > classes to enable this (and the like):
> >
> > from pixbuf_camera import PixbufCamera
> >
> > camera = PixbufCamera ()
> > for i in range(0, 10):
> >   # Take a picture and wait for one second
> >   pixbuf = camera.takePicture ()
> >   pixbuf.save ("test_%s.jpg" % i, 'jpeg')
> >   time.sleep (1)
> >
> > This isn't really usable within Pippy since it doesn't have text (or
> > aural) output.  Is there place where a simple API of this sort could
> > go? (Or could Pippy be modified to give scripts more flexible output?)
> >  Are there already platform-level APIs for the camera?  Right now it
> > just takes snapshots from the camera, but it could/should be extended
> > to do video and other fun things (motion detection).
> >
> > Gabriel
> 
> _______________________________________________
> Sugar mailing list
> Sugar at lists.laptop.org
> http://lists.laptop.org/listinfo/sugar


More information about the Sugar mailing list