How to detect the limits of the road?
1 view (last 30 days)
Show older comments
I did a project for detecting the street and want to know how to detect the limits of asphalt, left and right, from the midpoint.
Original Photo

Binary Photo

3 Comments
Accepted Answer
John BG
on 6 Jun 2016
Hi Bogdan
just answered a similar question
A(find(A>125))=255; A(find(A<=125))=0; % basic image clean-up converting to binary map
A(:,:,2)=and(A(:,:,2),A(:,:,3));A(:,:,3)=[];
A=and(A(:,:,1),A(:,:,2));
A=logical(~A);
% figure(1);imshow(A)
A2=del2(A)
figure(3);imshow(A2)

If you find this answer of any help solving your question,
please click on the thumbs-up vote link, or mark it as accepted answer
thanks in advance
John
8 Comments
Anas Al-Shaghouri
on 16 Dec 2019
Hello
Can you help me in this.
This command is not running:
A2=del2(A);
And giving me this error:
"Error using zeros
CLASSNAME input must be a valid numeric class name.
Error in del2 (line 43)
v = zeros(size(f),class(f));"
Image Analyst
on 17 Dec 2019
Anas, I think you posted this in the wrong place. It doesn't seem to have anything to do with anything on this page. But the line of code seems to be saying that f is not one of the standard MATLAB classes. It's probably some special variable that you defined, like a class or something.
More Answers (1)
Image Analyst
on 6 Jun 2016
Pick one of the many papers on the subject here: http://www.visionbib.com/bibliography/contentsactive.html#Active%20Vision,%20Camera%20Calibration,%20Mobile%20Robots,%20Navigation,%20Road%20Following Then code it up.
0 Comments
See Also
Categories
Find more on Convert Image Type in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!