Re: multitouch + audio feedback linux dev - XO-2?

2009-01-26 Thread Nirav Patel
 1) Are there any existing hooks/systems for Linux for multi-touch?
 That's the only proper way you can get a virtual keyboard to work for
 a double-touchscreen clamshell device (the feasibility of which is not
 sold to me because of the power consumption of running a 2nd screen vs
 a keyboard, and mostly mostly mostly the lack of haptic feedback from
 a virtual keyboard).

Peter Hutterer has been working on Multi-Pointer X for several years.
It is getting pretty usable, judging by the Youtube videos.
http://wearables.unisa.edu.au/mpx/
http://www.youtube.com/watch?v=olWjnfBoY8E

 In fact, you could pretty much do multitouch systems with just a
 camera (the XO's would be good enough, the machine would just need a
 CPU with stronger horsepower to do the image processing :P) and any
 surface where discrete image sections can be formed for img recog aid,
 like using shadows from hands or maybe a color-reactive transparent
 surface where if pressure or contact is applied, a particular color
 shade (like a chroma key) will appear to aid img rec.

You can use the pygame camera module to do multitouch on an XO,
though it is far from usable for anything but drawing.
http://www.youtube.com/watch?v=HIDdxY3L5V8

Nirav
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: [Sugar-devel] Wacom Bamboo with XO?

2008-12-08 Thread Nirav Patel
Chris,

We're working on switching from gstreamer to the pygame camera module.
Gstreamer in 8.2 had some changes that broke the pipeline Colors was using.
While it would have been possible to change the pipeline, switching to
pygame will be easier/better for both the videopaint and photo snap parts.

This will likely be done before the end of the month.

Nirav

On Mon, Dec 8, 2008 at 8:02 AM, Chris Marshall [EMAIL PROTECTED]wrote:


 BTW, Colors! version 11 did not appear to have
 the photo snap capability.  Was that removed?

 Cheers,
 Chris
 ___
 Devel mailing list
 Devel@lists.laptop.org
 http://lists.laptop.org/listinfo/devel

___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Panorama activity

2008-11-04 Thread Nirav Patel
I applied for project hosting a few weeks ago but haven't gotten a
reply yet.  For now I'm just using my own repo.  I'm starting up an
Activity development team at my university, and our first projects are
going to be getting Panorama and Bridge to a deployable state.  Our
first meeting is going to be this week, and there should be a more
stable release of Panorama over Thanksgiving weekend.

Nirav

On Tue, Nov 4, 2008 at 2:57 PM, Samuel Klein [EMAIL PROTECTED] wrote:
 this is still one of the cooler projects people have taken on!  Jeff
 K, have you gotten to try it out?  Nirav, any thoughts of another
 release?   Else you (or someone who wants to maintain it) should set
 up hosting for the code...

 SJ

 On Sun, Oct 12, 2008 at 2:15 AM, Nirav Patel [EMAIL PROTECTED] wrote:
 That sounds like a much better idea.  I'll try to set up something
 like that on my webserver, though I'll have to move elsewhere if the
 activity gains any kind of popularity.  It still leaves the problem of
 the images uploading to my personal Flickr account though.  I think
 having a Panorama Collection or Set on the OLPC Flickr account would
 be nice.

 Also, I uploaded the pre-alpha bundle: http://eclecti.cc/files/Panorama-1.xo

 Nirav

 On Sun, Oct 12, 2008 at 1:39 AM, Brian Jordan [EMAIL PROTECTED] wrote:
 Maybe one could set up a one-way upload script for this on dev (or
 some appropriate
 community-developed-web-services-server-of-the-future)? This script,
 then, could handle the uploading via flickr API securely.

 Regards
 Brian
 ___
 Devel mailing list
 Devel@lists.laptop.org
 http://lists.laptop.org/listinfo/devel


___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Hosting request: Panorama

2008-10-12 Thread Nirav Patel
1. Project name :Panorama
2. Existing website, if any :  http://wiki.laptop.org/go/Panorama
3. One-line description : A panorama stitching activity

