File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -434,7 +434,9 @@ def tailcuts_hysteresis_clean(
434
434
# matrix (2d), we find all pixels that are above the boundary threshold
435
435
# AND have any neighbor that is in the picture
436
436
pixels_above_boundary = image >= boundary_thresh
437
-
437
+ pixels_with_boundary_neighbors = geom .neighbor_matrix_sparse .dot (
438
+ pixels_above_boundary
439
+ )
438
440
for count in range (max_iter ):
439
441
pixels_in_picture_previous = pixels_in_picture .copy ()
440
442
pixels_with_picture_neighbors = geom .neighbor_matrix_sparse .dot (
@@ -445,9 +447,6 @@ def tailcuts_hysteresis_clean(
445
447
pixels_above_boundary & pixels_with_picture_neighbors
446
448
) | pixels_in_picture
447
449
else :
448
- pixels_with_boundary_neighbors = geom .neighbor_matrix_sparse .dot (
449
- pixels_above_boundary
450
- )
451
450
pixels_in_picture = (
452
451
pixels_above_boundary & pixels_with_picture_neighbors
453
452
) | (pixels_in_picture & pixels_with_boundary_neighbors )
You can’t perform that action at this time.
0 commit comments