Forest basic tree measurement factor estimation method and system and computer program

By taking marked forest photos and using semantic segmentation models for image segmentation, combined with the principle of small hole imaging, the traditional forest measurement method is solved inaccurate tree calculations and difficult measurement of multiple trees on slopes, and a fast and accurate measurement of basic tree measurement factors for multiple trees is achieved.

CN119693395AActive Publication Date: 2025-03-25RES INST OF FOREST RESOURCE INFORMATION TECHN CHINESE ACADEMY OF FORESTRY

Patent Information

Application Number
CN202411907326.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-03-25
Estimated Expiration
2044-12-24

AI Technical Summary

Technical Problem

The existing forest measurement methods have the problem of inaccurate calculation when dealing with slopes or trees that are not grown vertically, and traditional methods are difficult to calculate the basic tree measurement factors of multiple trees at the same time.

Method used

By taking marked forest photos, the trained semantic segmentation model is used to automatically segment the image, and combining the principles of small hole imaging and photogrammetry, the basic tree measurement factor of forests is calculated.

Benefits of technology

The basic tree measurement factors of multiple trees are quickly and accurately calculated, reducing costs, improving calculation efficiency, and improving measurement accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119693395A_ABST
    Figure CN119693395A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a system for estimating basic tree measurement factors of a forest tree and a computer program. The method comprises the following steps of: applying a mark with a preset height on a trunk of the forest tree to be detected; calibrating a shooting device, acquiring internal parameters of the shooting device, and shooting a picture of the forest to be detected by using the shooting device; constructing and training an image segmentation model to segment the photo, and obtaining a trunk area coordinate and a mark area coordinate of the forest to be detected; and according to the coordinates of the trunk area, the coordinates of the marked area, the actual height of the marked area and the internal parameters of the shooting device, based on the pinhole imaging and photogrammetry principle, obtaining a forest basic measurement factor estimation result. According to the technical scheme provided by the invention, the picture of the forest with the mark is shot, the trained semantic segmentation model is utilized to realize automatic segmentation of the image, then the forest basic tree measurement factor estimation result can be calculated based on the pinhole imaging and photogrammetry principle, and the precision of forest basic tree measurement factor estimation can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of forest measurement, and in particular to a method, system and computer program for estimating basic tree measurement factors of forests. Background Art

[0002] In forest tree measurement, trunk diameter, tree height and timber volume are the basic tree measurement factors. Rapidly and accurately obtaining basic tree measurement factors has always been a concern of forestry researchers and forestry production.

[0003] At present, there are some methods for measuring the diameter at breast height and tree height of trees, and indirectly estimating the volume of a single tree. These measurement methods are mainly divided into contact and non-contact methods. The contact method is the traditional use of calipers, tape measures, elastic recording ropes, etc.; the non-contact method is to achieve long-distance measurement through sensors and other methods, including photogrammetry of ground cameras, three-dimensional point cloud reconstruction based on ground images, and ground laser scanning derived from LiDAR. Although tree measurement factors including diameter at breast height, tree height, and volume can be obtained based on the three-dimensional structure of a single tree point cloud, there are still many hidden costs in data processing and data collection. For example, the equipment price is very expensive, and the calculation accuracy depends on the quality of the data obtained. In addition, compared with extracting the parameters of the three-dimensional structure of trees, it is also possible to measure the basic tree measurement factors of forest trees based on two-dimensional ground images. This type of method is simpler, faster, and less costly.

[0004] In nature, many trees grow on slopes, or some trees do not grow completely vertically, which poses a challenge to the calculation of basic tree measurement factors. The traditional single-tree volume formula assumes that the trunk is a regular geometric body for calculation, or approximates the volume based on the shape number, but the calculation is not accurate enough due to the fact that the trees do not grow vertically. In addition, the traditional measurement method does not take into account the situation where there are multiple trees of different distances in an image, which has certain limitations. Summary of the invention

[0005] In view of the above-mentioned deficiencies in the current technology, the present invention provides a method for estimating basic tree measurement factors of forest trees. By taking photos of marked trees and using a trained semantic segmentation model, automatic image segmentation is achieved. Then, based on pinhole imaging and photogrammetry principles, the estimation results of the basic tree measurement factors of forest trees can be calculated.

