Target-based height measurement method, device and equipment

By calculating the angle between the target normal vector and the ground normal vector, and adjusting the three-dimensional point cloud, the measurement error problem caused by the non-vertical installation of the radar is solved, and the accuracy of crop height measurement is improved.

CN113805157BActive Publication Date: 2024-08-27AEROSPACE NEWSKY TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111106924.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-22
Publication Date
2024-08-27
Estimated Expiration
2041-09-22

AI Technical Summary

Technical Problem

During the installation process of the lidar, the radar installation pole may not be completely vertical, causing the manually measured radar inclination angle to deviate from the horizontal plane, which in turn leads to large errors in the crop height measurement results.

Method used

By obtaining the three-dimensional point cloud containing the target point cloud, the target normal vector and the ground normal vector are calculated, the angle between the two vectors is used to calculate the three-dimensional rotation matrix, and the three-dimensional point cloud is adjusted to reduce the measurement error.

Benefits of technology

It effectively reduces the measurement deviation caused by errors in manual measurement and improves the accuracy of crop height measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113805157B
    Figure CN113805157B
Patent Text Reader

Abstract

The present invention relates to the field of crop height measurement, and specifically to a target-based height measurement method, device and equipment, comprising the following steps: obtaining a three-dimensional point cloud containing a point cloud of an object to be measured; wherein the three-dimensional point cloud contains a target point cloud; calculating a target normal vector of the plane where the target point cloud is located, and calculating a three-dimensional rotation matrix based on the target normal vector, the ground normal vector and the angle between the target normal vector and the ground normal vector; adjusting the three-dimensional point cloud according to the three-dimensional rotation matrix, and measuring the height of the object to be measured using the adjusted three-dimensional point cloud. The height is measured using the finely adjusted three-dimensional point cloud, effectively reducing the measurement deviation caused by the error in manual measurement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of crop height measurement, and in particular to a target-based height measurement method, device and equipment. Background Art

[0002] Laser radar (LiDAR) has been increasingly used in object detection. It can emit laser pulses and determine the distance from the object to itself by calculating the time interval from emission to return, thereby obtaining high-density three-dimensional point cloud data. The three-dimensional point cloud data obtained by LiDAR can better describe the contour and height of the crop canopy, and is almost unaffected by environmental factors such as solar radiation, air temperature and humidity, background temperature and light changes, so it has a good application prospect in crop canopy height detection.

[0003] The measurement of height requires obtaining the installation height of the laser radar and the angle between it and the horizontal plane when it is tilted. However, during the installation process, it is inevitable that the installation pole of the radar may not be completely vertical and the angle between the manually measured radar and the horizontal plane may deviate, which ultimately leads to large errors in the measurement results. Summary of the invention

[0004] Therefore, the present invention aims to solve the technical problem that during the installation process, the installation pole of the radar may not be completely vertical, and the angle between the manually measured radar and the horizontal plane may deviate, which eventually leads to a large error in the measurement result, thereby providing a target-based height measurement method, comprising the following steps:

[0005] Acquire a three-dimensional point cloud including a point cloud of an object to be measured; wherein the three-dimensional point cloud includes a target point cloud;

[0006] Calculating a target normal vector of the plane where the target point cloud is located, and calculating a three-dimensional rotation matrix based on the target normal vector, the ground normal vector, and the angle between the target normal vector and the ground normal vector;

[0007] The three-dimensional point cloud is adjusted according to the three-dimensional rotation matrix, and the height of the object to be measured is obtained by measuring the adjusted three-dimensional point cloud.

[0008] Preferably, the calculating of the target normal vector of the plane where the target point cloud is located includes:

[0009] Obtaining point cloud data of all points in the target point cloud to obtain n point cloud coordinates; wherein the point cloud coordinates are three-dimensional vectors;

[0010] A three-row and three-column matrix is ​​obtained based on the number of point cloud data in the target point cloud and the values ​​of each dimension in the point cloud coordinates;

[0011] The minimum eigenvector of the three-row and three-column matrix is ​​obtained, and the minimum eigenvector is used as the target normal vector.

