2D Laser Range Finder

Ever since I read Ken Maxon’s article: ‘A Real-time Laser Range Finding Vision System’, I’ve wanted to experiment with a similar system. This past Sunday afternoon, I finally got around to it. I don’t have any CLPD chops, so I used a regular computer. Above you can see my initial rough results. The line laser registers lower in the image field for the block than for the background. The software properly converted that lower registration to a distance of about 26.5 inches.

The idea behind the concept is fairly straight forward. By angling and elevating the camera relative to the laser we can establish a trigonometric relationship between the vertical location of the laser and the distance to the object that the laser is striking. Since the laser is a line on the screen, each pixel column in the image field becomes it’s own independent laser range finder.

In the picture above four possible angles are shown to demonstrate that each angle corresponds to a different obstruction distance.

Each possible height in the image field corresponds to a specific angle of light into the camera’s roughly conical field of view. The line from the laser’s point of impact to the camera, the vertical line from the camera to the laser generator and the horizontal laser line itself form a right triangle that allows us to compute distance. By dividing the angular field of vision by the number of rows in the the camera we come up with a formula to compute the angle of entry for the reflected laser light for each of the rows in the camera. We also know the distance from the camera to the laser generator. (Its fixed). Pluging the angle and the vertical distance in the trigonmetry equation: tangent of theta equals the opposite leg length divided by the adjacent leg length, and re-arranging, we compute the opposite leg length and determine how far away the object is.

You can see my software doing just that in the first picture. The software doesn’t compensate for the fact that the horizontal pixels are each their own angle as well, but in this first rough pass I felt it wasn’t necessary. You’ll note the the software makes no attempt to measure the left/right distances.

With a sub 5mW power level and a popular frequency (red), something like is probably restricted to a small indoor bot with somewhat short range needs. Still in complement to other scanning systems like a spinning ultra sonic range finder, I can see this adding mechanism to the reliability of local environment mapping system. If I ever build my home security patrol bot, I’ll definitely think about this technique.

Below you can see the rig I used to test this idea out. It’s pretty basic but it got the job done. To the left you see the paper back drop and the paper obstruction. To the right you can see the line laser generator sitting at the bottom of the dremel drill press with the webcam perched on top.