Smartphone And IR Line Laser Measure Distance

Measuring the distance using lasers is a mainstay of self-driving vehicles and ambitious robotics projects. The fine folks at MIT’s Computer Science and Artificial Intelligence Laboratory (CSAIL) decided to tackle the problem in an innovative way. [Jason H. Gao] and [Li-Shiuan Peh] used an infra-red (IR) line laser and the camera on a smartphone. Their prototype cost only $49 since they used a smartphone that was on hand. The article reports good results using the device outdoors in direct sunlight which is often a challenge for inexpensive lidars.

The line laser creates a horizontal line that is reflected back to the camera on the phone. The vertical position of the laser on the camera image lets the phone calculate the distance by parallax. To bring out a faint laser reflection, the algorithm compares four images – two with the laser on and two with it off – and subtracts the background. Using a smartphone for this is ideal since it automatically adjusts for light level and can easily be upgraded to a newer phone with a better camera later.

This should be a cheap and easily replicable setup. If you make one of these, let us know. If you need something more refined, check out this post on interfacing the Neato vacuum cleaner’s XV-11a lidar with the Raspberry Pi.

Some previous hobby work by [Jonathan Piat] in 2014 was similar, using a visible line laser, a BeagleBone, and a LOGI-Bone FPGA cape to handle the processing.

12 thoughts on “Smartphone And IR Line Laser Measure Distance

  1. I’am really surprised that they got published with this hack … I haven’t read the full paper, so there might still be something original in their work but the method is state of the art.

    1. It’s state of the art on hackaday to publish boring stuff like this.
      I especially don’t like this sentence: ” The fine folks at MIT’s Computer Science and Artificial Intelligence Laboratory (CSAIL) decided to tackle the problem in an innovative way.”

      There is nothing innnovative about doing laser triangulation with a cell phone camera.

      I would love to see some quality over quantity on HaD. They simply post any garbage without reflecting on it and without adding any value for the reader at all.

  2. That is elegant, well the idea is anyway. :-) And because it is on a smart phone you can sweep the phone and know the angle it is at which gives you a 3D scan when you assemble the captured contours into a surface.

  3. Haven’t read the paper either, this fails to impress me: Line laser trigonometry is as old as webcams and has been used in hobby robotics for decades. Using a phone only shows your Android programming skills on very basic stuff. In respect to the processing power of phones today, they could at least have made a rough Kinect like system to get a 2D scan with maybe just 100 unique dots. What is more interesting nowadays is monocular SLAM and optical flow. Monocular slam (real time photometry) is maybe too intensive for phones just yet, but optical flow is enough to avoid collisions for robots. Why the application with the car? Do they seriously think that a laser line system is sufficient for anything else than navigating empty halls with vertical white walls?

    As for relevance to Hackaday, sure this is interesting from a hobbyist’s perspective as it looks easily doable at low cost, so thumbs up, but is this undergraduate stuff now coming out of MIT because of the common core curriculum infecting universities?

  4. I just read the paper. They mostly tell us why their design is superior than other cheap designs like the Neato spinning Lidar or a Kinect. Their main advantage is the line laser’s power that enables the system to work outdoor and the high computational power. There isn’t anything really new I guess, except you have never heard of line lasers for triangulation.
    Sadly they don’t discuss their weakspots in an adequate way, poor horizontal field of view vs 360° Neato or only linear distance measuring vs 2d @ Kinect or poor and odd behaving accuracy at different distances.

    1. Well yeah they could always have the phone move because it can already track motion, then it can scan. Rotate it 90 degrees to the laser line is vertical, then spin it around the vertical axis and it covers the same area/surface as the Neato?

  5. Could they pulse the laser to improve sunlight results? Turn the knob to 11 and sync the brighter pulse to one of X frame grabs? That’s possible with LEDs, what about lasers? I know nothing about them. Anyone got a good source of practical info? Would higher speed cameras be better? What if they put a tighter red filter over the lens? They appear to be using an inexpensive filter that’s orders of magnitude wider than their laser’s output bandwidth.

    Woah, was that an on-topic, possibly helpful comment not denigrating anyone? I’m sooo sorry everyone.

    To win some epeen points, I will say it has been done better and many many times before.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.