From 63f17344e59f0fa27920a9221ddb28fe64dec0b7 Mon Sep 17 00:00:00 2001 From: Tony S Yu Date: Mon, 9 Jan 2012 22:24:56 -0500 Subject: [PATCH] Fix peak detection algorithm. Reverse sorted values so that max peak is checked first. --- skimage/filter/harris.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skimage/filter/harris.py b/skimage/filter/harris.py index b0add2cd..2f5b2198 100644 --- a/skimage/filter/harris.py +++ b/skimage/filter/harris.py @@ -103,7 +103,7 @@ def harris(image, min_distance=10, threshold=0.1, eps=1e-6, candidate_values = harrisim[candidates] # sort candidates - index = np.argsort(candidate_values) + index = np.argsort(candidate_values)[::-1] # store allowed point locations in array allowed_locations = np.zeros(harrisim.shape)