Area Fill Algorithms

Area Fill Algorithms

Area Fill Algorithms

Flood Fill vs Boundary Algorithms

Objective – Color the entire area with the color already present in the area.

Flood fill algorithm

This method is useful when area to be filled has multiple colors in it.

Find any point in this area and replace it with fill color.

Start filling the surrounding points using the 4-connected or 8- connected approach with the color of the seed point identified in the previous step.

Keep on filling the surrounding area till the time you see a point which does not have same color as interior area.

Objective – Color the entire area with the color already present in the area.

Boundary fill algorithm

This method is used when area to be colored is defined with single color boundary.

In Boundary filled algorithm the interior points of the area are replaced with a new color.

The interior points are not filled with new color in fact they are replaced by new points.

This algorithm works only if the to be filled color and the color of the boundary of the region are not same.

We have disabled - Right- Click - How about stay to read :)