If you first do the flood filling at every pixel, you'll probably also get small regions inside letters like O, B, A. I think you could try the following:
- Detect areas containing labels and remember the coordinates of the rectangle around it.
- For each area containing text use tesseract or similar to read the label and remember it.
- Remove the rectangles containing text. After that you could try doing some morphological operations to try and close the regions that aren't completely closed. Start the flood fill from locations where you found text to get the regions.
This could work in theory, but the results will depend on what the images look like, how well you detect the text and things like that.
Good luck!