4. Longer description   : An auto panorama stitcher that can upload the
: captured panoramas to a central website
of some kind.

5. URLs of similar projects :
http://wiki.laptop.org/go/Panorama_camera_activity

6. Committer list
   Please list the maintainer (lead developer) as the first entry. Only list
   developers who need to be given accounts so that they can commit to your
   project's code repository, or push their own. There is no need to list
   non-committer developers.

  Username   Full name SSH2 key URLE-mail
     - --
   #1   nrp   Nirav Patel  http://n0r.org/id_rsa.pub
[EMAIL PROTECTED]
   #2
   #3
  ...

   If any developers don't have their SSH2 keys on the web, please attach them
   to the application e-mail.

7. Preferred development model

   [X] Central tree. Every developer can push his changes directly to the
   project's git tree. This is the standard model that will be familiar to
   CVS and Subversion users, and that tends to work well for most projects.

   [ ] Maintainer-owned tree. Every developer creates his own git tree, or
   multiple git trees. He periodically asks the maintainer to look at one
   or more of these trees, and merge changes into the maintainer-owned,
   main tree. This is the model used by the Linux kernel, and is
   well-suited to projects wishing to maintain a tighter control on code
   entering the main tree.

   If you choose the maintainer-owned tree model, but wish to set up some
   shared trees where all of your project's committers can commit directly,
   as might be the case with a discussion tree, or a tree for an individual
   feature, you may send us such a request by e-mail, and we will set up the
   tree for you.

8. Set up a project mailing list:

   [ ] Yes, named after our project name
   [ ] Yes, named __
   [X] No

   When your project is just getting off the ground, we suggest you eschew
   a separate mailing list and instead keep discussion about your project
   on the main OLPC development list. This will give you more input and
   potentially attract more developers to your project; when the volume of
   messages related to your project reaches some critical mass, we can
   trivially create a separate mailing list for you.

   If you need multiple lists, let us know. We discourage having many
   mailing lists for smaller projects, as this tends to
   stunt the growth of your project community. You can always add more lists
   later.

9. Commit notifications

   [ ] Notification of commits to the main tree should be e-mailed to the list
   we chose to create above
   [ ] A separate mailing list, projectname-git, should be created for commit
   notifications
   [X] No commit notifications, please

10. Shell accounts

   As a general rule, we don't provide shell accounts to developers unless
   there's a demonstrated need. If you have one, please explain here, and
   list the usernames of the committers above needing shell access.

11. Translation
   [X] Set up the laptop.org Pootle server to allow translation
commits to be made
   [ ] Translation arrangements have already been made at ___

12. Notes/comments:
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Panorama activity

2008-10-12 Thread Nirav Patel
That sounds like a much better idea.  I'll try to set up something
like that on my webserver, though I'll have to move elsewhere if the
activity gains any kind of popularity.  It still leaves the problem of
the images uploading to my personal Flickr account though.  I think
having a Panorama Collection or Set on the OLPC Flickr account would
be nice.

Also, I uploaded the pre-alpha bundle: http://eclecti.cc/files/Panorama-1.xo

Nirav

On Sun, Oct 12, 2008 at 1:39 AM, Brian Jordan [EMAIL PROTECTED] wrote:
 Maybe one could set up a one-way upload script for this on dev (or
 some appropriate
 community-developed-web-services-server-of-the-future)? This script,
 then, could handle the uploading via flickr API securely.

 Regards
 Brian
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Panorama activity

2008-10-11 Thread Nirav Patel
My roomate and I wrote an auto-stitching Panorama Activity during the
Yahoo Hack Day at CMU yesterday (ended up winning the Hack for Good
award).  I'll be posting it in the wiki at some point today.  It needs
a whole lot of polishing, since it was written in 24 hours.

