Adaptive tree crown segmentation method based on crown height model and hyperspectral collaboration
By using adaptive processing parameters and a region growing segmentation algorithm, combined with a canopy height model and hyperspectral imagery, the problem of insufficient canopy segmentation accuracy in existing technologies has been solved. High-precision canopy segmentation has been achieved in different regions and at different resolutions, improving the integrity and boundary clarity of the segmentation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SICHUAN FORESTRY RES INST (SICHUAN FORESTRY IND RES & DESIGN INST)
- Filing Date
- 2026-06-12
- Publication Date
- 2026-07-14
AI Technical Summary
Existing canopy segmentation methods that combine canopy height models with hyperspectral images fail to effectively balance the boundary clarity of the edge region with the integrity of the height information in the central region, resulting in oversegmentation or undersegmentation problems and failing to meet the requirements for high-precision segmentation.
By acquiring canopy height models and hyperspectral images, spatial resolution identification and height statistics are performed. Adaptive processing parameters are dynamically determined, and median filtering and local extremum detection are used to extract tree vertices. A canopy growth seed set is generated, and regions are divided by combining vegetation masking and canopy height gradient. A region growth segmentation algorithm is then used for differentiated processing.
It achieves high-precision canopy segmentation in different regions and resolutions, improves the integrity and boundary clarity of the segmentation, avoids the adhesion of adjacent canopies and noise interference, and significantly improves the segmentation accuracy.
Smart Images