[0006] To achieve the above object, the embodiments of the present invention adopt the following technical solutions: A method for estimating basic tree measurement factors of forest trees comprises the following steps: Applying marks of predetermined heights on the trunks of trees to be inspected; Calibrate the camera device, obtain internal parameters of the camera device, and use the camera device to take photos of the trees to be detected; Build and train an image segmentation model to segment the photos and obtain the trunk area coordinates and marking area coordinates of the trees to be detected; According to the coordinates of the trunk area and the marked area, the actual height of the marked area, the internal parameters of the shooting device, and based on the principles of pinhole imaging and photogrammetry, the estimation results of the basic tree measurement factors of the forest are obtained.

[0007] According to one aspect of the present invention, the mark has a predetermined height in the vertical direction and covers the shooting width of the entire tree trunk in the horizontal direction.

[0008] According to one aspect of the present invention, the step of calibrating the camera to obtain internal parameters of the camera includes: The Zhang Zhengyou chessboard image was captured by a camera, and the open source OpenCV calibration method was used to calibrate the camera to obtain the internal parameters of the camera.

[0009] According to one aspect of the present invention, the internal parameters of the shooting device include the focal length of the shooting device, the coordinates of the principal point, and the lens distortion coefficient.

[0010] According to one aspect of the present invention, the image segmentation model is a semantic segmentation model.

[0011] According to one aspect of the present invention, the method for estimating basic tree measurement factors of forest trees further comprises: Generate a json file based on the trunk area coordinates and marker area coordinates.

[0012] According to one aspect of the present invention, obtaining the estimation result of the basic tree measurement factor of the forest tree based on the pinhole imaging and photogrammetry principle according to the coordinates of the trunk area and the coordinates of the marked area, the actual height of the marked area, and the internal parameters of the shooting device includes: According to the coordinates of the trunk area, the coordinates of the marked area, and the actual height of the marked area, the diameter and height of the trunk are calculated based on the principles of pinhole imaging and photogrammetry.

[0013] According to one aspect of the present invention, obtaining the estimation result of the basic tree measurement factor of the forest tree based on the pinhole imaging and photogrammetry principle according to the coordinates of the trunk area and the coordinates of the marked area, the actual height of the marked area, and the internal parameters of the shooting device also includes: The tree trunks are divided into infinite segments, and based on the idea of ​​limit summation, the volume of the forest is calculated using the diameter and height of the trunks.

[0014] A system for estimating basic tree measurement factors of forest trees, based on the method for estimating basic tree measurement factors of forest trees as described above, comprises: A marking module, used for applying a mark of a predetermined height on the trunk of the tree to be inspected; A shooting module is used to calibrate the shooting device, obtain the internal parameters of the shooting device, and use the shooting device to take pictures of the trees to be detected; A segmentation module is used to construct and train an image segmentation model to segment the photo and obtain the trunk area coordinates and the marking area coordinates of the trees to be detected; The estimation module is used to obtain the estimation results of the basic tree measurement factors of forest trees based on the coordinates of the trunk area and the marked area, the actual height of the marked area, and the internal parameters of the shooting device, based on the principles of pinhole imaging and photogrammetry.

[0015] A computer program, when executed, implements the steps of the above-mentioned method for estimating basic tree measurement factors of forest trees.

[0016] Advantages of the present invention: The present invention provides a method for estimating basic tree measurement factors of forest trees. By taking photos of marked trees and using a trained semantic segmentation model, automatic image segmentation is achieved. Then, based on pinhole imaging and photogrammetry principles, the estimation results of the basic tree measurement factors of forest trees can be calculated.

[0017] This method can realize the calculation of basic tree measurement factors of multiple trees through one image; it does not need the help of the network, only needs a camera or mobile phone to take images, no expensive detection equipment is required, it is convenient to use in practice, and can reduce costs; it uses an open source trained semantic segmentation model to realize automatic image segmentation, and there is no need to consume manpower and material resources to train the image segmentation model, which can greatly improve the calculation efficiency.

