Improved method for determining hemisphere photograph vegetation and forest gap threshold value through neighbor method

By adopting the improved neighbor method in hemispheric photos, taking into account the neighbor distance of pixel points and automatically determining the threshold, the accuracy and repeatability of hemispheric photos threshold determination in the prior art is solved, and a more accurate and reliable gap estimation is achieved, which is suitable for forestry and ecology research in complex environmental conditions.

CN119723318APending Publication Date: 2025-03-28刘娅斯 +3
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311252674.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-26
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The prior art has problems with accuracy and repeatability when automating threshold determination in hemispherical photographs, especially under variable environmental conditions, resulting in systematic bias and inaccurate gap estimation.

Method used

Using the improved neighbor method, by considering the neighbor distance of pixel points in image processing, the hemispheric photo vegetation and forest gap thresholds are automatically determined, and the standard curve of the optimal neighbor distance and gap is established, and the threshold is iteratively optimized to improve accuracy.

Benefits of technology

It significantly improves the accuracy of gap estimation, is suitable for wider forest canopy and complex environmental conditions, reduces manpower and material investment, is simple to operate and reliable results, and is suitable for forestry and ecological research.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

The invention discloses a method for determining a hemisphere photograph vegetation and forest gap threshold value by using an improved neighbor method. The method comprises the following steps: standardizing the size of a forest crown photograph; fitting a standard curve of the optimal neighbor distance and the clearance degree; substituting a neighbor distance and calculating a threshold value and a clearance degree; and determining an optimal threshold value and an optimal clearance degree by utilizing an iteration method. The invention relates to a method for determining a hemispherical photograph vegetation and forest gap threshold value by an improved neighbor method according to a power book requirement 1. The method is characterized by comprising the following steps of: 1) formulating a set of complete and widely applicable judgment scheme for the hemispherical photograph vegetation and forest gap threshold value; 2) the scheme is more accurate and reliable in result than a traditional algorithm and commercial software, is simpler and more convenient than manual judgment, and reduces manpower and material resource investment; 3) the neighbor method is standard in threshold judgment process, high in operability and detailed, clear and scientific in criterion, and 4) a judgment standard and an operation method for determining the threshold by using the improved neighbor method in a computer are formulated through a large number of experimental comparisons, so that the blank of domestic related research is filled.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method for determining the threshold values ​​of vegetation and forest gaps in hemispherical photos by using an improved neighbor method in a computer. Background Art

[0002] Hemispheric photographs are now widely used to provide important information on solar radiation dynamics, forest canopy structure and its contribution to biophysical processes, plant productivity and ecosystem properties (Jonckheere et al., 2017; Nakamura et al., 2017; Toda et al., 2018). They have the advantages of being portable and able to visualize data, making it easy to obtain vegetation structure variables (Yang et al., 2022). A prerequisite for analyzing hemispheric photographs is binary classification between sky and canopy pixels (Roxburgh and Kelly, 1995). Reliable binary classification is the first step to derive other canopy structure-related indicators, such as gap, canopy openness, leaf area index, direct and indirect site factors (Alivernini et al., 2018; Fang et al., 2019; Jonckheere et al., 2017; Madhumali et al., 2021).

[0003] Traditional manual thresholding between sky and canopy is laborious and time-consuming, somewhat arbitrary and subjective, and can lead to systematic biases (Nobis and Hunziker, 2005), which undermines the reliability of comparisons of light environments across plots (Glatthorn and Beckschäfer, 2014). In contrast, automated thresholding allows subsequent analyses to be performed more efficiently and consistently (Jonckheere et al., 2017). Although digital hemispherical photography is generally considered an accurate method, it is sometimes limited to specific lighting or canopy conditions (Li et al., 2021). Therefore, it is important to improve the accuracy and reproducibility of hemispherical photo thresholding (Cescatti, 2007; Díaz and Lencinas, 2018; Glatthorn and Beckschäfer, 2014; Jonckheere et al., 2005; Nobis and Hunziker, 2005).

