diff --git a/skimage/feature/censure.py b/skimage/feature/censure.py index 726af80d..6178335c 100644 --- a/skimage/feature/censure.py +++ b/skimage/feature/censure.py @@ -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