[0018] This method ensures that the trunk mark and the tree to be measured are in the same plane. Compared with the method of using reference objects, it effectively guarantees the measurement of the distance from the photographer to the trunk and can improve the accuracy of the estimation of the basic tree measurement factors of the forest. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 It is a flow chart of a method for estimating basic tree measurement factors of forest trees according to the present invention; Figure 2 The trunk spray marking of the present invention; Figure 3 Segmenting the trunk area and the marking area of ​​the trees using the image segmentation model of the present invention; Figure 4The geometric relationship during the actual measurement of the present invention; Figure 5 The present invention provides for dividing a tree trunk into n sections for calculating the volume of trees. DETAILED DESCRIPTION

[0021] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0022] Embodiment 1

[0023] like Figure 1 As shown, a method for estimating basic tree measurement factors of forest trees includes the following steps: S1: Marking of a predetermined height is applied to the trunk of the tree to be inspected.

[0024] The mark is: a predetermined height in the vertical direction, and covers the shooting width of the entire tree trunk in the horizontal direction.

[0025] In practical applications, conspicuous red paint can be used to spray marks on tree trunks, such as Figure 2 As shown, you can use a hollow rectangular cardboard to assist spraying to ensure that the sprayed mark meets the requirements. You can also tie a flexible reference object on the tree trunk as a mark, such as a brightly colored tape.

[0026] This spray-painted mark or flexible reference tied to the tree is attached to the trunk, which is equivalent to a known length on the trunk itself. It is more effective than using a hanging reference (not close to the trunk), and the final measurement accuracy is also higher.

[0027] The use of paint spray marking is not only suitable for obtaining basic tree measurement factors for a single forest. According to the characteristics of tree growth, the width of the paint will not change during the height growth and radial growth of the tree. This eliminates the need to re-spray the marks for each measurement. Therefore, it is more convenient to obtain basic tree measurement factors for multiple periods of forests in the future.

[0028] S2: Calibrate the shooting device, obtain internal parameters of the shooting device, and use the shooting device to take photos of the trees to be detected.

[0029] In practical applications, the photographing device used in this method can be a convenient photographing device such as a digital camera, a smart phone, etc.

[0030] Preferably, the calibrating the camera device to obtain internal parameters of the camera device includes: The Zhang Zhengyou chessboard image was captured by a camera, and the open source OpenCV calibration method was used to calibrate the camera to obtain the internal parameters of the camera.

[0031] Specifically, the internal parameters of the shooting device include the focal length of the shooting device, the coordinates of the principal point, the lens distortion coefficient, etc.

[0032] The checkerboard image consists of a series of alternating black and white squares. The corner points of each square are clear feature points. These corner points are easy to detect and identify in the image, so they are widely used in the camera calibration process.

[0033] Camera calibration using OpenCV is a common computer vision task. The specific steps are as follows: (1) Prepare calibration images: The camera takes Zhang Zhengyou chessboard images from different angles. These images should cover different viewing angles and focal lengths of the camera to ensure the accuracy of calibration.

[0034] (2) Detect corner points: Use the corner detection algorithm provided by OpenCV (such as Harris corner detection or Shi-Tomasi corner detection) to detect the checkerboard corner points in each image. These corner points will be used as feature points in the calibration process.

[0035] (3) Solving intrinsic and extrinsic parameters: Using the detected corner point coordinates and the known world coordinates of the chessboard corner points, we can solve the intrinsic and extrinsic parameters of the camera.

[0036] (4) Evaluate the calibration results: The calibration results are usually evaluated by calculating the reprojection error, that is, calculating the error when the calibrated camera parameters project the three-dimensional world coordinates onto the two-dimensional image coordinates. If the error is small, it means that the calibration result is relatively accurate.

[0037] When photographing trees, both the trunk range and the marked area on the trunk must be included in the photograph, and the photographed marks need to cover the entire width of the trunk horizontally. You can take photos of multiple trees at the same time and calculate the basic tree measurement factors of the trees together.