[0004] There are many automatic general algorithms for thresholding (Jonckheere et al., 2005, 2017). Among them, the "edge detection" algorithm proposed by Nobis and Hunziker (2005) can avoid the multi-peak phenomenon that appears in the grayscale histogram when photos are taken under variable environmental conditions (Goodenough et al., 2012). Multi-peak phenomenon will cause large errors in threshold estimation of many algorithms (such as histogram shape-based methods and clustering-based threshold methods) (Glatthorn and Beckschäfer, 2014). Therefore, edge detection algorithms can retain well-lit leaves in more open canopy scenes (Jonckheere et al. 2017). Jonckheere et al. (2005) and Glatthorn and Beckschäfer (2014) compared various binary methods and found that the accuracy and reliability of the "edge detection" algorithm were among the best among these methods. However, this method significantly overestimates the actual gap degree (Cescatti, 2007; Glatthorn and Beckschäfer, 2014). Nobis (2005) noticed a significant difference between the manual threshold and the threshold of the "edge detection" algorithm, which is due to the systematic bias of the manual threshold. Inappropriate exposure also leads to incorrect estimates of gap degree by this method (Song et al., 2014). Niu (2021) found that the misclassification of vegetation is mainly related to mixed pixels, which may be caused by sun spots and canopy reflections. All of this evidence suggests that the "edge detection" algorithm can also be improved to obtain more accurate binary classification.

[0005] The principle of “edge detection” is to find a grayscale threshold that maximizes the local contrast between the edges of pixel regions classified as “crown” and “sky”. However, in traditional algorithms (Nobis and Hunziker, 2005), only neighboring pixels are involved in the calculation. Since “sky” pixels affect the grayscale values ​​of their neighboring canopy pixels (Leblanc et al., 2005), and the shadow edges (i.e., “penumbra” effect) caused by sunlight passing through leaves or canopy openings depend on the size of the gap (Pearcy and Way, 2012; Smith et al., 1989), we propose that the neighbor selection strategy of pixels will significantly affect the results and lead to inaccuracies found in the literature (Cescatti, 2007; Glatthorn and Beckschäfer, 2014; Nobis and Hunziker, 2005). In this application, we propose a new method to automatically determine the optimal threshold for binary classification. This method takes into account the neighbor distance, which refers to the distance between the pixels involved in the calculation, to eliminate the influence of the "sky" pixel on its adjacent canopy pixels. If the neighbor distance is 1, it is the original "edge detection" algorithm of Nobis and Hunziker (2005). This method can significantly improve the accuracy of gap estimation and can be applied to more open canopies, sunny days and other environmental conditions that are generally considered to be poor for shooting. It has a wider applicability to the wild environment and has broad application prospects in research fields such as forestry and ecology. Summary of the invention

[0006] The purpose of the present invention is to provide a method for determining the vegetation and forest gap thresholds of hemispherical photos by using an improved neighbor method.

[0007] The method comprises the following steps: (1) Use image processing tools and programs written by the author to process the original forest canopy photos taken with a fisheye lens into a perfect circular / square standard canopy image.

[0008] (2) Select at least 25 standard canopy images, run the program, extract the light channel information separately, convert it into a grayscale image, and randomly select multiple pixels in its field of view to manually determine whether they are "sky / vegetation". Find the true manual threshold and gap degree, and establish a standard curve of the optimal neighbor distance and gap degree.

[0009] (3) Using the standard curve, in the standard canopy image of the target forest canopy photo, substitute the neighbor distance into the program and calculate the gap threshold and gap degree.

[0010] (4) The neighbor distance is continuously improved in the program using an iterative method. When the gap threshold is fixed, it is the optimal threshold for the canopy photo.

