How to make a road lane for a synthetic image in gray scale?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Erika
am 20 Dez. 2016
Kommentiert: Erika
am 21 Dez. 2016
I'm trying to make a synthetic image in gray scale with some lines to simulate a road lane similar to the image attached. I appreciate any help.
0 Kommentare
Akzeptierte Antwort
Massimo Zanetti
am 20 Dez. 2016
Here it is:
%create one element
Z = zeros(100,101);
%lateral lanes
Z(:,[11:15,87:91]) = 1;
%mid lane (dashed)
Z(1:50,49:53) = 1;
%repeat element N times to create the road pattern
N = 4;
Z = repmat(Z,N,1);
%show image
imshow(Z);
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!