1

I'm learning matlab with imgtoolbox atm. I found some excersie to practice on but there's one I don't know how to do. The problem is that: there's an image with a highway on it. You need to detect and mark the lanes then color it with different colors. Here's the starting image: enter image description here

And this is how it should looks like at the end: enter image description here

I can't make a working code in matlab :(

codeaviator
  • 2,545
  • 17
  • 42
Poko
  • 149
  • 1
  • 2
  • 9
  • i tried to detect the area between the border and the broken line but it didnt worked yet. – Poko May 03 '15 at 07:45
  • start with detecting White(ish) ,yellow/orange, and gray/black areas, then decide which are the border lines and road by area,aspect ratio, orientation,location excluding invalid areas and then from what is left divide the road to lanes – Spektre May 03 '15 at 09:17
  • yea i was trying to do that. how it should looks like in code? – Poko May 03 '15 at 09:30
  • do not use Matlab so I cant help you there, convert to HSV, do a Histogram extract the most ocurent colors from it check if they match road or line color or it is background then mask image pixel by pixel removing unnecesarry info from image then find lines (hough tranform or directly by segmentation) create road polygon and fill it ... look here [HSV histogram](http://stackoverflow.com/a/29286584/2521214) the same can be done also on RGB but that is a bit more problematic... start coding and only then you will see what way is the best PS add @nick to comment to notify the nick person !!! – Spektre May 04 '15 at 07:58
  • Check out the example lane departure system at http://www.mathworks.com/examples/simulink-computer-vision/719-lane-departure-warning-system – Navan May 04 '15 at 14:04

0 Answers0