資源簡介
對(duì)于非車道線或者車道線缺失情況下的道路進(jìn)行檢測識(shí)別
代碼片段和文件信息
clear?all
rgb1?=?imread(‘Road1.tif‘);
RGB=rgb2gray(rgb1);
%對(duì)圖像進(jìn)行邊緣檢測
BW?=?edge(RGB‘sobel‘0.1);
imshow(BW);
title(‘Figure1‘);
%對(duì)檢測結(jié)果進(jìn)行Hough變換
[HTR]?=?hough(BW‘ThetaResolution‘1‘RhoResolution‘10);
imshow(H[]‘XData‘T‘YData‘R‘InitialMagnification‘‘fit‘);
xlabel(‘\theta‘)ylabel(‘r‘);
axis?onaxis?normalhold?on;
%對(duì)Hough變換中的密集交點(diǎn)進(jìn)行檢測
P=?houg
評(píng)論
共有 條評(píng)論