G
G
gena-tile2020-10-21 14:49:24
JavaScript
gena-tile, 2020-10-21 14:49:24

How to determine the presence of a break in the picture?

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

Thanks

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
Wataru, 2020-10-21
@gena-tile

Breadth or depth traversal algorithm. It is also called the fill algorithm. Google it. If in one fill you painted over all the black pixels, then there is only one shape. Otherwise, if there is more than one component, there is a gap.

A
Alexander Skusnov, 2020-10-22
@AlexSku

Regionprops function in Matlab (Image Processing toolbox)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question