ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Your task is similar to finding lane lines on a road. You can try the following approach

image description

  1. Make bird eye view image
  2. Extract white pixels by color threshold or gradients or some combined technique
  3. Split your image vertically by line of some height like 50 pixels
  4. Build histogram of bottom line
  5. Find coordinates of X where histogram peaks are appear, using come assumptions about lane width.
  6. Switch to next line and start search from X coordinate that previous line was found using sliding window. Extract center of mass in the window by color and get new centers coordinates by X
  7. Repeat step 6 to top line
  8. Approximate found coordinates by spline Now you found both lines.

You can find detailed description here. BTW, this is a course project offered by Udacity learning platform. You can find a bunch of implementations of this project on github by googling 'udacity advanced lane lines'.