How can I separate objects in a Binary Image?

4 visualizaciones (últimos 30 días)
Elijah Holland
Elijah Holland el 30 de Jul. de 2021
Comentada: Matt J el 2 de Ag. de 2021
I am having trouble separating objects in this binary image. I am coding an algorithm to match deflections in a hexagonal grid. I am having diffculties separating all objects in the image through watershedding. Here is an example image. Most of the objects (pillars) are fine, but some critical ones come into such close contact with each other that they do not separate well at all and form these ellipitical objects (there are three in this image). I have tried isolating these objects using regionprops() but I have been having troube bisecting them.
Any ideas on how to separate these objects? I am hoping to automate this as it is a single frame in a movie. Any help is appreciated!
  2 comentarios
Walter Roberson
Walter Roberson el 31 de Jul. de 2021
Are there ever times when more than two of the objects can appear to touch?
Is it correct that the only possible touch geometries are at multiples of 60 degrees? Or can the "deflections" alter that?
Are the blobs a fixed size?
Elijah Holland
Elijah Holland el 2 de Ag. de 2021
  1. Yes you can get more than two of the objects to touch.
  2. No, the deflections can alter where the objects touch.
  3. Yes, they are of similar sizes in area.

Iniciar sesión para comentar.

Respuestas (1)

Matt J
Matt J el 31 de Jul. de 2021
What if you use regionprops to find the minor axis of the ellipse-shaped blobs and split them along that axis?
  6 comentarios
Elijah Holland
Elijah Holland el 2 de Ag. de 2021
Isn't the equation of a line the reverse?
sin(theta)*(x-xo)+cos(theta)*(yo-y)=0
y=tan(theta)*(x-xo)+yo
Matt J
Matt J el 2 de Ag. de 2021
To find the distance from a point (x,y) to a line, this is the equation that you need.
distance = abs( sin(theta)*(x-x0)+cos(theta)*(y-y0) )
It works for any theta.

Iniciar sesión para comentar.

Categorías

Más información sobre Image Segmentation and Analysis en Help Center y File Exchange.

Productos


Versión

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by