Skip to content

Commit

Permalink
Merge pull request scikit-image#1137 from sciunto/doc
Browse files Browse the repository at this point in the history
DOC: introduce variable num_peaks for reusability
  • Loading branch information
jni committed Sep 8, 2014
2 parents 9077338 + 9214e81 commit 865cc1b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions doc/examples/plot_circular_elliptical_hough_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,11 @@

for radius, h in zip(hough_radii, hough_res):
# For each radius, extract two circles
peaks = peak_local_max(h, num_peaks=2)
num_peaks = 2
peaks = peak_local_max(h, num_peaks=num_peaks)
centers.extend(peaks)
accums.extend(h[peaks[:, 0], peaks[:, 1]])
radii.extend([radius, radius])
radii.extend([radius] * num_peaks)

# Draw the most prominent 5 circles
image = color.gray2rgb(image)
Expand Down

0 comments on commit 865cc1b

Please sign in to comment.