Advertisement
Tal_Rofe

t4_5

Jan 21st, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.39 KB | None | 0 0
  1. function[] = circleHoughFunc(image)
  2.     e = edge(image, 'canny');
  3.     radii = 20:1:50;
  4.     h = circle_hough(e, radii, 'same', 'normalise');
  5.     peaks = circle_houghpeaks(h, radii, 'nhoodxy', 41, 'nhoodr', 51, 'npeaks', 14);
  6.     imshow(image);
  7.     hold on;
  8.     for peak = peaks
  9.         [x, y] = circlepoints(peak(3));
  10.         plot(x+peak(1), y+peak(2), 'g-');
  11.     end
  12.     hold off
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement