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!