User:Tamas Bates/Research/Alone

From XPUB & Lens-Based wiki


A room which reacts to the presence of visitors.

Are we more comfortable alone in the light, or together in the dark?

Overview -- image data taken from a software simulation of the room

The entire room is lit by a large array of lights attached to or hung from the ceiling. From the outside, the room should appear bright and inviting. To minimize diffuse light from the ceiling, the floors and walls are black. There are no (open or exposed) windows.

Visitors are only able to enter the room one at a time (each person must step completely inside the room before the next person enters). As soon as a visitor enters the room, the lights directly above them in the array go dark, so each person in the room stands in their own darkened space. As they move through the room, the darkness follows them--the lights above each visitor are always dark, but will re-light as soon as nobody is standing below them.

If two or more visitors approach each other, the radius in which lights above them are darkened will increase in proportion to the number of adjacent visitors. In this way, when visitors gather near each other they will find the room to be darker, and the room will be at its brightest when all visitors are as far from each other as possible.

Practical Notes and Thoughts

Due to the fluid nature of the lighting conditions in the room, tracking visitors will likely need to be handled with infrared cameras. Visitors should be discouraged from wearing hats or reflective clothing if possible. Forcing visitors to enter the room one-by-one also greatly simplifies some aspects of the tracking code. Depending on how successful tracking is with IR cameras alone, it may be necessary to paint a pattern on the floor or to use a 3D camera (e.g. Kinect) for more accurate results.

The tracking data from the cameras will be processed by a computer (probably through OpenCV or something similar) which will generate a map of all lights affected by the current position of the visitors. Treating each visitor as the source point for a metaball is done fairly cheaply, and allows for nice blending between dark regions when visitors step near each other. Adjusting the affected radius of lights is also straightforward by simply modifying the "strength" of individuals when they get too close to each other.

The lights can be driven by one or more (depending on the size of the room and density of the array) microcontrollers. Software running on the main processing machine will send instructions to the controllers when any lights need to be disabled/re-enabled.

Depending on the height of the room and the viewing angle of the LEDs obtained for the project, some kind of cover around each diode (a bit of rubber tubing or something) may be necessary to prevent the light from an individual LED from spreading out too far once it reaches the floor.

The MAX7219 LED driver seems it would make handling the LED array much easier, but does not allow for varying the intensity of individual LEDs. This may be worth the trade-off, though, and diffusion from the LEDs surrounding each dark area may end up providing the desired amount of "partly-lit" space.

Hardware

The MAX7219 driver turned out to be far too expensive to be practical (prices have risen to about 25 EUR per chip). A good (and much cheaper) alternative is the TLC5947, a 24-channel constant-current LED driver. The only issue is that the largest package it's manufactured in is HTSSOP-32. Adafruit makes a breakout board for the chip, but after shipping and VAT it comes out to around 15 EUR per board. I'm optimistic that this cost can be reduced by about half by getting a small run of PCBs printed and soldering the parts on by hand.

TLC5947 Datasheet

PCB Layout for the breakout board (adapted from Rambo's design to include onboard holes for the IREF resistor inline with ground, optional holes for a capacitor to deal with potential issues from the power source, and some reorganization of the data pins to make daisy chaining easier):

TLC5947 breakout.png


Necessary Experiments/Prototypes

Basic camera tracking in one dimension applied to LEDs in real-time
Basic camera tracking in two dimensions applied to LEDs in real-time
  • Software simulation to demonstrate the concept and evaluate different methods of handling dark areas
  • Camera Tracking
    • Basic object tracking
      • ...applied to LEDs in one dimension
      • ...applied to LEDs in two dimensions
    • Object tracking at room-scale
      • ...applied to an LED matrix
      • ...used to evaluate camera needs
      • ...used to track multiple individuals