How to calculate the area of single leaf along with its height

5 次查看(过去 30 天)
How to calculae the area of single leaf with its height? Since the leaf is rounded and not flat, how to estimate the area of other sides of the leaf?
  2 个评论
Diwakar Diwakar
Diwakar Diwakar 2023-7-11
It's challanging task. still you can make an approximation by assuming the leaf's shape resembles a hemisphere or a portion of a sphere.
Example code:
% Leaf height (in centimeters)
height = 10;
% Radius of the rounded leaf (assuming a hemisphere or a portion of a sphere)
radius = height / 2;
% Calculate the approximate area of the rounded leaf
area = 2 * pi * radius^2;
disp(['The estimated area of the leaf is: ', num2str(area), ' cm^2']);

请先登录,再进行评论。

采纳的回答

Image Analyst
Image Analyst 2023-7-12
First of all you need to segment the plant, which is easy enough. Then get the skeleton of the leaf with bwskel. Then you need to get the radius at each location along the leaf's skeleton with a distance transform bwdist . Then square it and multiply by pi and sum it up for all points along the skeleton.
A demo for a similar (but not identical) is attached.
  7 个评论
Malini
Malini 2023-8-17
Also my dataset is like this. How to induvidually calculate the leaf area
Image Analyst
Image Analyst 2023-8-17
To get the area of each leaf, you need to make sure they're separated and then threshold to get a mask (binary image). Then you simply do
props = regionprops(mask, 'Area');
allAreas = [props.Area]

请先登录,再进行评论。

更多回答(1 个)

Vishnu
Vishnu 2023-7-12
I understand that you want to get an approximation for the area of a rounded leaf, now since the leaf is rounded the only way to get the approx area is to divide the entire height of the leaf into multiple smaller unit which can be cyllindrical(This is assumption for the approximation). We can then procced to integrate this cyllindrical shell element across the height of the entire leaf with an integral function to get the area of the leaf.
Here is the working code for this approach:
function leafArea = estimateLeafArea(radius, height)
% Define the function representing the leaf shell
leafShell = @(x) sqrt(radius^2 - (radius/height)^2 * x.^2);
% Define the integration limits
lowerLimit = -height/2;
upperLimit = height/2;
% Perform the integration using the integral function
leafArea = integral(leafShell, lowerLimit, upperLimit);
end

标签

Community Treasure Hunt

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

Start Hunting!

Translated by