[Activities] Panorama activity

Brian Jordan brian at laptop.org
Sun Oct 12 01:39:45 EDT 2008

On Sat, Oct 11, 2008 at 10:26 PM, Nirav Patel <olpc at spongezone.net> wrote:
> 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.

So cool -- can't wait to try.

> 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/

Awesome! :-D

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.


> 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 <jeff.keller at gmail.com> 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 <sj at laptop.org> 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 <brian at laptop.org> 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 <bmschwar at fas.harvard.edu> wrote:
>>>>> 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 world.
>>>>> - --Ben Schwartz
>>>>> -----BEGIN PGP SIGNATURE-----
>>>>> Version: GnuPG v1.4.7 (GNU/Linux)
>>>>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>>>> iD8DBQFGeU4yUJT6e6HFtqQRAv4rAJ9F5wTDfzz9piYzzwGskVVmaqZTiQCgjFru
>>>>> QsRergUtY1iCZS6hIXCHjSM=
>>>>> =v5GB
>>>>> -----END PGP SIGNATURE-----
>>>>> _______________________________________________
>>>>> Devel mailing list
>>>>> Devel at lists.laptop.org
>>>>> http://lists.laptop.org/listinfo/devel

More information about the Activities mailing list