rebuild for 10.11+
This commit is contained in:
parent
d989eff547
commit
901b731582
234 changed files with 1522 additions and 927 deletions
|
|
@ -391,8 +391,8 @@ def floodfill(image, xy, value, border=None, thresh=0):
|
|||
pixel.
|
||||
:param thresh: Optional threshold value which specifies a maximum
|
||||
tolerable difference of a pixel value from the 'background' in
|
||||
order for it to be replaced. Useful for filling regions of non-
|
||||
homogeneous, but similar, colors.
|
||||
order for it to be replaced. Useful for filling regions of
|
||||
non-homogeneous, but similar, colors.
|
||||
"""
|
||||
# based on an implementation by Eric S. Raymond
|
||||
# amended by yo1995 @20180806
|
||||
|
|
@ -406,7 +406,9 @@ def floodfill(image, xy, value, border=None, thresh=0):
|
|||
except (ValueError, IndexError):
|
||||
return # seed point outside image
|
||||
edge = {(x, y)}
|
||||
full_edge = set() # use a set to keep record of current and previous edge pixels to reduce memory consumption
|
||||
# use a set to keep record of current and previous edge pixels
|
||||
# to reduce memory consumption
|
||||
full_edge = set()
|
||||
while edge:
|
||||
new_edge = set()
|
||||
for (x, y) in edge: # 4 adjacent method
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue