-3

I have a white map of country with black edges of provinces. I want to recognize areas of provinces and keep pixels of each province. Then I would like to color this areas(as polygon) by different colors. I would be grateful if you could help me. I know that exist AForge.Net library but I didn't find any helpful information.

mateusz
  • 1
  • 1

1 Answers1

0

If you can get a good binary image by thresholding the original one, you can try 'connected component analysis'. See for example here: OpenCV how to find a list of connected components in a binary image

By a 'good' binary image I mean one where the provinces are completely separated by the black boundaries.

Community
  • 1
  • 1