Fill area between x-y data

조회 수: 1 (최근 30일)
Aishwarya Rao
Aishwarya Rao 2023년 4월 11일
답변: Image Analyst 2023년 4월 11일
Hi everyone!
I have a data as shown in the figure. I want to fill/find the polygon area with maximum probability (not necessarily circular, I need to find the shape). Can anyone please help me?
Thank you!
  댓글 수: 2
Matt J
Matt J 2023년 4월 11일
You'll need to define "maximum probability" for us. Are you sure you don't simply want to take the convex hull?
Walter Roberson
Walter Roberson 2023년 4월 11일
Given the coordinates of any particular polygon, how would you calculate the "probability" of it?

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

답변 (2개)

Joe Vinciguerra
Joe Vinciguerra 2023년 4월 11일
편집: Joe Vinciguerra 2023년 4월 11일
xy = randn(100, 2);
shp = alphaShape(xy, inf);
area = shp.area;
facets = shp.boundaryFacets;
plot(shp, "LineStyle","none", "Marker","none")
hold on;
scatter(xy(:,1), xy(:,2))
grid on;

Image Analyst
Image Analyst 2023년 4월 11일
The polygon with the maximum density would be one that starts at one point and then snakes around until it has "grabbed" every point. The width of the snake would be infinitesimally small.

카테고리

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

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by