[0012] Preferably, the n point cloud coordinates of the target point cloud are {(x i ,y i ,z i ), i = 1, 2, ..., n}; the three-row and three-column matrix is ​​obtained by a first mathematical model, wherein the first mathematical model is:

[0013]

[0014] In the formula, Δx i Represents x i The difference from the mean value in the x dimension, Δy i Represents y i The difference from the mean in the y dimension, Δz i Indicates z i The difference from the mean in the z dimension.

[0015] Preferably, the method further comprises: performing outlier point processing on the point cloud data of the target;

[0016] After removing the outlier points, the target normal vector is calculated based on the remaining point cloud data.

[0017] Preferably, the n point cloud coordinates of the target point cloud are {(x i ,y i ,z i ), i = 1, 2, ..., n}, the target normal vector is (a, b, c); the point cloud data of the target is processed with abnormal points, including:

[0018] The distance between each point cloud coordinate and the plane formed by the n point clouds is obtained using the third mathematical model, and the third mathematical model is:

[0019]

[0020] In the formula, represents the average value of the x dimension, represents the average value of the y dimension, represents the average value of the z dimension;

[0021] The standard deviation is calculated using the distance between all point cloud coordinates and the plane formed by n point clouds;

[0022] If the distance is greater than a preset multiple of the standard deviation, outlier processing is performed on the point cloud corresponding to the distance.

[0023] Preferably, the three-dimensional rotation matrix is ​​calculated by a fourth mathematical model, and the fourth mathematical model is:

[0024] R=I+sinθ*A+(1-cosθ)A 2

[0025] In the formula, I is represented by A is represented as the antisymmetric matrix of the cross product of the target normal vector and the ground normal vector, θ represents the angle between the target normal vector and the ground normal vector, and the ground normal vector is |1 0 0|.

[0026] Preferably, before calculating the target normal vector of the plane where the target point cloud is located, the method further includes: extracting the target point cloud from the three-dimensional point cloud;

[0027] The target point cloud is subjected to three-dimensional clustering and filtered by reflectivity to obtain a processed target point cloud.

[0028] Preferably, adjusting the three-dimensional point cloud according to the three-dimensional rotation matrix includes:

[0029] The three-dimensional rotation matrix is ​​multiplied by the point cloud coordinates of the three-dimensional point cloud to obtain an adjusted three-dimensional point cloud.

[0030] The present invention also provides a target-based height measurement device, comprising:

[0031] An acquisition module, used to acquire a three-dimensional point cloud including a point cloud of an object to be measured; wherein the three-dimensional point cloud includes a target point cloud;

[0032] A calculation module, used to calculate the target normal vector of the plane where the target point cloud is located, and calculate a three-dimensional rotation matrix based on the target normal vector, the ground normal vector and the angle between the target normal vector and the ground normal vector;

[0033] The measuring module is used to adjust the three-dimensional point cloud according to the three-dimensional rotation matrix, and use the adjusted three-dimensional point cloud to measure and obtain the height of the object to be measured.

[0034] The present invention also provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the above-mentioned target-based height measurement method by executing the computer instructions.

[0035] The present invention also provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable the computer to execute the above-mentioned target-based height measurement method.

[0036] The technical solution of the present invention has the following advantages:

[0037] 1. The target-based height measurement method provided by the present invention calculates the target point cloud in the three-dimensional point cloud to obtain the target normal vector, and calculates the three-dimensional rotation matrix using the target normal vector, the ground normal vector and the angle formed by the target normal vector and the ground normal vector, and then uses the three-dimensional rotation matrix to fine-tune the three-dimensional point cloud, and measures the height of the object to be measured in the adjusted three-dimensional point cloud. The height is measured using the fine-tuned three-dimensional point cloud, which effectively reduces the measurement deviation caused by the error in manual measurement. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0039] Figure 1 This is a flow chart of a target-based height measurement method according to Embodiment 1 of the present invention;

[0040] Figure 2 This is a flow chart of calculating the target normal vector in Embodiment 1 of the present invention;

[0041] Figure 3 This is a flow chart of clearing abnormal points in Example 1 of the present invention;

[0042] Figure 4 A scene graph obtained from the point cloud data of Example 1 of the present invention;

