
It is amazing what you can accomplish with a web cam, cheap laser pointer and a bit of C++ coding. The complete build, along with all the source code, is available on the site. – Link
There are many off the shelf range finding components available including ultrasonic, infrared, and even laser rangefinders. All of these devices work well, but in the field of aerial robotics, weight is a primary concern. It is desirable to get as much functionality out of each component that is added to an airframe. This page describes how a mini laser pointer can be configured along with a single camera to provide mono-machine vision with range information.










Rotate the camera 90 degrees for more pixels to play with.
Loved this project. I will be trying this soon myself. Some thoughts on possible improvements (at the cost of some complexity).
Instead of looking JUST for the brightest dot, you may wish to process a variable number of adjacent pixels (especially if the dot smears), and use an algorithm (TBD) to find the interpolated non-integer value of the max pixel. You will likely improve your accuracy beyong the inherent resolution of the camera.
This will likely make this project’s base accuracy depend on the physical alignment and calibrations.
Excellent article!
The math can be simplified to eliminate the trigonometry. Looking at the drawing, you can see that there are two similar right triangles: one with legs D and h, and a similar but smaller triangle inside the camera with legs we will call D2 and h2. Since the angles are similar, the legs are proportional such that D/h=D2/h2. h2 is the number of pixels from the center of focus (pfc in the article). Since h and D2 are fixed, we can let a constant r=h*D2. Then, D=r/h2, and r can be derived through the calibration process. Note: this assumes the two axes are parallel, but should be close enough for small deviations.
i love trying this project.since i’m a beginner, i dont understand how to calculate the gain constant and offset constant.anyone can help me?
// What's Trending
Raspberry Pi Design Contest
Maker Faire: Day One
A Photo Tour of Maker Faire
Arduino Announces New Wireless Linux Board
Seventeen Sneaky Secret Hides
10 Things to Connect to Your Raspberry Pi
Radio Shack Unveils the New Delta Series Mini PC Board at Maker Faire
I Have a (Puzzling) Dream
// What's Shared
A better way to slice a pumpkin
DIY Nerf Darts
In the Maker Shed: Minty Boost USB Charger
100 Dollar Store Organization Ideas for Craft Rooms and Beyond
Mad’s Mouse House
Lace Princess Crowns
I Have a (Puzzling) Dream
Play the Rings of a Tree Trunk Like a Record
// Most Commented
DIY Hacks & How To’s: Get Emergency Power from a Phone Line
Resin Casting: Going from CAD to Engineering-Grade Plastic Parts
Ten Tips for Screws and Screwdrivers
Ten Tips for Better Measurement
Makers on TV: Big Brain Theory
Grow: A Portable CNC Router System
Tool Review: BioLite CampStove
Pitches with Prototypes: Solar Tracker