[0011] The present invention optimizes and improves the original "edge detection" algorithm, and provides a new method for dividing vegetation and forest gaps in hemispherical photos. On the basis of correctly establishing a standard curve, it is an automatic, accurate and repeatable combination method. It can avoid the multi-peak phenomenon in the gray histogram and facilitate hemispherical photo shooting under a wider range of climatic conditions. The method effectively reduces the input of manpower and material resources, has a simple operation process, and reliable measurement results, and is suitable for wide application in related research in forestry and ecology. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 This is an example of a photo of the original forest canopy, with a size of 4000px×6000px and a resolution of 350dpi; Figure 2 This is an example of a standard canopy image, with a photo size of 3862px×3862px and a resolution of 350dpi; Figure 3 This is the relationship between the amount of pixels randomly selected by the author in the preliminary experiment and the gf change rate. 10 different color lines are used to represent the 10 photos used. The legend string is the photo number. Figure 4 The standard curve of neighbor distance and gap degree was fitted by the author using 25 canopy photos taken at the sample site; Figure 5-Figure 8 These are the four photos used by the author to test the reliability of the neighbor method vs. the manual judgment method. The photo numbers are: Figure 5 :BN1123, Figure 6 :WL193, Figure 7 :WL49, Figure 8 :WL133; Fig. 9 Technical flow chart for the improved edge detection method based on neighborhood distance, a: showing how to establish the optimal neighbor distance nd opt and manual determination of clearance gf manual , which is then applied to the iterative procedure; b: Demonstration of the automatic determination of the optimal iterative threshold ( t ite ) is an iterative process; Fig.10 The authors used a photo of a high-altitude oak secondary forest plot in Ailao Mountain, Yunnan, to test the neighbor method for low-gap stands. gf Improved effect, photo number: AL319. DETAILED DESCRIPTION

[0015] 1. Standardization of canopy photo size The original canopy photo taken with a fisheye lens is generally a rectangular picture with a colorful circular canopy image in the center and black surroundings. Therefore, the black part needs to be cropped first, leaving only the circular image in the center for subsequent processing. Currently, various commonly used image processing tools can achieve this function. This article takes Adobe Photoshop Elements 7.0 as an example to explain the general process and standards for processing canopy photos into circular images for reference: (1) Select the ellipse tool in the toolbar, select "Fixed Size" for mode, and enter the actual pixels (px) of the circular photo for both width and height. (2) Click the image to display a perfect circular selection area. Move the area to the area that just covers the photo, and try not to leave any edges. If the central image of the photo is not a perfect circle (such as an ellipse) due to the shooting angle, make sure that the image is completely covered by the selection area (it cannot be cropped), and the red dot on the edge of the lens used to determine the direction should also be retained. (3) "Copy" and "Paste" the cropped image into a newly created blank layer. You can adjust the resolution and size of the output image as needed, or just use the default option and save the image in JPEG format (.jpg).

[0016] Standard forest canopy photographs must be perfect circular / square images that completely include the forest canopy. The neighbor method generally has no fixed requirements for image resolution and size. Figure 1 , 2 Examples of forest canopy photos before and after processing.

[0017] 2. Fitting the standard curve of optimal neighbor distance and gap degree The standardized canopy photos were processed into grayscale images, and the color photos were manually thresholded to calculate the neighbor distance at this time. The standard curve of neighbor distance and gap degree was obtained through data statistical analysis software. The main steps are as follows: (1) Generate grayscale image: The author recommends using the blue light channel to process the standard photo in grayscale through image processing tools or programs written by the author. Because blue light is one of the most absorbed lights by plants, it can maximize the difference between "vegetation" and "sky" pixels. However, researchers can also use other color channels according to their habits and purposes, and this is not required.

[0018] Pixel points were randomly selected within the field of view of each canopy photo, and the visual judgment was made one by one whether it was "sky / vegetation". This paper uses a program written by us, which was mainly written using Matlab software (Matlab, R2010b, theMathWorks, Natick, Massachusetts, USA) and is divided into three parts: "Program 1: Randomly generate 200 points in a standard photo with a diameter of 3862 pixels" (hereinafter referred to as "Program 1"); "Program 2: Calculate the automatic threshold t of the photo using the blue channel" (hereinafter referred to as "Program 2"); "Program 3: Calculate the gap gf of the photo" (hereinafter referred to as "Program 3"). Researchers should install the software before using the program to establish the language environment.