[0043] Figure 5 The original three-dimensional point cloud and the adjusted three-dimensional point cloud in Example 1 of the present invention;

[0044] Figure 6 This is a structural block diagram of a target-based height measurement device according to Embodiment 2 of the present invention;

[0045] Figure 7 This is a principle structural block diagram of a computer device according to Embodiment 3 of the present invention. DETAILED DESCRIPTION

[0046] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. 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.

[0047] In the description of the present invention, it should be noted that the terms "first", "second" and "third" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance. In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0048] Laser radar, ultrasonic radar and other technologies are increasingly used in object detection. The three-dimensional point cloud data formed by scanning objects can well describe the height of the object and is almost unaffected by environmental factors such as solar radiation, air temperature and humidity, background temperature and light changes. It is increasingly valued in object detection.

[0049] like Figure 4 As shown, when the radar 105 scans the object 102 to form a three-dimensional point cloud, it transmits signals downward from a high place, and the original three-dimensional point cloud finally obtained is in an inclined state. It is necessary to adjust the original three-dimensional point cloud with the help of the installation height 106 of the radar 105 and the angle 107 formed by the radar 105 and the horizontal plane when it is tilted, so as to facilitate the subsequent height measurement of the object 102 to be measured. Figure 5 As shown, the first point cloud image 201 is the original three-dimensional point cloud obtained by the radar 105 scanning the object to be measured 102, and the second point cloud image 202 is the adjusted three-dimensional point cloud. The second point cloud image 202 is used to perform subsequent operations.

[0050] However, during the installation and measurement process, it is inevitable that the radar installation rod (not shown) is not completely perpendicular to the ground 101 and the angle 107 formed by the measured radar 105 and the horizontal plane deviates, which ultimately leads to a large error in the measurement result of the object to be measured 102.

[0051] The measured object 102 may be crops, buildings, trees, etc., and the radar 105 may be a laser radar (LiDAR), an ultrasonic radar, etc.

[0052] Example 1

[0053] This embodiment provides a target-based height measurement method. Figure 1 1 is a flowchart illustrating how to perform height measurement of an object to be measured based on a target to improve measurement accuracy according to some embodiments of the present invention. Although the processes described below include multiple operations that appear in a specific order, it should be clearly understood that these processes may also include more or fewer operations, which may be performed sequentially or in parallel (e.g., using a parallel processor or a multi-threaded environment).

[0054] This embodiment provides a target-based height measurement method for measuring the height of an object to be measured. Figure 1 As shown, the following steps are included:

[0055] S101, obtaining a three-dimensional point cloud including a point cloud of an object to be measured; wherein the three-dimensional point cloud includes a target point cloud.

[0056] In the above implementation steps, the 3D point cloud includes the point cloud of the object to be measured and the point cloud of the target. The 3D point cloud is obtained by radar scanning and is adjusted by the installation height of the radar and the angle formed by the radar when it is tilted with the horizontal plane. Figure 4 As shown, the target 103 is fixed on the pole 104, and the length of the pole 104 can be adjusted according to the height of the object 102 to be measured. There is a scale indicating the height on the pole 104, which is used to obtain the distance from the top of the target 103 to the ground 101.

[0057] Before the radar 105 scans to form a three-dimensional point cloud, the pole 104 is inserted into the ground within the radar detection range, and the target 103 is perpendicular to the ground plane formed by the ground 101. The installer can use a level to ensure that the target 103 is relatively perpendicular to the ground 101 when installed. The target 103 is usually installed in a direction close to the radar 105, and the height of the target 103 should be higher than the height of the object 102 to ensure that the point cloud formed by the target 103 will not be interfered by the object to be measured, so as to facilitate the subsequent extraction of the point cloud of the target 103. For example, when measuring the height of crops, it should be selected when the crops on the ground are not too high to ensure that there are no interfering point clouds generated by crops within a certain range above and below the target 103. The target 103 can be white and made of a material that reflects radar signals well.

[0058] S102, calculating the target normal vector of the plane where the target point cloud is located, and calculating a three-dimensional rotation matrix based on the target normal vector, the ground normal vector, and the angle between the target normal vector and the ground normal vector.