[0038] While shooting, the inclination angle of the shooting device is recorded by the gyroscope built into the shooting device, which is used for the subsequent calculation of the basic tree measurement factor of the forest. In actual applications, some cameras have built-in gyroscopes, and most smartphones have built-in gyroscopes. Shooting is performed using a shooting device with a built-in gyroscope.

[0039] S3: Build and train an image segmentation model to segment the photos and obtain the trunk area coordinates and marking area coordinates of the trees to be detected.

[0040] The image segmentation model can segment the tree trunk and the marked area on the trunk from the image, such as Figure 3As shown, finally, the trunk region coordinates and the marking region coordinates are obtained. The trunk region coordinates include: the image mask coordinates obtained by segmenting the trunk; the marking region coordinates include: the image coordinates of the paint boundary points.

[0041] In practical applications, the image segmentation model is a semantic segmentation model. Prepare some forest photos, manually mark and segment the tree trunks and mark the areas, build a training set, train the semantic segmentation model, and obtain the image segmentation model.

[0042] In practical applications, training image segmentation models from scratch is time-consuming and laborious. You can also directly use open source trained semantic segmentation models, such as U-Net, SegFormer, KTSE, etc.

[0043] In practical applications, when the image segmentation model is used to segment images, the intersection over union (IoU) reaches 0.9655 and the pixel segmentation accuracy reaches 0.9987, which is comparable to the accuracy of manual labeling.

[0044] S4: According to the coordinates of the trunk area and the marked area, the actual height of the marked area, and the internal parameters of the shooting device, based on the pinhole imaging and photogrammetry principles, the estimation results of the basic tree measurement factors of the forest are obtained.

[0045] Step S4 includes: According to the coordinates of the trunk area and the marked area, the actual height of the marked area, and the internal parameters of the shooting device, the diameter and height of the trunk are calculated based on the principles of pinhole imaging and photogrammetry.

[0046] In actual measurement, the geometric relationship is as follows Figure 4 As shown, ① is the side view when the camera is shooting, ② is the image plane of the camera, ③ is the geometric abstract image when the camera is shooting, ④ is the geometric abstract image when the camera is shooting, and ⑤ is the cross section of the tree trunk.

[0047] definition ,but

[0048] like Figure 4 As shown in ②, the focus F of the shooting device and the two points on the image plane form a triangle, a, b, c are the three sides of the triangle, φ is the angle between the vertex F and the triangle, is the area of ​​the triangle calculated by Heron's formula.

[0049] Figure 4In the figure, point F is the focus of the camera; Image plane is the plane where the light forms an image after passing through the lens. In the camera system, the image plane is usually the location of the photosensitive element of the camera, and a coordinate system including the X-axis and the Y-axis is established on the image plane; Principal point is the principal point. In photography and optics, the principal point refers to the point where the principal axis of the camera lens intersects with the image plane. The principal point is usually the center point of the image plane, but it may also be offset due to design and manufacturing differences of the camera; Object plane is the plane where the trunk to be measured is located; A0 and B0 are the upper and lower edge points of the marking area respectively. Since the vertical direction of the marking area is a predetermined height, the distance between points A0 and B0 on ​​the same vertical line is the predetermined height; A i , B i A0 and B0 are the corresponding points on the image plane; P0 and H0 are any two points on the tree trunk in the image. i , H i is the corresponding point on the image plane; L0 and R0 are the two points where the light from the camera intersects the edge of the tree trunk; point O is the center of the cross section of the tree trunk; M 01 , G 01 The two points where the light from the shooting device intersects with the extended line of the trunk diameter; E is the intersection of line segments OF and L0R0.

[0050] In the coordinate system of the camera, the Euclidean distance is used, x is used to replace the focal length, and y is used to replace the distance from a point to the principal point. The distance z from the point to the focus is:

[0051] The diameter d at any position of the trunk can be calculated according to formula (1), formula (2) and formula (3).

[0052] (1) (2) (3) Take point G on the trunk 02 According to formula (4), the height G of any position of the trunk can be calculated 01 G 02 .

