mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-12 12:30:16 +08:00
Putting constant variables outside the definition
This commit is contained in:
@@ -9,18 +9,20 @@ from skimage.morphology import convex_hull_image
|
||||
from skimage.feature.censure_cy import _censure_dob_loop
|
||||
|
||||
|
||||
OCTAGON_OUTER_SHAPE = [(5, 2), (5, 3), (7, 3), (9, 4), (9, 7), (13, 7),
|
||||
(15, 10)]
|
||||
OCTAGON_INNER_SHAPE = [(3, 0), (3, 1), (3, 2), (5, 2), (5, 3), (5, 4), (5, 5)]
|
||||
|
||||
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)]
|
||||
|
||||
|
||||
def _get_filtered_image(image, n_scales, mode):
|
||||
|
||||
scales = np.zeros((image.shape[0], image.shape[1], n_scales),
|
||||
dtype=np.double)
|
||||
|
||||
OCTAGON_OUTER_SHAPE = [(5, 2), (5, 3), (7, 3), (9, 4), (9, 7), (13, 7),
|
||||
(15, 10)]
|
||||
OCTAGON_INNER_SHAPE = [(3, 0), (3, 1), (3, 2), (5, 2), (5, 3), (5, 4), (5, 5)]
|
||||
|
||||
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)]
|
||||
if mode == 'DoB':
|
||||
for i in range(n_scales):
|
||||
n = i + 1
|
||||
|
||||
Reference in New Issue
Block a user