mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-19 11:27:45 +08:00
add some more comments to subdivision of polygons code
This commit is contained in:
committed by
Stefan van der Walt
parent
f267f65666
commit
02bf713017
@@ -136,10 +136,13 @@ def subdivide_polygon(coords, degree=2):
|
||||
|
||||
method = 'valid'
|
||||
if circular:
|
||||
# remove last coordinate because of wrapping
|
||||
coords = coords[:-1, :]
|
||||
# circular convolution by wrapping boundaries
|
||||
method = 'same'
|
||||
|
||||
mask_even, mask_odd = SUBDIVISION_DEGREES[degree]
|
||||
# divide by total weight
|
||||
mask_even = np.array(mask_even, 'float') / 2 ** degree
|
||||
mask_odd = np.array(mask_odd, 'float') / 2 ** degree
|
||||
|
||||
|
||||
Reference in New Issue
Block a user