mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-12 14:00:47 +08:00
ENH: more efficient binary operation in skeletonize
This commit is contained in:
@@ -127,7 +127,7 @@ def skeletonize(image):
|
||||
|
||||
# pass 2 - remove the 2's and 3's
|
||||
neighbours = correlate(skeleton, mask, mode='constant')
|
||||
neighbours[skeleton == 0] = 0
|
||||
neighbours *= skeleton
|
||||
codes = np.take(lut, neighbours)
|
||||
code_mask = (codes == 2)
|
||||
if np.any(code_mask):
|
||||
|
||||
Reference in New Issue
Block a user