[0053] In practical applications, the basic tree measurement factors of forest trees calculated by this method are compared with the measured values ​​collected manually. Images of 64 trees including Metasequoia, Ginkgo, Larix principis-rupprechtii, and Hickory were collected manually, with a total of 189 trunk diameters and 159 trunk heights. The results showed that the absolute average deviation of the 189 diameters was 0.4181 cm, the average standard deviation was 0.5577 cm, and the average root mean square error was 0.6970 cm; the absolute average deviation of the 159 trunk heights was 0.5564 cm, the average standard deviation was 0.4389 cm, and the average root mean square error was 0.7087 cm. Therefore, this method can be comparable to the accuracy of manually measuring the basic tree measurement factors of forest trees.

[0054] The beneficial effects of this embodiment are: This method can realize the calculation of basic tree measurement factors of multiple trees through one image; it does not need the help of the network, only needs a camera or mobile phone to take images, no expensive detection equipment is required, it is convenient to use in practice, and can reduce costs; it can realize automatic segmentation of images by using an open source trained semantic segmentation model, and no longer needs to consume manpower and material resources to train the image segmentation model, which can greatly improve the calculation efficiency; based on the principles of pinhole imaging and photogrammetry, the diameter and height of the tree trunk can be calculated.

[0055] This method ensures that the trunk mark and the tree to be measured are in the same plane. Compared with the method of using reference objects, it effectively guarantees the measurement of the distance from the photographer to the trunk, and in theory can improve the accuracy of the estimation of the basic tree measurement factors of forest trees.

[0056] Embodiment 2 like Figure 1 As shown, a method for estimating basic tree measurement factors of forest trees includes the following steps: S1: Marking of a predetermined height is applied to the trunk of the tree to be inspected.

[0057] The mark is: a predetermined height in the vertical direction, and covers the shooting width of the entire tree trunk in the horizontal direction.

[0058] In practical applications, conspicuous red paint can be used to spray marks on tree trunks, such as Figure 2 As shown, you can use a hollow rectangular cardboard to assist spraying to ensure that the sprayed mark meets the requirements. You can also tie a flexible reference object on the tree trunk as a mark, such as a brightly colored tape.

[0059] This spray-painted mark or flexible reference tied to the tree is attached to the trunk, which is equivalent to a known length on the trunk itself. It is more effective than using a hanging reference (not close to the trunk), and the final measurement accuracy is also higher.

[0060] The use of paint spray marking is not only suitable for obtaining basic tree measurement factors for a single forest. According to the characteristics of tree growth, the width of the paint will not change during the height growth and radial growth of the tree. This eliminates the need to re-spray the marks for each measurement. Therefore, it is more convenient to obtain basic tree measurement factors for multiple periods of forests in the future.

[0061] S2: Calibrate the shooting device, obtain internal parameters of the shooting device, and use the shooting device to take photos of the trees to be detected.

[0062] In practical applications, the photographing device used in this method can be a convenient photographing device such as a digital camera, a smart phone, etc.

[0063] Preferably, the calibrating the camera device to obtain internal parameters of the camera device includes: The Zhang Zhengyou chessboard image was captured by a camera, and the open source OpenCV calibration method was used to calibrate the camera to obtain the internal parameters of the camera.

[0064] Specifically, the camera internal parameters include camera focal length, principal point coordinates, lens distortion coefficient, etc.

[0065] The checkerboard image consists of a series of alternating black and white squares. The corner points of each square are clear feature points. These corner points are easy to detect and identify in the image, so they are widely used in the camera calibration process.

[0066] Camera calibration using OpenCV is a common computer vision task. The specific steps are as follows: (1) Prepare calibration images: The camera takes Zhang Zhengyou chessboard images from different angles. These images should cover different viewing angles and focal lengths of the camera to ensure the accuracy of calibration.

[0067] (2) Detect corner points: Use the corner detection algorithm provided by OpenCV (such as Harris corner detection or Shi-Tomasi corner detection) to detect the checkerboard corner points in each image. These corner points will be used as feature points in the calibration process.

[0068] (3) Solving intrinsic and extrinsic parameters: Using the detected corner point coordinates and the known world coordinates of the chessboard corner points, we can solve the intrinsic and extrinsic parameters of the camera.