[0059] In the above implementation steps, the target normal vector and the ground normal vector are both three-dimensional vectors, wherein the ground normal vector is the normal vector of the ground, and its value is not affected by the tilt angle of the three-dimensional point cloud. The three-dimensional rotation matrix is ​​calculated using the target normal vector, the ground normal vector, and the angle between the target normal vector and the ground normal vector. The three-dimensional rotation matrix can be used to fine-tune the angle of the three-dimensional point cloud.

[0060] For example, if Figure 4 As shown, after the radar 105 scans, an original three-dimensional point cloud is obtained, and the original three-dimensional point cloud is adjusted using the installation height 106 of the radar 105 and the angle 107 formed between the radar 105 and the horizontal plane when the radar 105 is tilted, to obtain an adjusted three-dimensional point cloud. The target normal vector of the target 103 in the adjusted three-dimensional point cloud is calculated, and the three-dimensional rotation matrix is ​​calculated using the target normal vector, the ground normal vector, and the angle formed by the target normal vector and the ground normal vector.

[0061] S103: adjusting the three-dimensional point cloud according to the three-dimensional rotation matrix, and obtaining the height of the object to be measured by measuring the adjusted three-dimensional point cloud.

[0062] In the above implementation steps, the 3D point cloud is adjusted using the 3D rotation matrix to obtain an adjusted 3D point cloud, and the height of the object to be measured is measured using the adjusted 3D point cloud. It should be noted that the height of the object to be measured in the 3D point cloud can be measured using existing technology, which will not be elaborated in detail here.

[0063] In one or more embodiments, the three-dimensional rotation matrix may be multiplied with the point cloud coordinates of the three-dimensional point cloud to obtain an adjusted three-dimensional point cloud. In some embodiments, some of the adjusted point cloud coordinates may be adaptively adjusted according to actual conditions.

[0064] In the above embodiment, the target point cloud in the three-dimensional point cloud is calculated to obtain the target normal vector, and the target normal vector, the ground normal vector and the angle formed by the target normal vector and the ground normal vector are used to calculate the three-dimensional rotation matrix, and then the three-dimensional point cloud is fine-tuned using the three-dimensional rotation matrix, and the height of the object to be measured in the adjusted three-dimensional point cloud is measured. The height is measured using the fine-tuned three-dimensional point cloud, which effectively reduces the measurement deviation caused by the error in manual measurement.

[0065] In one or more embodiments, Figure 2 As shown, calculating the target normal vector of the plane where the target point cloud is located may include the following steps:

[0066] S201. Obtain point cloud data of all points in the target point cloud to obtain n point cloud coordinates; wherein the point cloud coordinates are three-dimensional vectors.

[0067] In the above implementation steps, the target point cloud includes n point clouds, and all point cloud coordinates can be represented by three-dimensional vectors. For example, the n point cloud coordinates of the target point cloud are {(x i ,y i ,z i ),i=1,2,…,n}.

[0068] S202, obtaining a matrix with three rows and three columns based on the number of point cloud data in the target point cloud and the values ​​of each dimension in the point cloud coordinates.

[0069] In the above implementation steps, the number of point cloud data in the target point cloud is the number of point cloud coordinates, that is, if there are n point cloud coordinates, then there are also n point cloud data in the target point cloud. Point cloud coordinates are three-dimensional vectors, indicating that point cloud coordinates have three dimensions, and the values ​​in each dimension are dimension values.

[0070] For example, if the point cloud coordinates are (1,2,3), then the dimension value of the x dimension in the point cloud coordinates is 1, the dimension value of the y dimension is 2, and the dimension value of the z dimension is 3.

[0071] The three-row and three-column matrix can be obtained by a first mathematical model, and the first mathematical model is:

[0072]

[0073] In the formula, Δx i Represents x i The difference from the mean value in the x dimension, Δy i Represents y i The difference from the mean in the y dimension, Δz i Indicates z i The difference from the average value of the z dimension. The average value of the x dimension represents the average value of the x dimension in all point cloud coordinates, the average value of the y dimension represents the average value of the y dimension in all point cloud coordinates, and the average value of the z dimension represents the average value of the z dimension in all point cloud coordinates.

[0074] The first mathematical model is derived as follows:

