between the center points of laser light, camera, and
object. The most compelling example is the webcam-based DIY laser range finder (http://sites.google.
ranger); my design is based — in theory — on this
Referring to Figure 1, a laser diode module
shines a laser spot onto the target object. The value
h is a fixed, known distance between the center
points of the laser diode and the camera. When the
distance to the target object D changes, so do both
the angle q and the value pfc (pixels from center)
which is the number of pixels the centroid of the
primary blob (laser spot) is away from the camera’s
center point. As the object gets closer, the value of
pfc (and angle q) increases. As the object gets
farther away, pfc (and angle q) approaches zero.
Parallax’s Beau Schwabe made a very short video
that demonstrates this phenomenon:
If we know the angle q, then we
can use basic trigonometry to calculate
the distance value D:
FIGURE 1. Theory of operation for a webcam-based
DIY laser range finder.
tan q = h / D
Solving for D, we get:
D = h / tan q
Since the camera system returns a
FIGURE 2. My first successful laser range
finder prototype. The CMUcam2 and
manually-controlled laser diode are
mounted to an aluminum bracket held by
a tripod. The control circuitry is located
on the PCB in the background.
SERVO 10.2011 57