From 172cbd58e0bb8d7d3ee26c18b90e4754181eeac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Wed, 22 Jan 2014 19:34:48 -0500 Subject: [PATCH] Rename CenSurE to CENSURE --- doc/examples/plot_censure.py | 10 +++++----- skimage/feature/__init__.py | 4 ++-- skimage/feature/censure.py | 12 ++++++------ skimage/feature/tests/test_censure.py | 14 +++++++------- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/doc/examples/plot_censure.py b/doc/examples/plot_censure.py index 41f20496..c7d70ea5 100644 --- a/doc/examples/plot_censure.py +++ b/doc/examples/plot_censure.py @@ -1,16 +1,16 @@ """ ======================== -CenSurE feature detector +CENSURE feature detector ======================== -The CenSurE feature detector is a scale-invariant center-surround detector -(CenSurE) that claims to outperform other detectors and is capable of real-time +The CENSURE feature detector is a scale-invariant center-surround detector +(CENSURE) that claims to outperform other detectors and is capable of real-time implementation. """ from skimage import data from skimage import transform as tf -from skimage.feature import CenSurE +from skimage.feature import CENSURE from skimage.color import rgb2gray import matplotlib.pyplot as plt @@ -20,7 +20,7 @@ tform = tf.AffineTransform(scale=(1.5, 1.5), rotation=0.5, translation=(150, -200)) img2 = tf.warp(img1, tform) -detector = CenSurE() +detector = CENSURE() fig, ax = plt.subplots(nrows=1, ncols=2) diff --git a/skimage/feature/__init__.py b/skimage/feature/__init__.py index 2402d0ea..1b1cb189 100644 --- a/skimage/feature/__init__.py +++ b/skimage/feature/__init__.py @@ -10,7 +10,7 @@ from .corner import (corner_kitchen_rosenfeld, corner_harris, from .corner_cy import corner_moravec, corner_orientations from .template import match_template from .brief import BRIEF -from .censure import CenSurE +from .censure import CENSURE from .orb import ORB from .match import match_descriptors from .util import plot_matches @@ -37,7 +37,7 @@ __all__ = ['daisy', 'corner_orientations', 'match_template', 'BRIEF', - 'CenSurE', + 'CENSURE', 'ORB', 'match_descriptors', 'plot_matches'] diff --git a/skimage/feature/censure.py b/skimage/feature/censure.py index c111bc0f..24d7e62d 100644 --- a/skimage/feature/censure.py +++ b/skimage/feature/censure.py @@ -111,9 +111,9 @@ def _suppress_lines(feature_mask, image, sigma, line_threshold): -class CenSurE(FeatureDetector): +class CENSURE(FeatureDetector): - """CenSurE keypoint detector. + """CENSURE keypoint detector. min_scale : int, optional Minimum scale to extract keypoints from. @@ -149,7 +149,7 @@ class CenSurE(FeatureDetector): References ---------- .. [1] Motilal Agrawal, Kurt Konolige and Morten Rufus Blas - "CenSurE: Center Surround Extremas for Realtime Feature + "CENSURE: Center Surround Extremas for Realtime Feature Detection and Matching", http://link.springer.com/content/pdf/10.1007%2F978-3-540-88693-8_8.pdf @@ -162,9 +162,9 @@ class CenSurE(FeatureDetector): -------- >>> from skimage.data import lena >>> from skimage.color import rgb2gray - >>> from skimage.feature import CenSurE + >>> from skimage.feature import CENSURE >>> img = rgb2gray(lena()[100:300, 100:300]) - >>> censure = CenSurE() + >>> censure = CENSURE() >>> censure.detect(img) >>> censure.keypoints array([[ 71, 148], @@ -208,7 +208,7 @@ class CenSurE(FeatureDetector): self.scales = None def detect(self, image): - """Detect CenSurE keypoints along with the corresponding scale. + """Detect CENSURE keypoints along with the corresponding scale. Parameters ---------- diff --git a/skimage/feature/tests/test_censure.py b/skimage/feature/tests/test_censure.py index 05348d43..f1d88f3d 100644 --- a/skimage/feature/tests/test_censure.py +++ b/skimage/feature/tests/test_censure.py @@ -1,7 +1,7 @@ import numpy as np from numpy.testing import assert_array_equal, assert_raises from skimage.data import moon -from skimage.feature import CenSurE +from skimage.feature import CENSURE img = moon() @@ -9,25 +9,25 @@ img = moon() def test_keypoints_censure_color_image_unsupported_error(): """Censure keypoints can be extracted from gray-scale images only.""" - assert_raises(ValueError, CenSurE().detect, np.zeros((20, 20, 3))) + assert_raises(ValueError, CENSURE().detect, np.zeros((20, 20, 3))) def test_keypoints_censure_mode_validity_error(): """Mode argument in keypoints_censure can be either DoB, Octagon or STAR.""" - assert_raises(ValueError, CenSurE, mode='dummy') + assert_raises(ValueError, CENSURE, mode='dummy') def test_keypoints_censure_scale_range_error(): """Difference between the the max_scale and min_scale parameters in keypoints_censure should be greater than or equal to two.""" - assert_raises(ValueError, CenSurE, min_scale=1, max_scale=2) + assert_raises(ValueError, CENSURE, min_scale=1, max_scale=2) def test_keypoints_censure_moon_image_dob(): """Verify the actual Censure keypoints and their corresponding scale with the expected values for DoB filter.""" - detector = CenSurE() + detector = CENSURE() detector.detect(img) expected_keypoints = np.array([[ 21, 497], [ 36, 46], @@ -48,7 +48,7 @@ def test_keypoints_censure_moon_image_octagon(): """Verify the actual Censure keypoints and their corresponding scale with the expected values for Octagon filter.""" - detector = CenSurE(mode='octagon') + detector = CENSURE(mode='octagon') detector.detect(img) expected_keypoints = np.array([[ 21, 496], [ 35, 46], @@ -65,7 +65,7 @@ def test_keypoints_censure_moon_image_octagon(): def test_keypoints_censure_moon_image_star(): """Verify the actual Censure keypoints and their corresponding scale with the expected values for STAR filter.""" - detector = CenSurE(mode='star') + detector = CENSURE(mode='star') detector.detect(img) expected_keypoints = np.array([[ 21, 497], [ 36, 46],