Nirav,<br><br>I found your project only early this morning and am fascinated with your progress thus far.&nbsp; I will be following your developments eagerly.&nbsp; Also, I will be informing some of the other interest at the office about your work and see if any collaboration comes of it.<br>
<br>Seth<br><br><div class="gmail_quote">On Thu, Jun 26, 2008 at 4:07 AM, Nirav Patel &lt;<a href="mailto:nrpatel@gmail.com">nrpatel@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
As you may know, OLPC got GSoC students again this summer. &nbsp;I am one<br>
of them, and my project is Vision Processing. &nbsp;That is, a library to<br>
use the webcam for more than capturing images. &nbsp;I am implementing this<br>
by adding v4l2 and computer vision functions to pygame.<br>
<br>
My code is available at <a href="http://git.n0r.org/?p=pygame-nrp;a=summary" target="_blank">http://git.n0r.org/?p=pygame-nrp;a=summary</a> and<br>
is currently pygame 1.8.1 with the addition of a camera module that<br>
supports v4l2 cameras that use MMAP and have pixelformats of RGB24,<br>
RGB444, YUYV, SBGGR8, or YUV420. &nbsp;Basic usage is as follows:<br>
<br>
import pygame<br>
from pygame import camera<br>
<br>
cam = camera.Camera(&quot;/dev/video0&quot;, (640, 480), &quot;RGB&quot;) &nbsp;# the third<br>
argument can be YUV or HSV too.<br>
cam.start()<br>
frame = cam.get_image() # the frame returned is a 24bit pygame Surface<br>
<br>
You can also do fun stuff like:<br>
<a href="http://eclecti.cc/bytes/living-pointillism-a-pygame-webcam-script" target="_blank">http://eclecti.cc/bytes/living-pointillism-a-pygame-webcam-script</a><br>
or more practical stuff like having it track the centroid of a<br>
specific hue (green in this case): <a href="http://eclecti.cc/files/centroid.py" target="_blank">http://eclecti.cc/files/centroid.py</a><br>
<br>
My plans are to add functions like finding the largest connected<br>
component, optical flow, and other things useful for computer vision.<br>
<br>
Currently, performace is pretty poor on the XO; a combination of the<br>
Geode being slow and having to convert from 24bit to 16bit surfaces to<br>
display any captured frames. &nbsp;The XO is fast enough to capture and<br>
blit a 320x240 RGB frame at 30fps, but not at 640x480 or a frame being<br>
converted to HSV. &nbsp;I&#39;m not sure how or if I&#39;m going to be able to<br>
overcome those performance problems.<br>
<br>
I&#39;d appreciate any comments, suggestions, or reality checks on<br>
improving performance or anything else, or any requests for vision<br>
functions to add. &nbsp;Also, I only have the camera in the XO, vivi, and a<br>
poorly supported USB webcam, so if anyone could test it on other<br>
webcams, that would be great.<br>
<br>
Thanks,<br>
<font color="#888888"><br>
Nirav Patel<br>
_______________________________________________<br>
Devel mailing list<br>
<a href="mailto:Devel@lists.laptop.org">Devel@lists.laptop.org</a><br>
<a href="http://lists.laptop.org/listinfo/devel" target="_blank">http://lists.laptop.org/listinfo/devel</a><br>
</font></blockquote></div><br>