フィルターのクリア

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

4 ビュー (過去 30 日間)
Malini
Malini 2023 年 7 月 11 日
コメント済み: Image Analyst 2023 年 8 月 17 日
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']);
Malini
Malini 2023 年 7 月 11 日
Thank you Diwakar.

サインインしてコメントする。

採用された回答

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