Firefly and a Webcam

by Tuğrul Yazar | January 29, 2013 01:51

I finally installed Firefly, it immediately powers Grasshopper up with beautifully smart components, even if you don’t have Arduino it is still very useful. If you want to give it a try, first you have to install a small tool free from www.reactivision.com[1] in order to send data to Firefly. After that, you may download and install firefly from their website, www.fireflyexperiments.com[2].

It was the real-time inputs, my first interest. I was very excited to get data from my laptop’s tiny webcam and process that data to deform a pattern. It is based on the parquet deformation study yesterday (here) I started to plan for an installation at faculty, using webcams and projectors to manipulate the perception of people, using their movement both as an attractor, and the timed constructor of a pattern. Maybe this could be the most predictable idea after seeing that Firefly makes things that easy but anyway I decided to give it a try. Then, I realized I can skip data projectors as the webcam of my laptop can be rotated to record the backside. Would it be possible to create an interactive screen from a regular one?

The idea was simple. Just connect a screen to a laptop, rotate its webcam, (or put a mirror right in front of it), so Grasshopper will process the vision of itself (or another screen connected to the same computer). Maybe this could create a non-stoppable deformation because of a physical version of an infinite for-next loop. Any manipulation on the screen would trigger more and more… This became a calibration problem for me to tell Grasshopper that it should in fact track my hand, not its own screen. I tested the movement component of Firefly that captures a greyscale image from the webcam, showing the movements as white, and static things in black. The first experiment worked like this (sorry for the sound, just mute it):

This is the Grasshopper definition: [GHX: 0.9.0014][3] Remember you need to install the Reactivision tool and Firefly for Grasshopper.

2013_01_29-firefly-def[4]
2013_01_29-firefly

An important notice: There is a very small bug in the “Sample” component of Firefly. When you save the Grasshopper definition, the sample component doesn’t save the type of sampling. You have to right-click on it and select “Brightness” in order to use the above definition. Below is the screen capture of that:

2013_01_29-firefly-bug

Right-click on that “Sample” component and select brightness every time you open the document.

Endnotes:
  1. www.reactivision.com: http://www.reactivision.com
  2. www.fireflyexperiments.com: http://www.fireflyexperiments.com
  3. [GHX: 0.9.0014]: https://www.designcoding.net/decoder/wp-content/uploads/2013/01/2013_01_29-firefly.ghx
  4. [Image]: https://www.designcoding.net/decoder/wp-content/uploads/2013/01/2013_01_29-firefly-def.jpg

Source URL: https://www.designcoding.net/firefly-and-a-webcam/