求能够运行的用matlab进行hough变换直线检测的程序。急!
类似:http://hi.baidu.com/hpc%5Frobot/blog/item/82f851ec61fbdd2f63d09f7e.html里面的程序。可加分啊!...
类似:http://hi.baidu.com/hpc%5Frobot/blog/item/82f851ec61fbdd2f63d09f7e.html
里面的程序。
可加分啊! 展开
里面的程序。
可加分啊! 展开
1个回答
展开全部
直接运行:
RGB = imread('gantrycrane.png');
I = rgb2gray(RGB); % convert to intensity
BW = edge(I,'canny'); % extract edges
[H,T,R] = hough(BW,'RhoResolution',0.5,'ThetaResolution',0.5);
% display the original image
subplot(2,1,1);
imshow(RGB);
title('gantrycrane.png');
% display the hough matrix
subplot(2,1,2);
imshow(imadjust(mat2gray(H)),'XData',T,'YData',R,...
'InitialMagnification','fit');
title('Hough transform of gantrycrane.png');
xlabel('\theta'), ylabel('\rho');
axis on, axis normal, hold on;
colormap(hot);
RGB = imread('gantrycrane.png');
I = rgb2gray(RGB); % convert to intensity
BW = edge(I,'canny'); % extract edges
[H,T,R] = hough(BW,'RhoResolution',0.5,'ThetaResolution',0.5);
% display the original image
subplot(2,1,1);
imshow(RGB);
title('gantrycrane.png');
% display the hough matrix
subplot(2,1,2);
imshow(imadjust(mat2gray(H)),'XData',T,'YData',R,...
'InitialMagnification','fit');
title('Hough transform of gantrycrane.png');
xlabel('\theta'), ylabel('\rho');
axis on, axis normal, hold on;
colormap(hot);
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询