mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-30 12:31:08 +08:00
Documenting the choice of filter sizes
This commit is contained in:
@@ -40,8 +40,8 @@ for col, mode in enumerate(['dob', 'octagon', 'star']):
|
||||
# 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]
|
||||
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')
|
||||
|
||||
@@ -10,11 +10,18 @@ from skimage.feature.util import _mask_border_keypoints
|
||||
from skimage.feature.censure_cy import _censure_dob_loop
|
||||
|
||||
|
||||
# The paper(Reference [1]) mentions the sizes of the Octagon shaped filter
|
||||
# kernel for the first seven scales only. The sizes of the later scales
|
||||
# have been extrapolated based on the following statement in the paper.
|
||||
# "These octagons scale linearly and were experimentally chosen to correspond
|
||||
# to the seven DOBs described in the previous section."
|
||||
OCTAGON_OUTER_SHAPE = [(5, 2), (5, 3), (7, 3), (9, 4), (9, 7), (13, 7),
|
||||
(15, 10), (15, 11), (15, 12), (17, 13), (17, 14)]
|
||||
OCTAGON_INNER_SHAPE = [(3, 0), (3, 1), (3, 2), (5, 2), (5, 3), (5, 4), (5, 5),
|
||||
(7, 5), (7, 6), (9, 6), (9, 7)]
|
||||
|
||||
# The sizes for the STAR shaped filter kernel for different scales have been
|
||||
# taken from the OpenCV implementation.
|
||||
STAR_SHAPE = [1, 2, 3, 4, 6, 8, 11, 12, 16, 22, 23, 32, 45, 46, 64, 90, 128]
|
||||
STAR_FILTER_SHAPE = [(1, 0), (3, 1), (4, 2), (5, 3), (7, 4), (8, 5),
|
||||
(9, 6), (11, 8), (13, 10), (14, 11), (15, 12), (16, 14)]
|
||||
|
||||
Reference in New Issue
Block a user