[0075] Assume that the point cloud data of the plane is obtained, which is n data coordinate points {(x i ,y i ,z i ),i=1,2,…,n}, then the data coordinate point (x i ,y i ,z i ) to the plane is:

[0076] d i =|ax i +bx i +cx i -d|

[0077] The fitting plane must satisfy

[0078] Using the Lagrange multiplier method to find the extreme value of the function, we get the function:

[0079]

[0080] By taking partial derivatives of a, b and c in the above formula (1), we can get the first mathematical model. Thus, the solution of the target normal vector is transformed into the matrix solution of the eigenvector.

[0081] S203, obtaining the minimum eigenvector of the three-row and three-column matrix, and using the minimum eigenvector as the target normal vector.

[0082] In the above implementation steps, the minimum eigenvector is obtained by calculating the three-row and three-column matrix. The minimum eigenvector is a three-dimensional vector. The obtained minimum eigenvector is the target normal vector.

[0083] Since there are some abnormal data points in the point cloud scanned by the radar, the calculation of the target normal vector will be affected by these abnormal values, so that the obtained target normal vector has a certain deviation, so it is necessary to process the abnormal data points to ensure the effect of the adjustment. In one or more embodiments, Figure 3 As shown, the removal of abnormal data points includes the following steps:

[0084] S301. After obtaining the standard normal vector of the target point cloud, if the difference between the target normal vector and the standard normal vector exceeds a preset error, performing outlier processing on the point cloud data of the target.

[0085] In the above implementation steps, the standard vector of the target point cloud is obtained according to the point cloud data on the target point cloud. The standard vector is a three-dimensional vector and can be expressed as (A, B, C). Among them, the standard normal vector is preset by the system according to the data of the target point cloud. According to the obtained standard normal vector, the spatial plane formed by the target point cloud can be expressed as:

[0086] Ax+By+Cz=d

[0087] In the formula, A 2 +B 2 +C 2 =1, d is the distance from the origin of the coordinate system to the space plane.

[0088] The standard normal vector can be (A, B, C), and the target normal vector can be (a, b, c). If the difference between the target normal vector and the standard normal vector exceeds the preset error, it indicates that there are outliers (i.e., abnormal data points), and the point cloud data of the target needs to be processed to delete the outliers. If the difference between the target normal vector and the standard normal vector does not exceed the preset error, it indicates that there are no outliers, and the target normal vector can be used directly for subsequent calculations. It should be noted that those skilled in the art can make reasonable choices for the preset error according to actual conditions, and this is not limited here.

[0089] The n point cloud coordinates of the target point cloud are {(x i ,y i ,z i ), i = 1, 2, ..., n}, the target normal vector can be (a, b, c), which is calculated using n point cloud coordinates. The point cloud data of the target is processed by the following steps:

[0090] a. Using the third mathematical model to obtain the distance between each point cloud coordinate and the plane formed by the n point clouds, the third mathematical model is:

[0091]

[0092] In the formula, represents the average value of the x dimension, represents the average value of the y dimension, Represents the average value of the z dimension. The average value of the x dimension is the average value of the x dimension values ​​in all point cloud coordinates, the average value of the y dimension is the average value of the y dimension values ​​in all point cloud coordinates, and the average value of the z dimension is the average value of the z dimension values ​​in all point cloud coordinates.

[0093] b. Calculate the standard deviation using the distance between all point cloud coordinates and the plane formed by n point clouds. The standard deviation can be obtained by the following formula:

[0094]

[0095] In the formula, Represents the distance d between all point cloud coordinates and the plane formed by n point clouds i The average value of .

[0096] c. If the distance is greater than a preset multiple of the standard deviation, outlier processing is performed on the point cloud corresponding to the distance, wherein the preset multiple may be 2 times, 3 times, or 4 times, etc.

[0097] For example, if the distance between point cloud A and the plane formed by n point clouds is 0.634, the standard deviation is 0.177, and the preset multiple is 2, it means that point cloud A is an outlier point and point cloud A is deleted; if the distance between point cloud A and the plane formed by n point clouds is 0.202, it means that point cloud A is not an outlier point.

[0098] S302: After removing the outlier points, the target normal vector is calculated based on the remaining point cloud data.

