Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -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]
]
]