Area Filling Algorithms
Area Filling Algorithms
17. Boundary Fill – 4-Connected (Code) 18. Boundary Fill – 8-Connected (Code)
19. Flood Fill – 4-Connected (Code) 20. Flood Fill – 8-Connected (Code)
01
Seed Fill | Boundary Fill | Flood Fill
Seed Fill | Boundary Fill |
Flood Fill
Prepared by: Roll No. 5, 6, 7
BCA 5th Semester
Subject: Computer Graphics
02
What is Area Filling?
What is Area Filling?
2 Complex Regions
Handles curved/complex regions better.
3 Connectivity
More complete than 4-connected.
06
Boundary Fill Algorithm (Overview)
Boundary Fill Algorithm (Overview)
Starts from an interior point and fills until it Requires interior point, fill color, and boundary
reaches boundary color. color.
07
Boundary Fill – 4-Connected
Boundary Fill – 4-Connected
1 2 3
Adds diagonal neighbors for full coverage. Used for irregular or rounded shapes.
09
Flood Fill Algorithm (Overview)
Flood Fill Algorithm
(Overview)
1 Non-uniform Boundary
Used when boundary is not uniform.
3 Loose Regions
Suitable for loose or open regions.
10
Flood Fill – 4-Connected
Flood Fill – 4-Connected
Checks and fills up, down, left, right. Recursively replaces matching interior color.
11
Flood Fill – 8-Connected
Flood Fill – 8-Connected
1 Includes diagonal neighbors.