Cannot find hough all lines in this simple image

2 views (last 30 days)
5mid
5mid on 18 Nov 2017
Edited: 5mid on 18 Nov 2017
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

Answers (0)

Community Treasure Hunt

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

Start Hunting!