[0019] The author's preliminary experimental results show that for a circular standard canopy photo with a diameter of 3862 pixels, using 800 random pixels is sufficient to accurately and reliably reflect the results of the entire photo ( Figure 3 ); Therefore, the author uses 800 points randomly selected from a standard photo with a diameter of 3862 pixels as an example in the article, but researchers can increase or decrease the number of sampled points in proportion to the actual size of their own photos, and the number of points can be modified in this program.

[0020] First, run "Program 1", select the standardized canopy photo in the pop-up dialog box, and click OK. Considering that displaying 800 points on a photo would be too dense and affect judgment, the author stipulates that only 200 points can be randomly generated in batches each time, which is completed in four times, and is displayed in a 9-pixel × 9-pixel red box (the center of the square is the extracted pixel point), and the horizontal coordinate position of the point (the number of rows from the top to the bottom of the entire photo) and the grayscale value (0~255) are marked with red numbers next to it. These sampling point information will be synchronously stored in a txt file with three columns, from left to right, namely the vertical coordinate, horizontal coordinate, and grayscale value.

[0021] Import the data in the txt file into the data analysis software for processing. This article takes Microsoft Excel 2016 as an example. Sort the 200 points from small to large by grayscale value (third column) and expand the selected area. The larger the grayscale value, the brighter the pixel. According to observation experience, points with grayscale values ​​less than 100 are generally regarded as "vegetation", and points with grayscale values ​​greater than 230 are regarded as "sky". Therefore, it is only necessary to pick out points with grayscale values ​​in the range of 100~230 for visual judgment. According to the coordinates, the pixel point can be quickly located in the original image marked by Matlab, and a judgment can be made whether the point is "sky / vegetation". All points with grayscale values ​​less than 100 are recorded as 0, and all points with grayscale values ​​greater than 230 are recorded as 1, and the results are recorded in the fourth column of the Excel table.

[0022] Repeat the above judgment steps four times to obtain the judgment results of 800 random points in total. Rearrange the 800 points in ascending order of grayscale value, and pick out the points in disorder between 0 and 1 in the fourth column, starting from the first point judged as 1 and ending with the last point judged as 0. In theory, points less than the grayscale threshold (the front) should be 0 (vegetation) and points greater than the grayscale threshold (the back) should be 1 (sky), so the points between vegetation and sky are considered mixed points, which are all points that may be misclassified. The proportion of mixed points usually needs to be controlled within 1.88% (=15 / 800) of the total pixels. In the transition zone of mixed points, there are grayscale values ​​where the number of misjudged vegetation points is equal to the number of misjudged sky points, which are regarded as the true manual threshold ( t manual ). Calculate the manually determined clearance at this time ( gf manual ).

[0023] turn up gf manual Corresponding neighbor distance nd opt : Change the value of a in "Program 2" to a certain value (usually starting from 1) as the neighbor distance, and run the program to get the first automatic threshold t opt (the "opt" value output by the program), then modify the a value (a=a+1), and repeat the above steps until t opt Closest to t manual The value of a at this time is the optimal neighbor distance nd opt .

[0024] It is recommended to use at least 25 sample photos for fitting. nd opt and gf manual The standard curve is generally in the following form:

[0025] Where a and d are the parameters obtained by fitting. Figure 4 Example of a standard curve fitted by the authors.

[0026] Using the established standard curve, the numerical relationship between the neighbor distance and the gap degree of any target canopy photo (not necessarily the photo used to fit the curve) can be determined. The steps are as follows: (1) Try a neighbor distance (usually starting from 1), substitute it into "Program 2" and run it to calculate the automatic threshold of the photo.t opt (the "opt" value output by the program); (2) t opt Substitute it into "Program 3" and run it (modify the b value) to get the automatic clearance. gf opt (the "gf" value output by the program).

