From fe2e214385146ef93621698bf6475d8be6e0f51a Mon Sep 17 00:00:00 2001 From: Ankit Agrawal Date: Fri, 6 Sep 2013 02:49:37 +0530 Subject: [PATCH] Adding example in descriptor_orb --- skimage/feature/orb.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/skimage/feature/orb.py b/skimage/feature/orb.py index 81bf4867..09ed18ab 100644 --- a/skimage/feature/orb.py +++ b/skimage/feature/orb.py @@ -138,6 +138,21 @@ def descriptor_orb(image, keypoints, orientations, scales, "ORB : An efficient alternative to SIFT and SURF" http://www.vision.cs.chubu.ac.jp/CV-R/pdf/Rublee_iccv2011.pdf + Examples + -------- + >>> from skimage.data import lena + >>> from skimage.color import rgb2gray + >>> from skimage.feature import keypoints_orb, descriptor_orb + >>> img = rgb2gray(lena()) + >>> keypoints, orientations, scales = keypoints_orb(img, n_keypoints=250) + >>> keypoints.shape + (250, 2) + >>> descriptors, filtered_keypoints = descriptor_orb(img, keypoints, orientations, scales) + >>> filtered_keypoints.shape + (246, 2) + >>> descriptors.shape + (246, 256) + """ image = np.squeeze(image) if image.ndim != 2: