Surface area of a 3D irregular hollow structure

조회 수: 14 (최근 30일)
Aditya
Aditya 2024년 9월 8일
댓글: Aditya 2024년 9월 8일
Hello,
I am working with image processing of a flame using OH-LIF measurement. I unfortunately can't share the image because its part of a research but as a generalized shape it looks like a hollow cylinder. My objective is to perform edge detection on the flame and then stack them together to get a 3D volume and then calculate the outer surface area of the resulting flame, which will be used for calculations later. I have the 3D volume and tried to use the isosurface function to extract faces and vertices and applied a sort of triangulation method to get the surface area.
volume is a 523x554x132 matrix
[F,V]=isosurface(volume)
function surfaceArea = calculateSurfaceArea(F, V)
% Calculate the surface area of the 3D surface using the transformed vertices
surfaceArea = 0;
for i = 1:size(F, 1)
% Get the vertices of the i-th triangle
v1 = V(F(i, 1), :);
v2 = V(F(i, 2), :);
v3 = V(F(i, 3), :);
% Compute the area of the triangle using the cross product
a = v2 - v1;
b = v3 - v1;
area = norm(cross(a, b)) / 2;
% Accumulate the area
surfaceArea = surfaceArea + area;
end
end
I do get a result using this but since my structure is hollow i get the surface area of the outer and inner surface as well, but i need only the outer surface area. I also tried to use the AlphaShape method and the corresponding boundaryfacets function but didn't get any different answers. Is there a way to extract just the outer surface area, or simplify the geometry? Thanks in advance.

채택된 답변

Shubham
Shubham 2024년 9월 8일
편집: Shubham 2024년 9월 8일
Hey Aditya,
I understand that you wish to calculate outer surface area of an hollow irregular 3D object.
In order to fill a hollow cylinder, you can use the "imfill" function. You may fill the holes in the segmented 2D images before combining them to form the 3D object. For more information, refer to the following MATLAB Answer: https://www.mathworks.com/matlabcentral/answers/1805175-fill-empty-cylinders-in-binary-volume
I hope this helps!
  댓글 수: 1
Aditya
Aditya 2024년 9월 8일
Thank you so much for the quick response, I will try out all the methods!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

제품


릴리스

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by