- 2081 Chaitra (new course) · 3 marks
Boundary fill vs flood fill
Short answer
Boundary fill fills until a specified boundary color is reached, requiring a uniformly colored border. Flood fill replaces all pixels of an old interior color with a new color, stopping at any boundary color regardless of its uniformity.
Differentiate between boundary fill and flood fill algorithm.
Both are area-filling algorithms that start from a seed pixel and spread to neighbouring pixels (4-connected or 8-connected).
| Point | Boundary fill | Flood fill |
|---|---|---|
| Region defined by | A closed boundary of a single colour | An interior area of one colour (any boundary colours) |
| Stop condition | Stops when boundary colour is reached | Stops when a pixel is not of the old (interior) colour |
| Use | Region has a uniformly coloured boundary | Region has multi-coloured boundary or irregular interior |
| Test | pixel ≠ boundary colour and ≠ fill colour | pixel = old interior colour |
| Result | Fills interior up to the boundary | Replaces the old colour by the new colour |
| Example | Colouring inside a drawn polygon outline | Paint-bucket tool of image editors |
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- DDA versus Bresenham line algorithm · Computer Graphics, chapter 2 · asked 6×
- Cohen-Sutherland: two lines vs window A-D · Computer Graphics, chapter 3
- Centralized vs Ricart-Agrawala algorithm · Distributed System, chapter 6
- Bully algorithm vs ring algorithm · Distributed System, chapter 6
- Constructive and destructive boundary; Himalaya formation · Engineering Geology I, chapter 2
- Transform versus divergent plate boundary · Engineering Geology I, chapter 2