Highway fog line tracking
Phil Pilgrim (PhiPi)
Posts: 23,514
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:
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):
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:
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
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):
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:
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
Wow. This combination opens up a lot of new ideas.
I like this ··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··that you may have and all of your time finding them
·
·
·
·
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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Don't worry. Be happy