[0027] 4. Use iterative method to determine the optimal threshold ( t ite ) and the optimum clearance ( gf ite ) According to the automatic clearance gf opt , use the standard curve formula to calculate the new neighbor distance, and modify the neighbor distance starting from step 3, (1) re-run "Program 2" to determine the new t opt 'With the original t opt Are they consistent? (2) If t opt '≠ t opt , then t opt 'Substitute into "Program 3" to find gf opt ', calculate the new neighbor distance using the standard curve ( nd opt '), modify the value of a in "Program 2" = nd opt '; (3) Repeat the operations of steps (1) and (2) until t opt '= t opt When it ends.

[0028] At this time, the iteration method produces a fixed t opt ' is the optimal threshold ( t ite ), whose corresponding gf opt ' is the optimal gap ( gf ite ).

[0029] We will use the gap degree obtained by the neighbor method ( gf ite ) and the true value of the gap obtained by manual judgment ( gf manual ) and compared the results (Table 1). gfite The relative error is calculated as follows: Relative error = ( gf ite - gf manual ) / gf manual The results show that in the four randomly selected images with different gradients from small to large gf manual In the canopy photo, gf ite The relative error of the method can be controlled within 6%, while the relative error of the traditional method is as high as 36%, and the relative error of WinSCANOPY commercial software is as high as 41%. This shows that the new method we invented is feasible in operation, its results are reliable, and it can effectively improve the accuracy of the threshold compared with the general method.

[0030] The standard canopy photos used for inspection are shown in Figure 5-Figure 8 In Table 1, “Relative error of traditional algorithm (%)” means nd =1, the relative error of the gap degree is obtained by using the automatic threshold calculated by the traditional method; "Relative error of variance between groups (%)" means the relative error of the gap degree is obtained by using the automatic threshold calculated by WinSCANOPY software.

[0031]

[0032] For the technical flow chart, please refer to the “Description of the Figures” section. Fig. 9 .

[0033] Here are some key points of canopy photography technology involved in this patent: (1) The standard curve is usually in the gap ( gf ) between 0-30%. This method is generally applicable to forest stands of any density, but the improvement effect is often better for forest stands with lower interstices (denseer canopies). For example, the author used a photo of a high-altitude oak secondary forest plot in Ailao Mountain, Yunnan (see the "Figure Description" section). Fig.10 , photo number "AL319"), and found that the automatic threshold method (i.e., the maximum variance method calculated by WinSCANOPY) gf is 3.9%, while the neighbor distance threshold method of this patent invention obtains gf is 0.6%. At this time, the neighbor method gf The improvement rate is as high as 84.6%.

[0034] (2) Manual judgment of canopy photos should generally follow a fixed standard to minimize errors caused by subjectivity. If multiple people are involved in the photo judgment process, efforts should be made to unify the standards, such as training all manual judgment operators on photo samples in advance.

[0035] (3) In addition to manual judgment, a bar photometer can be used to quickly and easily judge gf Since its operation method does not belong to the invention of this patent, it will not be described here.

Claims

1. A method for determining vegetation and forest gap thresholds in hemispherical photos using an improved neighbor method, characterized in that: The method described improves the traditional "edge detection" algorithm by using neighbor distance, so that pixels farther away, not just adjacent pixels, are involved in the calculation, thereby more accurately and automatically determining the optimal grayscale threshold for binary classification.

2. The method for determining vegetation and forest gap thresholds in hemispherical photos by using the improved neighbor method according to claim 1, characterized in that: The following steps are involved: Step 1: Standardize the size of canopy photos; Step 2: Fitting the standard curve of the best neighbor distance and gap degree, including: generating grayscale images and manually thresholding the color photos, and establishing the standard curve; Step 3: Substitute the neighbor distance and calculate the threshold and gap degree; Step 4: Use the iterative method to determine the optimal threshold and the optimal gap.

3. The method for manually determining a threshold value and establishing a standard curve for color photos according to claim 2, characterized in that: In the process of manual threshold determination of color photos, it is necessary to run the first and second parts of the program we wrote in Matlab software, which are named "Program 1: Randomly generate 200 points in a standard photo with a diameter of 3862 pixels" and "Program 2: Use the blue channel to calculate the automatic threshold t of the photo".

4. The method of substituting neighbor distances and calculating thresholds and gap degrees according to claim 2, characterized in that: In the process of manual threshold determination of color photos, it is necessary to run the third part of the program we wrote in Matlab software, which is called "Program 3: Calculate the gap gf of the photo".