How to make a road lane for a synthetic image in gray scale?
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Massimo Zanetti
2016-12-20
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);
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!