[0069] (4) Evaluate the calibration results: The calibration results are usually evaluated by calculating the reprojection error, that is, calculating the error when the calibrated camera parameters project the three-dimensional world coordinates onto the two-dimensional image coordinates. If the error is small, it means that the calibration result is relatively accurate.

[0070] When photographing trees, both the trunk range and the marked area on the trunk must be included in the photograph, and the photographed marks need to cover the entire width of the trunk horizontally. You can take photos of multiple trees at the same time and calculate the basic tree measurement factors of the trees together.

[0071] While shooting, the inclination angle of the shooting device is recorded by the gyroscope built into the shooting device, which is used for the subsequent calculation of the basic tree measurement factor of the forest. In actual applications, some cameras have built-in gyroscopes, and most smartphones have built-in gyroscopes. Shooting is performed using a shooting device with a built-in gyroscope.

[0072] S3: Build and train an image segmentation model to segment the photos and obtain the trunk area coordinates and marking area coordinates of the trees to be detected.

[0073] The image segmentation model can segment the tree trunk and the marked area on the trunk from the image, such as Figure 3 As shown, finally, the trunk region coordinates and the marking region coordinates are obtained. The trunk region coordinates include: the image mask coordinates obtained by segmenting the trunk; the marking region coordinates include: the image coordinates of the paint boundary points.

[0074] In practical applications, the image segmentation model is a semantic segmentation model. Prepare some forest photos, manually mark and segment the tree trunks and mark the areas, build a training set, train the semantic segmentation model, and obtain the image segmentation model.

[0075] In practical applications, training image segmentation models from scratch is time-consuming and laborious. You can also directly use open source trained semantic segmentation models, such as U-Net, SegFormer, KTSE, etc.

[0076] Preferably, the above open source model can also be used as a basic framework to fine-tune and improve the model according to the task requirements of this method. Specifically, a portion of images can be selected and manually segmented as a test data set. The test data set is then used to retrain the open source model, adjust the model parameters, and improve the segmentation accuracy of forest images.

[0077] In practical applications, when the image segmentation model is used to segment images, the intersection over union (IoU) reaches 0.9655 and the pixel segmentation accuracy reaches 0.9987, which is comparable to the accuracy of manual labeling.

[0078] Preferably, the method for estimating basic tree measurement factors of forest trees further comprises: Generate a json file based on the trunk area coordinates and marker area coordinates.

[0079] In practical applications, the image mask coordinates of the trunk segmentation and the image coordinates of the paint boundary points obtained in step S3 can be saved in a json file for the next step of calculating the basic tree measurement factors of the forest.

[0080] S4: According to the coordinates of the trunk area and the marked area, the actual height of the marked area, and the internal parameters of the shooting device, based on the pinhole imaging and photogrammetry principles, the estimation results of the basic tree measurement factors of the forest are obtained.

[0081] Step S4 includes: S41: According to the coordinates of the trunk area and the marked area, the actual height of the marked area, and the internal parameters of the shooting device, the diameter and height of the trunk are calculated based on the pinhole imaging and photogrammetry principles.

[0082] In actual measurement, the geometric relationship is as follows Figure 4 As shown, ① is the side view when the camera is shooting, ② is the image plane of the camera, ③ is the geometric abstract image when the camera is shooting, ④ is the geometric abstract image when the camera is shooting, and ⑤ is the cross section of the tree trunk.

[0083] definition ,but

[0084] like Figure 4 As shown in ②, the focus F of the shooting device and the two points on the image plane form a triangle, a, b, c are the three sides of the triangle, φ is the angle between the vertex F and the triangle, is the area of ​​the triangle calculated by Heron's formula.

