How to detect the limits of the road?

1 view (last 30 days)
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
bogdan bogdan
bogdan bogdan on 6 Jun 2016
I need an answer to my question that I do not know how to respond. After all what's your problem?

Sign in to comment.

Accepted Answer

John BG
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
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
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.

Sign in to comment.

More Answers (1)

Image Analyst
Image Analyst on 6 Jun 2016

Categories

Find more on Convert Image Type in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!