CN110837849B - Leaf vein acquisition method for plant leaves - Google Patents
Leaf vein acquisition method for plant leaves Download PDFInfo
- Publication number
- CN110837849B CN110837849B CN201910981512.3A CN201910981512A CN110837849B CN 110837849 B CN110837849 B CN 110837849B CN 201910981512 A CN201910981512 A CN 201910981512A CN 110837849 B CN110837849 B CN 110837849B
- Authority
- CN
- China
- Prior art keywords
- point
- nearest neighbor
- base
- axis
- principal component
- 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
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2413—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
- G06F18/24147—Distances to closest patterns, e.g. nearest neighbour classification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Artificial Intelligence (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Life Sciences & Earth Sciences (AREA)
- General Engineering & Computer Science (AREA)
- Image Analysis (AREA)
Abstract
The invention provides a method for acquiring veins of plant leaves, which comprises the following steps: step 11, performing principal component analysis on plant leaf point cloud; step 13, segmenting the leaf point cloud based on the octree; respectively defining two endpoints in the first principal component direction as a starting point and an end point; step 15, selecting a starting point as a base point; step 17, searching K nearest neighbor points around the base point; step 19, respectively calculating the sum of the distances between each nearest neighbor point and the base point and the end point; step 21, judging whether the nearest neighbor point with the minimum distance sum is a base point; step 23, when the nearest neighbor point with the minimum distance sum is not the previous base point, taking the nearest neighbor point with the minimum distance sum as the current base point; step 25, circularly executing the steps 17 to 23 until the base point is the end point; and 27, fitting according to the stored base points to obtain the veins of the blade. The invention provides a high-efficiency method for obtaining the veins of plant leaves.
Description
Technical Field
The invention relates to the field of plant phenotype measurement, in particular to a method for acquiring veins of plant leaves.
Background
The phenotype of the plant is determined or influenced by gene and environmental factors, and reflects the structure and composition of the plant, the growth and development process of the plant and all physical, physiological and biochemical characteristics and characters of the result. The leaves are important components of plants, the morphology of the leaves directly influences the growth and the final yield of the plants, and the leaves are an indispensable part in the phenotypic classification of the plants. The veins make the leaves spread in the air, and the maximum sunlight acquisition is one of the most important parts on the leaves.
In the prior art, the veins are extracted from the point cloud of the blades, the point cloud of the blades is generally subjected to principal component analysis firstly to find the blade tips and the blade bases of the blades, and then the shortest path is searched on the point cloud of the blades by taking the blade tips and the blade base points as a starting point and an end point to replace the veins. The method needs to compare all possible paths on the blade point cloud to find the shortest path, the efficiency is low, the searched shortest path is not smooth, and errors still exist compared with smooth veins.
Therefore, it is necessary to provide a method for obtaining the veins of plant leaves and a method for collecting the veins, so as to solve the above problems.
Disclosure of Invention
The invention aims to provide a high-efficiency method for obtaining veins of plant leaves.
The above object of the present invention can be achieved by the following technical solutions: a method for obtaining veins of plant leaves comprises the following steps: step 11, performing principal component analysis on the plant leaf point cloud, and acquiring a first principal component direction of the plant leaf; step 13, segmenting the blade point cloud based on an octree structure; respectively defining two endpoints in the first principal component direction as a starting point and an end point; step 15, selecting the starting point as a base point; step 17, searching K nearest neighbor points around the base point; step 19, respectively calculating the sum of the distances between each nearest neighbor point and the base point and the end point; step 21, judging whether the nearest neighbor point with the minimum distance sum is a base point; step 23, when the nearest neighbor point with the minimum distance sum is not the previous base point, storing the base point; and the nearest neighbor point with the minimum sum of the distances is used as the current base point; step 25, circularly executing the step 17 to the step 23 until the base point is the end point; and 27, performing fitting calculation according to the stored base points to obtain the veins of the blade.
As a preferred embodiment, it further comprises: and step 29, when the nearest neighbor point with the minimum sum of the distances is the previous base point, selecting the nearest neighbor point with the minimum sum of the distances from the rest K-1 nearest neighbor points as the base point.
As a preferred embodiment, step 27, performing fitting calculation on a plurality of base points to obtain the veins of the blade specifically includes: 271, obtaining a second principal component direction and a third principal component direction of the plant leaf, wherein the first principal component direction, the second principal component direction and the third principal component direction are perpendicular to each other; step 273, regarding the first principal component direction as an X-axis, regarding the second principal component direction as a Y-axis, and regarding the third principal component direction as a Z-axis, so as to establish an XYZ coordinate system; 275 projecting the base points on a plane where the X axis and the Z axis are located in the XYZ coordinate system; and 277, performing fitting calculation on the projections of the base points on the plane where the X axis and the Z axis are located to obtain the veins of the blade.
As a preferred embodiment, the step 275, projecting the base points onto the plane where the X axis and the Z axis are located in the XYZ coordinate system, specifically includes: setting the Y coordinate of each of the base points to 0 in the XYZ coordinate system to project each of the base points onto a plane on which the X axis and the Z axis lie.
As a preferred embodiment, the step 273, taking the first principal component direction as an X axis, the second principal component direction as a Y axis, and the third principal component direction as a Z axis, to establish an XYZ coordinate system specifically includes: taking mass points of the plant leaf point cloud as an origin point, and taking the direction of the first main component as an X axis; taking the direction of the second main component as a Y axis; taking the direction of the third principal component as a Z axis; to establish an XYZ coordinate system.
As a preferred embodiment, the step 21 of determining whether the nearest neighboring point with the minimum sum of the distances is a base point or not specifically includes: comparing the nearest neighbor point with the minimum sum of the distances with each base point in a path set, wherein all the base points are stored in the path set; when the nearest neighbor point with the minimum sum of distances is different from each base point in the path set, the nearest neighbor point with the minimum sum of distances is not a previous base point; when the nearest neighbor point with the minimum sum of distances is the same as a certain base point in the path set, the nearest neighbor point with the minimum sum of distances is a used base point.
As a preferred embodiment, step 19 of calculating the sum of the distances between each nearest neighbor point and the base point and the end point respectively includes: step 191, calculating a first Euclidean distance between each nearest neighbor point and the base point; step 193, calculating a second Euclidean distance between each nearest neighbor point and the end point; and obtaining the sum of the distances according to the first Euclidean distance and the second Euclidean distance.
In a preferred embodiment, the first Euclidean distance h1=sqrt((xi-xt)^2+(yi-yt)^2+(zi-zt)^2) (ii) a Wherein (x)i,yi,zi) (i ═ 1, 2 … K) is the coordinate of the nearest neighbor; (x)t,yt,zt) Is the coordinate of the base point.
In a preferred embodiment, the second Euclidean distance h2=sqrt((xi-x0)^2+(yi-y0)^2+(zi-z0)^2) (ii) a Wherein (x)i,yi,zi) (i ═ 1, 2 … k) is the coordinate of the nearest neighbor; (x)0,y0,z0) Is the coordinate of the end point.
As a preferred embodiment, K is from 5 to 10.
The method for obtaining the vein of the plant leaf has the advantages that: in the method for obtaining the leaf veins of the plant leaves, K nearest neighbor points of a base point are searched, and when the nearest neighbor point with the minimum distance sum is not the base point, the nearest neighbor point with the minimum distance sum is used as the base point; the steps S17 to S23 are executed in a loop until the base point is the end point, and finally the fitting calculation is performed on the plurality of base points to obtain the veins 13 of the blade. Compared with the prior art, the method for acquiring the leaf veins of the plant leaves does not need to compare all possible paths on the leaf point cloud 11, and only needs to search K nearest neighbor points of the base point, so that the calculated data amount is less, and the calculation speed and efficiency can be improved. Therefore, the invention provides an efficient method for obtaining the veins of the plant leaves.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flow chart of a method for obtaining veins of plant leaves according to an embodiment of the present invention;
FIG. 2 illustrates a plurality of base points viewed from a Z-axis perspective in accordance with one embodiment of the present invention;
FIG. 3 illustrates a plurality of base points viewed from a Y-axis perspective in accordance with one embodiment of the present invention;
FIG. 4 illustrates a plurality of base points after projection from a Z-axis viewing angle, according to an embodiment of the present invention;
FIG. 5 illustrates a plurality of base points after projection at a Y-axis viewing angle, according to an embodiment of the present invention;
FIG. 6 is a fitted leaf vein at a Z-axis view provided by one embodiment of the present invention;
FIG. 7 is a fitted leaf vein at a Y-axis view provided by one embodiment of the present invention;
FIG. 8 is a schematic diagram of a leaf vein obtained by the method for obtaining a leaf vein of a plant leaf according to the embodiment of the present application on a point cloud of the plant leaf;
fig. 9 is a graph comparing the length of leaf vein obtained by the method for obtaining leaf vein of plant leaf according to the embodiment of the present application with the manually measured length of leaf vein.
Description of reference numerals:
11. blade point cloud; 13. leaf veins.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Please refer to fig. 1 to 8. An embodiment of the present application provides a method for obtaining veins of a plant leaf, which may include: step S11, performing principal component analysis on the plant leaf point cloud, and acquiring a first principal component direction of the plant leaf; step S13, segmenting the blade point cloud based on an octree structure; respectively defining two endpoints in the first principal component direction as a starting point and an end point; step S15, selecting the starting point as a base point; step S17, searching K nearest neighbor points around the base point; step S19, respectively calculating the sum of the distances between each nearest neighbor point and the base point and the end point; step S21, judging whether the nearest neighbor point with the minimum distance sum is a base point; step S23, when the nearest neighboring point with the minimum sum of the distances is not a previous base point, storing the base point; and the nearest neighbor point with the minimum sum of the distances is used as the current base point; step S25, circularly executing the steps S17 to S23 until the base point is the end point; and step S27, performing fitting calculation according to the stored base points to obtain the veins of the blade.
The technical scheme shows that: in the method for obtaining the leaf veins of the plant leaves, K nearest neighbor points of a base point are searched, and when the nearest neighbor point with the minimum distance sum is not the base point, the nearest neighbor point with the minimum distance sum is used as the base point; the steps S17 to S23 are executed in a loop until the base point is the end point, and finally the fitting calculation is performed on the plurality of base points to obtain the veins 13 of the blade. Compared with the prior art, the method for acquiring the leaf veins of the plant leaves does not need to compare all possible paths on the leaf point cloud 11, and only needs to search K nearest neighbor points of the base point, so that the calculated data amount is less, and the calculation speed and efficiency can be improved.
In the present embodiment, step S11: and (4) carrying out principal component analysis on the plant leaf point cloud 11, and acquiring a first principal component direction of the plant leaf. Specifically, the principal component analysis of the plant leaf point cloud 11 may be: firstly, carrying out characteristic decomposition on a covariance matrix of a plant leaf point cloud 11 to obtain n eigenvectors corresponding to n maximum eigenvalues; (n is 1, 2 … m, m is a natural number). The n feature vectors may be used to establish a coordinate system. So that the n-value coincides with the dimensions of the coordinate system to be established. For example, n is 3. Namely, feature decomposition is carried out on the covariance matrix of the plant leaf point cloud 11, and three feature vectors corresponding to three maximum feature values are obtained after the feature decomposition. The directions of the three eigenvectors are a first principal component direction, a second principal component direction and a third principal component direction in sequence, and can be known according to the principle of characteristic decomposition: the first principal component direction, the second principal component direction and the third principal component direction are perpendicular to each other. So that a 3-dimensional coordinate system can be calculated from the 3 eigenvectors. Of course, n is not limited to 3, but may be other numbers, such as 4, for example, and is not specified in this application.
Further, the plant leaf point cloud 11 can be obtained by a sensor. In particular, the individual blade point clouds 11 may be acquired directly by sensors. Of course, the plant point cloud can also be acquired first by the sensor. The plant point cloud is then segmented to obtain individual leaf point clouds 11. No provision is made for this application.
In the present embodiment, step S13: segmenting the leaf point cloud 11 based on the octree structure; and defines two end points in the first principal component direction as a start point and an end point, respectively. Specifically, the partition of the blade point cloud 11 based on the octree structure may be to partition the blade point cloud to the minimum point cloud according to the octree structure. The minimum point cloud may be the minimum point cloud that cannot be segmented based on an octree structure. Specifically, defining two end points in the first principal component direction as a start point and an end point, respectively, may be, for example, when the first principal component direction is taken as the X axis, comparing the coordinate positions of respective points on the blade point cloud 11 located on the X axis to find a point on the blade point cloud 11 where the X coordinate value is the largest and a point on the blade point cloud 11 where the X coordinate value is the smallest. One of the point where the X-coordinate value is maximum and the point where the X-coordinate value is minimum is defined as a starting point, and the other is defined as an ending point. For example, a point at which the X-coordinate value is maximum may be defined as the starting point. The point at which the X coordinate value is minimum is defined as the end point. It is of course also possible to define the point at which the X-coordinate value is maximum as the end point. The point at which the X coordinate value is minimum is defined as a starting point. An octree structure is a tree-like data structure used to describe a three-dimensional space. Each parent node of the octree represents a cubic volume element. Each parent node has eight child nodes. The volume elements represented by the eight child nodes are added together to equal the volume of the parent node.
In the present embodiment, step S15: and selecting a starting point as a base point. I.e. first the starting point is taken as the base point.
In the present embodiment, step S17: the K nearest neighbors around the base point are searched on the blade point cloud 11. The nearest neighbor point may be the point on the blade point cloud that is nearest to the base point. K is a natural number between 5 and 10. For example, K is 8. I.e. 8 nearest neighbors of the base point are searched on the blade point cloud 11. Specifically, for example, eight child nodes around the base point are first found in the blade point cloud 11. Then 8 nearest neighbor points of the base point are searched on the blade point cloud 11 based on the K neighbor search algorithm of the octree segmentation. The K neighbor search algorithm based on octree segmentation is an existing algorithm, and is not described in detail herein.
In the present embodiment, step S19: and respectively calculating the sum of the distances between each nearest neighbor point and the base point and the end point. So that the sum of K distances can be obtained. For example, when the nearest neighbor points are 8, the sum of the distances between the 8 nearest neighbor points and the base point and the end point is calculated, and the sum of the 8 distances can be obtained.
In one embodiment, step S19: respectively calculating the sum of the distances between each nearest neighbor point and the base point and the end point, specifically comprising:
step S191: and calculating a first Euclidean distance between each nearest neighbor point and the base point.
In one embodiment, the first Euclidean distance h1=sqrt((xi-xt)^2+(yi-yt)^2+(zi-zt)^2) (ii) a Wherein (x)i,yi,zi) (i ═ 1, 2 … K) is the coordinate of the nearest neighbor; (x)t,yt,zt) Are the coordinates of the base point. For example, the coordinates of the base point are (15, 0, 35). The coordinates of the nearest neighbor are (12, 0, 30). Then the first Euclidean distance between the nearest neighbor point and the base point is sqrt ((15-12) ^2+(0-0)^2+(35-30)^2)=sqrt(31)=5.6。
Step S193: calculating a second Euclidean distance between each nearest neighbor point and the end point; and obtaining the sum of the distances according to the first Euclidean distance and the second Euclidean distance. That is, the sum of the distances between each nearest neighbor point and the base point and the end point is the sum of the first euclidean distance between each nearest neighbor point and the base point and the second euclidean distance between each nearest neighbor point and the end point.
In one embodiment, the second Euclidean distance h2=sqrt((xi-x0)^2+(yi-y0)^2+(zi-z0)^2) (ii) a Wherein (x)i,yi,zi) (i ═ 1, 2 … K) is the coordinate of the nearest neighbor; (x)0,y0,z0) The coordinates of the end point. For example, the coordinates of the end point are (22, 0, 35). The coordinates of the nearest neighbor are (12, 0, 30). Then the first Euclidean distance between the nearest neighbor point and the starting point is sqrt ((22-12) ^2+(0-0)^2+(35-30)^2) Sqrt (125) ═ 11.1. So that the sum of the distances between the nearest neighbor and the base and end points is 5.6+ 11.1-16.7.
In the present embodiment, step S21: it is judged whether the nearest neighbor point having the smallest sum of distances has been the base point. That is, the nearest neighbor point with the smallest sum of distances is found from the sum of the K distances, and whether the nearest neighbor point with the smallest sum of distances is the same as any one of the base points is judged.
In one embodiment, step S21: judging whether the nearest neighbor point with the minimum sum of distances is a base point or not, specifically comprising:
the nearest neighbor point with the smallest sum of distances is compared with each base point in a path set, wherein all the base points are stored in the path set once. Specifically, the path set is used to store all base points once. I.e. the nearest neighbor point with the smallest sum of distances is compared with all the base points once.
Further, all base points were stored in the path set. Specifically, a set of paths may be established first. All base points are then stored in the path set, respectively. More specifically, a starting point must be stored within the set of paths. In addition, all other base points are stored in the path set. That is, when the base point is stored in step S23, the base point may be stored in a path set. Thus, all base points can be stored in the path set. For example, after the starting point is used as the base point and step 15, step 17, and step 19 are performed, the nearest neighbor point with the smallest sum of distances is selected to be compared with the starting point in the path set, and when the nearest neighbor point with the smallest sum of distances is different from the starting point, the nearest neighbor point with the smallest sum of distances is stored in the path set.
Further, when the nearest neighbor point with the smallest sum of distances is different from each base point in the path set, the nearest neighbor point with the smallest sum of distances is not the former base point. I.e. the nearest neighbor point for which the sum of the distances is the smallest has not been taken as a base point. For example, all the past base points in the path set are: (14, 0, 30), (15, 1, 29) and (15, -1, 31). The nearest neighbor point for which the sum of the distances is the smallest is (14, 1, 30). Then it can be seen that the nearest neighbor point is not the same as each base point in the path set, and the nearest neighbor point is not the base point once.
Further, when the nearest neighbor point with the smallest sum of distances is the same as a certain base point in the path set, the nearest neighbor point with the smallest sum of distances is the former base point. I.e. the nearest neighbor point for which the sum of the distances is the smallest, has been taken as the base point. For example, all the past base points in the path set are: (14, 0, 30), (15, 1, 29) and (15, -1, 31). The nearest neighbor point for which the sum of the distances is the smallest is (14, 0, 30). Then it can be seen that the nearest neighbor is the same as the (14, 0, 30) base point in the path set, and then the nearest neighbor is the base point once.
In the present embodiment, step S23: when the nearest neighbor point with the minimum distance sum is not the previous base point, storing the base point; and using the nearest neighbor point with the minimum distance sum as the current base point. Further, it can be seen from the above that: that is, the base point corresponding to the nearest neighboring point with the smallest sum of distances is stored in the path set. For example, all the past base points in the path set are: (14, 0, 30), (15, 1, 29) and (15, -1, 31). The nearest neighbor point for which the sum of the distances is the smallest is (14, 1, 30). And the base point corresponding to the nearest neighbor point with the minimum sum of the distances is (14, 1, 31). The base points corresponding to the nearest neighbor point with the minimum distance sum are (14, 1, 31) stored in the path set, so that all the base points in the path set are (14, 0, 30), (15, 1, 29), (15, -1, 31) and (14, 1, 31).
In the present embodiment, step S25: the steps S17 to S23 are executed in a loop until the base point is the end point. That is, step S17, step S19, step S21 and step S23 are repeatedly performed. Until the base point is the terminal point.
In the present embodiment, step S27: fitting calculation is performed based on the stored base points to obtain the veins 13 of the leaf. So that the veins 13 of the plant leaves can be obtained from a plurality of base points.
In one embodiment, step S27: the fitting calculation of the plurality of base points to obtain the veins 13 of the blade specifically includes:
step S271: and acquiring a second principal component direction and a third principal component direction of the plant leaves, wherein the first principal component direction, the second principal component direction and the third principal component direction are vertical to each other. Specifically, three eigenvectors corresponding to the three maximum eigenvalues can be obtained after performing eigen decomposition on the covariance matrix of the plant leaf point cloud 11. The directions of the three eigenvectors are a first principal component direction, a second principal component direction and a third principal component direction in sequence, and can be known according to the principle of characteristic decomposition: the first principal component direction, the second principal component direction and the third principal component direction are perpendicular to each other.
Step S273: the first principal component direction is taken as the X-axis, the second principal component direction is taken as the Y-axis, and the third principal component direction is taken as the Z-axis to establish an XYZ coordinate system. Thereby converting the coordinates of the blade point cloud 11 into an XYZ coordinate system.
Specifically, step 273: establishing an XYZ coordinate system by taking the first principal component direction as an X axis, the second principal component direction as a Y axis and the third principal component direction as a Z axis, specifically comprising:
using mass points of the plant leaf point cloud 11 as an origin and using the direction of the first main component as an X axis; taking the direction of the second main component as a Y axis; taking the direction of the third main component as a Z axis; to establish an XYZ coordinate system. The mass point of the plant leaf point cloud 11 is the mass midpoint of the plant leaf point cloud 11.
Step S275: a plurality of base points are projected on a plane where an X axis and a Z axis are located in an XYZ coordinate system. Thereby eliminating the y-axis direction deviation. For example, as shown in fig. 2, the line formed by the base points before projection is initially curved when viewed from the Z-axis. As shown in fig. 3, the initial stage of the line formed by the plurality of base points when viewed from the Z-axis perspective after projection is straightened; thus eliminating the y-axis direction deviation.
Further, step 275, projecting the base points on a plane where the X axis and the Z axis are located in the XYZ coordinate system, specifically includes: the Y coordinate of each base point is set to 0 in the XYZ coordinate system to project each base point onto a plane on which the X axis and the Z axis lie. For example, when the coordinate of the base point is (15, 1, 29), the projection of the base point on the plane where the X axis and the Z axis are located is (15, 0, 29). When the coordinate of the base point is (15, -1, 31), the projection of the base point on the plane where the X axis and the Z axis are located is (15, 0, 31).
In one embodiment, step S27: the fitting calculation is performed on the plurality of base points to obtain the veins 13 of the leaf, further including step S277: the projections of the base points are subjected to fitting calculation on the plane on which the X-axis and the Z-axis lie to obtain the veins 13 of the blade. In particular, a projection of the base points on the plane on which the X-axis and the Z-axis lie can be fitted using polynomial regression to obtain a smooth curve. For example, as shown in fig. 4 and 5, the projection of the base point on the plane where the X axis and the Z axis are located effectively eliminates the error in the Y axis direction, but does not eliminate the error in the X axis direction. As shown in fig. 6 and 7, fitting the projections of the base points on the planes of the X axis and the Z axis can effectively eliminate the error in the X axis direction, so that the veins 13 of the leaf at the Y axis viewing angle are smooth curves.
In one embodiment, the method for obtaining the vein of a plant leaf according to the embodiment of the present application further comprises:
step S29: and when the nearest neighbor point with the minimum distance sum is the one-time base point, selecting the nearest neighbor point with the minimum distance sum from the rest K-1 nearest neighbor points as the base point. That is, the nearest neighbor point corresponding to the sum of the second smallest distance among the sum of the K distances is selected.
Further, fig. 8 shows a schematic diagram of a leaf curve obtained by the leaf vein obtaining method for a plant leaf according to the embodiment of the present application on the plant leaf point cloud 11. As can be seen from fig. 8: the fitting degree of the vein curve obtained by the vein obtaining method of the plant leaves according to the embodiment of the application and the vein 13 of the leaf point cloud 11 is very high.
Further, fig. 9 is a graph comparing the length of the leaf curve on the leaf point cloud 11 obtained by the leaf vein obtaining method for the plant leaf according to the embodiment of the present application with the manually measured length of the leaf vein 13. The abscissa in fig. 9 represents the length of the leaf curve on the leaf point cloud 11 obtained by the leaf vein acquisition method for the plant leaf according to the embodiment of the present application. The ordinate represents the manually measured vein length. And the leaf is obtained by calculating the leaf vein obtaining method of the plant leaf according to the embodiment of the applicationDetermination coefficient r of length of vein 13 curve on point cloud 11 and manually measured vein 13 length2And the mean square error RMSE. Thereby passing through the determination coefficient r2And the mean square error RMSE is used for judging the effect of the method for obtaining the vein of the plant leaf according to the embodiment of the application. Wherein, the mean square error RMSE is:
wherein p isiIs the length, y, of the leaf vein 13 extracted by the algorithmiIs the manually measured length of the veins 13 and n represents the number of leaves.
Further, the determination coefficient r2Greater than 0.99, RMSE 2.55 mm. Therefore, the method for obtaining the vein of the plant leaf is high in precision.
It should be noted that, in the description of the present invention, the terms "first", "second", and the like are used for descriptive purposes only and for distinguishing similar objects, and no precedence between the two is considered as indicating or implying relative importance. In addition, in the description of the present invention, "a plurality" means two or more unless otherwise specified.
The above embodiments are provided to further explain the objects, technical solutions and advantages of the present invention in detail, it should be understood that the above embodiments are only examples of the present invention and are not intended to limit the scope of the present invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (10)
1. A method for obtaining veins of plant leaves is characterized by comprising the following steps:
step 11, performing principal component analysis on the plant leaf point cloud, and acquiring a first principal component direction of the plant leaf;
step 13, segmenting the blade point cloud based on an octree structure; respectively defining two endpoints in the first principal component direction as a starting point and an end point;
step 15, selecting the starting point as a base point;
step 17, searching K nearest neighbor points around the base point;
step 19, respectively calculating the sum of the distances between each nearest neighbor point and the base point and the end point;
step 21, judging whether the nearest neighbor point with the minimum distance sum is a base point;
step 23, when the nearest neighbor point with the minimum distance sum is not the previous base point, storing the base point; and the nearest neighbor point with the minimum sum of the distances is used as the current base point;
step 25, circularly executing the step 17 to the step 23 until the base point is the end point;
and 27, performing fitting calculation according to the stored base points to obtain the veins of the blade.
2. The method of claim 1, further comprising:
and step 29, when the nearest neighbor point with the minimum sum of the distances is the previous base point, selecting the nearest neighbor point with the minimum sum of the distances from the rest K-1 nearest neighbor points as the base point.
3. The method of claim 1, wherein the method comprises: step 27, performing fitting calculation on the plurality of base points to obtain the veins of the blade, specifically including:
271, obtaining a second principal component direction and a third principal component direction of the plant leaf, wherein the first principal component direction, the second principal component direction and the third principal component direction are perpendicular to each other;
step 273, regarding the first principal component direction as an X-axis, regarding the second principal component direction as a Y-axis, and regarding the third principal component direction as a Z-axis, so as to establish an XYZ coordinate system;
275 projecting the base points on a plane where the X axis and the Z axis are located in the XYZ coordinate system;
and 277, performing fitting calculation on the projections of the base points on the plane where the X axis and the Z axis are located to obtain the veins of the blade.
4. The method of claim 3, wherein the method comprises: step 275, projecting the plurality of base points onto a plane where the X axis and the Z axis are located in the XYZ coordinate system, specifically comprising:
setting the Y coordinate of each of the base points to 0 in the XYZ coordinate system to project each of the base points onto a plane on which the X axis and the Z axis lie.
5. The method for obtaining the leaf vein of the plant leaf according to claim 3, wherein the step 273, with the first principal component direction as X-axis, the second principal component direction as Y-axis and the third principal component direction as Z-axis, establishes an XYZ coordinate system, specifically comprises:
taking mass points of the plant leaf point cloud as an origin point, and taking the direction of the first main component as an X axis; taking the direction of the second main component as a Y axis; taking the direction of the third principal component as a Z axis; to establish an XYZ coordinate system.
6. The method for obtaining the leaf vein of the plant leaf according to claim 1, wherein the step 21 of determining whether the nearest neighboring point with the minimum sum of the distances is a base point comprises:
comparing the nearest neighbor point with the minimum sum of the distances with each base point in a path set, wherein all the base points are stored in the path set;
when the nearest neighbor point with the minimum sum of distances is different from each base point in the path set, the nearest neighbor point with the minimum sum of distances is not a previous base point;
when the nearest neighbor point with the minimum sum of distances is the same as a certain base point in the path set, the nearest neighbor point with the minimum sum of distances is a used base point.
7. The method for obtaining the leaf vein of a plant leaf according to claim 1, wherein the step 19 of calculating the sum of the distances between each nearest neighbor and the base point and the end point respectively comprises:
step 191, calculating a first Euclidean distance between each nearest neighbor point and the base point;
step 193, calculating a second Euclidean distance between each nearest neighbor point and the end point; and obtaining the sum of the distances according to the first Euclidean distance and the second Euclidean distance.
8. The method of claim 7, wherein the method comprises: the first Euclidean distance h1=sqrt((xi-xt)^2+(yi-yt)^2+(zi-zt)^2) (ii) a Wherein (x)i,yi,zi) (i ═ 1, 2 … K) is the coordinate of the nearest neighbor; (x)t,yt,zt) Is the coordinate of the base point.
9. The method of claim 7, wherein the method comprises: the second Euclidean distance h2=sqrt((xi-x0)^2+(yi-y0)^2+(zi-z0)^2) (ii) a Wherein (x)i,yi,zi) (i ═ 1, 2 … k) is the coordinate of the nearest neighbor; (x)0,y0,z0) Is the coordinate of the end point.
10. The method of claim 1, wherein the method comprises: k is 5 to 10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910981512.3A CN110837849B (en) | 2019-10-16 | 2019-10-16 | Leaf vein acquisition method for plant leaves |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910981512.3A CN110837849B (en) | 2019-10-16 | 2019-10-16 | Leaf vein acquisition method for plant leaves |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110837849A CN110837849A (en) | 2020-02-25 |
CN110837849B true CN110837849B (en) | 2022-04-08 |
Family
ID=69575245
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910981512.3A Active CN110837849B (en) | 2019-10-16 | 2019-10-16 | Leaf vein acquisition method for plant leaves |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110837849B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111723819B (en) * | 2020-06-24 | 2022-04-26 | 武汉理工大学 | Grading identification method for leaf veins of plant leaves |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108229502A (en) * | 2017-12-20 | 2018-06-29 | 中国农业大学 | A kind of three dimensional point cloud middle period chip base point extracting method of crown canopy |
CN109559338A (en) * | 2018-11-20 | 2019-04-02 | 西安交通大学 | A kind of three-dimensional point cloud method for registering estimated based on Weighted principal component analysis and M |
CN109712229A (en) * | 2018-11-26 | 2019-05-03 | 漳州通正勘测设计院有限公司 | A kind of isolated tree wooden frame point extracting method, device, equipment and storage medium |
CN109961470A (en) * | 2019-02-21 | 2019-07-02 | 南京林业大学 | A kind of accurate estimating and measuring method of live standing tree leaf attribute based on laser point cloud |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103218817B (en) * | 2013-04-19 | 2015-11-18 | 深圳先进技术研究院 | The dividing method of plant organ point cloud and system |
-
2019
- 2019-10-16 CN CN201910981512.3A patent/CN110837849B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108229502A (en) * | 2017-12-20 | 2018-06-29 | 中国农业大学 | A kind of three dimensional point cloud middle period chip base point extracting method of crown canopy |
CN109559338A (en) * | 2018-11-20 | 2019-04-02 | 西安交通大学 | A kind of three-dimensional point cloud method for registering estimated based on Weighted principal component analysis and M |
CN109712229A (en) * | 2018-11-26 | 2019-05-03 | 漳州通正勘测设计院有限公司 | A kind of isolated tree wooden frame point extracting method, device, equipment and storage medium |
CN109961470A (en) * | 2019-02-21 | 2019-07-02 | 南京林业大学 | A kind of accurate estimating and measuring method of live standing tree leaf attribute based on laser point cloud |
Non-Patent Citations (2)
Title |
---|
基于形态重构的叶片性状特征可视化表达方法;唐卫东;《农业机械学报》;20190831;全文 * |
基于表型特征的植物叶片建模方法研究;王静文;《中国优秀硕士学位论文全文数据库信息科技辑》;20130915;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN110837849A (en) | 2020-02-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106096066B (en) | Text Clustering Method based on random neighbor insertion | |
Mérigot et al. | Voronoi-based curvature and feature estimation from point clouds | |
CN113269791B (en) | Point cloud segmentation method based on edge judgment and region growth | |
CN111222418A (en) | Crowdsourcing data rapid fusion optimization method for multiple road segments of lane line | |
CN111209805B (en) | Rapid fusion optimization method for multi-channel segment data of lane line crowdsourcing data | |
CN112529891B (en) | Method and device for identifying hollow holes and detecting contours based on point cloud and storage medium | |
CN112200915B (en) | Front-back deformation detection method based on texture image of target three-dimensional model | |
CN110837849B (en) | Leaf vein acquisition method for plant leaves | |
WO2020197508A1 (en) | Method and system for visual based inspection of rotating objects | |
CN109325510A (en) | A kind of image characteristic point matching method based on lattice statistical | |
CN114241018A (en) | Tooth point cloud registration method and system and readable storage medium | |
CN112102178A (en) | Point cloud feature-preserving denoising method and device, electronic equipment and storage medium | |
CN117408913B (en) | Method, system and device for denoising point cloud of object to be measured | |
CN108229502B (en) | Method for extracting base points of blades in three-dimensional point cloud data of tree canopy layer | |
CN110310322A (en) | Method for detecting assembly surface of 10-micron-level high-precision device | |
CN111553410B (en) | Point cloud identification method based on key point local curved surface feature histogram and spatial relationship | |
CN113554079A (en) | Electric power load abnormal data detection method and system based on secondary detection method | |
CN110879063B (en) | Rapid star map identification method based on triangle matching | |
CN112950706B (en) | Mobile equipment positioning data processing method, device, equipment and storage medium | |
CN114970247A (en) | Automatic modeling method of high-fidelity finite element model for leaf disc structure | |
CN110149234B (en) | Graph data compression method, device, server and storage medium | |
CN112465022A (en) | Transformer substation clustering method based on improved hierarchical clustering algorithm | |
CN117315002B (en) | Method, system and device for measuring three-dimensional phenotype of object to be measured | |
CN116503390B (en) | Hardware part defect detection method based on computer vision | |
CN115952310B (en) | Model retrieval method based on multilayer spherical harmonic feature operator |
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 |