diff --git a/doc/examples/plot_censure_keypoints.py b/doc/examples/plot_censure_keypoints.py deleted file mode 100644 index fbba4e1b..00000000 --- a/doc/examples/plot_censure_keypoints.py +++ /dev/null @@ -1,54 +0,0 @@ -""" -========================= -CenSurE Feature Detection -========================= - -In this example we detect and plot the CenSurE (Center Surround Extrema) -features at various scales using Difference of Boxes, Octagon and Star shaped -bi-level filters. - -""" - -from skimage.feature import keypoints_censure -from skimage.data import lena -from skimage.color import rgb2gray -import matplotlib.pyplot as plt - -# Initializing the parameters for Censure keypoints -img = lena() -gray_img = rgb2gray(img) -min_scale = 2 -max_scale = 6 -non_max_threshold = 0.15 -line_threshold = 10 - - -_, ax = plt.subplots(nrows=(max_scale - min_scale - 1), ncols=3, - figsize=(6, 6)) -plt.subplots_adjust(wspace=0.02, hspace=0.02, top=0.94, - bottom=0.02, left=0.06, right=0.98) - -# Detecting Censure keypoints for the following filters -for col, mode in enumerate(['dob', 'octagon', 'star']): - - ax[0, col].set_title(mode.upper(), fontsize=12) - - keypoints, scales = keypoints_censure(gray_img, min_scale, max_scale, - mode, non_max_threshold, - line_threshold) - - # Plotting Censure features at all the scales - for row, scale in enumerate(range(min_scale + 1, max_scale)): - mask = scales == scale - x = keypoints[mask, 1] - y = keypoints[mask, 0] - s = 0.5 * 2 ** (scale + min_scale + 1) - ax[row, col].imshow(img) - ax[row, col].scatter(x, y, s, facecolors='none', edgecolors='b') - ax[row, col].set_xticks([]) - ax[row, col].set_yticks([]) - ax[row, col].axis((0, img.shape[1], img.shape[0], 0)) - if col == 0: - ax[row, col].set_ylabel('Scale %d' % scale, fontsize=12) - -plt.show() diff --git a/skimage/feature/__init__.py b/skimage/feature/__init__.py index bde81e59..4a6518d6 100644 --- a/skimage/feature/__init__.py +++ b/skimage/feature/__init__.py @@ -7,9 +7,7 @@ from .corner import (corner_kitchen_rosenfeld, corner_harris, corner_peaks) from .corner_cy import corner_moravec from .template import match_template -from ._brief import brief, match_keypoints_brief -from .util import pairwise_hamming_distance -from .censure import keypoints_censure + __all__ = ['daisy', 'hog', @@ -24,8 +22,4 @@ __all__ = ['daisy', 'corner_subpix', 'corner_peaks', 'corner_moravec', - 'match_template', - 'brief', - 'pairwise_hamming_distance', - 'match_keypoints_brief', - 'keypoints_censure'] + 'match_template'] diff --git a/skimage/feature/_brief.py b/skimage/feature/_brief.py index 27a8d085..ecc2ec11 100644 --- a/skimage/feature/_brief.py +++ b/skimage/feature/_brief.py @@ -9,7 +9,9 @@ from ._brief_cy import _brief_loop def brief(image, keypoints, descriptor_size=256, mode='normal', patch_size=49, sample_seed=1, variance=2): - """Extract BRIEF Descriptor about given keypoints for a given image. + """**Experimental function**. + + Extract BRIEF Descriptor about given keypoints for a given image. Parameters ---------- @@ -178,7 +180,9 @@ def brief(image, keypoints, descriptor_size=256, mode='normal', patch_size=49, def match_keypoints_brief(keypoints1, descriptors1, keypoints2, descriptors2, threshold=0.15): - """Match keypoints described using BRIEF descriptors in one image to + """**Experimental function**. + + Match keypoints described using BRIEF descriptors in one image to those in second image. Parameters diff --git a/skimage/feature/censure.py b/skimage/feature/censure.py index 00be16a8..4bb7fdda 100644 --- a/skimage/feature/censure.py +++ b/skimage/feature/censure.py @@ -111,7 +111,8 @@ def _suppress_lines(feature_mask, image, sigma, line_threshold): def keypoints_censure(image, min_scale=1, max_scale=7, mode='DoB', non_max_threshold=0.15, line_threshold=10): - """ + """**Experimental function**. + Extracts CenSurE keypoints along with the corresponding scale using either Difference of Boxes, Octagon or STAR bi-level filter. diff --git a/skimage/feature/tests/test_brief.py b/skimage/feature/tests/_test_brief.py similarity index 100% rename from skimage/feature/tests/test_brief.py rename to skimage/feature/tests/_test_brief.py diff --git a/skimage/feature/tests/test_censure.py b/skimage/feature/tests/_test_censure.py similarity index 100% rename from skimage/feature/tests/test_censure.py rename to skimage/feature/tests/_test_censure.py diff --git a/skimage/feature/util.py b/skimage/feature/util.py index eb3817e8..a5267d44 100644 --- a/skimage/feature/util.py +++ b/skimage/feature/util.py @@ -14,7 +14,9 @@ def _mask_border_keypoints(image, keypoints, dist): def pairwise_hamming_distance(array1, array2): - """Calculate hamming dissimilarity measure between two sets of + """**Experimental function**. + + Calculate hamming dissimilarity measure between two sets of vectors. Parameters