Over a weekend back in August I wrote a C++ program that allows people to draw graffiti on any surface. The person draws using a normal red laser pointer, and a MiniDV camera then detects the red dot. The C++ program maps the laser dot from camera coordinates into OpenGL screen coordinates using a simple homography. The computer projects its screen image back onto the surface, offering a persistent view of what the user has drawn.
The system is self-calibrating on startup–it uses four green squares to generate the homography. They disappear once calibration is complete. We then use OpenGL textures to render a chalk-like pen, following the laser pointer when it’s turned on. The system can also detect crude gestures to change ink color or clear the screen.
Using a typical VGA projector, we filled the side of a seven story building at night. Above are some pictures of things we drew. Because the system recognized gestures, we could easily draw using the laser pointer from a few blocks away from the actual equipment. We used a Panasonic MiniDV camcorder connected through firewire to a Intel Core2 2.4GHz box running Gentoo Linux. The computer was connected to an Epson 2400-lumens projector through a VGA cable and pointed towards the building.
Future work includes moving to an ffmpeg-based image processing solution, instead of using pipes to pass raw image data. Gestures need work so they are detected more reliably. Some effort should also be put into the laser pointer detection, as its thresholds can vary widely under different lighting conditions.
As part of my thesis work, I’ve been writing algorithms to design wireless radio networks. One important question we needed to answer was whether a given pair of locations could communicate using a set of radio equipment. This question is pretty hard to answer because there is so much uncertainty in the real-world. If we make some simplifying assumptions, we can boil the problem down to a handful of calculations:
First we need to check if the link is line-of-sight. That is, can both the towers physically see each other, or is there a mountain in the way? We’re using high-resolution 10-meter data from USGS to walk along a path between the towers, checking for obstructions as we go. If nothing blocks the path, the link might be possible.
Next we need to check our link budget. If the radio isn’t powerful enough, it will be too weak when we reach the other tower. This boils down to a neat equation:
transmitter power (dBm) + antenna (dB) – free space (db) – Fresnel loss (db) – vegetation loss (db)
From our equipment, we know the transmitter power and antenna specifications. From the distance and terrain we can calculate free space, Fresnel, and vegetation losses. Then we compare this budget against the receiver sensitivity of the destination tower. If there is enough signal power left, the link is possible.
This is just a quick summary of what I’ve spent months writing and testing. As part of my fellowship here, I’m allowed to open-source the code I’ve written for my thesis. So if you’re interested in a fast C++ library that can do propagation testing, libprop is the way to go. It can easily read USGS terrain data, and there are some quick examples.
I’ve also written an awesome little mashup that overlays propagation images in Google Maps. It’s an instant “What if we put a tower here?” tool. Other propagation tools on the market are a few thousand bucks, and they don’t even offer anything like this. Check it out and let me know what you think.