1 | initial version |
Always try to break down your problem into more simple parts. Whilst there may not be many examples of people trying to measure the width of roads, there are many people doing similar things that could help. This problem could be broken into two steps:
There are many ways to detect edges using opencv, I suggest starting here: http://docs.opencv.org/2.4/doc/tutorials/imgproc/table_of_content_imgproc/table_of_content_imgproc.html#table-of-content-imgproc More specifically for edges of a road, here's an example of one to get started: https://mistywest.com/machine-learning-lane-detection/
Once you've figured out a robust way of finding the edges, you'll need to calibrate the camera at a certain distance in order to get the resolution. Again, there are many ways you could do this, but opencv have a nice example using a checkerboard here: http://docs.opencv.org/2.4/doc/tutorials/calib3d/camera_calibration/camera_calibration.html
Hope that helps, Dave