Cannot find hough all lines in this simple image
조회 수: 1 (최근 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
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!