[0099] In the above implementation steps, the target normal vector is calculated using the uncleared point cloud, and the recalculated target normal vector can be compared with the standard normal vector. If the difference between the recalculated target normal vector and the standard normal vector exceeds the preset error, the outlier point processing is performed again to delete the outlier point, that is, step S302 and step S303 are executed again.

[0100] It should be noted that if the calculated difference between the target normal vector and the standard normal vector does not exceed the preset error, it means that the target normal vector can more accurately represent the standard normal vector.

[0101] In actual operation, after obtaining the target normal vector, the point cloud data of the target can be directly processed for outliers to determine whether there are outliers in the point cloud data. If there are outliers, the outliers are removed; if there are no outliers, the target normal vector is used for subsequent calculations.

[0102] In one or more embodiments, the three-dimensional rotation matrix is ​​calculated by a fourth mathematical model, and the fourth mathematical model is:

[0103] R=I+sinθA+(1-cosθ)A 2

[0104] In the formula, I is represented by A represents the antisymmetric matrix of the cross product of the target normal vector and the ground normal vector, θ represents the angle between the target normal vector and the ground normal vector, and the ground normal vector is |1 0 0|. It should be noted that, in order to adapt to adjustments in different situations, those skilled in the art may make adaptive modifications to the fourth mathematical model, such as adding adjustment parameters.

[0105] In one or more embodiments, before calculating the target normal vector of the plane where the target point cloud is located, it also includes:

[0106] The target point cloud is extracted from the three-dimensional point cloud; the target point cloud is three-dimensionally clustered and filtered by reflectivity to obtain a processed target point cloud.

[0107] After removing the obvious outliers in height, the target point cloud can be roughly extracted from top to bottom by height (the z dimension value of the point cloud), and then the target point cloud is clustered in three dimensions using DBSCAN, and filtered by reflectivity information (the measured object and the target have different emissivity to the radar signal), and the obvious outlier point cloud is deleted, and finally a more accurate target point cloud is obtained. Using a more accurate target point cloud to calculate the target normal vector can make the final adjusted three-dimensional point cloud more accurate and improve the accuracy of height measurement.

[0108] The method of extracting targets through spatial clustering and reflectivity information in this embodiment has high accuracy and robustness. The entire calibration scheme is also relatively easy to operate, and calibration fine-tuning helps to improve recognition accuracy.

[0109] For example, the target point cloud includes 11 point cloud coordinates: (1.02,-0.01,1.01), (2.02,0.09,0.01), (2.01,0.09,0.01), (1.99,-1.01,0.01), (1.98,-1.01,0.01), (-0.01,1.01,2), (-0.01,1.01,1.99), (0.01,-0.99,2), (0.01,-0.99,2.01), (1.0,-0.01,1.01) and (1.5,0,1.5).

[0110] Substituting the 11 point cloud coordinates into the first mathematical model, we get a matrix with three rows and three columns:

[0111]

[0112] Solve the obtained three-row and three-column matrix to obtain matrix A 33 The minimum eigenvector is: (0.70248578,-0.02082733,0.71139296), that is, the target normal vector of the above target point cloud is (0.702,-0.02,0.711).

[0113] Substitute the 11 point cloud coordinates into the third mathematical model, find the distance between each point cloud and the plane formed by the 11 point clouds, and calculate the standard deviation to be 0.1733. It can be found that the distance between the point cloud coordinates (1.5, 0, 1.5) and the plane formed by the 11 point clouds is 0.634, which is greater than 2 times the standard deviation. This point cloud is an abnormal point, and the point cloud with the point cloud coordinates (1.5, 0, 1.5) is removed.

[0114] Example 2

[0115] This embodiment provides a target-based height measurement device for measuring the height of an object to be measured. Figure 6 As shown, including:

[0116] The acquisition module 301 is used to acquire a three-dimensional point cloud including a point cloud of an object to be measured; wherein the three-dimensional point cloud includes a target point cloud; for details, please refer to the relevant description of step S101 in embodiment 1, which will not be repeated here.

