필터 지우기
필터 지우기

How to measure area from voronoi function?

조회 수: 22 (최근 30일)
Jigar
Jigar 2022년 11월 25일
댓글: Jigar 2022년 12월 3일
I am trying to measure area (also individual's length and width) from voronoi function as all samples are not in same line.

채택된 답변

Indra
Indra 2022년 12월 1일
To Calculate Area of a voronoi polygon (and length and width), you need to find out the vertices of voronoi edges. To find the vertices you have to create Delaunay triangulation from the set of points. The vertices of the Voronoi edges are located at the circumcenters of the Delaunay triangles. The Circumcenter function returns a matrix of set of circumcenters. Look into Voronoi Diiagrams for more info.
TR = delaunayTriangulation(P);
C = circumcenter(TR);
To find area of a voronoi polygon you can use convhull function.
[~,area]=convhull(vertices);
  댓글 수: 1
Jigar
Jigar 2022년 12월 3일
Thank you Indra for your response.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Voronoi Diagram에 대해 자세히 알아보기

태그

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by