[0085] Figure 4 In the figure, point F is the focus of the camera; Image plane is the plane where the light forms an image after passing through the lens. In the camera system, the image plane is usually the location of the photosensitive element of the camera, and a coordinate system including the X-axis and the Y-axis is established on the image plane; Principal point is the principal point. In photography and optics, the principal point refers to the point where the principal axis of the camera lens intersects with the image plane. The principal point is usually the center point of the image plane, but it may also be offset due to design and manufacturing differences of the camera; Object plane is the plane where the trunk to be measured is located; A0 and B0 are the upper and lower edge points of the marking area respectively. Since the vertical direction of the marking area is a predetermined height, the distance between points A0 and B0 on ​​the same vertical line is the predetermined height; A i , B i A0 and B0 are the corresponding points on the image plane; P0 and H0 are any two points on the tree trunk in the image. i , H i is the corresponding point on the image plane; L0 and R0 are the two points where the light from the camera intersects the edge of the tree trunk; point O is the center of the cross section of the tree trunk; M 01 , G 01 , G 02The two points where the light from the shooting device intersects with the extended line of the trunk diameter; E is the intersection of line segments OF and L0R0.

[0086] In the coordinate system of the camera, the Euclidean distance is used, x is used to replace the focal length, and y is used to replace the distance from a point to the principal point. The distance z from the point to the focus is:

[0087] The diameter d at any position of the trunk can be calculated according to formula (1), formula (2) and formula (3).

[0088] (1) (2) (3) Take point G on the trunk 02 According to formula (4), the height G of any position of the trunk can be calculated 01 G 02 .

[0089] (4) In practical applications, the basic tree measurement factors of forest trees calculated by this method are compared with the measured values ​​collected manually. Images of 64 trees including Metasequoia, Ginkgo, Larix principis-rupprechtii, and Hickory were collected manually, with a total of 189 trunk diameters and 159 trunk heights. The results showed that the absolute average deviation of the 189 diameters was 0.4181 cm, the average standard deviation was 0.5577 cm, and the average root mean square error was 0.6970 cm; the absolute average deviation of the 159 trunk heights was 0.5564 cm, the average standard deviation was 0.4389 cm, and the average root mean square error was 0.7087 cm. Therefore, this method can be comparable to the accuracy of manually measuring the basic tree measurement factors of forest trees.

[0090] S42: Divide the tree trunk into infinite segments, and based on the limit summation idea, use the trunk diameter and tree height to calculate the volume of the forest.

[0091] like Figure 5 As shown, the trunk is divided into n segments, and the diameter of the i-th segment is d i , height is h i , the volume calculation formula of forest trees is as follows: (5) Where V is the volume of the tree; S is the vertical cross-sectional area of ​​the tree trunk image, S1, S2, ..., S n is the cross-sectional area of ​​each section of the trunk; h is the height of the trunk.

[0092] The beneficial effects of this embodiment are: this method can also fine-tune the open source semantic segmentation model to improve the segmentation accuracy of forest images; it can also calculate the volume of trees based on the limit summation idea and using the diameter and height of the trunk.

[0093] Embodiment 3 A system for estimating basic tree measurement factors of forest trees, based on the method for estimating basic tree measurement factors of forest trees as described in the first or second embodiment, comprises: A marking module, used for applying a mark of a predetermined height on the trunk of the tree to be inspected; A shooting module is used to calibrate the shooting device, obtain the internal parameters of the shooting device, and use the shooting device to take pictures of the trees to be detected; A segmentation module is used to construct and train an image segmentation model to segment the photo and obtain the trunk area coordinates and the marking area coordinates of the trees to be detected; The estimation module is used to obtain the estimation results of the basic tree measurement factors of forest trees based on the coordinates of the trunk area and the marked area, the actual height of the marked area, and the internal parameters of the shooting device, based on the principles of pinhole imaging and photogrammetry.

[0094] Embodiment 4 A computer program, when executed, implements the steps of the method for estimating basic tree measurement factors of forest trees as described in embodiment one or two.

[0095] Embodiment 5 A readable storage medium stores a computer program as described in Example 4, and when the computer program is executed, the steps of the method for estimating basic tree measurement factors of forest trees as described in Example 1 or 2 are implemented.

[0096] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by any technician familiar with the art within the technical scope disclosed in the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for estimating basic tree measurement factors of forest trees, characterized in that: The following steps are involved: Applying marks of predetermined heights on the trunks of trees to be inspected; Calibrate the camera device, obtain internal parameters of the camera device, and use the camera device to take photos of the trees to be detected; Build and train an image segmentation model to segment the photos and obtain the trunk area coordinates and marking area coordinates of the trees to be detected; According to the coordinates of the trunk area and the marked area, the actual height of the marked area, the internal parameters of the shooting device, and based on the principles of pinhole imaging and photogrammetry, the estimation results of the basic tree measurement factors of the forest are obtained.

2. The method for estimating basic tree measurement factors of forest trees according to claim 1, characterized in that: The mark is: a predetermined height in the vertical direction, and covers the shooting width of the entire tree trunk in the horizontal direction.

3. The method for estimating basic tree measurement factors of forest trees according to claim 1, characterized in that: The calibrating the camera device to obtain internal parameters of the camera device includes: The Zhang Zhengyou chessboard image was captured by a camera, and the open source OpenCV calibration method was used to calibrate the camera to obtain the internal parameters of the camera.

4. The method for estimating basic tree measurement factors of forest trees according to claim 3, characterized in that: The internal parameters of the shooting device include the focal length of the shooting device, the coordinates of the principal point, and the lens distortion coefficient.

5. The method for estimating basic tree measurement factors of forest trees according to claim 1, characterized in that: The image segmentation model is a semantic segmentation model.

6. The method for estimating basic tree measurement factors of forest trees according to claim 1, characterized in that: The method for estimating basic tree measurement factors of forest trees also includes: generating a json file according to the coordinates of the trunk area and the coordinates of the marking area.

7. The method for estimating basic tree measurement factors of forest trees according to claim 1, characterized in that: The method of obtaining the estimation result of the basic tree measurement factor of the forest tree based on the coordinates of the trunk area and the coordinates of the marked area, the actual height of the marked area, and the internal parameters of the shooting device and the principle of pinhole imaging and photogrammetry includes: According to the coordinates of the trunk area, the coordinates of the marked area, and the actual height of the marked area, the diameter and height of the trunk are calculated based on the principles of pinhole imaging and photogrammetry.

8. The method for estimating basic tree measurement factors of forest trees according to claim 7, characterized in that: The method of obtaining the estimation result of the basic tree measurement factor of the forest tree based on the coordinates of the trunk area and the coordinates of the marked area, the actual height of the marked area, and the internal parameters of the shooting device and based on the pinhole imaging and photogrammetry principle also includes: The tree trunks are divided into infinite segments, and based on the idea of ​​limit summation, the volume of the forest is calculated using the diameter and height of the trunks.

9. A system for estimating basic tree measurement factors of forest trees, characterized in that: The method for estimating basic tree measurement factors of forest trees according to any one of claims 1 to 8 comprises: A marking module, used for applying a mark of a predetermined height on the trunk of the tree to be inspected; A shooting module is used to calibrate the shooting device, obtain the internal parameters of the shooting device, and use the shooting device to take pictures of the trees to be detected; A segmentation module is used to construct and train an image segmentation model to segment the photo and obtain the trunk area coordinates and the marking area coordinates of the trees to be detected; The estimation module is used to obtain the estimation results of the basic tree measurement factors of forest trees based on the coordinates of the trunk area and the marked area, the actual height of the marked area, and the internal parameters of the shooting device, based on the principles of pinhole imaging and photogrammetry.

10. A computer program, characterized in that When the computer program is executed, the steps of the method for estimating basic tree measurement factors of forest trees as described in any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Standing tree height measuring method based on monocular vision

    CN110672020A

  • Standing tree height measuring system and method based on machine vision

    CN113837927A

  • Single-plant standing wood volume lossless determination method suitable for small and medium-sized arbor

    CN114279323A

  • Method and device for measuring height and diameter at breast height of standing tree through combination of smart phone and computer vision

    CN118816729A

  • Marking device for measuring diameter at breast height of tree

    CN219191700U

Cited By

  • Trunk center line extraction and three-dimensional reconstruction volume estimation method and system based on SegFormer segmentation and multi-scale curvature adaptive modeling

    CN121033264A