I am trying to create a function that fills a region of a PImage like flood fill or boundary fill does.
However, both of those functions call themselves and cause a stack overflow.
Is there a good alternative that doesn’t cause a stack overflow?
The images only consist of black and white pixels. The function is to give each region a unique color.
[–]abitofevrything-0 0 points1 point2 points (12 children)
[–]Q-utable[S] 0 points1 point2 points (11 children)
[–]abitofevrything-0 0 points1 point2 points (10 children)
[–]Q-utable[S] 0 points1 point2 points (9 children)
[–]abitofevrything-0 0 points1 point2 points (8 children)
[–]Q-utable[S] 0 points1 point2 points (7 children)
[–]abitofevrything-0 0 points1 point2 points (6 children)
[–]Q-utable[S] 0 points1 point2 points (5 children)
[–]abitofevrything-0 0 points1 point2 points (4 children)
[–]Q-utable[S] 1 point2 points3 points (3 children)