How to determine if there is a break in the picture?

  • 0
    There is a canvas on which the figure is drawn. We need an algorithm to determine if there is one object in the picture or several. Where can you find such an algorithm?

    Thank you
    JavaScript Ian Blair, Nov 19, 2019

  • 2 Answers
  • 0
    Breadth-first or depth-first traversal algorithm. It is also called the fill algorithm. Google. If in one fill you painted over all black pixels, then there is only one shape. Otherwise, if there are several components of interest, there is a gap.
    Aubrey Preston

  • 0
    regionprops in Matlab (Image Processing toolbox)

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!