[0117] The calculation module 302 is used to calculate the target normal vector of the plane where the target point cloud is located, and to obtain a three-dimensional rotation matrix based on the target normal vector, the ground normal vector and the angle between the target normal vector and the ground normal vector; for details, please refer to the relevant description of step S102 in Example 1, which will not be repeated here.

[0118] The measuring module 303 is used to adjust the 3D point cloud according to the 3D rotation matrix, and use the adjusted 3D point cloud to measure and obtain the height of the object to be measured. For details, please refer to the relevant description of step S103 in embodiment 1, which will not be repeated here.

[0119] In the above embodiment, the calculation module 302 calculates the target point cloud in the three-dimensional point cloud obtained by the acquisition module 301 to obtain the target normal vector, and calculates the three-dimensional rotation matrix using the target normal vector, the ground normal vector and the angle formed by the target normal vector and the ground normal vector. The measurement module 303 uses the three-dimensional rotation matrix to fine-tune the three-dimensional point cloud and measures the height of the object to be measured in the adjusted three-dimensional point cloud. The height is measured using the fine-tuned three-dimensional point cloud, which effectively reduces the measurement deviation caused by the error in manual measurement.

[0120] Example 3

[0121] This embodiment provides a computer device, such as Figure 7 As shown, the computer device includes a processor 401 and a memory 402, wherein the processor 401 and the memory 402 can be connected via a bus or other means. Figure 7 The example of connecting through bus is taken in the following.

[0122] The processor 401 may be a central processing unit (CPU). The processor 401 may also be other general-purpose processors, digital signal processors (DSP), graphics processors (GPU), embedded neural network processors (NPU), or other dedicated deep learning coprocessors, application specific integrated circuits (ASIC), field programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.

[0123] The memory 402 is a non-transitory computer-readable storage medium that can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions / modules corresponding to the target-based height measurement method in the embodiment of the present invention (such as Figure 6The processor 401 executes various functional applications and data processing of the processor by running the non-transient software programs, instructions and modules stored in the memory 402, that is, the target-based height measurement method in the above method embodiment 1 is implemented.

[0124] The memory 402 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data created by the processor 401, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 402 may optionally include a memory remotely arranged relative to the processor 401, and these remote memories may be connected to the processor 401 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0125] The one or more modules are stored in the memory 402, and when executed by the processor 401, the following is performed: Figure 1 Target based height measurement method in the illustrated embodiment.

[0126] In this embodiment, the memory 402 stores a program instruction or module of a height measurement method based on a target. When the processor 401 executes the program instruction or module stored in the memory 402, the target point cloud in the three-dimensional point cloud is calculated to obtain the target normal vector, and the target normal vector, the ground normal vector and the angle formed by the target normal vector and the ground normal vector are used to calculate the three-dimensional rotation matrix, and then the three-dimensional point cloud is fine-tuned using the three-dimensional rotation matrix, and the height of the object to be measured in the adjusted three-dimensional point cloud is measured. The height is measured using the fine-tuned three-dimensional point cloud, which effectively reduces the measurement deviation caused by the error in manual measurement.

[0127] The embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions can execute the target-based height measurement method in any of the above method embodiments. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk (HDD) or a solid-state drive (SSD), etc.; the storage medium may also include a combination of the above-mentioned types of memory.

[0128] Obviously, the above embodiments are merely examples for the purpose of clear explanation, and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived therefrom are still within the scope of protection of the invention.

Claims

1. A target-based height measurement method, characterized in that: The steps include: Acquire a three-dimensional point cloud including a point cloud of an object to be measured; wherein the three-dimensional point cloud includes a target point cloud; Calculate the target normal vector of the plane where the target point cloud is located, and calculate the three-dimensional rotation matrix based on the target normal vector, the ground normal vector and the angle between the target normal vector and the ground normal vector; wherein the three-dimensional rotation matrix is ​​calculated by a fourth mathematical model, and the fourth mathematical model is: R=I+sinθA+(1-cosθ)A 2 In the formula, I is represented by A represents the antisymmetric matrix of the cross product of the target normal vector and the ground normal vector, θ represents the angle between the target normal vector and the ground normal vector, and the ground normal vector is |1 0 0|; Adjusting the three-dimensional point cloud according to the three-dimensional rotation matrix, and obtaining the height of the object to be measured by measuring the adjusted three-dimensional point cloud; The calculating of the target normal vector of the plane where the target point cloud is located includes: Obtaining point cloud data of all points in the target point cloud to obtain n point cloud coordinates; wherein the point cloud coordinates are three-dimensional vectors; A three-row and three-column matrix is ​​obtained based on the number of point cloud data in the target point cloud and the values ​​of each dimension in the point cloud coordinates; The minimum eigenvector of the three-row and three-column matrix is ​​obtained, and the minimum eigenvector is used as the target normal vector.

