Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,9 @@
|
|||
createMask[img_, pos_, tol_] :=
|
||||
RegionBinarize[img, Image[SparseArray[pos -> 1, ImageDimensions[img]]], tol];
|
||||
floodFill[img_Image, pos_List, tol_Real, color_List] :=
|
||||
ImageCompose[
|
||||
SetAlphaChannel[ImageSubtract[img, createMask[img, pos, tol]], 1],
|
||||
SetAlphaChannel[Image[ConstantArray[color, ImageDimensions[img]]],
|
||||
Dilation[createMask[img, pos, tol],1]
|
||||
]
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue