The flood fill algorithm checks if a point is inside or outside a polygon by checking its color, fills the polygon with a new color by changing matching colors to the fill color using a 4-point method, and does not check boundaries so the fill will spread to the whole background if the internal and background colors are the same.
We take content rights seriously. If you suspect this is your content, claim it here.
0 ratings0% found this document useful (0 votes)
140 views1 page
Flood Fill
The flood fill algorithm checks if a point is inside or outside a polygon by checking its color, fills the polygon with a new color by changing matching colors to the fill color using a 4-point method, and does not check boundaries so the fill will spread to the whole background if the internal and background colors are the same.
We take content rights seriously. If you suspect this is your content, claim it here.
You are on page 1/ 1
Flood fill algorithm:
In this method instead of checking whether the boundary is encountered we check if
the present mapped point is inside or not . Thus we check the interior color of the polygon which is suppose xand colour to be filled is supposey Then if encountered pixel has colour x the change it to y using the 4 point method else continue. This algorithm is used when the background colour is different from the colour already present inside the to be coloured region , this because if both the background colour and the present internal colour are same the the whole background AND the internal will be coloured SAME COLOUR as the algorithm doesnt check for boundaries..