Archive for March, 2009

counting change

Thursday, March 26th, 2009

ofcountingchange

As an in-class exercise for Spatial Media we were asked to develop a program which would identify coins in a series of supplied images and tally up their total value. In one hour.

Since time was limited, I decided to use pixel count as a rough estimate of each coin’s size. This works very reliably with the sample set of images, but that’s likely because the images consist of duplicated coins and are on a solid white background. Several additional methods wold likely need to be implemented to deal with actual situations. (Code below) (more…)

openFrameworks + iPhone libs

Wednesday, March 25th, 2009

of_iphoneI’ve had a few days to test the libraries I cobbled together for using openFrameworks with iPhone and also received positive reports from some folks who tried out the Makefiles I provided to them, so here they are for anyone who’s willing to try them out. -please make these instructions better if you see fit- (more…)

openFrameworks + iPhone

Monday, March 16th, 2009

particles-iphoneI’ve heard about openFrameworks 0.6 (as of yet unreleased) and specifically efforts to support building apps using oF for the iPhone. There are a few developers who have published videos of their efforts and even several apps in the AppStore.

Memo Atken has a very informative article about setting up the prerelease 0.6 version for use with the ofxiPhone addon. However, there is a HUGE simplification of the steps necessary for getting the supporting libraries installed for use with iPhone.

Update: freetype/freeimage building instructions have been posted. (more…)

TrafficFlow: Prototype

Friday, March 13th, 2009

flow-darkAmeya and I presented the prototype of TrafficFlow yesterday at ITP for our Spatial Media midterm project. It is an installation-based table which visualizes wireless traffic on a local network as gracefully flowing rivers of light.

Each user on a network has an individual connection to the internet and may have a conceptual model of personalized “tube”. However, all traffic on a typical network shares the same infrastructure and commingles at some point, and if unencrypted, is available to any other member of the network. TrafficFlow aims to make visible this hidden connection. (more…)

Thinking Physically: ThinkBig

Friday, March 13th, 2009

thinkbig-floor

Corey Menscher and I worked together on ThinkBig for the Whole Body Interface exercise in Thinking Physically. Corey had the basic idea of making soft switches which would be foot activated. Initially he was going to make three which you’d have to skip between. (more…)

Thinking Physically: FaceSpace

Friday, March 13th, 2009

facespace-andypovAndrew Styer and I worked together to develop FaceSpace – a device which indicates the amount of space in front of the wearer in terms of Proxemic distance. It’s designed to be somewhat impractical, nearly completely obscuring your view and forcing reliance on the dial’s reading while walking around a space. (more…)

Spatial Media: TrafficFlow update

Thursday, March 5th, 2009

Simple updates on the project. The previz applet has mouse control for each of the emitters. It’s interesting to see how the glowing packets influence each other when in close proximity. Here’s the applet.

ir_flame

Camera vision. Started working with openFrameworks to do the visual tracking of objects on the table. Unexposed portions of developed film negatives block most visible light and let IR light pass. Using this as a filter over the built-in iSight camera, I was able to test a rudimentary camera tracking system. It would likely be better to use a more robust library like openCV, but writing the tracking myself helped me to learn about how it works.

Still have to merge these two components. It looks like I’ll have to rewrite the flocking system in C++ since Processing/Java is getting bogged down. Ameya is working on the web side of the project – messing with a linux-based router to handle the proxy and packet sniffing as well as a database system to manage the data.

The table was built throughout this past week; we still need to mount the camera and projector in an effective way for under projection and sensing…any advice?

Simple things feel so good. (warning: geekery)

Wednesday, March 4th, 2009

Toggle an integer variable between 0 and 1. Useful for a flag to control program flow in C without boolean types.

toggleVar = 1>>toggleVar;

What this is doing is right shifting the integer 1 either zero or one place, depending on the current value of toggleVar.

An 8-bit (unsigned – positive values only) integer has 256 possible values. This is a byte of information whose bits can be represented in binary as 00000000. The least significant bit, the smallest values are on the right…so, 00000001 = 1, 00000010 = 2 … 11111111 = 255.

Ok, this isn’t a binary lesson…so, right shifting is simply moving all the bits to columns to the right. 2>>1 = 1 or, 00000010 >> 1 = 00000001 (which is binary for 1).

The expression at the top does exactly this: When toggleVar is zero, it becomes 1>>0 = 1 and when toggleVar is 1 the expression is 1>>1 = 0. The last bit gets shifted right into oblivion!!! (sorry for that).

Of course, with boolean data types toggleVar = !toggleVar is still shorter, by one char! :)