Figure CN122391271A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to an adaptive canopy segmentation method based on canopy height model and hyperspectral synergy. Background Technology
[0002] Canopy segmentation is a core technology in vegetation remote sensing and forest resource surveys. Through image processing and analysis, it accurately separates the canopy region of individual trees from remote sensing images or height data, clarifying the spatial location, morphological characteristics, and attribute information of each tree. This provides high-precision data support for forest resource surveys, ecological environment assessments, and precision forestry management.
[0003] Currently, the canopy segmentation method that combines canopy height models (CHM) with hyperspectral imagery has become mainstream. This typically involves acquiring both the CHM and hyperspectral imagery of the study area, preprocessing both types of data separately, using the spectral features of the hyperspectral imagery to distinguish between vegetated and non-vegetated areas, extracting tree vertices as segmentation seeds using the height information from the CHM, and finally achieving canopy segmentation through algorithms such as region growing. However, this method suffers from several drawbacks. It employs a globally uniform approach to fusing the CHM and hyperspectral data, failing to design a fusion scheme based on the characteristic differences of different canopy regions. This makes it difficult to balance the boundary clarity of edge regions with the integrity of height information in the central region, leading to oversegmentation or undersegmentation. Furthermore, the processing of the CHM is relatively simplistic, not involving dividing the canopy region into edge and central regions, and it cannot differentiate the processing based on the characteristics of different regions, thus failing to meet the requirements for high-precision segmentation.
[0004] Therefore, developing an adaptive canopy segmentation method based on canopy height model and hyperspectral synergy is of great significance for improving segmentation accuracy. Summary of the Invention
[0005] To address the issue of poor segmentation accuracy in existing technologies, this invention proposes an adaptive canopy segmentation method based on a canopy height model and hyperspectral synergy, specifically including the following steps: S1. Obtain the canopy height model and hyperspectral image of the study area, and perform spatial resolution identification on the canopy height model; S2. Perform height statistics on the effective area of the canopy height model to obtain basic statistical characteristics; S3. Based on the spatial resolution identification results and basic statistical characteristics of the canopy height model, dynamically determine the adaptive processing parameters; S4. Based on the determined adaptive processing parameters, after median filtering and denoising the canopy height model, local extremum detection and threshold screening are used to extract tree vertices and generate a canopy growth seed set. S5. Calculate vegetation index based on hyperspectral imagery and generate vegetation mask. Determine the cropping region of the canopy height model based on the vegetation mask and the boundary of the target study area. S6. Calculate the canopy height gradient based on the data of the cut area, and divide the cut area into the canopy edge area and the canopy center area according to the canopy height gradient; S7. In the edge area of the canopy, the vegetation index and the data of the cropped area are linearly fused according to the preset weights. In the center area of the canopy, the original data of the canopy height model are retained to obtain the fused height surface. S8. Starting from the canopy growth seed set, perform region growth segmentation on the fusion height surface, determine the affiliation of each region on the fusion height surface, stop growth when the termination condition is met, and output the canopy segmentation result.
[0006] Furthermore, in S2, height statistics are performed on the effective area of the canopy height model to obtain basic statistical features, including: identifying and removing pixels without data in the canopy height model to obtain the effective area; statistically calculating the pixel heights within the effective area to obtain the average height and maximum height; and using the average height and maximum height as the basic statistical features characterizing the canopy height of the study area.
[0007] Furthermore, the adaptive processing parameters include a filtering window, a minimum tree height threshold, and a treetop search scale. In step S3, the adaptive processing parameters are dynamically determined based on the spatial resolution identification results and basic statistical characteristics of the canopy height model. These parameters include: dynamically determining the scale of the filtering window required for median filtering based on the ratio of average height to spatial resolution; calculating the minimum tree height threshold according to a preset proportional coefficient based on the average height to eliminate non-canopy targets; and dynamically determining the treetop search scale used for local extremum detection based on the maximum height and its corresponding canopy scale estimate.
[0008] Furthermore, in step S4, after median filtering denoising the canopy height model based on the determined adaptive processing parameters, local extremum detection and threshold screening are used to extract tree vertices and generate a canopy growth seed set. This includes: performing median filtering denoising on the canopy height model using the filtering window scale in the adaptive processing parameters; performing local extremum detection using the treetop search scale in the adaptive processing parameters to extract candidate tree vertices; screening the candidate tree vertices using the minimum tree height threshold in the adaptive processing parameters and removing candidate tree vertices below the minimum tree height threshold; storing the spatial coordinates and corresponding height values of the retained tree vertices as point vector data, and assigning a unique identifier to each tree vertex to generate a canopy growth seed set.
[0009] Furthermore, after generating the tree canopy growth seed set, the process also includes: acquiring elevation surface data that characterizes terrain undulations; identifying steep slope areas based on the elevation surface data; and correcting the spatial position of the tree top located in the steep slope area to reduce tree top positioning deviation.
[0010] Furthermore, in step S5, calculating the vegetation index and generating a vegetation mask based on the hyperspectral image includes: calculating the normalized difference vegetation index based on the corresponding band of the hyperspectral image; performing binarization analysis on the normalized difference vegetation index based on a preset vegetation index threshold to generate a vegetation mask used to distinguish between vegetated and non-vegetated areas.
[0011] Furthermore, in step S6, the canopy height gradient is calculated based on the data of the cropped area, and the cropped area is divided into the canopy edge area and the canopy center area according to the canopy height gradient. This includes: calculating the canopy height gradient based on the data within the cropped area and generating a gradient image; statistically analyzing the gradient values in the gradient image, and dividing the cropped area into the canopy edge area and the canopy center area based on a preset gradient quantile threshold, wherein the gradient value of the canopy edge area is higher than the gradient value of the canopy center area.
[0012] Furthermore, in S7, in the crown edge region, the vegetation index and the data of the cropped area are linearly fused according to a preset weight, including: spatially registering and aligning the vegetation index and the data of the cropped area to make them in the same spatial position; within the crown edge region, the aligned vegetation index and the data of the cropped area are weighted linearly combined according to a preset weight.
[0013] Furthermore, in S8, starting from the canopy growth seed set, region growth segmentation is performed on the fusion height surface to determine the affiliation of each region on the fusion height surface. This includes: using each tree vertex in the canopy growth seed set as a seed, iteratively expanding and growing towards multiple surrounding pixels on the fusion height surface; during the growth process, calculating the height difference, height change rate, and spatial distance between each surrounding pixel and the corresponding tree vertex to determine the canopy to which the pixel belongs; wherein, when a pixel is determined to belong to multiple canopies, its unique affiliation canopy is determined through a conflict detection and allocation mechanism.
[0014] Furthermore, when the termination condition is met, growth is stopped and the canopy segmentation result is output, including: setting an adaptive growth stop threshold for each tree vertex that matches the height of the tree top; when the height of any pixel relative to the tree vertex drops below the stop threshold, or when the current growth region comes into contact with an adjacent canopy region, the growth of the canopy in the direction of the current pixel is terminated, and the canopy segmentation vector result containing the tree vertex and canopy attribute information is output.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention acquires a canopy height model and hyperspectral image of the study area, and performs spatial resolution identification on the canopy height model; it performs height statistics on the effective area of the canopy height model to obtain basic statistical features; based on the spatial resolution identification results and basic statistical features of the canopy height model, it dynamically determines adaptive processing parameters; based on the determined adaptive processing parameters, it performs median filtering denoising on the canopy height model, and then uses local extremum detection and threshold screening to extract tree vertices, generating a canopy growth seed set; it calculates vegetation indices based on hyperspectral imagery and generates a vegetation mask, and then uses the vegetation mask and target... The study area boundary is used to determine the clipping region of the canopy height model. Based on the data from the clipping region, the canopy height gradient is calculated, and the clipping region is divided into canopy edge and canopy center regions according to the canopy height gradient. In the canopy edge region, vegetation indices and data from the clipping region are linearly fused according to preset weights. In the canopy center region, the original data of the canopy height model is retained to obtain a fused height surface. Starting from the canopy growth seed set, regional growth segmentation is performed on the fused height surface to determine the affiliation of each region. Growth stops when a termination condition is met, and the canopy segmentation result is output. By automatically identifying the spatial resolution of the canopy height model and dynamically determining adaptive processing parameters based on effective regional height statistics, the system eliminates reliance on manual experience parameters and can adapt to canopy segmentation in different regions, with different resolutions and different stand conditions, exhibiting higher cross-regional consistency. Simultaneously, by dividing the canopy edge and center regions based on the canopy height gradient, differentiated processing of different regions is achieved. In the canopy edge region, boundary contrast is enhanced, and the segmentation accuracy in weak gradient regions is improved, avoiding the adhesion of adjacent canopies. By preserving the original data features in the central area of the crown and suppressing noise interference and over-segmentation, the integrity and boundary clarity of the crown segmentation are significantly improved compared to the global uniform processing method, which is conducive to improving the segmentation accuracy. Attached Figure Description
[0016] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0017] Figure 1 This is a flowchart of an adaptive canopy segmentation method based on canopy height model and hyperspectral synergy provided in an embodiment of the present invention. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0019] The specific embodiments of the present invention will be described below.
[0020] To address the issue of poor segmentation accuracy in existing technologies, this invention identifies the spatial resolution of the canopy height model, performs height statistics on the effective region of the canopy height model to determine adaptive processing parameters, preprocesses the canopy height model based on these parameters and extracts tree vertices to generate a canopy growth seed set, generates a vegetation mask based on hyperspectral imagery to determine the canopy height model clipping region, calculates the canopy height gradient in the clipping region, and divides it into canopy edge and canopy center regions, linearly fuses vegetation indices with the clipping region data in the canopy edge region, and retains the original canopy height model data in the canopy center region to obtain a fused height surface, and performs region growth segmentation on the fused height surface starting from the growth seed set to determine the affiliation of each region. This invention achieves high segmentation accuracy.
[0021] This invention provides an adaptive canopy segmentation method based on a canopy height model and hyperspectral synergy. Figure 1 This is a flowchart of the adaptive canopy segmentation method based on canopy height model and hyperspectral synergy provided in this embodiment of the invention, as follows: Figure 1 As shown, the specific steps include the following: S1. Obtain the canopy height model and hyperspectral image of the study area, and perform spatial resolution identification on the canopy height model.
[0022] A canopy height model is a model generated based on lidar or remote sensing data to characterize the vertical height distribution of tree canopies, reflecting tree height, canopy undulation, and canopy structure. Hyperspectral imagery refers to remote sensing imagery with continuous, fine spectral resolution, providing rich information on spectral differences in ground features.
[0023] First, canopy height models and hyperspectral imagery of the study area are acquired. The canopy height models are then read and their GeoTransform information is analyzed. GeoTransform parameters describe the mapping relationship between pixel grids and geographic coordinates. By analyzing the pixel data, spatial resolution is automatically identified and spatial reference resolution is completed, providing a unified benchmark for subsequent data processing. Automatic resolution identification avoids reliance on manual input and improves the level of automation.
[0024] S2. Perform height statistics on the effective area of the canopy height model to obtain basic statistical characteristics.
[0025] The effective area of the canopy height model refers to the effective pixel area where the actual tree canopy is located in the canopy height model, after removing areas with no values, background, and non-vegetation areas. Basic statistical characteristics are used to reflect the overall level, dispersion, distribution pattern, and extreme value characteristics of the data, providing a basis for subsequent analysis and parameter setting.
[0026] Specifically, height statistics are performed on the effective area of the canopy height model to obtain basic statistical characteristics, including: identifying and removing pixels without data in the canopy height model to obtain the effective area; statistically calculating the pixel heights within the effective area to obtain the average height and maximum height; and using the average height and maximum height as the basic statistical characteristics characterizing the canopy height of the study area.
[0027] Cells marked as having no data in the canopy height model are identified, and corresponding effective region masks are created to exclude these data-free regions from all subsequent calculations. After obtaining the effective regions, each effective cell within the effective region is traversed, and two core statistics are performed: the global average height is calculated by summing the height values of all effective cells and dividing by the total number of cells; and the global maximum height is obtained by comparing and recording the maximum value encountered in real time during the traversal. Finally, the average height and maximum height are used as a set of basic statistical features to provide core input for subsequent adaptive parameter setting.
[0028] By conducting pixel-level height statistics on the effective area of the canopy height model, and first identifying and removing pixels with no data to ensure the purity and validity of the statistical range, and then accurately calculating the pixel height within the effective area, the true distribution characteristics of canopy height in the study area can be obtained objectively, stably, and quantitatively. This yields two simple and reliable basic statistical features: average height and maximum height, thus avoiding interference from invalid pixels, null values, and noisy data, and improving the accuracy and reliability of the canopy height characterization results. Simultaneously, this statistical process directly provides a stable, unified, and quantifiable basis for subsequent parameter adaptive setting, model training, and regional comparative analysis, effectively improving the scientific rigor, objectivity, and reproducibility of the overall scheme, and laying a reliable data foundation for achieving high-precision, automated, and standardized canopy height analysis.
[0029] S3. Based on the spatial resolution identification results and basic statistical characteristics of the canopy height model, dynamically determine the adaptive processing parameters.
[0030] Adaptive processing parameters refer to intelligent processing parameters that automatically and dynamically adapt to the basic statistical characteristics of spatial resolution and canopy height. These parameters are not fixed and can be adjusted automatically according to different regions and different data. For example, adaptive processing parameters include filtering window, minimum tree height threshold, and treetop search scale.
[0031] Specifically, based on the spatial resolution identification results and basic statistical characteristics of the canopy height model, adaptive processing parameters are dynamically determined, including: dynamically determining the scale of the filtering window required for median filtering based on the ratio of average height to spatial resolution; calculating the minimum tree height threshold according to the average height and a preset proportional coefficient to eliminate non-canopy targets; and dynamically determining the treetop search scale for local extremum detection based on the maximum height and its corresponding canopy scale estimate.
[0032] The scale of the filtering window refers to the size of the sliding window used when performing median filtering denoising on the canopy height model. The size of the sliding window is measured in pixels, and its size determines the balance between smoothing noise and preserving detail. A larger window provides stronger denoising capabilities but may also over-smooth the sharp shape of treetops. The minimum tree height threshold is a height threshold value used to filter tree vertices. After local extremum detection, only candidate points with heights higher than this threshold are retained as true treetops; points lower than this threshold are discarded. Points below this threshold may be ground noise, low shrubs, or terrain undulations. The treetop search scale is the radius of the neighborhood used in local extremum detection to determine whether a pixel is a local maximum. A treetop search scale that is too small will produce a large number of false treetops caused by noise, while a scale that is too large will cause the true treetops of adjacent trees to be missed due to competition. Preset scaling factors are empirical constants used to connect statistical features with target parameters. For example, the minimum tree height threshold is the average height multiplied by a fixed scaling factor, such as a preset scaling factor of 0.35. These preset scaling factors are based on extensive experiments or prior knowledge, giving the derived rules universality and physical meaning. The crown scale estimate is an estimate of the horizontal extension range of the tree crown, calculated from the maximum height using an empirical model or function. The taller the tree, the larger the crown usually is. The crown scale estimate is used to reasonably set the treetop search scale to ensure that the entire treetop area of tall trees can be completely searched.
[0033] The pixel scale corresponding to the average tree height is estimated based on the ratio of average height to spatial resolution. The filtering window is then set to 3 to 5 times this pixel scale and adjusted to an odd number to determine the median filtering window size. The minimum tree height threshold is set to 0.35 times the average height; the formula for calculating the minimum tree height threshold is: H_min = 0.35 × H_mean, where H_min is the minimum tree height threshold and H_mean is the average canopy height of the effective area, thus excluding surface noise and low shrubs. The maximum canopy size is estimated based on the maximum height and converted to a pixel scale. The treetop search scale used for local extremum detection is dynamically determined to match the search range with the actual canopy scale of the study area.
[0034] For example, estimating the maximum crown width D_max based on the relationship between the maximum height H_max and its corresponding crown width scale, and converting it to a pixel scale to determine the search radius r_peak, can be expressed in the following form: D_max = f(H_max); r_peak=round((D_max / 2) / R); Where f is an estimation function mapping tree height to canopy size, which can be given by a pre-defined empirical model, a tree species parameter table, or a regionally universal approximation relation; round represents rounding to fit the pixel grid; and R represents the spatial resolution, i.e., the pixel size of the canopy height model. To ensure that the radius is numerically reasonable, upper and lower limits are imposed on r_peak: r_peak=clamp(r_peak,r_min,r_max); "Clamp" means to clamp and restrict the calculated parameter values within a preset reasonable range. The treetop search scale can adaptively adjust with changes in the maximum tree height and resolution of the region to ensure that the treetop area of tall trees can be completely captured, while reducing the false treetop rate under dense canopy conditions.
[0035] By dynamically determining adaptive processing parameters based on spatial resolution and fundamental statistical characteristics, the filtering window, minimum tree height threshold, and treetop search scale can automatically adapt to the data scale and canopy height, eliminating reliance on manual, empirical parameters and effectively avoiding problems such as insufficient filtering or over-smoothing, false treetop detection, and missed detection of true treetops. Simultaneously, it can adapt to canopy data with different spatial resolutions and stand conditions, improving the objectivity, consistency, and universality of parameter settings.
[0036] S4. Based on the determined adaptive processing parameters, after median filtering and denoising the canopy height model, local extremum detection and threshold screening are used to extract tree vertices and generate a canopy growth seed set.
[0037] Specifically, based on determined adaptive processing parameters, after median filtering denoising the canopy height model, local extremum detection and threshold screening are used to extract tree vertices and generate a canopy growth seed set. This includes: performing median filtering denoising on the canopy height model using the filtering window scale in the adaptive processing parameters; performing local extremum detection using the treetop search scale in the adaptive processing parameters to extract candidate tree vertices; using the minimum tree height threshold in the adaptive processing parameters to screen the candidate tree vertices and remove those below the minimum tree height threshold; storing the spatial coordinates and corresponding height values of the retained tree vertices as point vector data, and assigning a unique identifier to each tree vertex to generate a canopy growth seed set.
[0038] Median filtering denoising is a nonlinear filtering method used to process canopy height model images. Its core principle is to use a sliding window of a specific size to traverse the image, replacing the value of the center pixel of the window with the median height value of all valid pixels within that window at each iteration. Median filtering effectively suppresses isolated abnormal high-value points caused by point cloud interpolation errors or noise, while also preserving sharp edges and peak structures such as treetops, avoiding excessive smoothing of treetops like mean filtering. Local extremum detection refers to the process of finding whether each pixel is the highest point in its local neighborhood on the filtered canopy height model; the local range is determined by the treetop search scale. The minimum tree height threshold is the height threshold value used to filter tree vertices. The canopy growth seed set is the set of high-quality tree vertices retained after local extremum detection and threshold filtering.
[0039] Based on a defined filtering window scale, median filtering is performed on the original canopy height model to generate a denoised canopy height model. A moving window is constructed at a defined treetop search scale. For the denoised canopy height model, local extrema detection is performed pixel-by-pixel, marking the highest point within each window as a candidate tree vertex, completing the initial localization. Then, a fine-tuning stage is performed: the system reads the height value of each candidate tree vertex and compares it one by one with a defined minimum tree height threshold, eliminating all false targets below the minimum tree height threshold, such as shrubs and noise. Finally, the selected valid tree vertices are stored as point vector data according to their spatial coordinates and corresponding height values, and each vertex is assigned a unique identifier, forming a seed set for subsequent canopy region growth.
[0040] The adaptive parameter-driven median filtering and treetop extraction process effectively suppresses noise while preserving the true treetop structure to the greatest extent, significantly reducing the probability of false treetops, missed detections, and false detections. Combined with adaptive threshold filtering, low-lying vegetation and surface noise interference can be accurately removed, ensuring the purity and reliability of seed points. The generated normalized treetop seed set provides a stable starting point for region growth, effectively improving the boundary accuracy, region integrity, and algorithm robustness of subsequent canopy segmentation, while achieving full automation without manual intervention or empirical parameter tuning.
[0041] Based on the above embodiments, after generating the tree canopy growth seed set, the method further includes: acquiring elevation surface data representing terrain undulations; identifying steep slope areas based on the elevation surface data; and correcting the spatial position of the tree top located in the steep slope area to reduce tree top positioning deviation.
[0042] Elevation surface data refers to data from digital elevation models or digital surface models used to reflect the topographic relief and surface slope changes of a study area. It is the fundamental basis for judging the steepness of the terrain. Steep slope areas refer to geographical areas where the terrain slope exceeds the usual gentle range and the surface inclination is large. These areas are prone to geometric offset and segmentation deviation of treetops.
[0043] After generating the canopy growth seed set, elevation surface data to characterize terrain undulations are acquired. Based on the elevation surface data, steep slope areas in the study area are identified, and the possible geometric offsets of tree vertices in steep slope areas are determined. The spatial correction of the tree vertices in steep slope areas is performed to correct the offset tree vertices to reasonable positions, reducing the positioning error caused by terrain tilt. Finally, the corrected tree vertex set is used as the final input of the canopy growth seed set to replace the original coordinates that may have deviations, thereby improving the overall spatial accuracy of subsequent canopy segmentation.
[0044] By performing spatial position correction on the treetops in steep slope areas, the geometric offset of the treetops caused by terrain undulations can be effectively corrected, avoiding treetop positioning deviations and missegmentation of regions caused by terrain tilt. This significantly improves the spatial accuracy and reliability of treetop extraction under complex terrain conditions, providing more accurate seed points for subsequent canopy growth, and thus improving the consistency and stability of the overall canopy segmentation results.
[0045] S5. Calculate vegetation index based on hyperspectral imagery and generate vegetation mask. Determine the cropping region of the canopy height model based on the vegetation mask and the boundary of the target study area.
[0046] Vegetation indices are indices calculated through mathematical combinations of reflectance in specific bands of hyperspectral imagery. They are used to enhance and quantify vegetation information and include the Normalized Difference Vegetation Index (NDVI), Soil-Adjusted Vegetation Index (SAVI), Normalized Difference Moisture Index (NDWI), Normalized Difference Building Index (NDBI), and Enhanced Vegetation Index (EVI). A vegetation mask is a binary raster image used to distinguish between vegetated and non-vegetated areas. The cropped area of the canopy height model refers to the final effective processing range delineated on the original canopy height model after the combined effect of the vegetation mask and the study area boundary vector.
[0047] Specifically, the calculation of vegetation indices and generation of vegetation masks based on hyperspectral images includes: calculating the normalized difference vegetation index based on the corresponding bands of the hyperspectral images; performing binarization analysis on the normalized difference vegetation index based on a preset vegetation index threshold to generate a vegetation mask for distinguishing between vegetated and non-vegetated areas.
[0048] The Normalized Difference Vegetation Index (NDVI) is a specific vegetation index obtained through mathematical calculations of the near-infrared and red reflectance bands of hyperspectral images. The formula for calculating NDVI is: NDVI = (ρ_NIR) / (ρ_NIR) ρ_RED) / (ρ_NIR+ρ_RED), where ρ_NIR is the near-infrared reflectance and ρ_RED is the red light reflectance. The vegetation index threshold is a pre-set numerical threshold used to determine whether a pixel represents valid vegetation.
[0049] Based on the input hyperspectral imagery, reflectance data in the near-infrared and red bands are extracted. Using the formula for the Normalized Difference Vegetation Index (NDVI), a NDVI raster covering the entire study area is calculated. A preset vegetation determination threshold is used to perform global binarization analysis on the NDVI. Pixels with NDVI values greater than the threshold are classified as vegetation pixels, while pixels with NDVI values less than or equal to the threshold are classified as non-vegetation pixels, generating a binarized raster image, i.e., a vegetation mask. For example, with a vegetation determination threshold of 0.2, if a pixel's NDVI value is greater than 0.2, the pixel is marked as valid vegetation, typically assigned a value of 1; otherwise, the pixel is marked as non-vegetation or invalid, typically assigned a value of 0.
[0050] By calculating the normalized differential vegetation index based on hyperspectral imagery and performing binarization analysis according to a preset vegetation index threshold to generate a vegetation mask, it is possible to accurately distinguish between vegetated and non-vegetated areas, effectively eliminate interference from non-vegetated backgrounds such as soil, rocks, shadows, and buildings, provide a clean vegetation processing range for subsequent canopy segmentation, significantly reduce missegmentation and false canopy generation caused by non-vegetated areas, improve the accuracy and automation of vegetation area identification, and enhance the robustness and applicability of the overall algorithm in complex surface environments.
[0051] S6. Calculate the canopy height gradient based on the data of the cut area, and divide the cut area into the canopy edge area and the canopy center area according to the canopy height gradient.
[0052] The canopy height gradient is a numerical measure that characterizes the rate and direction of change of canopy height within a local space. It reflects the degree of height change from the center to the edge of the canopy and is a key criterion for distinguishing the center and edge of the canopy. The central area of the canopy refers to the region within the pruning area with a smaller height gradient, higher height values, and a gentler change, corresponding to the core area at the top of the canopy. The edge area of the canopy refers to the region within the pruning area with a larger height gradient and a rapid decrease in height, corresponding to the transition area at the outer boundary of the canopy.
[0053] Specifically, the canopy height gradient is calculated based on the data of the cropped area, and the cropped area is divided into the canopy edge area and the canopy center area according to the canopy height gradient. This includes: calculating the canopy height gradient based on the data within the cropped area and generating a gradient image; statistically analyzing the gradient values in the gradient image, and dividing the cropped area into the canopy edge area and the canopy center area based on a preset gradient quantile threshold, wherein the gradient value of the canopy edge area is higher than that of the canopy center area.
[0054] A gradient image is a raster image composed of the canopy height gradient values of each pixel, which can intuitively represent the spatial distribution of canopy height changes. The gradient quantile threshold is a critical value of quantiles obtained based on global statistical analysis of gradient values in the gradient image, used to distinguish between the canopy edge and central regions. The canopy height gradient is calculated based on canopy height model data within a cropped area centered on the tree vertex, and a corresponding gradient image is generated. The gradient values of all pixels within the gradient image are statistically analyzed, and the gradient values are classified according to a preset gradient quantile threshold. Regions with gradient values higher than the threshold are identified as canopy edge areas, and regions with gradient values lower than the threshold are identified as canopy central areas, thus automatically distinguishing between the canopy central and canopy edge areas within the cropped area.
[0055] By adaptively dividing the central and peripheral areas of the canopy based on the canopy height gradient and statistical quantile threshold, it is possible to objectively and accurately distinguish between areas with gentle height changes and areas with abrupt boundary changes within the canopy. This enables refined zoning of the canopy structure, providing a reliable basis for subsequent regional growth using different growth rules. It effectively avoids problems such as excessive expansion of the canopy boundary, adhesion between adjacent canopies, and unclear boundaries, significantly improving the accuracy and clarity of canopy segmentation.
[0056] S7. In the edge area of the canopy, the vegetation index and the data of the cropped area are linearly fused according to the preset weights. In the center area of the canopy, the original data of the canopy height model are retained to obtain the fused height surface.
[0057] The fused height surface refers to the result data obtained after differential fusion processing. In the edge area of the canopy, the fused height surface is a weighted composite value of the cropped area data and the vegetation index. In the center area of the canopy, the fused height surface maintains the original canopy height model height value unchanged.
[0058] Based on the above embodiments, the gradient values in the gradient image are statistically analyzed, and the cropping region is divided into a crown edge region and a crown center region based on a preset gradient quantile threshold. For example, if the gradient quantile threshold is 25%, the region with the top 25% of global gradient values is the crown edge region, and the region with relatively gentle height changes and gradient values ranking in the bottom 75% is the crown center region. Within the divided crown edge region, the cropping region height value and vegetation index value corresponding to each pixel are linearly synthesized according to preset weights to generate an enhanced boundary height value. In the crown center region, the original crown height model height value is retained unchanged. A spatially continuous fused height surface is output, which receives spectral information enhancement in the edge region and retains the original structural features in the center region. This surface will serve as the input data for crown region growth.
[0059] By linearly fusing vegetation index and canopy height data in the edge area of the canopy with preset weights, and retaining the original canopy height data in the center area of the canopy, the accuracy of vegetation differentiation in the edge area can be balanced. This ensures that the canopy height is not tampered with and maintains the original canopy shape, while using vegetation index to enhance the vegetation identification in the edge area, suppressing non-vegetation interference and height noise. This makes the fused height surface more closely match the real canopy boundary, effectively solving problems such as adjacent canopy adhesion, excessive edge growth, and blurred boundaries, and significantly improving the segmentation accuracy and contour rationality of subsequent area growth.
[0060] Specifically, in the crown edge region, the vegetation index and the cropped area data are linearly fused according to preset weights, including: spatial registration and resolution alignment of the vegetation index and the cropped area data so that they are in the same spatial position; within the crown edge region, the aligned vegetation index and the cropped area data are weighted linearly combined according to preset weights.
[0061] First, spatial registration and resolution alignment are performed on the vegetation index and canopy height data within the clipping area to ensure a one-to-one correspondence between their pixel locations and complete geographic consistency. Within the canopy edge region, the aligned vegetation index and canopy height data are linearly combined using preset weights to achieve linear fusion of the two types of data. For example, the vegetation index weight can be set to 0.3, and the clipping area data weight can be set to 0.7. The edge region fusion value is obtained through weighted calculation, ultimately forming a complete fused height surface.
[0062] By performing weighted linear combination according to preset weights in the crown edge area, height information and vegetation information can be effectively integrated while ensuring data spatial consistency. This not only makes full use of vegetation indices to enhance vegetation identification at the crown edge, but also ensures that the main characteristics of crown height are not destroyed through weight control. This effectively enhances the distinguishability of the crown edge, suppresses boundary ambiguity and adhesion between adjacent crowns, and avoids fusion errors caused by spatial misalignment, thereby improving the boundary accuracy and segmentation reliability of subsequent regional growth.
[0063] S8. Starting from the canopy growth seed set, perform region growth segmentation on the fusion height surface, determine the affiliation of each region on the fusion height surface, stop growth when the termination condition is met, and output the canopy segmentation result.
[0064] Specifically, starting with the canopy growth seed set, region growth segmentation is performed on the fusion height surface to determine the affiliation of each region on the fusion height surface. This includes: using each tree vertex in the canopy growth seed set as a seed, iteratively expanding and growing towards multiple surrounding pixels on the fusion height surface; during the growth process, calculating the height difference, height change rate, and spatial distance between each surrounding pixel and its corresponding tree vertex to determine the canopy to which the pixel belongs; where, when a pixel is determined to belong to multiple canopies, its unique affiliation canopy is determined through a conflict detection and allocation mechanism.
[0065] Region growing segmentation is an image segmentation algorithm that starts from a seed point and gradually incorporates eligible pixels in its spatial neighborhood into the same canopy region using specific decision rules. Region growing segmentation is an iterative expansion process that continues until the growth conditions are no longer met, with the ultimate goal of forming the complete boundary of each canopy. Iterative expansion starts at each tree vertex. In each iteration, all unassigned neighboring pixels on the current canopy region boundary are checked, and a decision is made based on the decision rules to include them in the canopy. This process is repeated until no new pixels meet the inclusion criteria.
[0066] Starting with a canopy growth seed set, where each tree vertex is an independent growth seed, iterative expansion growth is initiated on the fused height surface, centered on each seed, towards the surrounding unassigned cells. In each growth iteration, the height difference between the current candidate cell and its corresponding tree vertex is calculated, and combined with the local height change rate of the cell and its spatial distance from the tree vertex, a joint decision is made to evaluate whether the cell should belong to the current canopy. When a cell simultaneously meets the inclusion criteria of multiple different canopies during region growth, boundary competition occurs, and this cell is called a competing cell. These competing cells are identified through conflict detection, and a unique assigning canopy is determined for each competing cell through an allocation mechanism, for example, selecting the canopy with the smallest height difference, the closest distance, or the lowest overall cost. This ensures that each cell is ultimately assigned to only one canopy, forming a complete and non-overlapping single-tree canopy segmentation result.
[0067] Using each tree vertex as a seed, multi-directional iterative expansion growth is performed on the fused height surface. During the growth process, the height difference between the pixel and the seed point, the rate of height change, and the spatial distance are comprehensively calculated to determine the pixel's affiliation. Simultaneously, a conflict detection and allocation mechanism is employed to ensure unique pixel affiliation for overlapping canopies. This enables refined and adaptive segmentation of individual tree canopies, fully guaranteeing the rationality of canopy growth and the accuracy of boundaries. The conflict resolution mechanism ensures that each pixel belongs to only a single canopy, improving the completeness, uniqueness, and reliability of the canopy segmentation results, and providing a precise and standardized canopy boundary foundation for subsequent individual tree parameter extraction.
[0068] When the termination condition is met, growth stops and the canopy segmentation result is output, including: setting an adaptive growth stop threshold for each tree vertex that matches the height of the tree top; when the height of any pixel relative to the tree vertex drops more than the stop threshold, or when the current growth region comes into contact with the adjacent canopy region, the growth of the canopy in the direction of the current pixel is terminated, and the canopy segmentation vector result containing the tree vertex and canopy attribute information is output.
[0069] Based on the above embodiments, during the region expansion process starting from the seed set, an adaptive growth stopping threshold τ(h) = α × H_top is set for each tree vertex, which is proportional to its own height H_top. α is adaptively adjusted according to the tree height, varying between 0.08 and 0.12 to reasonably distinguish the crown width differences between tall trees and low vegetation. In each growth iteration, when the height decrease of any candidate pixel relative to its parent tree top exceeds the stop threshold τ(h) set for that crown, growth in that direction is terminated. Simultaneously, the spatial relationship between the current growth region and adjacent crown regions is detected in real time. Once contact or overlap is detected, growth is immediately terminated at the contact boundary. After all crown growth in all directions has terminated due to satisfying any of the above conditions, the system performs boundary vectorization on each finally determined crown region, calculates relevant attributes, and outputs a crown segmentation vector result containing the spatial position of the tree vertex, the crown boundary polygon, and the associated attribute information.
[0070] By setting an adaptive growth stopping threshold that matches the treetop height, and using exceeding the height descent limit and contact between adjacent canopies as dual termination conditions, the canopy growth boundary can adaptively match the height of different trees, avoiding the problems of excessive growth of low-growing canopies and insufficient growth of tall canopies caused by a fixed threshold. Simultaneously, timely stopping growth when adjacent canopies contact effectively prevents canopy overlap, boundary adhesion, and blurred boundaries, ensuring that each tree canopy has a clear, independent, and non-overlapping boundary.
[0071] This embodiment acquires the canopy height model and hyperspectral image of the study area, and performs spatial resolution identification on the canopy height model; performs height statistics on the effective area of the canopy height model to obtain basic statistical features; dynamically determines adaptive processing parameters based on the spatial resolution identification results and basic statistical features of the canopy height model; based on the determined adaptive processing parameters, performs median filtering denoising on the canopy height model, and uses local extremum detection and threshold screening to extract tree vertices, generating a canopy growth seed set; calculates vegetation indices based on the hyperspectral image and generates a vegetation mask, and then uses the vegetation mask and... The target study area boundary determines the clipping region of the canopy height model. Based on the data from the clipping region, the canopy height gradient is calculated, and the clipping region is divided into canopy edge and canopy center regions according to the canopy height gradient. In the canopy edge region, vegetation indices and data from the clipping region are linearly fused according to preset weights. In the canopy center region, the original data of the canopy height model is retained, resulting in a fused height surface. Starting from the canopy growth seed set, regional growth segmentation is performed on the fused height surface to determine the affiliation of each region. Growth stops when a termination condition is met, and the canopy segmentation result is output. By automatically identifying the spatial resolution of the canopy height model and dynamically determining adaptive processing parameters based on effective region height statistics, the system eliminates reliance on manual empirical parameters and can adapt to canopy segmentation in different regions, with different resolutions and different stand conditions, exhibiting higher cross-regional consistency. Simultaneously, by dividing the canopy edge and center regions based on the canopy height gradient, differentiated processing of different regions is achieved. In the canopy edge region, boundary contrast is enhanced, and the segmentation accuracy in weak gradient regions is improved, avoiding the adhesion of adjacent canopies. By preserving the original data features in the central area of the crown and suppressing noise interference and over-segmentation, the integrity and boundary clarity of the crown segmentation are significantly improved compared to the global uniform processing method, which is conducive to improving the segmentation accuracy.
[0072] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the technical solutions of the embodiments of the present invention.
Claims
1. An adaptive canopy segmentation method based on canopy height model and hyperspectral synergy, characterized in that, include: S1. Obtain the canopy height model and hyperspectral image of the study area, and perform spatial resolution identification on the canopy height model; S2. Perform height statistics on the effective area of the canopy height model to obtain basic statistical characteristics; S3. Based on the spatial resolution identification results and basic statistical characteristics of the canopy height model, dynamically determine the adaptive processing parameters; S4. Based on the determined adaptive processing parameters, after median filtering and denoising the canopy height model, local extremum detection and threshold screening are used to extract tree vertices and generate a canopy growth seed set. S5. Calculate vegetation index based on hyperspectral imagery and generate vegetation mask. Determine the cropping region of the canopy height model based on the vegetation mask and the boundary of the target study area. S6. Calculate the canopy height gradient based on the data of the cut area, and divide the cut area into the canopy edge area and the canopy center area according to the canopy height gradient; S7. In the edge area of the canopy, the vegetation index and the data of the cropped area are linearly fused according to the preset weights. In the center area of the canopy, the original data of the canopy height model are retained to obtain the fused height surface. S8. Starting from the canopy growth seed set, perform region growth segmentation on the fusion height surface, determine the affiliation of each region on the fusion height surface, stop growth when the termination condition is met, and output the canopy segmentation result.
2. The adaptive canopy segmentation method based on canopy height model and hyperspectral synergy according to claim 1, characterized in that, In step S2, height statistics are performed on the effective area of the canopy height model to obtain basic statistical characteristics, including: Identify and remove pixels without data from the canopy height model to obtain the effective region; The pixel heights within the effective area are statistically calculated to obtain the average height and the maximum height. The average height and maximum height are used as the basic statistical characteristics to characterize the canopy height in the study area.
3. The adaptive canopy segmentation method based on canopy height model and hyperspectral synergy according to claim 2, characterized in that, The adaptive processing parameters include the filtering window, minimum tree height threshold, and treetop search scale. In step S3, the adaptive processing parameters are dynamically determined based on the spatial resolution identification results and basic statistical characteristics of the canopy height model, including: Based on the ratio of average height to spatial resolution, the scale of the filtering window required for median filtering is dynamically determined. Based on the average height, calculate the minimum tree height threshold according to a preset proportional coefficient to exclude non-canopy targets; The treetop search scale for local extremum detection is dynamically determined based on the maximum height and its corresponding crown width scale estimate.
4. The adaptive canopy segmentation method based on canopy height model and hyperspectral synergy according to claim 3, characterized in that, In step S4, based on determined adaptive processing parameters, after median filtering and denoising of the canopy height model, local extremum detection and threshold screening are used to extract tree vertices, generating a canopy growth seed set, including: Median filtering was used to denoise the canopy height model using the filter window scale in the adaptive processing parameters. Local extrema detection is performed using the treetop search scale in the adaptive processing parameters to extract candidate tree vertices; By using the minimum tree height threshold in the adaptive processing parameters, candidate tree vertices are filtered, and candidate tree vertices that are lower than the minimum tree height threshold are removed. The spatial coordinates and corresponding height values of the tree vertices that have been filtered and retained are stored as point vector data, and each tree vertex is assigned a unique identifier to generate a seed set for tree crown growth.
5. The adaptive canopy segmentation method based on canopy height model and hyperspectral synergy according to claim 4, characterized in that, After generating the seed set for canopy growth, the following is also included: Acquire elevation surface data that characterizes topographic relief; Steep slope areas are identified based on elevation surface data, and the spatial position of treetops located in steep slope areas is corrected to reduce treetop positioning deviation.
6. The adaptive canopy segmentation method based on canopy height model and hyperspectral synergy according to claim 1, characterized in that, In step S5, calculating vegetation indices and generating vegetation masks based on hyperspectral images includes: Based on the corresponding bands of hyperspectral images, the normalized differential vegetation index is calculated. Based on a preset vegetation index threshold, the normalized differential vegetation index is binarized to generate a vegetation mask that distinguishes between vegetated and non-vegetated areas.
7. The adaptive canopy segmentation method based on canopy height model and hyperspectral synergy according to claim 1, characterized in that, In step S6, the canopy height gradient is calculated based on the data from the cut-off region, and the cut-off region is divided into a canopy edge region and a canopy center region according to the canopy height gradient, including: Calculate the canopy height gradient based on the data within the cropped area, and generate a gradient image; The gradient values in the gradient image are statistically analyzed, and based on a preset gradient quantile threshold, the cropping region is divided into the crown edge region and the crown center region, wherein the gradient value of the crown edge region is higher than that of the crown center region.
8. The adaptive canopy segmentation method based on canopy height model and hyperspectral synergy according to claim 1, characterized in that, In step S7, in the crown edge region, the vegetation index and the data of the cropped area are linearly fused according to a preset weight, including: Spatial registration and resolution alignment were performed between the vegetation index and the data of the cropped area to place them in the same spatial location. Within the edge area of the canopy, the aligned vegetation index and the data of the cropped area are combined linearly with preset weights.
9. The adaptive canopy segmentation method based on canopy height model and hyperspectral synergy according to claim 1, characterized in that, In step S8, starting with the canopy growth seed set, region growth segmentation is performed on the fusion height surface to determine the affiliation of each region on the fusion height surface, including: Using each tree vertex in the canopy growth seed set as a seed, iteratively expands and grows to multiple surrounding pixels on the fusion height surface; During the growth process, the height difference, height change rate, and spatial distance between each surrounding pixel and its corresponding tree vertex are calculated to determine the tree canopy to which the pixel belongs. When a pixel is determined to belong to multiple tree canopies, its unique tree canopy is determined through a conflict detection and allocation mechanism.
10. The adaptive canopy segmentation method based on canopy height model and hyperspectral synergy according to claim 9, characterized in that, Growth stops when the termination condition is met, and the canopy segmentation results are output, including: Set an adaptive growth stopping threshold for each tree vertex that matches the height of the tree top; When the height of any pixel relative to the tree vertex decreases beyond the stopping threshold, or when the current growth region comes into contact with an adjacent canopy region, the growth of the canopy in the direction of the current pixel is terminated, and a canopy segmentation vector result containing tree vertex and canopy attribute information is output.