How can i get the smallest shape using a list of centroid coordinates?

조회 수: 9 (최근 30일)
As part of image analysis protocol, I have binary images with shapes I have detected using region props. As the dimensions of the original area containing the shapes differs outside the edges of the shape-enriched area, I am trying to find the smallest shape that includes all the dots (shapes detected with regionprops). The approaches I have looked for deal with paths that intersect with all the shapes, hamiltonian paths and whatsoever, but I only need the outer shapes to be the actual vertexes of the shape, the ones inside the resulting shape need to be left excluded.
If you need a visual explanation, imagine a circle-like distribution of stars, how can I get a shape that includes all the stars, both the ones that end up making the shape perimeter and the ones that are left inside?
Thank you!
  댓글 수: 2
Jonas
Jonas 2023년 7월 12일
is the distribution of your stars concave? than maybe a convex hull using bwconvhull may be what you are searching for?
if I misunderstood, could you show an image and mark what you want to get from it?
Miguel Ramirez
Miguel Ramirez 2023년 7월 12일
Its wedged shape (it is a biological sample so it is subjetcted to change). I just compared your suggestion(white shape) with the alphashape i obtained. It looks the latter is much more conservative with the actual shape (sickle versus wedge).

댓글을 달려면 로그인하십시오.

채택된 답변

Matt J
Matt J 2023년 7월 12일
You can use bwalphaclose from this FEX download,
It is very similar in its syntax to bwconvhull, except you can specify the alphashape you have already designed to take a more form-fitting closure.
  댓글 수: 1
Miguel Ramirez
Miguel Ramirez 2023년 7월 14일
It looks like basic area(alphashape) is good enough for this, but i will inspect your tools to see if it gets improved. thanks!

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Image Analyst
Image Analyst 2023년 7월 12일
Why don't you just simply OR all the binary images together?

카테고리

Help CenterFile Exchange에서 Bounding Regions에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by