Shop OBEX P1 Docs P2 Docs Learn Events
Highway fog line tracking — Parallax Forums

Highway fog line tracking

Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
edited 2009-09-30 16:20 in Accessories
In another thread, there was a query about lane (white line) detection with an eye on autoguiding a vehicle. I decided to see if the TSL1401-DB linescan imager in conjunction with a MoBoStamp-pe would be a reasonable tool to use for tracking the fog line along a road shoulder. I mounted the boards at the end of a long 1x2 thus:

attachment.php?attachmentid=64064

The 1x2 was hung out of the car window, and the sensor/MoBo combo was connected to a laptop in the car via the USB cable (which also powers everything):

attachment.php?attachmentid=64065

Then, with the TSL1401 Monitor Program running to capture every detail, I drove slowly down the road to see what the line sensor would pick up. I set the exposure time to AUTO, which continuously compensates for changing ambient light conditions. Here's a screen capture, taken at the end of my track:

attachment.php?attachmentid=64066

The gray-level image at the top comes from all the individual scans, stacked side by side. The white line (and my erratic driving) are very visible. The "noisy" section on the left is from a gravel parking lot before I entered the road. The vertical white stripe is a painted crosswalk.

The "scope" trace in the lower part of the image is an instantaneous snapshot of the pixel intensities across the field of view. (With the included lens, the field of view is equal to the subject distance.) I set the comparator threshold and hysteresis to capture the edges of the line and used the "light object" locator to find its center (vertical yellow line). The MoBo's coprocessor firmware for the TSL1401-DB is preprogrammed to perform these edge-locating functions, freeing the BASIC Stamp for the things it's best at.

In conclusion, it looks like the linescan sensor had no trouble detecting the white line. Of course, not all fog lines are this fresh and bright, so one's results may vary. But the TSL1401/MoBo combination could very well be worth considering for an app like this.

-Phil

Post Edited (Phil Pilgrim (PhiPi)) : 9/28/2009 9:15:55 PM GMT

Comments

  • sylvie369sylvie369 Posts: 1,622
    edited 2009-09-28 21:26
    I had no idea they were called "fog lines", but after an experience I had with heavy fog about four years ago, I understand why. Without them, I'd have been in the ditch for sure.

    Wow. This combination opens up a lot of new ideas.
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2009-09-28 22:12
    Phil

    I like this ·idea.gif·but I see a few problem with this

    What happen when the white line is not there because of an exit to another road

    What about being in the second·lane where the line is like this ___··· ___

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them smile.gif

    ·
    ·
    ·
    ·
    Sam
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-09-28 22:25
    Sam,

    The problems you mention are just a small sample of the things can can crop up in the real world. That's what makes the DARPA Challenge so hard for its contestents. In real-life, uncontrolled conditions, adaptable software and redundant sensor technologies are called for — not to mention a heap of ingenuity!

    -Phil
  • dev/nulldev/null Posts: 381
    edited 2009-09-30 09:16
    Very nice project Phil!!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't worry. Be happy
  • jazzedjazzed Posts: 11,803
    edited 2009-09-30 16:20
    Fascinating. Wonder how the bumps on the freeway at 65MPH would look.
Sign In or Register to comment.