From 85efc6a2cd4143b5c27861b5779b5fc304685f47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Sat, 30 Nov 2013 10:58:38 +0100 Subject: [PATCH] Add example to doc string of CenSurE --- skimage/feature/censure.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/skimage/feature/censure.py b/skimage/feature/censure.py index a2830033..f201e12f 100644 --- a/skimage/feature/censure.py +++ b/skimage/feature/censure.py @@ -151,6 +151,32 @@ class CenSurE(FeatureDetector): Descriptors in the Context of Robot Navigation" http://www.jamris.org/01_2013/saveas.php?QUEST=JAMRIS_No01_2013_P_11-20.pdf + Examples + -------- + >>> from skimage.data import lena + >>> from skimage.color import rgb2gray + >>> from skimage.feature import CenSurE + >>> img = rgb2gray(lena()[100:300, 100:300]) + >>> keypoints, scales = CenSurE().detect(img) + >>> keypoints + array([[ 71, 148], + [ 77, 186], + [ 78, 189], + [ 89, 174], + [127, 134], + [131, 133], + [134, 125], + [137, 125], + [149, 36], + [162, 165], + [168, 167], + [170, 5], + [171, 29], + [179, 20], + [194, 65]]) + >>> scales + array([2, 4, 2, 3, 4, 2, 2, 3, 4, 6, 3, 2, 3, 4, 2]) + """ def __init__(self, min_scale=1, max_scale=7, mode='DoB',