Question: void SEED_FILL(int x, int y){ if ((PIXEL_VALUE(x, y) != BoundaryValue) && (PIXEL_VALUE) != FillValue)) SET_PIXEL(x, y, FillValue); SEED_FILL(x + 1, y); SEED_FILL(x - 1, y);

void SEED_FILL(int x, int y){ if ((PIXEL_VALUE(x, y) != BoundaryValue) && (PIXEL_VALUE) != FillValue)) SET_PIXEL(x, y, FillValue); SEED_FILL(x + 1, y); SEED_FILL(x - 1, y); SEED_FILL(x, y + 1); SEED_FILL(x, y - 1); }
For the region shown above assume BoundaryValue = black, FillValue = gray and that SEED_FILL(4, 6) has been called. Show the effect of the seed fill algorithm numbering at each phase, for example first filled coordinate use number 1 and then for the second one, use number 2 etc..
It'd be great if you can explain the steps and logic behind the solution.
01234567
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
