I am doing my Bachelor's project on Road extraction. I have detected the line segments(edges) in the image using hough transform. I need to detect the curved lines in the road and link them(edge linking). help me with matlab coding.
-
$\begingroup$ have you tried sobel edge detector with some morphological operations such as dilation? $\endgroup$– lennon310Commented Feb 5, 2014 at 16:13
-
$\begingroup$ I have tried canny edge detector and hough transform so far. $\endgroup$– user3260487Commented Feb 6, 2014 at 10:03
1 Answer
One possible pre-processing apporach is to use imdilate(I,strel('disk',5))
to thicken the road lines a little bit.
If you are trying houghlines
, probably one parameter that you need to tune is the 'FillGap' which will connect the very short segments (you can try to change this parameter yourself to observe the effect, along with the MinLength
value):
lines = houghlines(BW,T,R,P,'FillGap',30,'MinLength',15);
However, the road curves are not straight lines, so I won't recommend you to use hough transform. You may try bwmorph(bw,'skel',N);
after you thicken the binarized road image. N
is the iteration number that you need to tune.