I ran into the same problem that Ben did with autowhitebalance and
autoexposure.  I looked through the ov7670 driver, and it seems
changing V4L2_CID_BRIGHTNESS should flip the auto exposure control
(AEC) bit in one of the registers.  I added support for changing
brightness to the camera module in Pygame, but either disabling AEC
doesn't work, or it just makes auto gain control and auto white
balance work even harder to change the image.  Other than that, the
stitching seems to work ok.  I'm going to pyramidize it at some point
to make it faster, and do something to improve the accuracy.  The
slowness of stitching doesn't effect the user experience much though,
because it only stitches after the user is done taking the pictures.

The Activity we wrote uses the Flickr API for an upload to Flickr
button.  I feel that this is the most important part.  There is
support for saving the stitched images as Journal entries, but it
would be wonderful if a kid anywhere in the world could see panoramas
taken by other kids elsewhere.  Flickr is far from ideal for this.
Beyond not really being designed for viewing panoramas, it is
currently set up to just upload every picture to my personal Flickr
account.  My API key, secret key, and an authentication token are
prerecorded in the activity, so anyone could potentially use those
values to edit existing photos and upload whatever to my Flickr
account:  http://flickr.com/photos/nrpatel/

It seems Gigapan doesn't have an upload API.  gigapan.org works in
Browse on my os767 XO, but panning around an image is pretty slow.
Anyone have ideas on this?  A better way to Flickr, ideas for
designing a new site, getting Gigapan to add an upload API, etc?

The other issue we ran into is integrating OLPCGames with pyGTK stuff.
 We used OLPCGames to take advantage of capturing the images as SDL
surfaces, but we also wanted pyGTK to pop up a Dialog box when the
user hits Save, asking for a Title, Tags, and a Description of the
panorama.  We hacked together something that does pop up the box and
saves correctly, but fails to ever destroy the box.  It then just sits
with the box open, preventing the user from using or exiting the
Activity.  Is it possible to use pyGTK beyond the toolbox while still
using OLPCGames?

Nirav

On Fri, Sep 5, 2008 at 6:41 PM, Jeff Keller [EMAIL PROTECTED] wrote:
 Yeah -- I sent my loaner unit off to Burning Man, but I should get it
 back soon, and I'd be delighted to talk about stitchers.  Randy
 Sargent and I wrote our own for GigaPan last summer because nothing
 else was up to the task.  It relies on a model of the GigaPan device's
 behavior to do rough placement, but it can auto-stitch 1000+ images
 with  10 pixels rms displacement error, and it should be open-sourced
 one of these days.  Of course, it uses much more storage, RAM, and CPU
 than an XO has, but nothing inappropriate to what it does, and there
 are some nice improvements in the works.  Oh, and my office is down
 the block from OLPC's.
 --Jeff

 On Fri, Sep 5, 2008 at 12:38 PM, Samuel Klein [EMAIL PROTECTED] wrote:
 Speaking of which, Jeff Keller has been trying to get OLPC folks to
 learn more about using his gigapan group's cameras (and perhaps to
 borrow one to bring them into a country for weeks) for a while.  Jeff,
 Ben Schwartz and Nirav are really interested in large-scale image
 splicing...

 SJ
 ---
 617 529 4266


 On Fri, Sep 5, 2008 at 2:08 AM, Brian Jordan [EMAIL PROTECTED] wrote:
 *bump*

 http://wiki.laptop.org/go/Panorama_camera_activity

 (code? Nirav is interested in doing something similar!)

 Brian

 On Wed, Jun 20, 2007 at 11:56 PM, Benjamin M. Schwartz [EMAIL PROTECTED] 
 wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 The XO happens to be perfect for shooting stitched panoramic photographs, 
 due to
 the swivel design.  I tested it out in the OLPCHQ lobby. Then, I wrote a 
 simple
 panorama stitcher in 50 lines of Python.  It runs in 3.4 seconds on my 
 Core Duo,
 producing this output:

 http://people.fas.harvard.edu/~bmschwar/lobby_ugly.jpg

 The results aren't too bad.  I also tried stitching this scene with Hugin, 
 the
 most powerful panorama stitcher I know of.  Hugin required significant user
 intervention and half an hour of computing time, producing this output:

 http://people.fas.harvard.edu/~bmschwar/lobby_pretty.jpg

 This scene is unusually difficult because of the huge indoor-outdoor 
 contrast.
 Given this positive result, I would like to work on a panorama-making 
 activity,
 possibly inside Capture.  I know that at age 10, I loved making panoramas 
 out of
 photographs.  Panoramas provide an immersive way for children to 
 communicate
 their environments to each other and to the 