2. The target-based height measurement method according to claim 1, characterized in that: The n point cloud coordinates of the target point cloud are {(x i ,y i ,z i ), i = 1, 2, ..., n}; the three-row and three-column matrix is ​​obtained by a first mathematical model, wherein the first mathematical model is: In the formula, Δx i Represents x i The difference from the mean value in the x dimension, Δy i Represents y i The difference from the mean in the y dimension, Δz i Indicates z i The difference from the mean in the z dimension.

3. The target-based height measurement method according to claim 1, characterized in that: The method further comprises: Performing outlier point processing on the point cloud data of the target; After removing the outlier points, the target normal vector is calculated based on the remaining point cloud data.

4. The target-based height measurement method according to claim 3, characterized in that: The n point cloud coordinates of the target point cloud are {(x i ,y i ,z i ), i = 1, 2, ..., n}, the target normal vector is (a, b, c); the point cloud data of the target is processed with abnormal points, including: The distance between each point cloud coordinate and the plane formed by the n point clouds is obtained using the third mathematical model, and the third mathematical model is: In the formula, represents the average value of the x dimension, represents the average value of the y dimension, represents the average value of the z dimension; The standard deviation is calculated using the distance between all point cloud coordinates and the plane formed by n point clouds; If the distance is greater than a preset multiple of the standard deviation, outlier processing is performed on the point cloud corresponding to the distance.

5. The target-based height measurement method according to any one of claims 1 to 4, characterized in that: Before calculating the target normal vector of the plane where the target point cloud is located, it also includes: Extracting the target point cloud from the three-dimensional point cloud; The target point cloud is subjected to three-dimensional clustering and filtered by reflectivity to obtain a processed target point cloud.

6. The target-based height measurement method according to any one of claims 1 to 4, characterized in that: The adjusting the three-dimensional point cloud according to the three-dimensional rotation matrix comprises: The three-dimensional rotation matrix is ​​multiplied by the point cloud coordinates of the three-dimensional point cloud to obtain an adjusted three-dimensional point cloud.

7. A height measurement device based on a target, characterized in that: include: An acquisition module, used to acquire a three-dimensional point cloud including a point cloud of an object to be measured; wherein the three-dimensional point cloud includes a target point cloud; A calculation module is used to calculate the target normal vector of the plane where the target point cloud is located, and calculate the three-dimensional rotation matrix based on the target normal vector, the ground normal vector and the angle between the target normal vector and the ground normal vector; wherein the three-dimensional rotation matrix is ​​calculated by a fourth mathematical model, and the fourth mathematical model is: R=I+sinθA+(1-cosθ)A 2 In the formula, I is represented by A represents the antisymmetric matrix of the cross product of the target normal vector and the ground normal vector, θ represents the angle between the target normal vector and the ground normal vector, and the ground normal vector is |1 0 0|; A measuring module, used for adjusting the three-dimensional point cloud according to the three-dimensional rotation matrix, and obtaining the height of the object to be measured by measuring the adjusted three-dimensional point cloud; The calculating of the target normal vector of the plane where the target point cloud is located includes: Obtaining point cloud data of all points in the target point cloud to obtain n point cloud coordinates; wherein the point cloud coordinates are three-dimensional vectors; A three-row and three-column matrix is ​​obtained based on the number of point cloud data in the target point cloud and the values ​​of each dimension in the point cloud coordinates; The minimum eigenvector of the three-row and three-column matrix is ​​obtained, and the minimum eigenvector is used as the target normal vector.

8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the target-based height measurement method according to any one of claims 1 to 6 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to cause the computer to execute the target-based height measurement method according to any one of claims 1 to 6.