0

Is there a method/algorithm to generate instances of objects from image that was segmented by the use of any image segmentation models?

For example, I have an image with one class and it was segmented in a given way, where 1s are objects of the same class and empty fields are of no class:enter image description here

How can I now generate list of the two objects, where list's elements for example would be positions of all the pixels inside the object (list of list).

GKozinski
  • 1,290
  • 11
  • 22

1 Answers1

0

Those segmented instances can be seen as connected components of the 1s. You can use the flood fill or BFS algorithm to detect these components or try SimpleBlobDetector by OpenCV.

entropy07
  • 71
  • 5