From 50ac1e89af799de23d8c37e3f0b24a3dfad75f0b Mon Sep 17 00:00:00 2001 From: Ankit Agrawal Date: Sat, 6 Jul 2013 20:34:32 +0800 Subject: [PATCH] Fixing bug in _remove_border_keypoints --- skimage/feature/util.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/skimage/feature/util.py b/skimage/feature/util.py index b634305b..c77421d7 100644 --- a/skimage/feature/util.py +++ b/skimage/feature/util.py @@ -7,10 +7,10 @@ def _remove_border_keypoints(image, keypoints, dist): width = image.shape[0] height = image.shape[1] - keypoints = keypoints[(dist < keypoints[:, 0]) - & (keypoints[:, 0] < width - dist) - & (dist < keypoints[:, 1]) - & (keypoints[:, 1] < height - dist)] + keypoints = keypoints[(dist - 1 < keypoints[:, 0]) + & (keypoints[:, 0] < width - dist + 1) + & (dist - 1 < keypoints[:, 1]) + & (keypoints[:, 1] < height - dist + 1)] return keypoints