Skip to content

Commit

Permalink
refactor: change square->footprint_rectangle in skimage.morphology
Browse files Browse the repository at this point in the history
  • Loading branch information
martibosch committed Jan 23, 2025
1 parent 8e40bb1 commit 3d9d17c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion detectree/pixel_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ def __init__(
if neighborhood is None:
if min_neighborhood_range is None:
min_neighborhood_range = settings.ENTROPY_MIN_NEIGHBORHOOD_RANGE
neighborhood = morphology.square(2 * min_neighborhood_range + 1)
neighborhood_side = 2 * min_neighborhood_range + 1
neighborhood = morphology.footprint_rectangle(
(neighborhood_side, neighborhood_side)
)
self.neighborhood = neighborhood
if num_neighborhoods is None:
num_neighborhoods = settings.ENTROPY_NUM_NEIGHBORHOODS
Expand Down

0 comments on commit 3d9d17c

Please sign in to comment.