CN113096027B - Point cloud-based farmland soil layer horizontal correction and removal method - Google Patents
Point cloud-based farmland soil layer horizontal correction and removal method Download PDFInfo
- Publication number
- CN113096027B CN113096027B CN202110229082.7A CN202110229082A CN113096027B CN 113096027 B CN113096027 B CN 113096027B CN 202110229082 A CN202110229082 A CN 202110229082A CN 113096027 B CN113096027 B CN 113096027B
- Authority
- CN
- China
- Prior art keywords
- point cloud
- soil layer
- plane
- plant
- vector
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 239000002689 soil Substances 0.000 title claims abstract description 69
- 238000000034 method Methods 0.000 title claims abstract description 35
- 238000012937 correction Methods 0.000 title claims abstract description 25
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 19
- 238000012545 processing Methods 0.000 claims abstract description 17
- 238000004364 calculation method Methods 0.000 claims abstract description 16
- 238000005070 sampling Methods 0.000 claims abstract description 14
- 238000003860 storage Methods 0.000 claims description 8
- 239000011159 matrix material Substances 0.000 claims description 6
- 230000009191 jumping Effects 0.000 claims description 3
- 238000010606 normalization Methods 0.000 claims description 3
- 230000003287 optical effect Effects 0.000 claims description 3
- 238000010187 selection method Methods 0.000 claims description 3
- 238000005259 measurement Methods 0.000 abstract description 16
- 230000008569 process Effects 0.000 abstract description 7
- 238000010586 diagram Methods 0.000 description 6
- 230000000694 effects Effects 0.000 description 5
- 230000008901 benefit Effects 0.000 description 4
- 238000004590 computer program Methods 0.000 description 4
- 230000001066 destructive effect Effects 0.000 description 4
- 230000007613 environmental effect Effects 0.000 description 4
- 230000012010 growth Effects 0.000 description 3
- 238000011160 research Methods 0.000 description 3
- 230000000007 visual effect Effects 0.000 description 3
- 238000011161 development Methods 0.000 description 2
- 238000011065 in-situ storage Methods 0.000 description 2
- 238000011900 installation process Methods 0.000 description 2
- 238000003973 irrigation Methods 0.000 description 2
- 230000002262 irrigation Effects 0.000 description 2
- 230000008635 plant growth Effects 0.000 description 2
- 238000007792 addition Methods 0.000 description 1
- 230000009418 agronomic effect Effects 0.000 description 1
- 230000004075 alteration Effects 0.000 description 1
- 238000009395 breeding Methods 0.000 description 1
- 230000001488 breeding effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000000877 morphologic effect Effects 0.000 description 1
- 239000002994 raw material Substances 0.000 description 1
- 239000000126 substance Substances 0.000 description 1
- 230000002195 synergetic effect Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/80—Geometric correction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10028—Range image; Depth image; 3D point clouds
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30181—Earth observation
- G06T2207/30188—Vegetation; Agriculture
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Graphics (AREA)
- Geometry (AREA)
- Software Systems (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Processing (AREA)
Abstract
The invention provides a farmland soil layer horizontal correction and removal method based on point clouds, which comprises the steps of firstly obtaining visible light images of farmland soil layers and depth information corresponding to the images by using a depth camera, obtaining three-dimensional point cloud data of plants through difference value calculation, and storing the obtained three-dimensional point cloud data of the field plants in a computer in a classified manner; then using a point cloud processing tool to gradually perform soil layer fitting on the obtained three-dimensional point cloud data through a random sampling consistency algorithm to obtain a fitted soil layer horizontal plane, performing soil layer horizontal correction on the point cloud of the fitted soil layer horizontal plane through a Rodrign rotation algorithm, and finally removing the soil layer according to a preset threshold value. The method effectively avoids complexity of phenotype parameter calculation caused by irrelevant environment point clouds possibly existing in the three-dimensional scanning process, improves accuracy of plant phenotype calculation, and realizes accurate measurement of plant phenotypes.
Description
Technical Field
The invention relates to the technical field of agricultural planting, in particular to a farmland soil layer horizontal correction and removal method based on point cloud.
Background
The plant phenotype is taken as the observable morphological characteristics of synergistic expression such as plant genotype and environmental interaction effect, and the related research can explore the interrelation among phenotype, plant genotype and environmental factors, so as to promote the development of plant phenotypic histology and bring new and huge breakthrough to the research of crop breeding; high throughput, high quality and high accuracy plant phenotyping is an important direction of phenotypic histology as a prior work for plant phenotyping analysis, and is one of the difficulties faced at present.
At present, for high-precision phenotype acquisition, a mode of field destructive sampling and then three-dimensional reconstruction is usually adopted in a laboratory by using a three-dimensional scanner or multi-angle visual imaging, but data obtained by the destructive sampling can only be carried out once for one plant (namely, the plant does not have reproducibility for the same plant), and the growth change condition of the plant in the field can not be reflected dynamically and truly; meanwhile, the three-dimensional scanning equipment is utilized for scanning, so that although in-situ crop point cloud data in the field can be obtained in a high throughput manner and time sequence point cloud analysis is carried out on a farmland, the real growth environment (including drip irrigation pipes, soil layers and the like) of crops is often scanned in the scanning process, and more redundant data are provided for phenotype extraction; also, because the farmland itself has a slope or the three-dimensional scanning device is inclined at an angle during the installation process, the scanning process cannot be completely perpendicular to the growth direction of the plants, resulting in the scanned ground point cloud not being horizontal but having a slope, thereby affecting the accuracy of subsequent plant phenotyping measurements.
The food crops and the cash crops of a plurality of varieties in China have important edible value, and are also important raw materials for animal husbandry, light industry and chemical industry; at present, in acquisition and measurement of various phenotypic parameters of crops, acquisition of plant point clouds in situ in the field is always the focus of research on plant phenotypes. The measurement phenotype data of traditional agronomic methods such as vertical ruler, angle ruler and the like need to consider subjective factors and the like of measurement staff, which are the problems of accurate measurement of phenotype in the prior art and need to be solved urgently, are time-consuming and labor-consuming due to manual scanning in the field destructive sampling, and greatly restrict the development of plant phenotype measurement.
Disclosure of Invention
Aiming at the problems existing in the prior art, the invention aims to provide a farmland soil layer horizontal correction and removal method based on point cloud, which is characterized in that three-dimensional point cloud data of plants are obtained, and meanwhile, soil layer fitting, coordinate system correction and soil layer removal are carried out on the basis of the soil layer surface where the plants are positioned, so that complexity brought by a plurality of irrelevant environment point clouds to phenotype parameter calculation and accuracy of phenotype measurement influenced by shooting angles, farmland gradients and the like in the three-dimensional scanning process are avoided, further, accuracy of plant phenotype calculation is improved, and reliability of plant phenotype measurement results is ensured.
It is a further object of the present invention to provide a system for the above method.
The aim of the invention is achieved by the following technical scheme:
a farmland soil layer horizontal correction and removal method based on point cloud is characterized in that:
firstly, obtaining visible light images of farmland soil layers and depth information corresponding to the images by utilizing an RGB-D camera, obtaining three-dimensional point cloud data of plants through difference value calculation, and storing the obtained three-dimensional point cloud data of the farmland plants in a computer in a classified manner; then, using a point cloud processing tool in a computer, taking the surface of a soil layer where a plant is located as a reference, gradually carrying out soil layer fitting on the obtained three-dimensional point cloud data through a random sampling consistency algorithm to obtain a fitted soil layer horizontal plane, carrying out soil layer horizontal correction on the point cloud of the fitted soil layer horizontal plane through a Rodrign rotation algorithm, and finally removing the soil layer according to a preset threshold value to obtain the complete plant point cloud for later analysis of plant phenotypes.
And further optimizing, wherein the three-dimensional point cloud data comprises a space X coordinate, a space Y coordinate, a space Z coordinate, an R channel value, a G channel value and a B channel value corresponding to the visible light image.
And further optimizing, wherein the soil layer fitting by the random sampling consistency algorithm specifically comprises the following steps:
firstly, for a group of scanned point cloud data S, three non-collinear points are fitted into a Plane by adopting a random selection method, a parameter model containing unknown quantity is constructed on the basis, and the distance d between any point in the point cloud and the fitted Plane is calculated i Setting a threshold d t And d i Comparing;
if d i <d t Then the arbitrary point is defined as a point within the model (i.e., a soil horizon point); if d i >d t And defining the arbitrary point as a point (namely a plant point) outside the model, recording the number of points in the parameter model one by one, repeatedly iterating, and setting the jumping-out condition of the iteration loop according to a random sampling consistency algorithm:
assuming that the number of points selected from the point set is m, determining the number of points needed by the parameter model as n, and determining the probability that all n points are points in the parameter model as p after iterating k times, wherein a preset first formula is provided:
p=1-(1-m n ) k ;
the iteration number k is obtained according to a preset second formula:
and (3) jumping out of iteration until a parameter model with the largest number of internal points is determined, and determining a fitted soil layer plane.
Further optimizing, the soil horizon horizontal correction by the Rodrign rotation algorithm is specifically as follows:
firstly, establishing a ternary primary plane equation:
ax+by+cz+d=0;
wherein x, y and z are specific coordinates of the specific point cloud in a space rectangular coordinate system; a. b, c and d are constants, and are obtained according to the specific position of the specific point cloud in the space rectangular coordinate system;
then, the normal vector of the soil plane is obtained by a ternary primary plane equationSimultaneously defining the normal vector of the depth camera coordinate system as +.>Wherein (1)>Is (x) 1 ,y 1 ,z 1 ),/>Is (x) 2 ,y 2 ,z 2 ) From the dot product definition, it is possible to:
in which θ is the vector before and after rotationVector->Is included in the plane of the first part;
since the axis of rotation must be perpendicular to the normal vector of the ground planeAnd depth camera coordinate system normal vector +.>Plane in which the vector is located ∈>Vector->Cross multiplication to obtain a rotation axis vector +.>And carrying out normalization operation:
in (w) x ,w y ,w z ) Is vector quantityCoordinates of (c);
then, a rotation matrix R is obtained according to the Rodrign rotation algorithm:
and finally multiplying the original point cloud by the rotation matrix R to obtain the point cloud after horizontal correction.
And further optimizing, wherein the preset threshold value is 0.05m, and all points with the result below 0.05m after the plane is fitted are defined as soil layer points and removed.
A farmland soil layer level correction and removal system based on point cloud is used for the method and is characterized in that: the system comprises an acquisition module, a building module and a processing module;
the acquisition module acquires visible light images and depth information of plants by adopting an RGB-D depth camera; the building module calculates a three-dimensional point cloud of the plant through the difference value; and the processing module is used for fitting and removing the plane where the plant point cloud is positioned, and processing by adopting a point cloud processing tool.
Further optimizing, the point cloud processing tool adopts a Microsoft Visual Studio C ++ open source point cloud programming library PCL.
Further optimized, the system also comprises a storage medium, wherein the storage medium is connected with the processing module; the storage medium is any one of a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a random access Memory (Random Access Memory, RAM).
The invention has the following technical effects:
according to the farmland soil layer horizontal correction and removal method and device based on the point cloud, a visible light image and corresponding depth information are simultaneously acquired through a depth camera, three-dimensional point cloud data of plants are obtained through difference calculation, soil layer fitting is carried out on the basis of the soil layer surface where the plants are located, and further, the obtained point cloud is subjected to coordinate system correction, and the soil layer is removed according to a set threshold value; the complexity of the calculation of the phenotype parameters caused by the irrelevant environmental point clouds possibly existing in the space is effectively avoided, the accuracy of the calculation of the plant phenotype is improved, the accurate measurement of the plant phenotype is realized, and the influences of the external environment and the three-dimensional scanning angle in the plant phenotype measurement process are solved.
Drawings
Fig. 1 is a schematic flow chart of correcting and removing a farmland soil layer horizontal plane based on point cloud in an embodiment of the invention.
Fig. 2 is a schematic view of soil horizon fitting using a random sampling consistency algorithm in an embodiment of the invention.
FIG. 3 is a schematic diagram of the front and back of the Rodrign rotation algorithm for correcting the fitted horizontal plane according to the embodiment of the present invention; wherein, fig. 3 (a) is a schematic diagram before correction; fig. 3 (b) is a schematic diagram after correction.
FIG. 4 is a schematic view of the soil layer removal before and after threshold cutting in an embodiment of the present invention; wherein fig. 4 (a) is a schematic diagram before removal; fig. 4 (b) is a schematic view after removal.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Examples:
as shown in fig. 1, a method for correcting and removing the soil horizon level of a farmland based on point cloud is characterized in that:
step 101: firstly, placing an RGB-D depth camera at a position of 1.5m of a plant canopy, carrying out fixed-point shooting, generating plant point clouds by utilizing a depth map and RGB image difference values, and constructing a plant three-dimensional point cloud data set; specifically, in one embodiment, the data relating to plant phenotype obtained by the RGB-D camera includes: visible light image, depth information, and plant three-dimensional point cloud data obtained by difference calculation (the difference calculation adopts a difference calculation method common in a calculation system in the field, and the embodiment of the invention is not discussed too much): the method comprises the steps of space X coordinate, space Y coordinate, space Z coordinate, R channel value, G channel value and B channel value corresponding to visible light images, and classifying and storing the data obtained by obtaining field plant point clouds in a computer.
Step 102: then, calculating phenotype parameters based on plant three-dimensional point clouds in a overlooking view, removing a soil layer plane and irrelevant objects from point cloud data, and extracting complete plant point clouds from a complex environment background; it should be noted that, the point cloud data under the overlooking view has a single scene, and has irrelevant objects such as plants, soil layers, drip irrigation pipes and the like, and most of irrelevant objects are near the soil layers, and a random sampling consistency method (RANSAC) is adopted to perform plane fitting on the soil layers, as shown in fig. 2.
The method comprises the following steps:
firstly, for a group of scanned point cloud data S, three non-collinear points are fitted into a Plane by adopting a random selection method, a parameter model containing unknown quantity is constructed on the basis, and the distance d between any point in the point cloud and the fitted Plane is calculated i Setting a threshold d t And d i Comparing;
if d i <d t Then the arbitrary point is defined as a point within the model (i.e., a soil horizon point); if d i >d t And defining the arbitrary point as a point outside the model (namely, an object point), recording the number of points in the parameter model one by one, iterating repeatedly, and setting the jump-out condition of the iterative loop according to a random sampling consistency algorithm:
assuming that the number of points selected from the point set is m, determining the number of points needed by the parameter model as n, and determining the probability that all n points are points in the parameter model as p after iterating k times, wherein a preset first formula is provided:
p=1-(1-m n ) k ;
the iteration number k is obtained according to a preset second formula:
jumping out of iteration until a parameter model with the largest number of internal points is obtained, and determining a fitted soil layer plane; in the iteration process in the iteration number k, the iteration is directly jumped out when the number of the inner points is the largest.
S103: the point cloud data are placed in a three-dimensional coordinate system, and the fact that the scanning process cannot be completely perpendicular to the plant growth direction due to the fact that farmlands have slopes or the depth camera is inclined at an angle in the installation process is found, in this case, the ground point cloud scanned by the depth camera is not horizontal but has slopes, and in order to enable the soil layer surface to be removed easily and to calculate plant phenotype parameters, accuracy and precision are high, the scanned point cloud needs to be subjected to soil layer horizontal correction through a Rodrign rotation algorithm, as shown in fig. 3.
The method comprises the following steps:
firstly, establishing a ternary primary plane equation:
ax+by+cz+d=0;
wherein x, y and z are specific coordinates of the point cloud in a space rectangular coordinate system; a. b, c and d are constants, and are obtained according to the specific position of the point cloud in the space rectangular coordinate system;
then, the normal vector of the soil plane is obtained by a ternary primary plane equationSimultaneously defining the normal vector of the depth camera coordinate system as +.>Wherein (1)>Is (x) 1 ,y 1 ,z 1 ),/>Is (x) 2 ,y 2 ,z 2 ) From the dot product definition, it is possible to:
in which θ is the vector before and after rotationVector->Is included in the plane of the first part;
since the axis of rotation must be perpendicular to the normal vector of the ground planeAnd depth camera coordinate system normal vector +.>Plane in which the vector is located ∈>Vector->Cross multiplication to obtain a rotation axis vector +.>And carrying out normalization operation:
in (w) x ,w y ,w z ) Is vector quantityCoordinates of (c);
then, a rotation matrix R is obtained according to the Rodrign rotation algorithm:
and finally multiplying the original point cloud by the rotation matrix R to obtain the point cloud after horizontal correction.
Step 104: finally, removing the soil layer according to a preset threshold value to obtain a complete plant point cloud for later analysis of plant phenotype; as shown in fig. 4.
According to the plant growth condition and the test scene, the preset threshold value is 0.05m, and all points with the result below 0.05m after plane fitting are defined as soil layer points and removed.
In addition, it should be noted that the present disclosure provides a farmland soil layer level correction and removal method based on point cloud, wherein a visible light image and corresponding depth information thereof are obtained simultaneously through an RGB-D camera, a difference value is calculated to obtain three-dimensional point cloud data of a plant, and Microsoft Visual Studio C ++ open source point cloud programming library PCL (Point Cloud Library) is selected as a point cloud processing tool; performing soil layer fitting on the surface of the soil layer where the plants are positioned by utilizing a random sampling consistency algorithm (RANSAC); carrying out soil horizon horizontal correction on the point cloud after the plane is fitted by a Rodrign rotation algorithm; and removing the soil layer according to the set threshold value to obtain the complete plant point cloud for plant phenotype. The complexity of the calculation of the phenotype parameters caused by the irrelevant environmental point clouds existing in the space is avoided, the accuracy of the plant phenotype calculation is improved, and the method has good effects of farmland fitting, horizontal correction and removal. Furthermore, a large amount of manpower and material resources can be saved, phenotype analysis can be performed through time sequence through continuous data acquisition, subjectivity of manual actual measurement data in the past is reduced, and accurate plant phenotype parameter results are obtained. The method for processing the point cloud can solve the problem that the same crop cannot continuously acquire the point cloud caused by destructive sampling, reduces subjective errors during manual measurement compared with manual measurement of the same planting field, saves time required by manual measurement, and improves the problems of poor automation degree, time and labor waste during manual measurement and low efficiency.
Based on the same inventive concept, the invention also provides a farmland soil layer horizontal correction and removal system based on point cloud, which comprises an acquisition module, an establishment module and a processing module; because the principle of solving the problem of the system is similar to that of the farmland soil layer horizontal correction and removal method based on the point cloud, the implementation of the system can be realized according to the specific steps of the method, and the repeated parts are not repeated.
Embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, the program being executed by a processor as in fig. 1 or the embodiments described above.
Embodiments of the present invention also provide a computer program product comprising instructions. The computer program product, when run on a computer, causes the computer to perform the method as in fig. 1 or in the embodiments described above.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), or the like.
The basic principles of the present disclosure have been described above in connection with specific embodiments, however, it should be noted that the advantages, benefits, effects, etc. mentioned in the present disclosure are merely examples and not limiting, and these advantages, benefits, effects, etc. are not to be considered as necessarily possessed by the various embodiments of the present disclosure. Furthermore, the specific details disclosed herein are for purposes of illustration and understanding only, and are not intended to be limiting, since the disclosure is not necessarily limited to practice with the specific details described.
The block diagrams of the devices, apparatuses, devices, systems referred to in this disclosure are merely illustrative examples and are not intended to require or imply that the connections, arrangements, configurations must be made in the manner shown in the block diagrams. As will be appreciated by one of skill in the art, the devices, apparatuses, devices, systems may be connected, arranged, configured in any manner. Words such as "including," "comprising," "having," and the like are words of openness and mean "including but not limited to," and are used interchangeably therewith. The terms "or" and "as used herein refer to and are used interchangeably with the term" and/or "unless the context clearly indicates otherwise. The term "such as" as used herein refers to, and is used interchangeably with, the phrase "such as, but not limited to.
In addition, as used herein, the use of "or" in the recitation of items beginning with "at least one" indicates a separate recitation, e.g., "at least one of A, B or C" recitation means a or B or C, or AB or AC or BC, or ABC (i.e., a and B and C). Furthermore, the term "exemplary" does not mean that the described example is preferred or better than other examples.
The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of the disclosure to the form disclosed herein. Although a number of example aspects and embodiments have been discussed above, a person of ordinary skill in the art will recognize certain variations, modifications, alterations, additions, and combinations thereof.
Claims (3)
1. A farmland soil layer treatment method based on point cloud is used for horizontally correcting and removing farmland soil layers and is characterized in that:
step S101: firstly, obtaining visible light images of farmland soil layers and depth information corresponding to the images by utilizing an RGB-D camera, obtaining three-dimensional point cloud data of plants through difference value calculation, and storing the obtained three-dimensional point cloud data of the farmland plants in a computer in a classified manner;
step S102: then, using a point cloud processing tool in a computer, taking the surface of the soil layer where the plant is located as a reference, gradually carrying out soil layer fitting on the obtained three-dimensional point cloud data through a random sampling consistency algorithm, and obtaining a fitted soil layer horizontal plane, wherein the method specifically comprises the following steps:
firstly, for a group of scanned point cloud data S, three non-collinear points are fitted into a Plane by adopting a random selection method, a parameter model containing unknown quantity is constructed on the basis, and the distance d between any point in the point cloud and the fitted Plane is calculated i Setting a threshold d t And d i Comparing;
if d i <d t The arbitrary point is defined as a point within the model; if d i >d t And defining the arbitrary point as a point outside the model, recording the number of points in the parameter model one by one, iterating repeatedly, and setting the jumping-out condition of the iteration loop according to a random sampling consistency algorithm:
assuming that the number of points selected from the point set is m, determining the number of points needed by the parameter model as n, and determining the probability that all n points are points in the parameter model as p after iterating k times, wherein a preset first formula is provided:
p=1-(1-m n ) k ;
the iteration number k is obtained according to a preset second formula:
jumping out of iteration until a parameter model with the largest number of internal points is obtained, and determining a fitted soil layer plane;
step S103: and then carrying out soil horizon horizontal correction on the fitted point cloud of the soil horizon by a Rodrign rotation algorithm, wherein the method specifically comprises the following steps:
firstly, establishing a ternary primary plane equation:
ax+by+cz+d=0;
wherein x, y and z are specific coordinates of the point cloud in a space rectangular coordinate system; a. b, c and d are constants, and are obtained according to the specific position of the point cloud in the space rectangular coordinate system;
then, the normal vector of the soil plane is obtained by a ternary primary plane equationSimultaneously defining the normal vector of the depth camera coordinate system as +.>Wherein (1)>Is (x) 1 ,y 1 ,z 1 ),/>Is (x) 2 ,y 2 ,z 2 ) From the dot product definition, it is possible to:
in which θ is the vector before and after rotationVector->Is included in the plane of the first part;
since the axis of rotation must be perpendicular to the normal vector of the ground planeAnd depth camera coordinate system normal vector +.>Plane in which the vector is located ∈>Vector->Cross multiplication to obtain a rotation axis vector +.>And carrying out normalization operation:
in (w) x ,w y ,w z ) Is vector quantityCoordinates of (c);
then, a rotation matrix R is obtained according to the Rodrign rotation algorithm:
finally multiplying the original point cloud by a rotation matrix R to obtain a point cloud after horizontal correction;
step S104: and finally, removing the soil layer according to a preset threshold value to obtain the complete plant point cloud for plant phenotype.
2. A system for a point cloud based farmland soil layer treatment method, as defined in claim 1, wherein: the system comprises an acquisition module, a building module and a processing module;
the acquisition module acquires visible light images and depth information of plants by adopting an RGB-D depth camera; the building module calculates a three-dimensional point cloud of the plant through the difference value; and the processing module is used for fitting and removing the plane where the plant point cloud is located, and a point cloud processing tool is selected for processing.
3. A point cloud based farmland soil layer treatment system, as set forth in claim 2, wherein: the system also includes a storage medium coupled to the processing module; the storage medium is any one of a magnetic disk, an optical disk, a read-only memory ROM or a random access memory RAM.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110229082.7A CN113096027B (en) | 2021-03-02 | 2021-03-02 | Point cloud-based farmland soil layer horizontal correction and removal method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110229082.7A CN113096027B (en) | 2021-03-02 | 2021-03-02 | Point cloud-based farmland soil layer horizontal correction and removal method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113096027A CN113096027A (en) | 2021-07-09 |
CN113096027B true CN113096027B (en) | 2024-01-23 |
Family
ID=76667777
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110229082.7A Active CN113096027B (en) | 2021-03-02 | 2021-03-02 | Point cloud-based farmland soil layer horizontal correction and removal method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113096027B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115479545A (en) * | 2022-10-28 | 2022-12-16 | 博众精工科技股份有限公司 | Height difference measuring method and device, terminal and readable storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2017118396A (en) * | 2015-12-25 | 2017-06-29 | Kddi株式会社 | Program, apparatus and method for calculating internal parameters of depth camera |
EP3340130A1 (en) * | 2016-12-23 | 2018-06-27 | Hexagon Technology Center GmbH | Method for prediction of soil and/or plant condition |
CN109816680A (en) * | 2018-12-19 | 2019-05-28 | 黑龙江八一农垦大学 | A high-throughput calculation method for crop plant height |
CN109859099A (en) * | 2019-01-22 | 2019-06-07 | 华中农业大学 | The quick minimizing technology of potting corn weeds based on SFM point cloud depth degree |
CN110765962A (en) * | 2019-10-29 | 2020-02-07 | 刘秀萍 | Plant identification and classification method based on three-dimensional point cloud contour dimension values |
CN111724433A (en) * | 2020-06-24 | 2020-09-29 | 广西师范大学 | A method and system for crop phenotypic parameter extraction based on multi-eye vision |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110335295B (en) * | 2019-06-06 | 2021-05-11 | 浙江大学 | Plant point cloud acquisition registration and optimization method based on TOF camera |
-
2021
- 2021-03-02 CN CN202110229082.7A patent/CN113096027B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2017118396A (en) * | 2015-12-25 | 2017-06-29 | Kddi株式会社 | Program, apparatus and method for calculating internal parameters of depth camera |
EP3340130A1 (en) * | 2016-12-23 | 2018-06-27 | Hexagon Technology Center GmbH | Method for prediction of soil and/or plant condition |
CN109816680A (en) * | 2018-12-19 | 2019-05-28 | 黑龙江八一农垦大学 | A high-throughput calculation method for crop plant height |
CN109859099A (en) * | 2019-01-22 | 2019-06-07 | 华中农业大学 | The quick minimizing technology of potting corn weeds based on SFM point cloud depth degree |
CN110765962A (en) * | 2019-10-29 | 2020-02-07 | 刘秀萍 | Plant identification and classification method based on three-dimensional point cloud contour dimension values |
CN111724433A (en) * | 2020-06-24 | 2020-09-29 | 广西师范大学 | A method and system for crop phenotypic parameter extraction based on multi-eye vision |
Non-Patent Citations (1)
Title |
---|
基于可视化类库的植株三维形态配准方法及点云可视化;方慧;杜朋朋;胡令潮;何勇;;农业工程学报(22);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN113096027A (en) | 2021-07-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Shi et al. | An automatic method of fish length estimation using underwater stereo system based on LabVIEW | |
Sun et al. | In-field high throughput phenotyping and cotton plant growth analysis using LiDAR | |
Che et al. | Estimation of maize plant height and leaf area index dynamics using an unmanned aerial vehicle with oblique and nadir photography | |
James et al. | Optimising UAV topographic surveys processed with structure-from-motion: Ground control quality, quantity and bundle adjustment | |
Ghahremani et al. | Direct and accurate feature extraction from 3D point clouds of plants using RANSAC | |
Roth et al. | Repeated multiview imaging for estimating seedling tiller counts of wheat genotypes using drones | |
Jiang et al. | Quantitative analysis of cotton canopy size in field conditions using a consumer-grade RGB-D camera | |
Zhou et al. | An integrated skeleton extraction and pruning method for spatial recognition of maize seedlings in MGV and UAV remote images | |
Cai et al. | Measurement of potato volume with laser triangulation and three-dimensional reconstruction | |
Herrero-Huerta et al. | Canopy roughness: A new phenotypic trait to estimate aboveground biomass from unmanned aerial system | |
Ma et al. | Retrieving forest canopy clumping index using terrestrial laser scanning data | |
Fang et al. | High-throughput volumetric reconstruction for 3D wheat plant architecture studies | |
Paturkar et al. | Non-destructive and cost-effective 3D plant growth monitoring system in outdoor conditions | |
CN113780144A (en) | An automatic extraction method of crop plant number and stem width based on 3D point cloud | |
CN111060922A (en) | Tree point cloud extraction method based on airborne laser radar point cloud spatial distribution characteristics | |
CN113096027B (en) | Point cloud-based farmland soil layer horizontal correction and removal method | |
Gao et al. | A method for obtaining maize phenotypic parameters based on improved QuickShift algorithm | |
Dong et al. | Improved voxel-based volume estimation and pruning severity mapping of apple trees during the pruning period | |
Itakura et al. | Voxel-based leaf area estimation from three-dimensional plant images | |
CN112285130B (en) | Inversion method, device and equipment of atmospheric thermal structure and storage medium | |
Putro et al. | Application of 3D reconstruction system based on close-range photogrammetry method for plant growth estimation | |
CN116757507A (en) | A method, system, electronic device and storage medium for predicting crop filling process | |
Chong et al. | Performance of structure-from-motion approach on plant phenotyping using images from smartphone | |
Wang et al. | High-throughput analysis of maize azimuth and spacing from Lidar data | |
CN114581361A (en) | Object form measuring method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |