Method for measuring volume of single standing wood

By combining pinhole camera and lidar technology, we detect the feature points of the depth image and build a map, and combine the measurement mechanism to complete the calculation of the vertical wood volume, solving the problem of accurate measurement of the upper diameter and height of the vertical wood and realizing high-precision single Plant-standing wood volume measurement.

CN118960552APending Publication Date: 2024-11-15SOUTHWEST FORESTRY UNIVERSITY +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410825040.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

The existing method of measuring the amount of single-plant vertical wood is insufficient in the precise measurement of the diameter and height of the upper part of the vertical wood, the dry shape index and the amount calculation, especially the measurement of the characteristic of the opposite wood body ignores the characteristics of the wood body body.

Method used

Using a combination of pinhole camera and lidar, through feature point detection and description of depth images, the Oriented FAST feature point detection method and bag-of-word model are used to construct maps and optimize positioning, and the calculation of vertical wood volume is completed with the measurement mechanism, including Measurement and calculation of the diameter of the upper part of the standing wood, corresponding height, breast diameter and tree height.

Benefits of technology

Accurate measurement of the vertical wood volume is achieved, the accuracy and simplicity of measurement is improved, and the global point cloud map can be efficiently constructed and the vertical wood volume can be calculated.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118960552A_ABST
    Figure CN118960552A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of single standing tree volume measurement, in particular to S1, the upper diameter of a standing tree is measured, point cloud data of the upper diameter of the standing tree is acquired by a laser radar according to the imaging principle of a pinhole camera, and information of the upper diameter of the standing tree is converted into a picture composed of pixels according to the imaging principle of a binocular camera; s2, feature points of the depth image are detected, described, matched and preprocessed; s3, estimating the prior pose of the depth camera in a stage of estimating the pose between frames; s4, constructing a map, and initializing a pose map of the depth camera; s5, measuring the height corresponding to the upper diameter of the wood; and a cutting degree equation is constructed through the upper diameter, the corresponding height, the diameter at breast height and the tree height, and parameter estimation and calculation are carried out to obtain a standing wood volume. The method is used for achieving accurate measurement of the upper diameter of the standing tree, accurate measurement of the corresponding height and calculation of the stem shape index and the standing tree volume.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of single-tree standing timber volume measurement, and in particular to a single-tree standing timber volume measurement method. Background Art

[0002] With the development of forest metrology, concepts and theories such as precision forestry and digital forestry have emerged and improved continuously. People's requirements for forest resource investigation and monitoring have also changed from manual and extensive to precise, digital and information-based. Especially in today's world where forest resources are decreasing day by day, it is particularly important and urgent to achieve accurate and automatic measurement of individual trees.

[0003] The classic single tree standing volume method can be roughly divided into two categories. The first category is to use the trunk shape factor to measure the standing volume. The single tree standing volume method based on the trunk shape factor can actually reflect the characteristic volume of a single tree. However, the existing instruments for measuring the characteristic factors of individual trees are very limited, and many characteristic indicators can only be generalized through model fitting. The second category is to measure the standing volume by non-trunk shape factors. The characteristic factors of individual trees measured by the single tree standing volume method based on non-trunk shape factors are mainly the breast diameter and tree height. The existing instruments have high accuracy in measuring the breast diameter and are relatively simple to operate. This method solves the common modeling problem of single tree volume well, but ignores the problem of measuring the characteristic volume of individual trees. Summary of the invention

[0004] The purpose of the present invention is to provide a method for measuring the volume of a single tree, so as to solve the problems of accurate measurement of the upper diameter of the tree, accurate measurement of the corresponding height, and calculation of the trunk shape index and the volume of the tree.

[0005] The technical implementation scheme of the present invention is:

[0006] A method for measuring the volume of a single tree, comprising the following steps:

[0007] S1. Measurement of the upper diameter of standing trees. Based on the imaging principle of pinhole cameras, the laser radar obtains point cloud data of the upper diameter of standing trees. Based on the imaging principle of binocular cameras, the information of the upper diameter of standing trees is converted into a photo composed of pixels.

[0008] S2, detecting, describing, matching and preprocessing the feature points of the depth image, and detecting the feature points of the depth image by using the Oriented FAST feature point detection method;

[0009] S3, estimation of the prior pose of the depth camera. In the stage of estimating the pose between frames, the feature points in the previous frame are judged, and the pose is solved for three cases respectively;

[0010] S4, build the map, initialize the pose graph of the depth camera, and perform similarity detection and pose analysis on the two most recent depth images of the map trajectory of the upper diameter measured by the depth camera based on the bag-of-words model (Bow).

[0011] Graph optimization;

[0012] Perform pose optimization on the errors and noise detected by local features of closed-loop detection, and finally stitch them into a global point cloud map;

[0013] S5, measuring the height corresponding to the upper diameter of the wood, using a measuring mechanism to complete the inclination angle and length of the wood to calculate the actual height of the wood;

[0014] The taper equation was constructed using the upper diameter, corresponding height, DBH and tree height, and the standing timber volume was obtained through parameter estimation and calculation.

[0015] Optionally, in step S1, the point cloud data of the upper diameter of the standing tree obtained by the laser radar is calculated using the following formula 101:

[0016]

[0017] Where, X w , Y w and Z w Respectively represent the horizontal coordinate, vertical coordinate and vertical coordinate of the world coordinate system; u and v represent the horizontal and vertical coordinates in the pixel coordinate system; t is the translation vector; R is the rotation matrix; f x With f y Respectively represent the focal length in the x and y directions; d x With d y Represents the physical size of each pixel on the horizontal axis x and the vertical axis y respectively.

[0018] Optionally, in step S1, the information of the upper diameter of the standing tree is converted into a photo composed of pixels and calculated using the following formula 102 and formula 103:

[0019]

[0020] In the formula, u l 、v l Indicates the horizontal and vertical coordinates in the left camera pixel coordinate system; u r 、v r Indicates the horizontal and vertical coordinates in the pixel coordinate system of the right camera; u l0 、v l0 Indicates the horizontal and vertical coordinate offset in the left camera pixel coordinate system; u r0 、v r0 Indicates the horizontal and vertical coordinate offset in the pixel coordinate system of the right camera; b is the viewing distance of the two-sided camera; f is the focal length of the camera.

[0021] Optionally, in step S2, the Oriented FAST feature point detection method is used to perform calculation using the following formulas 104 to 107:

[0022]

[0023] θ=atan2(m 01 ,m 10 ) (107)

[0024] In the formula, m pq is the intensity moment A of the local pixel; I(x,y) is the gray value of the pixel at (x,y); C is the gray centroid of the image block A; It is the direction vector connecting the geometric center O of the image block A and the centroid C, and θ is the direction of the feature point.

[0025] Optionally, the intensity moment of the local pixel is used to turn the binary descriptor (BRIEF) feature descriptor according to the direction vector of the "Oriented FAST" feature point to generate a descriptor with a certain rotation invariance, which is calculated using the following formulas 108-110:

[0026]

[0027] g n (p,θ)=f n (p)|(x i ,y i )∈S θ (110)

[0028] Where S is the original point set selected by BRIEF; n is the number of point pairs in the neighborhood of the feature point; g n (p,θ) is the BRIEF descriptor with direction invariance; f n (p) is the original BRIEF descriptor;

[0029] After obtaining the descriptor of the feature point, the Hamming distance is used to match the feature points of two adjacent frames of images, and the following formula 111 is used for calculation:

[0030]

[0031] Wherein, x and y represent n-dimensional descriptors describing feature points, and L is the Hamming distance. In step S2, the methods used to improve image quality and reduce mismatching include image denoising, color correction, and dedistortion.

[0032] Optionally, in step S3, in the stage of estimating the pose between frames, the feature points in the previous frame are judged. Assuming that the current frame is the kth frame, there will be three different depth value situations in the k-1th frame, and the pose is solved for the three situations respectively:

[0033] For the first case, a PNP (perspective-n-point) problem is constructed for all feature points in the two frames, and the pose is solved by formula 112:

[0034]

[0035] Where ξ is the pose change from frame k-1 to frame k, are all feature points in the k frame (i∈N, N is the total number of feature points in the k frame), are all the deep feature points in the k-1 frames, is the projection of the feature point;

[0036] For the second case, two feature points with depth and without depth are selected for pose estimation. For feature points with depth, the PNP problem is constructed and the pose T2′ is solved by formula 112. The displacement part t2 in T2′ is taken as the displacement vector of the pose to be estimated in this case; and the epipolar geometry problem is constructed for all feature points through formula 113 to solve T2′ and the rotation part R2 in T2′ is taken as the rotation matrix of the pose to be estimated:

[0037]

[0038] In the formula, are all feature points without depth information in the k-1 frame, are all feature points in the k frame; K is the camera internal parameter matrix; R2 and t2 are used to form the estimated pose T2 in this case;

[0039]

[0040] For the third case, when none of the feature points in the k-1th frame has a depth value, the improved epipolar geometry algorithm is used to obtain the pose. First, the epipolar geometry problem is constructed for all the feature points in the two frames to solve the pose T′, and the rotation matrix R3 in T′ is taken as the rotation matrix for the pose to be estimated in this case. The method of constructing the epipolar geometry problem to obtain the pose performs well in estimating the rotation, but the estimation effect is poor for the translation part, and the displacement vector is estimated by formula 115:

[0041]

[0042] Where t is the displacement vector in T3′, l is the actual distance between the feature points in the two frames, and t3 and R3 are taken through formula 116 to form the pose T3 to be estimated in this case:

[0043]

[0044] Optionally, in step S4, the first frame of the upper diameter of the trunk captured by the camera is used as the first key frame frame0 to obtain the first camera pose matrix K1. When the second frame of the upper diameter of the trunk is captured, feature detection extraction and feature matching are performed with the first key frame frame0 to obtain the next key frame frame1, and the second camera pose matrix K2 is obtained, and so on, until the last key frame frameN is obtained, and the camera pose matrix Kn of the last upper diameter of the trunk is obtained, and then a pose graph consisting of edges rkn and camera poses Kn is obtained;

[0045] Based on the bag-of-words model (Bow), the similarity of the two most recent depth images of the map trajectory of the upper diameter measured by the depth camera is detected and calculated using formulas 117-119.

[0046]

[0047] In the formula, TF is the word frequency; IDF is the inverse document frequency index; n wi is the number of times a word appears in a feature, n i is the total number of features in a certain image, N is the total number of images in the image set, and n w is the number of images containing this feature;

[0048] A={(w1,η1),(w2,η2),L,(w n ,η n )}@v A (118)

[0049]

[0050] Where (w1,η1) is the weight η1 of the i-th feature w1 in the image; v A is the discriminant of map A; s(v A -v B ) is v A -v B The L1 norm of

[0051] In the process of optimizing the pose graph, formula 120 is used to optimize the pose for the errors and noise detected by the local features of the closed-loop detection, and finally spliced ​​into a global point cloud map. Formula 120 is as follows:

[0052]

[0053] In the formula, e ij is the error set detected by similarity detection; ε is the set of all edges.

[0054] Finally, the upper diameter of the standing tree was measured by integrating laser and visual SLAM technology, and the point cloud data collected by the lidar was projected onto the depth image.

[0055] Optionally, in step S5, a measuring mechanism is used to measure the height of a single standing tree, and then calculation is performed using formula 121 and formula 122.

[0056] H=h1+h2 (121)

[0057] h2=h·cos(α) (122)

[0058] The taper equation is constructed based on the upper diameter, corresponding height, DBH and tree height, and the parameters are estimated. The calculation is completed using formula 123.

[0059]

[0060] Where: d is the upper diameter, D is the breast diameter, h is the height corresponding to the upper diameter, H is the tree height, a, b and c are parameters;

[0061] The standing timber volume is calculated using formula 124:

[0062]

[0063] Where: V is the volume of a single tree, d is the upper diameter, h is the height corresponding to the upper diameter, H is the tree height, and a, b and c are parameters.

[0064] Optionally, the measuring mechanism includes a connecting pillar, a bracket mechanism, a rotating table, a distance measuring mechanism and an auxiliary wire mechanism. The connecting pillar is provided with a bracket mechanism for supporting. The bracket mechanism is composed of three support groups, the support group includes a support rod, a sliding connection block, a connecting rod and a limiter. One end of the support rod is movably connected to the first fixed ear on the sliding connection block, and the other end of the support rod is movably connected to the second fixed ear of the connecting pillar through the connecting rod; the second fixed ear is arranged inside the rectangular opening of the connecting pillar; the support rod and the connecting rod are movably connected through a connecting pin, and a support block is arranged at the connection of the support rod; a rotating table is arranged on the upper part of the connecting pillar, and a distance measuring mechanism is arranged on the rotating table. The distance measuring mechanism includes a measuring box, a fixed support, a winding wheel, a first rotating shaft, a second rotating shaft, a bevel gear set, a light source placement plate, a prism mounting support, a fixed grating, an encoding disk and a photosensitive component. The light source placement plate, the prism mounting support, the fixed grating, the encoding disk and the photosensitive component are all arranged on the second rotating shaft, the second rotating shaft is connected to the first rotating shaft through the bevel gear set, and one end of the first rotating shaft is connected through the rotating shaft on the winding wheel.

[0065] Optionally, the second rotating shaft is connected to the inside of the measuring box through a bearing seat, and the light source placement plate, the prism mounting support, the encoding disk and the photosensitive component are all connected to the second rotating shaft through bearings; a light emitting diode is arranged on the upper part of the light source placement plate, a prism is arranged on the upper part of the prism mounting support, and the prism and the light emitting diode are arranged correspondingly; a plurality of rectangular openings are arranged on the upper part of the fixed grating, and the rectangular openings are arranged opposite to the light-transmitting spaces on the encoding disk; the bevel gear set includes a first bevel gear and a second bevel gear, the first bevel gear is arranged on the first rotating shaft, the second bevel gear is arranged on the second rotating shaft, and the first bevel gear and the second bevel gear are meshed and connected; the fixed support is arranged in the measuring box One end of the wire guide mechanism comprises a wire-passing bracket, a guide bracket, a guide wheel and a telescopic rod, two guide brackets are symmetrically arranged on the upper part of the wire-passing bracket, and a guide wheel is arranged on the guide bracket; one end of the guide bracket is connected to the wire-passing bracket through the telescopic rod, and a pressure spring is arranged on the outer wall of the telescopic rod to form an elastic structure; a limiter is arranged on the connecting pillar, and a connecting port is arranged at one end of the limiter, and the internal thread of the connecting port is arranged corresponding to the external thread on the sliding connecting block.

[0066] The present invention has the following advantages:

[0067] 1. The present invention provides a method for measuring the volume of a single standing timber. By measuring the upper diameter of the standing timber, the information of the upper diameter of the standing timber volume can be converted into a photo composed of pixels. The image is processed and adjusted from an unconstructed map to form a global point cloud map. The height of the entire standing timber volume is completed and calculated through a measuring mechanism. Then, the taper equation is constructed through the upper diameter, corresponding height, breast diameter and tree height to calculate the standing timber volume. The entire measurement method is relatively simple and has high measurement accuracy.

[0068] 2. The present invention is provided with an independent measuring mechanism, which can fix the pillar and the rotating table on the ground through the bracket mechanism, and then pull out the upper steel wire rope through the winding wheel to measure the inclined length from the ground to the top of the wood. Moreover, when measuring, we adopt the method of coordinating the fixed grating, the encoding disk and the photosensitive component. At the rotation angle of the fixed grating, the length of the pulled steel wire rope is calculated through the encoding disk and the photosensitive component, thereby obtaining the inclined length of the top of the wood.

[0069] 3. In order to pull out the wire rope smoothly, we have designed an auxiliary guide mechanism, which can provide a guiding environment for the wire rope through the guide wheels on the two guide brackets, and assist the wire rope to be pulled out smoothly with the assistance of the guide wheels. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] Figure 1 The overall framework diagram of the invention.

[0071] Figure 2 The present invention is a schematic diagram of the depth value of feature points in the k-1 frame.

[0072] Figure 3 This is a construction diagram of the upper trunk diameter posture diagram of the present invention.

[0073] Figure 4 This is a depth diagram for extracting feature points in the present invention.

[0074] Figure 5 The figure is a schematic diagram of the principle of measuring the height corresponding to the upper diameter of the measuring rod of the present invention.

[0075] Figure 6 It is the principle diagram of the measuring mechanism of the present invention.

[0076] Figure 7 It is a schematic diagram of the structure of the measuring mechanism of the present invention.

[0077] Figure 8 It is the front view of the measuring mechanism of the present invention.

[0078] Fig. 9 It is a structural schematic diagram of the support mechanism of the present invention.

[0079] Fig.10It is a schematic diagram of the structure of the fixed support connection of the present invention.

[0080] Fig.11 It is a structural schematic diagram of the auxiliary wire mechanism of the present invention.

[0081] Fig.12 It is a structural schematic diagram of the distance measuring mechanism of the present invention.

[0082] Fig.13 It is a schematic diagram of the structure of the guide bracket connection of the present invention. Fig.14 This is a schematic diagram of measuring tree height using the analytical wood method of the present invention.

[0083] Meanings of the reference numerals in the figure: 1-connecting pillar, 2-bracket mechanism, 202-support rod, 203-connecting pin, 204-connecting rod, 205-rectangular opening, 207-second fixed ear, 208-sliding connection block, 209-limiter, 210-first fixed ear, 3-rotating table, 4-distance measuring mechanism, 402-measuring box, 403-fixed support, 404-winding wheel, 405-first synchronous wheel, 406-synchronous belt, 408-second synchronous wheel , 409-wire rope, 410-first rotating shaft, 411-first bevel gear, 412-second bevel gear, 413-second rotating shaft, 414-bearing seat, 415-light source placement plate, 416-light emitting diode, 417-prism mounting support, 418-prism, 419-fixed grating, 420-encoding disk, 421-photosensitive component, 5-auxiliary wire mechanism, 501-wire passing bracket, 503-telescopic rod, 504-guide wheel, 505-guide bracket. DETAILED DESCRIPTION

[0084] In order to make the purpose, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. It is hereby stated that the directional terms such as up, down, left, right, front, back, inside, outside, etc. that appear or will appear in the text of the present invention are only based on the accompanying drawings of the present invention, and are not specific limitations of the present invention.

[0085] A method for measuring the volume of a single tree, comprising the following steps:

[0086] S1. Measurement of the upper diameter of standing trees. Based on the imaging principle of pinhole cameras, the laser radar obtains point cloud data of the upper diameter of standing trees. Based on the imaging principle of binocular cameras, the information of the upper diameter of standing trees is converted into a photo composed of pixels.

[0087] S2, detecting, describing, matching and preprocessing the feature points of the depth image, and detecting the feature points of the depth image by using the Oriented FAST feature point detection method;

[0088] S3, estimation of the prior pose of the depth camera. In the stage of estimating the pose between frames, the feature points in the previous frame are judged, and the pose is solved for three cases respectively;

[0089] S4, build a map, initialize the pose graph of the depth camera, and perform similarity detection and pose graph optimization on the two most recent depth images of the map trajectory of the upper diameter measured by the depth camera based on the bag-of-words model (Bow); perform pose optimization on the errors and noise detected by the local features of the closed-loop detection, and finally splice them into a global point cloud map;

[0090] S5. Measure the height corresponding to the upper diameter of the wood, and use a measuring mechanism to complete the inclination angle and length of the wood to calculate the actual height of the wood; and construct the taper equation through the upper diameter, corresponding height, breast diameter and tree height, and perform parameter estimation and calculation to obtain the standing timber volume.

[0091] In step S1, the point cloud data of the upper diameter of the standing tree obtained by the laser radar is calculated using the following formula 101:

[0092]

[0093] Where, X w , Y w and Z w Respectively represent the horizontal coordinate, vertical coordinate and vertical coordinate of the world coordinate system; u and v represent the horizontal and vertical coordinates in the pixel coordinate system; t is the translation vector; R is the rotation matrix; f x With f y Respectively represent the focal length in the x and y directions; d x With d y Respectively represent the physical size of each pixel on the horizontal axis x and the vertical axis y;

[0094] In step S1, the information of the upper diameter of the standing tree is converted into a photo composed of pixels and calculated using the following formulas 102 and 103:

[0095]

[0096] In the formula, u l 、v l Indicates the horizontal and vertical coordinates in the left camera pixel coordinate system; u r 、v r Indicates the horizontal and vertical coordinates in the pixel coordinate system of the right camera; u l0 、v l0 Indicates the horizontal and vertical coordinate offset in the left camera pixel coordinate system; u r0 、v r0 Indicates the horizontal and vertical coordinate offset in the pixel coordinate system of the right camera; b is the viewing distance of the two-sided camera; f is the focal length of the camera.

[0097] In step S2, the Oriented FAST feature point detection method is used to calculate using the following formulas 104 to 107:

[0098]

[0099] θ=atan2(m 01 , m 10 ) (107)

[0100] In the formula, m pq is the intensity moment A of the local pixel; I(x, y) is the gray value of the pixel at (x, y); C is the gray centroid of the image block A; is the direction vector connecting the geometric center O of the image block A and the centroid C, and θ is the direction of the feature point;

[0101] 1. Using the intensity moment of the local pixel, the binary descriptor (BRIEF) feature descriptor is steered according to the direction vector of the "Oriented FAST" feature point to generate a descriptor with a certain rotation invariance, calculated using the following formula 108-formula 110:

[0102]

[0103] g n (p,θ)=f n (p)|(x i ,y i )∈S θ (110)

[0104] Where S is the original point set selected by BRIEF; n is the number of point pairs in the neighborhood of the feature point; g n (p, θ) is the BRIEF descriptor with direction invariance; f n (p) is the original BRIEF descriptor;

[0105] After obtaining the descriptor of the feature point, the Hamming distance is used to match the feature points of two adjacent frames of images, and the following formula 111 is used for calculation:

[0106]

[0107] In the formula, x and y represent n-dimensional descriptors that describe feature points, and L is the Hamming distance.

[0108] In step S2, the methods used to improve image quality and reduce mismatching include: image denoising, color correction, dedistortion and other processes;

[0109] In step S3, when estimating the pose between frames, the feature points in the previous frame are judged. Assuming that the current frame is the kth frame, there will be three different depth values ​​in the k-1th frame. The poses are solved for the three cases respectively:

[0110] For the first case, a PNP (perspective-n-point) problem is constructed for all feature points in the two frames, and the pose is solved by formula 112:

[0111]

[0112] Where ξ is the pose change from frame k-1 to frame k, are all feature points in the k frame (i∈N, N is the total number of feature points in the k frame), are all the deep feature points in the k-1 frames, is the projection of the feature point;

[0113] For the second case, two feature points with depth and without depth are selected for pose estimation. For feature points with depth, the PNP problem is constructed to solve the pose T2′ through formula 112, and the displacement part t2 in T2′ is taken as the displacement vector of the pose to be estimated in this case; and the epipolar geometry problem is constructed for all feature points through formula 113 to solve T2′ and take the rotation part R2 in T2′ as the rotation matrix of the pose to be estimated:

[0114]

[0115] In the formula, are all feature points without depth information in the k-1 frame, are all feature points in the k frame; K is the camera internal parameter matrix; R2 and t2 are used to form the estimated pose T2 in this case through formula (114);

[0116]

[0117] For the third case, when none of the feature points in the k-1th frame has a depth value, the improved epipolar geometry algorithm is used to obtain the pose. First, the epipolar geometry problem is constructed for all the feature points in the two frames to solve the pose T′, and the rotation matrix R3 in T′ is taken as the rotation matrix for the pose to be estimated in this case. The method of constructing the epipolar geometry problem to obtain the pose performs well in estimating the rotation, but the estimation effect is poor for the translation part, and the displacement vector is estimated by formula 115:

[0118]

[0119] Where t is the displacement vector in T3′, l is the actual distance between the feature points in the two frames, and t3 and R3 are taken through formula 116 to form the pose T3 to be estimated in this case:

[0120]

[0121] It should be noted that in the attached Figure 2 In the figure, (a) shows that all feature points in the previous frame have depth values, (b) shows that not all feature points in the previous frame have depth values, and (c) shows that none of the feature points in the previous frame have depth values.

[0122] In step S4, the first frame of the upper diameter of the trunk captured by the camera is used as the first key frame frame0 to obtain the first camera pose matrix K1. When the second frame of the upper diameter of the trunk is captured, feature detection extraction and feature matching are performed with the first key frame frame0 to obtain the next key frame frame1, and the second camera pose matrix K2 is obtained. This is repeated until the last key frame frameN is obtained, and the camera pose matrix Kn of the last upper diameter of the trunk is obtained, thereby obtaining a pose graph consisting of edges rkn and camera poses Kn.

[0123] Based on the bag-of-words model (Bow), the similarity of the two most recent depth images of the map trajectory of the upper diameter measured by the depth camera is detected and calculated using formulas 117-119.

[0124]

[0125] In the formula, TF is the word frequency; IDF is the inverse document frequency index; n wi is the number of times a word appears in a feature, n i is the total number of features in a certain image, N is the total number of images in the image set, and n w is the number of images containing this feature;

[0126] A={(w1,η1),(w2,η2),L,(w n ,η n )}@v A (118)

[0127]

[0128] Where (w1,η1) is the weight η1 of the i-th feature w1 in the image; v A is the discriminant of map A; s(v A -v B ) is v A -v B The L1 norm of .

[0129] In the process of optimizing the pose graph, formula 120 is used to optimize the pose for the errors and noise detected by the local features of the closed-loop detection, and finally spliced ​​into a global point cloud map. Formula 120 is as follows:

[0130]

[0131] In the formula, e ij is the error set monitored by similarity detection; ε is the set of all edges. Finally, the upper diameter of the standing tree is measured by integrating laser and visual SLAM technology. The point cloud data collected by the laser radar is projected on the depth image. The laser point cloud is divided according to the depth in a certain interval around the feature point. Several intervals with a depth of g are constructed. The point cloud at a distance from the feature point is selected to fit into a plane according to the same depth interval. The intersection of the line connecting the optical center feature point and the plane is recorded as the depth c of the feature point (such as Figure 4 The upper diameter point cloud data is spatially clustered based on the regional point cloud semantic segmentation method, and then the upper diameter value at a given height is calculated.

[0132] It should be noted that in the attached Figure 4 In the figure, (a) is the laser point cloud near the selected feature point, and (b) is the plane where the fitted feature point is located.

[0133] It should be further explained that we use laser SLAM and visual SLAM data fusion technology to combine the data of two different types of sensors to achieve better positioning and mapping effects. The fusion method used is as follows:

[0134] Feature-level fusion: Extract the features of laser data (such as line segments, point cloud features, etc.) and the features of visual images (such as corner points, edges, etc.), and then associate and fuse them to improve the ability to recognize and describe environmental features. Figure 4 shown.

[0135] Map-level fusion: The laser-generated map and the visually generated map are integrated to combine the advantages of both, making the map more accurate and complete.

[0136] Posture fusion: The posture information estimated by laser and vision is fused through a certain algorithm to improve the accuracy and reliability of positioning.

[0137] Data association: Establish accurate association between laser point cloud and visual features to ensure the accuracy of fusion.

[0138] Multi-sensor calibration: Accurately calibrating the relative position and posture relationship between laser sensors and visual sensors is the basis for achieving effective fusion.

[0139] By fusing laser SLAM and visual SLAM data, the limitations of a single sensor can be overcome. For example, laser may not perform well in some texture-deficient scenes, while vision can supplement texture information; vision may be unstable under conditions such as lighting changes, while laser is relatively more stable. The fused system can provide more robust and accurate positioning and mapping results under different environmental conditions.

[0140] In step S5, the height measurement of a single standing tree is completed by using a measuring mechanism. The formula 121 and the formula 122 are used for calculation. Due to the influence of gravity, the measuring rod produces elastic deformation in the vertical direction, and the length of the elastic deformation part is OA, recorded as h; the angle between the elastic deformation part of the measuring rod and the vertical direction is recorded as α, and the distance from point O to point C is the vertical distance from the upright part of the height gauge to the ground, recorded as h1; OB is the vertical distance from the part of the measuring rod that is theoretically not elastically deformed to the treetop, recorded as h2; the tree height is recorded as H (such as Figure 5 By selecting a rod support material with higher hardness and reducing the α value, the tree height H can be calculated according to formula 121-122.

[0141] H=h1+h2 (121)

[0142] h2=h·cos(α) (122)

[0143] The taper equation is constructed using the upper diameter, corresponding height, DBH and tree height, and parameter estimation is performed (as shown in Formula 23).

[0144]

[0145] Where: d is the upper diameter, D is the breast diameter, h is the height corresponding to the upper diameter, H is the tree height, and a, b and c are parameters.

[0146] S4 calculates the standing timber volume using formula 24:

[0147]

[0148] Where: V is the volume of a single tree, d is the upper diameter, h is the height corresponding to the upper diameter, H is the tree height, and a, b and c are parameters.

[0149] The following are the measurements of tree height and area using the analytical wood method;

[0150] The relative height and upper diameter obtained by the analytical wood method (felled wood) are the actual values ​​(true values), and the volume calculated by the central section differentiation quadrature formula is the actual value (true value). The relative height and upper diameter measured by this instrument are the measured values, and the volume calculated by the central section differentiation quadrature formula is the measured value.

[0152]

[0153] like Figure 7 , Figure 8 , Fig. 9 , Fig.10 and Fig.12 As shown, the measuring mechanism includes a connecting pillar 1, a bracket mechanism 2, a rotating table 3, a distance measuring mechanism 4 and an auxiliary wire mechanism 5. The connecting pillar 1 is provided with a bracket mechanism 2 for supporting. The bracket mechanism 2 is composed of three support groups, which include a support rod 202, a sliding connection block 208, a connecting rod 204 and a stopper 209. One end of the support rod 202 is movably connected to a first fixing ear 210 on the sliding connection block 208, and the other end of the support rod 202 is movably connected to a second fixing ear 207 of the connecting pillar 1 through the connecting rod 204; the second fixing ear 207 is arranged inside a rectangular opening 205 of the connecting pillar 1; the support rod 202 and the connecting rod 204 are movably connected through a connecting pin 203, and the support rod 20 2 is provided with a support block; a rotating table 3 is provided on the upper part of the connecting pillar 1, and a distance measuring mechanism 4 is provided on the rotating table 3, and the distance measuring mechanism 4 includes a measuring box 402, a fixed support 403, a winding wheel 404, a first rotating shaft 410, a second rotating shaft 413, a bevel gear set, a light source placement plate 415, a prism mounting support 417, a fixed grating 419, a coding disk 420 and a photosensitive component 421, the light source placement plate 415, the prism mounting support 417, the fixed grating 419, the coding disk 420 and the photosensitive component 421 are all arranged on the second rotating shaft 413, the second rotating shaft 413 is connected to the first rotating shaft 410 through the bevel gear set, and one end of the first rotating shaft 410 is connected through the rotating shaft on the winding wheel 404.

[0154] It should be noted that the measuring mechanism is used to measure the height of a single standing timber. For the convenience of measurement, a bracket mechanism 2 is set on the connecting pillar 1 to support the entire device. Among them, three support groups are set on the connecting pillar 1, which can be pulled out to play a supporting role when in use.

[0155] It should be further explained that the support group includes a support rod 202, a sliding connection block 208, a connecting rod 204 and a limiter 209, wherein one end of the support rod 202 is movably connected to the sliding connection block 208, and the other end of the support rod 202 is connected to the second fixed ear 207 through the connecting rod 204. When in use, the sliding connection block 208 can be disconnected from the limiter 209. At this time, when the sliding connection block 208 slides downward, the support rod 202 can be guided out from the rectangular opening 205 inside the connecting pillar 1, and a triangular bracket structure is formed with the cooperation of the connecting rod 204, and the support of the entire device is completed through three support groups.

[0156] It should be further explained that the purpose of designing the distance measuring mechanism 4 is that due to the high height of individual standing timber, the ordinary measurement method will be affected by its own gravity, and the middle part of the measuring rod will bend, resulting in inaccurate data. Therefore, we designed a distance measuring mechanism 4 that automatically measures the length. When the wire rope 409 is pulled out of the winding wheel 404, it can drive the first rotating shaft 410 to rotate through the first synchronous wheel 405 and the synchronous belt 406. During the rotation of the first rotating shaft 410, the second rotating shaft 413 is driven to rotate through the bevel gear set, and then the fixed grating 419 is rotated. The fixed grating 419 can output three groups of pulses of A, B and Z phases. The phase angle of the A phase and B phase pulses is 90°, and the rotation direction of the encoding disk 420 can be determined. If the B phase pulse is ahead of the A phase pulse, the photoelectric encoder is reversed, otherwise it is forward. The Z phase is the zero pulse phase, and one pulse is generated for each rotation. Photoelectric detection devices such as light-emitting diodes use the principle of photoelectric conversion to calculate the number of pulses output by the photoelectric encoder per second, and convert it into corresponding digital quantities, ultimately completing the measurement of the wiring length. Regardless of whether the trees are growing vertically or at an angle, the measuring rod can be extended along the tree body to the treetop to complete the tree height measurement.

[0157] like Figure 7-Figure 13As shown, the second rotating shaft 413 is connected to the inside of the measuring box 402 through the bearing seat 414, and the light source placement plate 415, the prism mounting support 417, the encoding plate 420 and the photosensitive component 421 are all connected to the second rotating shaft 413 through bearings; the upper part of the light source placement plate 415 is provided with a light-emitting diode 416, and the upper part of the prism mounting support 417 is provided with a prism 418, and the prism 418 is arranged corresponding to the light-emitting diode 416; a plurality of rectangular openings are arranged on the upper part of the fixed grating 419, and the rectangular openings are arranged opposite to the light-transmitting spaces on the encoding plate 420; the bevel gear set includes a first bevel gear 411 and a second bevel gear 412, the first bevel gear 411 is arranged on the first rotating shaft 410, and the second bevel gear 412 is arranged on the second rotating shaft 413, and the first bevel gear 411 and the second bevel gear 412 are meshed and connected; the fixed support 403 is arranged in the measuring box At one end of 402, a winding wheel 404 is arranged on the rotating shaft inside the fixed support 403, and a wire rope 409 is arranged on the upper part of the winding wheel 404. The first synchronous wheel 405 on the upper part of the rotating shaft is connected to the second synchronous wheel 408 on the first rotating shaft 410 through a synchronous belt 406; the auxiliary wire mechanism 5 includes a wire-passing bracket 501, a guide bracket 505, a guide wheel 504 and a telescopic rod 503. Two guide brackets 505 are symmetrically arranged on the upper part of the wire-passing bracket 501, and the guide bracket 505 is provided with a guide wheel 504; one end of the guide bracket 505 is connected to the wire-passing bracket 501 through the telescopic rod 503, and a pressure spring is arranged on the outer wall of the telescopic rod 503 to form an elastic structure; the limiter 209 is arranged on the connecting pillar 1, and a connecting port is arranged at one end of the limiter 209, and the internal thread of the connecting port is arranged corresponding to the external thread on the sliding connecting block 208.

[0158] It should be noted that when the wire rope 409 is pulled out, the pulling direction will change. In order to avoid interference when pulling it out, we have set up an auxiliary wire mechanism 5, which can support the wire rope 409 through two sets of corresponding guide brackets 505, and a guide wheel 504 is set on the guide bracket 505 to play an auxiliary guiding role. The guide bracket 505 is connected to the wire bracket 501 through a telescopic rod 503, and a pressure spring is set on the outer wall of the telescopic rod 503 to form an elastic structure. This design can form an elastic force between the guide wheel 504 and the contact part of the wire rope 409, which is smoother when the wire rope 409 is pulled to prevent hard contact with other parts.

[0159] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge scope of those skilled in the art without departing from the spirit of the present invention.

Claims

1. A method for measuring the volume of a single tree, characterized in that: The following steps are involved: S1. Measurement of the upper diameter of standing trees. Based on the imaging principle of pinhole cameras, the laser radar obtains point cloud data of the upper diameter of standing trees. Based on the imaging principle of binocular cameras, the information of the upper diameter of standing trees is converted into a photo composed of pixels. S2. Detect, describe, match and preprocess the feature points of the depth image, and detect the feature points of the depth image by using the OrientedFAST feature point detection method; S3, estimation of the prior pose of the depth camera. In the stage of estimating the pose between frames, the feature points in the previous frame are judged, and the pose is solved for three cases respectively; S4, build a map, initialize the pose graph of the depth camera, and perform similarity detection and pose graph optimization on the two most recent depth images of the map trajectory of the upper diameter measured by the depth camera based on the bag-of-words model (Bow); Perform pose optimization on the errors and noise detected by local features of closed-loop detection, and finally stitch them into a global point cloud map; S5, measuring the height corresponding to the upper diameter of the wood, using a measuring mechanism to complete the inclination angle and length of the wood to calculate the actual height of the wood; The taper equation was constructed using the upper diameter, corresponding height, DBH and tree height, and the standing timber volume was obtained through parameter estimation and calculation.

2. A method for measuring the volume of a single tree according to claim 1, characterized in that: In step S1, the point cloud data of the upper diameter of the standing tree obtained by the laser radar is calculated using the following formula (101): In the formula, X w , Y w and Z w Respectively represent the horizontal coordinate, vertical coordinate and vertical coordinate of the world coordinate system; u and v represent the horizontal and vertical coordinates in the pixel coordinate system; t is the translation vector; R is the rotation matrix; f x With f y Respectively represent the focal length in the x and y directions; d x With d y Represents the physical size of each pixel on the horizontal axis x and the vertical axis y respectively.

3. A method for measuring the volume of a single tree according to claim 1, characterized in that: In step S1, the information of the upper diameter of the standing tree is converted into a photo composed of pixels and calculated using the following formulas (102) and (103): In the formula, u l 、v l Represents the horizontal and vertical coordinates in the left camera pixel coordinate system; u r 、v r Represents the horizontal and vertical coordinates in the pixel coordinate system of the right camera; u l0 、v l0 Indicates the horizontal and vertical coordinate offset in the left camera pixel coordinate system; u r0 、v r0 Indicates the horizontal and vertical coordinate offset in the pixel coordinate system of the right camera; b is the viewing distance of the two-sided camera; f is the focal length of the camera.

4. A method for measuring the volume of a single tree according to claim 1, characterized in that In step S2, the Oriented FAST feature point detection method is used to calculate using the following formulas (104) to (107): θ=atan2(m 01 ,m0) (107) Where mpq is the intensity moment A of the local pixel; I(x,y) is the gray value of the pixel at (x,y); C is the gray centroid of the image block A; It is the direction vector connecting the geometric center 0 of the image block A and the centroid C, and θ is the direction of the feature point.

5. A method for measuring the volume of a single tree according to claim 4, characterized in that: Using the intensity moment of the local pixel, the binary descriptor (BRIEF) feature descriptor is steered according to the direction vector of the "Oriented FAST" feature point to generate a descriptor with a certain degree of rotation invariance. The calculation is performed using the following formula (108)-formula (110): g n (p,θ)=f n (p)|(x i ,y i )∈S θ (110) Where S is the point set selected by the original BRIEF; n is the number of point pairs in the neighborhood of the feature point; gn(p, θ) is the BRIEF descriptor with direction invariance; fn(p) is the original BRIEF descriptor; After obtaining the descriptor of the feature point, the Hamming distance is used to match the feature points of two adjacent frames of images, and the following formula (111) is used for calculation: In the formula, x and y represent n-dimensional descriptors that describe feature points, and L is the Hamming distance. In step S2, the methods used to improve image quality and reduce mismatching include image denoising, color correction, and distortion removal.

6. A method for measuring the volume of a single tree according to claim 1, characterized in that: In step S3, when estimating the pose between frames, the feature points in the previous frame are judged. Assuming that the current frame is the kth frame, there will be three different depth values ​​in the k-1th frame. The poses are solved for the three cases respectively: For the first case, a PNP (perspective-n-point) problem is constructed for all feature points in the two frames, and the pose is solved by formula (112): Where ξ is the pose change from frame k-1 to frame k, are all feature points in the k frame (i∈N, N is the total number of feature points in the k frame), are all the deep feature points in the k-1 frames, is the projection of the feature point; For the second case, two types of feature points, one with depth and one without depth, are used to estimate the pose. For feature points with depth, the PNP problem is constructed to solve the pose T2′ through formula (112). The displacement part t2 in T2′ is taken as the displacement vector of the pose to be estimated in this case; and the epipolar geometry problem is constructed for all feature points through formula (113) to solve T2′. The rotation part R2 in T2′ is taken as the rotation matrix of the pose to be estimated: In the formula, are all feature points without depth information in the k-1 frame, are all feature points in the k frame; K is the camera internal parameter matrix; R2 and t2 are used to form the estimated pose T2 in this case through formula (114); For the third case, when none of the feature points in the k-1th frame has a depth value, the improved epipolar geometry algorithm is used to obtain the pose. First, the epipolar geometry problem is constructed for all the feature points in the two frames to solve the pose T′, and the rotation matrix R3 in T′ is taken as the rotation matrix of the pose to be estimated in this case. The method of constructing the epipolar geometry problem to obtain the pose performs well in estimating the rotation, but the estimation effect is poor for the translation part. The displacement vector is estimated by formula (115): Where t is the displacement vector in T3′, l is the actual distance between the feature points in the two frames, and t3 and R3 are taken through formula (116) to form the pose T3 to be estimated in this case:

7. A method for measuring the volume of a single tree according to claim 1, characterized in that: In step S4, the first frame of the upper diameter of the trunk captured by the camera is used as the first key frame frame0 to obtain the first camera pose matrix K1. When the second frame of the upper diameter of the trunk is captured, feature detection extraction and feature matching are performed with the first key frame frame0 to obtain the next key frame frame1, and the second camera pose matrix K2 is obtained. This is repeated until the last key frame frameN is obtained, and the camera pose matrix Kn of the last upper diameter of the trunk is obtained, thereby obtaining a pose graph consisting of edges rkn and camera poses Kn. Based on the bag-of-words model (Bow), the similarity of the two most recent depth images of the map trajectory of the upper diameter measured by the depth camera is detected and calculated using formulas (117) to (119): In the formula, TF is the word frequency; IDF is the inverse document frequency index; n wi is the number of times a word appears in a feature, n i is the total number of features in a certain image, N is the total number of images in the image set, and n w is the number of images containing this feature; A={(w1,η1),(w2,η2),L,(w n ,or n )}@v A (118) Where (w1, η1) is the weight η1 of the i-th feature w1 in the image; v A is the discriminant of map A; s(v A -v B ) is v A -v B The L1 norm of In the process of optimizing the pose graph, formula (120) is used to optimize the pose for the errors and noise detected by the local features of the closed-loop detection, and finally spliced ​​into a global point cloud map. Formula (120) is as follows: In the formula, e ij is the error set detected by similarity detection; ε is the set of all edges. Finally, the upper diameter of the standing tree was measured by integrating laser and visual SLAM technology, and the point cloud data collected by the lidar was projected onto the depth image.

8. A method for measuring the volume of a single tree according to claim 1, characterized in that: In step S5, a measuring mechanism is used to measure the height of a single tree, and then the height is calculated using formula (121) and formula (122). H=h1+h2 (121) h2=h·cos(α) (122) The taper equation was constructed based on the upper diameter, corresponding height, DBH and tree height, and the parameters were estimated. The calculation was completed using formula (123). Where: d is the upper diameter, D is the breast diameter, h is the height corresponding to the upper diameter, H is the tree height, a, b and c are parameters; The standing timber volume is calculated using formula (124): Where: V is the volume of a single tree, d is the upper diameter, h is the height corresponding to the upper diameter, H is the tree height, and a, b and c are parameters.

9. A method for measuring the volume of a single tree according to claim 8, characterized in that: The measuring mechanism comprises a connecting pillar (1), a bracket mechanism (2), a rotating platform (3), a distance measuring mechanism (4) and an auxiliary wire mechanism (5); the connecting pillar (1) is provided with a bracket mechanism (2) for supporting; the bracket mechanism (2) is composed of three supporting groups, the supporting groups comprising a supporting rod (202), a sliding connecting block (208), a connecting rod (204) and a stopper (209); one end of the supporting rod (202) is movably connected to a first fixing ear (210) on the sliding connecting block (208); the other end of the supporting rod (202) is movably connected to a second fixing ear (207) of the connecting pillar (1) through the connecting rod (204); The second fixing ear (207) is arranged inside the rectangular opening (205) of the connecting pillar (1); The support rod (202) and the connecting rod (204) are movably connected via a connecting pin (203), and a support block is provided at the connection of the support rod (202); A rotating platform (3) is arranged on the upper part of the connecting pillar (1), and a distance measuring mechanism (4) is arranged on the rotating platform (3). The distance measuring mechanism (4) comprises a measuring box (402), a fixed support (403), a winding wheel (404), a first rotating shaft (410), a second rotating shaft (413), a bevel gear set, a light source placement plate (415), a prism mounting support (417), a fixed grating (419), an encoding plate (420) and a photosensitive component (421). The light source placement plate (415), the prism mounting support (417), the fixed grating (419), the encoding plate (420) and the photosensitive component (421) are all arranged on the second rotating shaft (413), the second rotating shaft (413) is connected to the first rotating shaft (410) through the bevel gear set, and one end of the first rotating shaft (410) is connected to the rotating shaft on the winding wheel (404).

10. A method for measuring the volume of a single tree according to claim 9, characterized in that: The second rotating shaft (413) is connected to the inside of the measuring box (402) through a bearing seat (414), and the light source placement plate (415), the prism mounting support (417), the encoding plate (420) and the photosensitive component (421) are all connected to the second rotating shaft (413) through bearings; A light emitting diode (416) is arranged on the upper part of the light source placement plate (415), a prism (418) is arranged on the upper part of the prism mounting support (417), and the prism (418) and the light emitting diode (416) are arranged correspondingly; A plurality of rectangular openings are arranged on the upper part of the fixed grating (419), and the rectangular openings are arranged opposite to the light-transmitting spaces on the encoding disk (420); The bevel gear set comprises a first bevel gear (411) and a second bevel gear (412), the first bevel gear (411) is arranged on the first rotating shaft (410), the second bevel gear (412) is arranged on the second rotating shaft (413), and the first bevel gear (411) and the second bevel gear (412) are meshedly connected; A fixed support (403) is arranged at one end of the measuring box (402), a winding wheel (404) is arranged on the rotating shaft inside the fixed support (403), a steel wire rope (409) is arranged on the upper part of the winding wheel (404), and a first synchronous wheel (405) on the upper part of the rotating shaft is connected to a second synchronous wheel (408) on the first rotating shaft (410) through a synchronous belt (406); The auxiliary wire mechanism (5) comprises a wire-passing bracket (501), a guide bracket (505), a guide wheel (504) and a telescopic rod (503); two guide brackets (505) are symmetrically arranged on the upper part of the wire-passing bracket (501); and a guide wheel (504) is arranged on the guide bracket (505); One end of the guide bracket (505) is connected to the wire-passing bracket (501) via a telescopic rod (503), and a pressure spring is arranged on the outer wall of the telescopic rod (503) to form an elastic structure; The stopper (209) is arranged on the connecting pillar (1), and a connecting port is arranged at one end of the stopper (209), and the internal thread of the connecting port is arranged corresponding to the external thread on the sliding connecting block (208).