Re: Wellington test team vs Activities - 2008-09-13

2008-09-14 Thread Nirav Patel
Thanks for the bug report on Bridge.  I just released Bridge-2 that
fixes those bugs and a few others.

Nirav

2008/9/13 Grant Patterson [EMAIL PROTECTED]:
 Grant's notes:

 Geoquiz-3
 - Too easy to mistakenly select the wrong answer when using the left and
 right controllers (as suggested by the instructions). This problem is caused
 by Geoquiz not distinguishing between the left and right controllers.
 - Lesotho, Swaziland and Gambia aren't visible on the Africa map, so when
 these questions arise, the user can only guess. Swaziland and Gambia are
 blacked out on the map, while Lesotho appears as part of South Africa.
 - Completing the quiz (either Africa or South America) causes Geoquiz to
 crash!
 - The questions are always in the same order until the laptop is rebooted.
 - Got a segmentation fault during the normal usage of the activity! Wasn't
 reproducable.

 Stopwatch-1
 - Worked well

 Bridge-1
 - Seems a little harsh that girders that are deleted are still counted
 towards the total cost of the bridge, especially since they can't be moved
 once in place.
 - Some instructions would be helpful. (e.g. press space to start train)
 - Pressing the 'b', 'j', or 'p' keys crashes the activity!
 - Otherwise a great activity.


 Grant


 2008/9/13 Tabitha Roder [EMAIL PROTECTED]

 Tabitha's notes:
 XO Build 8.2-759

 Mini vMac-1 - ctrl F for full screen is great! played with excalibur, note
 pad, calculator, puzzle, all good, but it is hard to shut down Mini vMac -
 seems you have to stop in the frame?

 Bridge-1 good

 Stopwatch-1 good

 Poll-17 - create own poll good, voted good, lesson plans display as XML
 not so good,  bug logged #8456

 Schoolsplay-1 - loads, font size is too big in the frames and in the
 pyramid, cant really play as cant read :-( bug logged #8458

 Audacity-1 - fails to launch, got logs, bug logged #8453

 XaoS-1 - good

 Moon-4 good

 Colors-4 - still not able to stop activity, same as v4 - see original bug
 #8335

 ProducePuzzle-0 - good

 Ok, now onto the big test - GCompris-7, get ready this is long

 GCompris - Various puzzles
 *assemble - good
 *tangram - good
 *build - good
 *superbrain - good
 *hanoi - good
 *sliding blocks - good
 *sudoku - good
 *fifteen game - good
 Gcompris - Mathematic games - geometry
 *freedraw - good
 *redraw - could not find or load the file skins/gartoon/redraw.svg this
 activity is incomplete exit it and report the problem to the authors
 ([EMAIL PROTECTED])
 *mirror - could not find or load the file
 skins/gartoon/redraw_symmetry.svg this activity is incomplete exit it and
 report the problem to the authors ([EMAIL PROTECTED])
 Gcompris - Mathematic games - calculations
 *math memory
 **multiply - good
 **add - good
 **subtract - good
 *algebra
 **add and subtract tested, took a while to work out that you have to push
 check answer or it thinks you havent entered an answer
 *number munchers
 **multiple - good
 **prime - good
 *math memory
 **bit confusing that questions with the same answer dont match in the
 matching game - e.g. 4 + 4 is not equal to 3 + 5, they are both = 8 only
 *balance the scales - good
 *target - good
 *series of correct operations - good
 Gcompris - Mathematic games - numeration
 *pairs of dice - good
 *count the items - couldn't find or load the file
 enumerate/food/banana.png this activity is incomplete - bruno
 *magician hat - good
 *feed tux the fish - good
 *money - couldnt find money/euro/p5e.png  - bruno
 *helicopter - good
 *draw with numbers - good
 GCompris - amusement
 *tuxpaint - cannot find tux paint install it to use this activity
 *football - good
 *hexagon - good
 *word processor - good, we all like the themes
 *drawing / animation - works for draw not animation - save image exits
 GCompris so cannot make animation
 *chat - sorry couldnt test this today
 GCompris - reading
 *click on letter - good
 *reading practice - good
 *horizontal - words start above the box not in it
 *vertical - words start above the box not in it
 *missing letter - good
 *image name drag and drop - good
 GCompris - discover the computer
 *keyboard
 **numbers with dice - good
 **throw ball to tux - good
 **simple letters - good
 **falling words - good
 *mouse
 **control the hose pipe - good
 **click the mouse - good
 **move the mouse - good
 **click on me - good
 **click and draw - good
 GCompris - strategy games
 *practice chess - error: the external program gnuchess is mandatory to
 play chess in gcompris first install it and check it is in
 /usr/games/gnome-gnuchess
 *connect 4 - good
 *bar game - good - the prerequisite of a brain is cute
 *oware - good
 GCompris - experiental games
 *parachutist - good
 *canal lock - good
 *water cycle - good
 *electricity - cannot find the gnucap electric simulator you can download
 and install it from http://geda.seul.org/tools/gnucap/ to be detected it
 must be installed in /usr/bin/gnucap or /usr/local/bin/gnucap you can still
 use this activity to draw schematics without computer 

Re: [sugar] [Activities] Camera raw mode (WAS: Panorama activity)

2008-09-06 Thread Nirav Patel
It supports Bayer RGGB8, which should be basically unprocessed data
off of the CMOS.  I can't imagine it being useful though.  It would
require unBayerizing it to display, even though the XO's display is
also Bayer (I assume pixel offsets and swizzling would mess it up,
even if the colors are in the same order).  You're better off letting
the camera do the heavy processing and just get packed RGB back.

Nirav

On Sat, Sep 6, 2008 at 10:15 AM, Christoph Derndorfer
[EMAIL PROTECTED] wrote:
 Nirav,

 IIRC the camera also supports a RAW mode, right?

 Is this another feature that we could integrate into an advanced camera
 activity that also includes the features mentioned below?

 Thanks,
 Christoph

 On Fri, Sep 5, 2008 at 4:26 PM, Nirav Patel [EMAIL PROTECTED] wrote:

 I don't know about integrating it into Record, but the other issues
 are fairly easy to resolve.  I wrote a Python module over the summer
 to interface v4l2 cameras that returns Pygame surfaces.  Capturing
 images is near instant (~20ms for 640x480 RGB).  Autogain and
 autowhitebalance can be disabled using v4l2 camera controls.  There is
 support in my module for the hflip and vflip controls, but adding
 additional controls is trivial.

 Alternately, we could just use a little utility in C to access any
 v4l2 camera control.  Since the module I wrote is for Pygame and is
 eventually going to be cross platform, adding v4l2 specific stuff to
 it is probably not the greatest idea.

 It may just be better to skip sticking it in Record and make a
 standalone activity, since Record seems to have plenty of issues on
 its own without a big new feature.  There wouldn't be much code
 duplication if Panorama doesn't use gstreamer anyway.

 Nirav

 On Fri, Sep 5, 2008 at 9:26 AM, Benjamin M. Schwartz
 [EMAIL PROTECTED] wrote:
  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA1
 
  Christoph Derndorfer wrote:
  | Sweet, I totally missed that!
  |
  | Is anyone actively working on integrating that functionality into
  'record'
  | or making it available as a seperate activity?
  |
  | Christoph
  |
 
  See http://lists.laptop.org/pipermail/sugar/2008-February/004307.html
 
  The Panorama Activity is snot quite barely functional.  It might be best
  to roll this functionality into Record, and Erik Blankinship has
  expressed
  some interest in that.  However, Record's UI is very unusual, and I am
  not
  about to attempt integration with it myself.  Also, as you can see in
  the
  examples, this process is only likely to work well once the camera's
  automatic white balance and gain control are deactivated.  The only way
  I
  know how to do that is to run in Bayer mode.  Bayer mode was introduced
  in
  a recent gstreamer, but gstreamer was recently downgraded, which leaves
  me
  without a known reliable way to access Bayer mode.
 
  - --Ben
 
  P.S.  For Bayer mode info, see
  http://lists.laptop.org/pipermail/devel/2008-February/011029.html
  -BEGIN PGP SIGNATURE-
  Version: GnuPG v2.0.9 (GNU/Linux)
  Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
  iEYEARECAAYFAkjBM3oACgkQUJT6e6HFtqRowgCfUlngIFr+Gl3jxKRYZAXBNl/x
  2hEAnAnoDrrvcd+vIHO68aJthULDKAQC
  =cvG0
  -END PGP SIGNATURE-
 



 --
 Christoph Derndorfer
 co-editor, olpcnews
 url: www.olpcnews.com
 e-mail: [EMAIL PROTECTED]

___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: [sugar] [Activities] Panorama activity

2008-09-05 Thread Nirav Patel
I don't know about integrating it into Record, but the other issues
are fairly easy to resolve.  I wrote a Python module over the summer
to interface v4l2 cameras that returns Pygame surfaces.  Capturing
images is near instant (~20ms for 640x480 RGB).  Autogain and
autowhitebalance can be disabled using v4l2 camera controls.  There is
support in my module for the hflip and vflip controls, but adding
additional controls is trivial.

Alternately, we could just use a little utility in C to access any
v4l2 camera control.  Since the module I wrote is for Pygame and is
eventually going to be cross platform, adding v4l2 specific stuff to
it is probably not the greatest idea.

It may just be better to skip sticking it in Record and make a
standalone activity, since Record seems to have plenty of issues on
its own without a big new feature.  There wouldn't be much code
duplication if Panorama doesn't use gstreamer anyway.

Nirav

On Fri, Sep 5, 2008 at 9:26 AM, Benjamin M. Schwartz
[EMAIL PROTECTED] wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Christoph Derndorfer wrote:
 | Sweet, I totally missed that!
 |
 | Is anyone actively working on integrating that functionality into 'record'
 | or making it available as a seperate activity?
 |
 | Christoph
 |

 See http://lists.laptop.org/pipermail/sugar/2008-February/004307.html

 The Panorama Activity is snot quite barely functional.  It might be best
 to roll this functionality into Record, and Erik Blankinship has expressed
 some interest in that.  However, Record's UI is very unusual, and I am not
 about to attempt integration with it myself.  Also, as you can see in the
 examples, this process is only likely to work well once the camera's
 automatic white balance and gain control are deactivated.  The only way I
 know how to do that is to run in Bayer mode.  Bayer mode was introduced in
 a recent gstreamer, but gstreamer was recently downgraded, which leaves me
 without a known reliable way to access Bayer mode.

 - --Ben

 P.S.  For Bayer mode info, see
 http://lists.laptop.org/pipermail/devel/2008-February/011029.html
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v2.0.9 (GNU/Linux)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

 iEYEARECAAYFAkjBM3oACgkQUJT6e6HFtqRowgCfUlngIFr+Gl3jxKRYZAXBNl/x
 2hEAnAnoDrrvcd+vIHO68aJthULDKAQC
 =cvG0
 -END PGP SIGNATURE-

___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Malfunctioning touchpad

2008-06-30 Thread Nirav Patel
I've had the same issue with my G1G1 XO.  It sounds like it could be
http://dev.laptop.org/ticket/5575

My problem mostly went away by itself after I took apart the XO and
put it back together.

Nirav

2008/6/30 pradosh Kharel [EMAIL PROTECTED]:
 I am troubleshooting hardware problems for the next week for Nepal's
 pilot schools. I will be asking questions to this list and sending my
 experiences.

 I had a laptop with a touchpad that only detected motion along the y axis.
 Swapping the card with an older version of the xo resulted in the touchpad
 not functioning at all and some keys not working. When I replaced the
 Keyboard of the malfunctioning XO with another one, both the keyboard and
 the touchpad worked fine.

 ___
 Devel mailing list
 Devel@lists.laptop.org
 http://lists.laptop.org/listinfo/devel


___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


GSoC Status Report: Vision Processing

2008-06-26 Thread Nirav Patel
As you may know, OLPC got GSoC students again this summer.  I am one
of them, and my project is Vision Processing.  That is, a library to
use the webcam for more than capturing images.  I am implementing this
by adding v4l2 and computer vision functions to pygame.

My code is available at http://git.n0r.org/?p=pygame-nrp;a=summary and
is currently pygame 1.8.1 with the addition of a camera module that
supports v4l2 cameras that use MMAP and have pixelformats of RGB24,
RGB444, YUYV, SBGGR8, or YUV420.  Basic usage is as follows:

import pygame
from pygame import camera

cam = camera.Camera(/dev/video0, (640, 480), RGB)  # the third
argument can be YUV or HSV too.
cam.start()
frame = cam.get_image() # the frame returned is a 24bit pygame Surface

You can also do fun stuff like:
http://eclecti.cc/bytes/living-pointillism-a-pygame-webcam-script
or more practical stuff like having it track the centroid of a
specific hue (green in this case): http://eclecti.cc/files/centroid.py

My plans are to add functions like finding the largest connected
component, optical flow, and other things useful for computer vision.

Currently, performace is pretty poor on the XO; a combination of the
Geode being slow and having to convert from 24bit to 16bit surfaces to
display any captured frames.  The XO is fast enough to capture and
blit a 320x240 RGB frame at 30fps, but not at 640x480 or a frame being
converted to HSV.  I'm not sure how or if I'm going to be able to
overcome those performance problems.

I'd appreciate any comments, suggestions, or reality checks on
improving performance or anything else, or any requests for vision
functions to add.  Also, I only have the camera in the XO, vivi, and a
poorly supported USB webcam, so if anyone could test it on other
webcams, that would be great.

Thanks,

Nirav Patel
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Face Detection and other Vision Processing (and some sample code)

2008-03-20 Thread Nirav Patel
I've been playing with vision processing stuff for the XO, mostly
using OpenCV.  I have some sample code up at
http://eclecti.cc/code/face-detection-on-the-olpc-xo that does face
detection surprisingly quickly.  It seems that the bottleneck isn't
even the OpenCV Haar Cascade algorithm, but the time it takes to
initialize the v4l2 drivers.

The code I wrote is just basic proof of concept stuff, but there are
some amazing possibilities involved in vision processing, like
recognizing sign language and gestures, drawing in air, playing motion
based games, and even identifying plants and wildlife.

If anyone is interested, I'd like to start developing an Activity that
uses face/object detection for something more fun or useful.  I'm new
to Python and OLPC development, so I could use some help.
Alternately, I am a student, so if anyone is interested in mentoring
this as a possible Summer of Code project, that would be great.
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Face Detection and other Vision Processing (and some sample code)

2008-03-20 Thread Nirav Patel
OpenCV has a Python API that uses SWIG.  It's in the default fedoro
repo as opencv-python.

Good idea, I'll add it to the wiki momentarily.

On Thu, Mar 20, 2008 at 6:47 PM, Chris Hager [EMAIL PROTECTED] wrote:
 Nirav Patel wrote:
   I've been playing with vision processing stuff for the XO, mostly
   using OpenCV.  I have some sample code up at
   http://eclecti.cc/code/face-detection-on-the-olpc-xo that does face
   detection surprisingly quickly.  It seems that the bottleneck isn't
   even the OpenCV Haar Cascade algorithm, but the time it takes to
   initialize the v4l2 drivers.

  Wow - this is amazing! And especially with this speed of ~0.25 seconds
  for finding a face! How are you accessing OpenCV - via SWIG or CTypes?

  I'd suggest to create [[OpenCV]] and start linking to infos, howto's and
  examples. That will make life much easier for all who want to play
  around with image recognition on the xo in the future.

  - Chris



___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel