Cannot find hough all lines in this simple image

2 次查看(过去 30 天)
Hi, I´m trying to identify the lines present in the figure to figure it out after if it is a rectangle or not. I´m struggling, could you help me? I´m finding three, is missing one and the other didnt fit the whole side.
[H, theta, rho] = hough(g_edge1,'RhoResolution',0.5,'ThetaResolution',0.5);
peaks = houghpeaks(H, 10);
% Use Matlab's Hough lines
lines = houghlines(g_edge1, theta, rho, peaks);
figure, imshow(g_edge1);
for k = 1:length(lines)
xy = [lines(k).point1; lines(k).point2];
line(xy(:,1),xy(:,2),'LineWidth',1,'Color','g');
end

回答(0 个)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by