How to extract tree DBH(Diameter at Breast Height) using helperExtractTreeMetrics function??

3 次查看(过去 30 天)
Hello
i'm studying lidar toolbox using lidar toolbox guideline.
TreeId, TreeHeight, etc. were extracted using the helperExtractTreeMetrics function in the tree attribute extraction step. However, it does not provide for one of the most important properties of the tree to be extracted, the 1.2 height diameter extraction.
Is there any other way to extract DBH?
lidar data type => ply
this is helperExtractTreeMetrics function
function treeMetrics = helperExtractTreeMetrics(normalizedPoints,label3D)
% Copyright 2021 The MathWorks, Inc.
% Consider points belongs to valid labels
validLabels = label3D ~= 0;
filteredLabels = label3D(validLabels);
filteredPoints = normalizedPoints(validLabels,:);
[filteredLabels, sortedIds] = sort(filteredLabels);
filteredPoints = filteredPoints(sortedIds,:);
% Identify the number of points at each cell
uniqueLabels = unique(filteredLabels);
idCounts = histc(filteredLabels, uniqueLabels); %#ok<HISTC>
% Create treeMetrics table
treeMetrics = table('Size', [length(idCounts),7], ...
'VariableTypes', {'uint32', 'uint32', 'double', 'double', 'double', 'double', 'double'}, ...
'VariableNames',{'TreeId', 'NumPoints', 'TreeApexLocX', 'TreeApexLocY','TreeHeight', 'CrownDiameter','CrownArea'});
endIdx = 0;
% Loop over valid cells
for i = 1: length(idCounts)
gridIdx = endIdx + 1;
endIdx = endIdx + idCounts(i);
treeMetrics.TreeId(i) = i;
treeMetrics.NumPoints(i) = idCounts(i);
[~,id]= max(filteredPoints(gridIdx:endIdx,3));
treeMetrics.TreeApexLocX(i) = filteredPoints(gridIdx+id-1,1);
treeMetrics.TreeApexLocY(i) = filteredPoints(gridIdx+id-1,2);
treeMetrics.TreeHeight(i) = filteredPoints(gridIdx+id-1,3);
if(idCounts(i) >=3)
[~, treeMetrics.CrownArea(i)] = convhull(double(filteredPoints(gridIdx:endIdx,1:2)));
else
treeMetrics.CrownArea(i) = 0;
end
end
treeMetrics.CrownDiameter = 2 * sqrt(treeMetrics.CrownArea/ pi);

回答(1 个)

Pratik
Pratik 2023-12-29
Hi 동현 김,
As per my understanding, you want to extract Diameter of tree at Breast Height using “helperExtractTreeMetrics” function, in lidar toolbox.
Extracting DBH directly from LiDAR data can be challenging because LiDAR often captures the top and side profiles of trees. To estimate DBH from LiDAR data, you might need to use indirect methods or additional processing steps. Here are a few possible approaches:
  1. Allometric Equations are mathematical equations that relate tree height, crown dimensions, and other easily measured attributes to DBH.
  2. Segment the point cloud to isolate individual trees and analyze the point cloud to find the trunk and measure its width at the appropriate height.
  3. You can train a machine learning model using labeled data (where DBH is known) to predict DBH from the 3D point cloud data. This would require a substantial dataset for training and validation.
Please note that estimating DBH from LiDAR data is an area of ongoing research, and the accuracy of these methods can vary widely depending on the complexity of the forest structure, the quality of the LiDAR data, and the specific algorithms used.
Hope this helps!

类别

Help CenterFile Exchange 中查找有关 Preprocessing 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by