FIX: number of peaks returned from feature.corner_peaks

corner_peaks accepted a num_peaks argument, but the call
to peak_local_max inside the function used np.inf instead
of the value of this keyword argument, leading to an unbounded
number of peaks being returned.
This commit is contained in:
Malcolm Reynolds
2013-03-15 18:50:43 +00:00
parent a41d74caa4
commit 44095eef81
+1 -1
View File
@@ -489,7 +489,7 @@ def corner_peaks(image, min_distance=10, threshold_abs=0, threshold_rel=0.1,
threshold_abs=threshold_abs,
threshold_rel=threshold_rel,
exclude_border=exclude_border,
indices=False, num_peaks=np.inf,
indices=False, num_peaks=num_peaks,
footprint=footprint, labels=labels)
if min_distance > 0:
coords = np.transpose(peaks.nonzero())