mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-12 12:30:16 +08:00
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:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user