mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-29 11:51:24 +08:00
Fix convolution bug in perimeter function
This commit is contained in:
@@ -451,7 +451,8 @@ def perimeter(image, neighbourhood=4):
|
||||
}
|
||||
perimeter_image = ndimage.convolve(border_image, np.array([[10, 2, 10],
|
||||
[ 2, 1, 2],
|
||||
[10, 2, 10]]))
|
||||
[10, 2, 10]]),
|
||||
mode='constant', cval=0)
|
||||
total_perimeter = 0
|
||||
for weight, values in perimeter_weights.items():
|
||||
num_values = 0
|
||||
|
||||
Reference in New Issue
Block a user