Skip to content

Commit

Permalink
Wrap lines
Browse files Browse the repository at this point in the history
  • Loading branch information
ahojnnes committed Feb 22, 2013
1 parent 6cb47a6 commit b716d8b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions skimage/transform/_hough_transform.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ def _probabilistic_hough(np.ndarray img, int value_threshold,
# if non-zero point found, continue the line
if mask[y1, x1]:
if good_line:
accum_idx = <int>round((ctheta[j] * x1 + stheta[j] * y1)) + offset
accum_idx = <int>round((ctheta[j] * x1 \
+ stheta[j] * y1)) + offset
accum[accum_idx, max_theta] -= 1
mask[y1, x1] = 0
# exit when the point is the line end
Expand All @@ -227,7 +228,8 @@ def _probabilistic_hough(np.ndarray img, int value_threshold,

# add line to the result
if good_line:
lines.append(((line_end[0, 0], line_end[0, 1]), (line_end[1, 0], line_end[1, 1])))
lines.append(((line_end[0, 0], line_end[0, 1]),
(line_end[1, 0], line_end[1, 1])))
if len(lines) > lines_max:
return lines

Expand Down

0 comments on commit b716d8b

Please sign in to comment.