Segmentation is the process of splitting an image into multiple segments.
The following demo (open externally) compares two segmentation methods: floodFill and Sequential. It also compares two different approaches of recursive floodFilling: Depth-First and Breadth-First.
And this can be the basis for for example Character Recognition. See this basic example: (open externally)