Posts tagged processing

2013 01 15 Jan 15th

2013 01 15 Jan 15th

2013 01 15 Jan 15th

2013 01 15 Jan 15th

2013 01 15 Jan 15th

2013 01 06 Jan 15th

2013 01 15 Jan 15th

These are some of my early experiments with slit-scan photography, made while trying a Processing application I coded mostly as a learning exercise. The software allows you to either 'scan' your webcam image or a video file, but since using my laptop as camera is a bit cumbersome, most of the above images were made by 'scanning' some random videos I had around. I'll have to try to shoot video specifically for slit-scanning — so far I found out that stable, sideways shots of slow-moving subjects work the best. (As an aside, slit-scan photography is basically one of the main techniques used by Photo-finish systems, only at very high frame rates.)

Anyway, I think the app is cool and stable enough to be worth sharing, so I made a download for Windows available — head to my Processing sketches page to get it!

A friend of mine asked if I could put together a piece of software that would allow him to have a video playlist and live video in the same screen, for use in a performance art piece. I said sure and started to dust off whatever little knowledge I had of Processing.

As usual, once I got over the usual hurdles (ex. the GSVideo library won’t accept DV capture over Firewire, so I had to use the flaky video library bundled with Processing for that, but then GSVideo 1.0 — much, much better for the video playlist part — would crash when used together with it so I had to settle for a prerelease version of GSVideo… and etecetera) I finally proceeded to pimp the code and throw everything I could think of at it: a dialog to choose the folder where the videos are and a routine to check for valid video file extensions, the ability to swap the video/live feed sides, the ability to switch between multiple cameras (ex. webcam, firewire camera, screen capture driver, etc.), the ability to correct the cameras’ aspect ratio, a fullscreen mode, the ability to reposition the images on the screen, a cool ‘swooshy’ effect for the live feed, the ability to pause or advance the playlist at random.

I’ve been using GitHub for version control, finally getting the hang of it thanks to their friendly Windows client (sorry if this makes me uncool — I had previous struggles with Git which made me wait for this sort of desktop client). I think it’s incredibly cool there’s this record of the changes I made to my code as I went along. Here’s my repository of Processing sketches.

P.S.: If you’re looking at the code in picture and wondering, I know perfectly well Java/Processing variables don’t need to start with a dollar sign ($). I just use that as a notation for global variables.

Sync'ed some of my Processing sketches to GitHub (batteries/libraries not included) —…

Dusting off my meagre Java/Processing skills, I had the unconfortable feeling it is legacy technology.

Another useless trick

Actually, this is how I feel sometimes — perforated.

On with the Processing saga. One of the things I’m interested is in live video manipulation and EyeToy-like interaction with the computer. So the other day I went to buy a cheapo webcam so that I could do my experiments without risking an accidental punch at my Canon HD camera, besides keeping a cleaner desk. I entered an electronics store, picked up the ten euro camera that didn’t look like a total piece of shit (the images it generates, however, are the glorious crap-o-vision you expect — which is nice), and went to the cashier. Just as I was going to pay I realized that here was a nerdy, badly shaven creature about to buy a webcam. “Hm, quit the mid-90s prejudices and cybersex superstitions”, I thought. “People constantly buy webcams, right? This electronics store sells at least a dozen different models, so there’s as much demand for webcams as for, say, mice and keyboards. Besides, most laptops have incorporated webcams, and people have all kinds of uses for them… It’s just that I can’t think about anything else right now!” I paid for the camera, and the guy at the cash register winks at me. The fucker.

Anyway, I did buy my blob brightness and positioning sensor to get some work done. I’m trying to see if I can come up with a gesture-based interface for something we’re doing at my Master’s, but in the meantime I got to get my Processing confidence level high enough. As a first exercise, I did some eye candy: an application that converts brightness data to depth data. That’s not much, but I’m still learning my way around the JMyron computer vision library, which looks like the fastest shortcut to where I want to be. Since Processing web applets apparently can’t access people’s cameras (which is a good thing, I suppose), you can’t see my experiment online, instead you’ll have to download a compiled application to try it. Both the Windows and the Mac versions require, I believe, Java on your computer, and the latter version is untested, so I’d love to hear from you if it works. There are quite a few options I added to that program, press ‘H’ to see the instructions. Enjoy!

Download 3Dwebcam: Windows | MacOS X.

Object oriented

Processing — Bounce

During the last couple of weeks I’ve been learning Processing, another tool in my Master’s degree’s utility belt. My workgroup is supposed to deliver a big project in one month and Processing will be our programming language of choice. I’ve meant to learn it for a long time, but there’s nothing like real need to get me to actually do something. So I bought my first programming book in nearly a decade — Daniel Shiffman’s Learning Processing (which besides being a good manual I found a very fine primer on computer programming) — and got on with it.

You can see the results of my first half-decent experiments → here, and I’ll be adding more as I go on. Be careful though — I did some experimenting with (annoying) sound too. All things Processing are actually Java, so there’s a slight chance you might need to install Java on your computer. Enjoy!