Corn harvesting row line detection method and system under corn-soybean complex planting mode
By combining lidar and algorithms, the corn row lines in the corn-soybean strip intercropping pattern are accurately detected, solving the problem of inaccurate detection in existing technologies and realizing intelligent control of corn harvesters and reducing losses.
Patent Information
- Application Number
- CN202211377062.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-04
- Publication Date
- 2026-03-03
- Estimated Expiration
- 2042-11-04
AI Technical Summary
Existing technologies make it difficult to accurately detect the position of corn rows in corn-soybean strip intercropping patterns, leading to increased harvest losses and making it difficult to achieve the production goal of not reducing corn yield.
Point cloud information of the work scene is acquired using LiDAR. Point clouds of corn and soybean crops are distinguished by coordinate transformation. Regions of interest (ROI) are extracted, and linear fitting is performed using particle swarm optimization and least squares method to accurately detect corn row lines.
It enables real-time and accurate detection of corn row positions in a corn-soybean strip intercropping pattern, providing basic data for intelligent control of corn harvesters, reducing harvest losses and improving production efficiency.
Smart Images

Figure CN115578459B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent agricultural machinery technology, and in particular relates to a method and system for detecting corn harvesting rows in a corn-soybean intercropping model. Background Technology
[0002] Soybeans and corn are major agricultural products in my country and important crops for ensuring national food security. The corn-soybean strip intercropping technology can fully utilize sunlight and land resources, alleviate competition for land between crops, and increase land productivity, and has been widely promoted in my country. However, in this intercropping model, the spacing between corn plants and the distance between individual plants within the corn strip are reduced, leading to mutual shading of corn leaves. Furthermore, the crop strip is a continuous block, making it difficult to accurately locate the corn row positions. Harvesting corn in rows can effectively reduce harvesting losses. To ensure that the distance between the corn plant and the center line of the ear-picking roller is maintained at a reasonable level during harvesting, the operator needs excellent driving skills and must maintain high concentration for extended periods, which can lead to fatigue and make sustained operation difficult. Providing a method for detecting corn row positions would greatly improve the accuracy of corn harvesting.
[0003] Currently, research on maize row line detection mainly focuses on harvesting scenarios where maize is planted alone. There are few reports on research specifically for maize-soybean strip intercropping. Existing technologies include using binocular cameras to acquire crop images and obtaining maize row line positions through crop color and depth information, and using deviation detection sensors. However, these methods are primarily suitable for traditional maize planting models where row spacing is large and individual maize plants are relatively independent and easily distinguishable. They cannot accurately extract the row line positions of densely planted maize in maize-soybean strip intercropping models, resulting in significant deviations. This greatly reduces the effectiveness of subsequent automated harvesting control, leading to increased harvest losses and making it difficult to achieve the production goal of maintaining maize yield. Summary of the Invention
[0004] To address the aforementioned technical problems, one objective of this invention is to provide a method for detecting corn harvesting rows in a corn-soybean intercropping pattern. This method uses lidar to acquire point cloud information of the work scene, transforms the coordinates to obtain the point cloud height, distinguishes between the point clouds of corn and soybean crops, extracts the Region of Interest (ROI), and finally performs linear fitting on the points to obtain the corn row lines in each corn crop strip within the corn-soybean intercropping strip. This method can accurately detect the row positions of each corn crop strip in the corn-soybean intercropping pattern in real time, providing fundamental data for intelligent control of corn harvesters in this pattern.
[0005] One objective of this invention is to provide a system for detecting corn harvesting rows in a corn-soybean intercropping pattern. This system includes a point cloud processing module, a point cloud extraction module, a ROI extraction module, a point clustering module, and a row acquisition module. It uses LiDAR to acquire point cloud information of the work scene, transforms the coordinates to obtain the point cloud height, distinguishes between the point clouds of corn and soybean crops, extracts the ROI region, and finally performs linear fitting on the points to obtain the corn row lines in each corn crop strip within the corn-soybean intercropping strip. This system can accurately detect the row line positions of each corn crop strip within the corn crop strip in the corn-soybean intercropping pattern in real time, providing basic data for intelligent control of corn harvesters in this pattern.
[0006] Note that the description of these objectives does not preclude the existence of other objectives. One aspect of the invention does not require achieving all of the above objectives. Objectives other than those described above can be extracted from the description, drawings, and claims.
[0007] The present invention achieves the above-mentioned technical objectives through the following technical means.
[0008] A method for detecting corn harvest rows in a corn-soybean intercropping model includes the following steps:
[0009] Step S1: Acquire and process point cloud data: Use lidar to acquire 3D point cloud of the working scene in front of the harvester, process the 3D point cloud data, and calculate the ground height of each point in the 3D point cloud.
[0010] Step S2: Extract the corn point cloud set: Based on the ground height of each point in the 3D point cloud calculated in step S1, distinguish between soybean and corn crop zones, and extract the 3D point cloud set of corn crops that are higher than soybeans.
[0011] Step S3: Extract the Region of Interest (ROI) for corn: Extract the Region of Interest (ROI) for corn based on the distribution of points in the point cloud set obtained in Step S2;
[0012] Step S4: Obtain the clustering results of the points: Use the particle swarm optimization algorithm to cluster the points in the ROI region obtained in step S3, and obtain the clustering results of the points corresponding to each row of corn.
[0013] Step S5: Linear fitting to obtain corn row lines: The least squares method is used to perform linear fitting on the points in each category after clustering in step S4 to obtain the corn row lines in each corn-soybean intercropping belt.
[0014] In the above scheme, the specific steps for processing 3D point cloud data in step S1 are as follows: based on the external parameters of the lidar calibration, the world coordinate system of the harvester and the lidar coordinate system are matched using the coordinate transformation formula to obtain the 3D point cloud in the world coordinate system of the harvester.
[0015] Furthermore, the coordinate transformation formula is as follows:
[0016]
[0017] Where X, Y, and Z are the three-dimensional coordinates of the 3D point cloud in the world coordinate system of the harvester;
[0018] X′, Y′, Z′ are the three-dimensional coordinates of the 3D point cloud in the lidar coordinate system;
[0019] R is the rotation matrix from the lidar coordinate system to the harvester's world coordinate system;
[0020] T is the translation matrix from the lidar coordinate system to the harvester's world coordinate system.
[0021] In the above scheme, the formula for calculating the ground clearance of each point in the 3D point cloud in step S1 is as follows:
[0022]
[0023] h i =HY
[0024] Where L is the straight-line distance from each point in the 3D point cloud of the harvester to the lidar in the world coordinate system;
[0025] X represents the horizontal distance from each point in the 3D point cloud of the harvester to the lidar in the world coordinate system of the harvester.
[0026] Y represents the vertical distance from each point in the 3D point cloud of the harvester to the horizontal reference plane in the world coordinate system.
[0027] H represents the ground clearance of the lidar in the world coordinate system of the harvester;
[0028] h i The height of each point above the ground in the 3D point cloud of the harvester's world coordinate system.
[0029] In the above scheme, the specific steps of step S2 include:
[0030] Step S2.1: Set the height difference threshold η between adjacent crop zones. Based on the ground height of each point in the 3D point cloud calculated in step S1, mark the 3D point clouds of adjacent crop zones with a height difference less than the height difference threshold η as the same crop zone from one side to the other. If the height difference between adjacent crop zones is greater than or equal to the height difference threshold η, it means that the crop zone has changed from one crop zone to another, and 3D point cloud blocks of multiple crop zones are obtained respectively.
[0031] Step S2.2: Calculate the average height of the 3D point cloud blocks of each crop zone in step S2.1, and input the preset first height interval and the second height interval, where the first height interval is greater than the second height interval. The 3D point cloud blocks with the average height in the first preset interval are identified as corn crop zones, and the 3D point cloud blocks with the average height in the second height interval are identified as soybean crop zones.
[0032] Step S2.3: Based on the average height h of the soybean crop belt s Based on the set height fluctuation threshold σ, extract all heights greater than (h) s A collection of 3D point clouds of maize crops (+σ).
[0033] In the above scheme, step S3 specifically includes the following steps:
[0034] Step S3.1: Construct a horizontal reference plane at the same height as the lidar mounting point;
[0035] Step S3.2: Project the 3D point cloud of the corn crop in the world coordinate system of the harvester obtained in step S2 onto the horizontal reference plane constructed in step S3.1;
[0036] Step S3.3: Dynamically extract the region of interest (ROI) of the maize crop based on the distribution of points on the horizontal reference plane.
[0037] Furthermore, the formula for extracting the Region of Interest (ROI) of the maize crop in step S3.3 is as follows:
[0038]
[0039]
[0040] Among them, R v The vertical coordinates of the upper and lower boundaries of the ROI region;
[0041] R h The x-coordinates of the left and right boundaries of the ROI region;
[0042] n is the number of midpoints in the reference plane;
[0043] v i represents the ordinate of all projected points in the horizontal reference plane;
[0044] h i represents the x-coordinates of all projected points in the horizontal reference plane;
[0045] μ1 is the width of the ROI region, and μ2 is the length of the ROI region.
[0046] In the above scheme, the formula for clustering points in the ROI region using the particle swarm optimization algorithm in step S4 is as follows:
[0047]
[0048] Where, x i y i These represent the x and y coordinates of each point in the ROI region, respectively.
[0049] k ii b jj The coefficients of the equation of the straight line;
[0050] T represents the distance from the point to the equation of the line.
[0051] In the above scheme, the formula for linearly fitting the points in each category after clustering in step S4 using the least squares method in step S5 is as follows:
[0052]
[0053] Where x0 is the x-coordinate matrix of points in each cluster category;
[0054] y0 is the y-coordinate matrix of points in each cluster category;
[0055] K is the coefficient matrix of the plane polynomial.
[0056] A system for detecting corn harvest rows in a corn-soybean intercropping model includes a point cloud processing module, a point cloud extraction module, an ROI extraction module, a point clustering module, and a row acquisition module.
[0057] The point cloud processing module is used to acquire 3D point cloud of the working scene in front of the harvester using lidar, process the 3D point cloud data, and calculate the ground height of each point in the 3D point cloud.
[0058] The point cloud extraction module is used to distinguish between soybean and corn crop zones based on the ground height of each point in the 3D point cloud, and to extract the 3D point cloud set of corn crops that are higher than soybeans.
[0059] The ROI extraction module is used to extract the region of interest (ROI) of corn based on the distribution of points in the point cloud set.
[0060] The point clustering module is used to cluster points in the ROI region using the particle swarm optimization algorithm to obtain the clustering results of the points corresponding to each row of corn.
[0061] The row line acquisition module is used to perform linear fitting on the points in each category after clustering using the least squares method to obtain the row lines of corn in the corn-soybean intercropping belt.
[0062] Compared with the prior art, the beneficial effects of the present invention are:
[0063] According to one aspect of the present invention, point cloud information of the working scene is acquired using lidar, and the point cloud height is obtained after coordinate transformation. After distinguishing the point clouds of corn and soybean crops, the ROI region is extracted, and finally, linear fitting is performed on the points to obtain the row lines of each corn in the corn-soybean intercropping strip. This enables real-time and accurate detection of the row line position of each corn in the corn crop strip under the corn-soybean intercropping mode, providing basic data for intelligent control of corn harvesters under the corn-soybean intercropping mode.
[0064] According to one aspect of the present invention, a system is provided for detecting the row position of corn harvesting in the corn-soybean intercropping pattern. This system can detect the row position of each corn row in the corn crop strip under the corn-soybean intercropping pattern in real time and accurately, providing basic data for intelligent control of corn harvesters under the corn-soybean intercropping pattern.
[0065] Note that the description of these effects does not preclude the existence of other effects. One aspect of the invention does not necessarily have all the aforementioned effects. Effects other than those described above can be readily observed and extracted from the description, drawings, claims, etc. Attached Figure Description
[0066] Figure 1 This is a flowchart illustrating one embodiment of the present invention.
[0067] Figure 2 This is a schematic diagram showing the relationship between the harvester's world coordinate system and the lidar coordinate system according to an embodiment of the present invention.
[0068] Figure 3 This is a diagram illustrating a work scenario according to one embodiment of the present invention.
[0069] Figure 4 This is a 3D point cloud image of a corn crop according to one embodiment of the present invention.
[0070] Figure 5 This is a map of the ROI region of a corn crop according to one embodiment of the present invention.
[0071] Figure 6 This is a row diagram of corn crop harvesting according to one embodiment of the present invention. Detailed Implementation
[0072] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.
[0073] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "front," "rear," "left," "right," "upper," "lower," "axial," "radial," "vertical," "horizontal," "inner," and "outer," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0074] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0075] Example 1
[0076] Figure 1 The image shows a preferred embodiment of the corn harvest row detection method under the corn-soybean intercropping model.
[0077] A method for detecting corn harvest rows based on lidar includes the following steps:
[0078] Step S1: Acquire and process point cloud data: Use lidar to acquire 3D point cloud of the working scene in front of the harvester, process the 3D point cloud data, and calculate the ground height of each point in the 3D point cloud.
[0079] Step S2: Extract the corn point cloud set: Based on the ground height of each point in the 3D point cloud calculated in step S1, distinguish between soybean and corn crop zones, and extract the 3D point cloud set of corn crops that are higher than soybeans.
[0080] Step S3: Extract the Region of Interest (ROI) for corn: Extract the Region of Interest (ROI) for corn based on the distribution of points in the point cloud set obtained in Step S2;
[0081] Step S4: Obtain the clustering results of the points: Use the particle swarm optimization algorithm to cluster the points in the ROI region obtained in step S3, and obtain the clustering results of the points corresponding to each row of corn.
[0082] Step S5: Linear fitting to obtain corn row lines: The least squares method is used to perform linear fitting on the points in each category after clustering in step S4 to obtain the corn row lines in each corn-soybean intercropping belt.
[0083] According to this embodiment, preferably, the specific steps for processing 3D point cloud data in step S1 are as follows: based on the external parameters of the lidar calibration, the world coordinate system of the harvester and the lidar coordinate system are matched using the coordinate transformation formula to obtain the 3D point cloud in the world coordinate system of the harvester.
[0084] like Figure 2 As shown, according to this embodiment, preferably, the lidar is installed on the top of the corn harvester at a height of 2.62m; the laser beam is directed toward the working scene in front of the corn harvester and maintains a downward angle of 30°.
[0085] Among them, X w ,Y w Z w O w In the world coordinate system corresponding to the harvester, X c ,Y c Z c O c The corresponding lidar coordinate system was established. The lidar installed on top of the corn harvester was calibrated to obtain the corresponding extrinsic parameter matrices R and T.
[0086] According to this embodiment, preferably, the coordinate transformation formula is as follows:
[0087]
[0088] Where X, Y, and Z are the three-dimensional coordinates of the 3D point cloud in the world coordinate system of the harvester;
[0089] X′, Y′, Z′ are the three-dimensional coordinates of the 3D point cloud in the lidar coordinate system;
[0090] R is the rotation matrix from the lidar coordinate system to the harvester's world coordinate system;
[0091] T is the translation matrix from the lidar coordinate system to the harvester's world coordinate system.
[0092] According to this embodiment, preferably, the formula used to calculate the ground clearance of each point in the 3D point cloud in step S1 is as follows:
[0093]
[0094] h i =HY
[0095] Where L is the straight-line distance from each point in the 3D point cloud of the harvester to the lidar in the world coordinate system;
[0096] X represents the horizontal distance from each point in the 3D point cloud of the harvester to the lidar in the world coordinate system of the harvester.
[0097] Y represents the vertical distance from each point in the 3D point cloud of the harvester to the horizontal reference plane in the world coordinate system.
[0098] H represents the ground clearance of the lidar in the world coordinate system of the harvester;
[0099] h i The height of each point above the ground in the 3D point cloud of the harvester's world coordinate system.
[0100] According to this embodiment, preferably, step S2 includes the following specific steps:
[0101] Step S2.1: Set the height difference threshold η between adjacent crop zones. The height difference threshold η can be determined based on the theoretical height difference between corn and soybean varieties. From one side to the other, mark the 3D point clouds of adjacent crop zones with a height difference less than the height difference threshold η as the same crop zone. If the height difference between adjacent crop zones is greater than or equal to the height difference threshold η, it indicates a change from one crop zone to another, and 3D point cloud blocks of multiple crop zones are obtained respectively. According to this embodiment, preferably, the height fluctuation threshold η = 60cm is set.
[0102] Step S2.2: Calculate the average height of the 3D point cloud blocks of each crop zone in step S2.1, and input the preset first height interval and the second height interval, where the first height interval is greater than the second height interval. The 3D point cloud blocks with the average height in the first preset interval are identified as corn crop zones, and the 3D point cloud blocks with the average height in the second height interval are identified as soybean crop zones.
[0103] Work scene images such as Figure 3 As shown, in the corn-soybean strip intercropping pattern, the height of the selected corn crop is usually between 260-280cm, and the height of the selected soybean crop is usually between 55-100cm. Therefore, the position of the corn and soybean crop strips can be determined based on the height difference of each point in the point cloud.
[0104] Step S2.3: Based on the average height h of the soybean crop belt s In this embodiment, preferably, the height fluctuation threshold σ is set to 40cm, and all heights greater than (h) are extracted. s A 3D point cloud dataset of maize crops (+40) was extracted. The results are as follows: Figure 4 As shown.
[0105] According to this embodiment, preferably, step S3 includes the following specific steps:
[0106] Step S3.1: Construct a horizontal reference plane at the same height as the lidar mounting point;
[0107] Step S3.2: Project the 3D point cloud of the corn crop in the world coordinate system of the harvester obtained in step S2 onto the horizontal reference plane constructed in step S3.1;
[0108] Step S3.3: Dynamically extract the region of interest (ROI) of the maize crop based on the distribution of points on the horizontal reference plane.
[0109] According to this embodiment, preferably, the formula for extracting the Region of Interest (ROI) of maize crop in step S3.3 is as follows:
[0110]
[0111]
[0112] Among them, R v The vertical coordinates of the upper and lower boundaries of the ROI region;
[0113] R h The x-coordinates of the left and right boundaries of the ROI region;
[0114] n is the number of midpoints in the reference plane;
[0115] v i represents the ordinate of all projected points in the horizontal reference plane;
[0116] h i represents the x-coordinates of all projected points in the horizontal reference plane;
[0117] μ1 is the width of the ROI region, and μ2 is the length of the ROI region.
[0118] like Figure 5 As shown, according to this embodiment, preferably, μ1 is set to 2.2m and μ2 is set to 1.4m, and the ROI region is extracted by combining the horizontal and vertical coordinates of the midpoint of the reference plane.
[0119] According to this embodiment, preferably, a distance threshold T0 = 20cm is set from the points in the area surrounding the corn row to the row. The plane is randomly initialized as a discrete straight line. The distance from all points in the plane to the discrete straight line is calculated. Based on the distribution density of points in the area surrounding the discrete straight line that are less than the distance threshold T0, the points are clustered.
[0120] The formula for clustering points in the ROI region using the particle swarm optimization algorithm in step S4 is as follows:
[0121]
[0122] Where, x i y i These represent the x and y coordinates of each point in the ROI region, respectively.
[0123] k ii b jj The coefficients of the linear equation are obtained by applying the particle swarm optimization algorithm to k. ii b jj The optimization process begins with random initialization, followed by continuous optimization during the computation process until the global optimum is reached.
[0124] T represents the distance from the point to the equation of the line.
[0125] According to this embodiment, preferably, the formula for linearly fitting the points in each category after clustering in step S4 using the least squares method in step S5 is as follows:
[0126]
[0127] Where x0 is the x-coordinate matrix of points in each cluster category;
[0128] y0 is the y-coordinate matrix of points in each cluster category;
[0129] K is the coefficient matrix of the plane polynomial.
[0130] like Figure 6 As shown, the corn crop harvesting row line diagram obtained after step S5 is clearly visible and conforms to the actual situation. It can provide important reference data for harvester-assisted or automatic row harvesting and guide the actual harvesting process.
[0131] This invention addresses the problems encountered during mechanized harvesting of corn in corn-soybean strip intercropping, where corn plants are denser than in traditional planting methods, hindering the operator's observation of corn rows and significantly increasing harvest losses due to inaccurate row placement. It provides a method for detecting corn harvesting rows in this corn-soybean strip intercropping pattern. The method includes: acquiring a 3D point cloud of the harvester's working scene using LiDAR and calculating the ground clearance of each point; extracting a set of 3D point clouds (PC) of corn crops above the soybean portion; constructing a horizontal reference plane and projecting the 3D point cloud of corn crops above the soybean portion onto the horizontal reference plane; extracting Regions of Interest (ROIs) based on point distribution; clustering the points in the ROIs using a particle swarm optimization algorithm; and linearly fitting the points in each cluster using the least squares method to obtain the corn row lines in each corn crop strip within the corn-soybean intercropping strip. This invention can accurately detect the row positions of corn crops in corn crop strips under a corn-soybean strip intercropping pattern in real time and has good applicability to different corn-soybean strip intercropping patterns in different regions of my country, providing basic data for automatic row alignment intelligent control of corn harvesters during corn harvesting operations under this pattern.
[0132] Example 2
[0133] A corn harvesting row detection system under a corn-soybean intercropping model includes a point cloud processing module, a point cloud extraction module, an ROI extraction module, a point clustering module, and a row acquisition module.
[0134] The point cloud processing module is used to acquire 3D point clouds of the working scene in front of the harvester using lidar, process the 3D point cloud data, and calculate the ground clearance of each point in the 3D point cloud. Specifically, the point cloud processing module matches the world coordinate system of the harvester with the lidar coordinate system using coordinate transformation formulas based on the lidar calibration extrinsic parameters to obtain the 3D point cloud in the harvester's world coordinate system.
[0135] The point cloud extraction module is used to distinguish between soybean and corn crop zones based on the ground elevation of each point in the 3D point cloud, and extract the 3D point cloud set of corn crops above the soybean area. Specifically, the point cloud extraction module sets a height difference threshold η between adjacent crop zones. Based on the ground elevation of each point in the 3D point cloud calculated by the point cloud processing module, 3D point clouds with a height difference less than the height difference threshold η between adjacent crop zones are marked as the same crop zone from one side to the other. If the height difference between adjacent crop zones is greater than or equal to the height difference threshold η, it indicates a change from one crop zone to another, resulting in multiple 3D point cloud blocks for each crop zone. The average height of the 3D point cloud blocks for each crop zone is calculated, and a preset first height interval and a second height interval are input, with the first height interval being greater than the second height interval. 3D point cloud blocks with an average height in the first preset interval are identified as corn crop zones, and 3D point cloud blocks with an average height in the second height interval are identified as soybean crop zones. Based on the average height h of the soybean crop zone... s Based on the set height fluctuation threshold σ, extract all heights greater than (h) s A collection of 3D point clouds of maize crops (+σ).
[0136] The ROI extraction module is used to extract the region of interest (ROI) of corn based on the distribution of points in the point cloud set. Specifically, the ROI extraction module constructs a horizontal reference plane with the same height as the lidar installation point; the 3D point cloud of corn crop in the world coordinate system of the harvester obtained by the point cloud extraction module is projected onto the horizontal reference plane constructed in step S3.1; and the region of interest (ROI) of corn crop is dynamically extracted in the horizontal reference plane based on the distribution of points.
[0137] The point clustering module is used to cluster points in the ROI region using the particle swarm optimization algorithm to obtain the clustering results of the points corresponding to each row of corn.
[0138] The row line acquisition module is used to perform linear fitting on the points in each category after clustering using the least squares method to obtain the row lines of corn in the corn-soybean intercropping belt.
[0139] The system is controlled by the aforementioned lidar-based corn harvesting row detection method, and therefore has the beneficial effects of Example 1, which will not be elaborated here.
[0140] It should be understood that although this specification is described according to various embodiments, not every embodiment contains only one independent technical solution. This way of describing the specification is only for clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.
[0141] The detailed descriptions listed above are merely specific illustrations of feasible embodiments of the present invention and are not intended to limit the scope of protection of the present invention. All equivalent embodiments or modifications made without departing from the spirit of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for detecting a corn harvesting row line in a corn-soybean interplanting mode, characterized in that, The method comprises the following steps: Step S1: acquiring and processing point cloud data: acquiring 3D point cloud of the harvesting machine's front working scene by using a laser radar, processing 3D point cloud data, and calculating the corresponding height of each point of the 3D point cloud from the ground; The specific steps of processing the 3D point cloud data are: matching the world coordinate system of the harvesting machine and the coordinate system of the laser radar by using a coordinate transformation formula according to the laser radar calibration external parameter, and acquiring the 3D point cloud in the world coordinate system of the harvesting machine; The formula for calculating the corresponding height of each point of the 3D point cloud from the ground is as follows: wherein L is the straight-line distance from each point in the 3D point cloud in the world coordinate system of the harvester to the laser radar; X is the horizontal distance from each point in the 3D point cloud in the world coordinate system of the harvester to the laser radar; Y is the vertical distance from each point in the 3D point cloud in the world coordinate system of the harvester to the horizontal reference surface; H is the height of the laser radar from the ground in the world coordinate system of the harvester; h i is the height of each point in the 3D point cloud from the ground in the world coordinate system of the harvester; Step S2: extracting a corn point cloud set: according to the corresponding height of each point of the 3D point cloud calculated in step S1, distinguishing soybean and corn crop belts, and extracting a 3D point cloud set of corn crops higher than the soybean part; Step S3: extracting a corn region of interest (ROI): extracting a corn region of interest (ROI) according to the distribution of points in the point cloud set in step S2; Step S4: acquiring a clustering result of points: clustering the points in the ROI region acquired in step S3 by using a particle swarm algorithm to acquire a clustering result of points corresponding to each row of corn; Step S5: linear fitting to obtain a corn row line: linearly fitting the points in each category after clustering in step S4 by using a least square method to obtain each corn row line in the corn-soybean complex planting belt.
2. The corn harvesting row line detection method in a corn-soybean complex planting pattern according to claim 1, characterized in that, The coordinate transformation formula is as follows: wherein, , , is the three-dimensional coordinate of the 3D point cloud in the world coordinate system of the harvester; , , is the three-dimensional coordinate of the 3D point cloud in the laser radar coordinate system; R is the rotation matrix of the laser radar coordinate system to the world coordinate system of the harvester; T is the translation matrix of the laser radar coordinate system to the world coordinate system of the harvester.
3. The method according to claim 1, wherein the method is characterized by, The specific steps of step S2 include: Step S2.1: setting a height difference threshold η of adjacent crop belts, according to the height of each point of the 3D point cloud calculated in step S1, sequentially marking the 3D point cloud of adjacent crop belts with a height difference less than the height difference threshold η as the same crop belt from one side to the other, and if the height difference of adjacent crop belts is greater than or equal to the height difference threshold η, it indicates that the crop belt changes from one to another, and the 3D point cloud blocks of multiple crop belts are obtained respectively; Step S2.2: calculating the average height of the 3D point cloud block of each crop belt in step S2.1, and inputting a first height interval and a second height interval, and the first height interval is greater than the second height interval, and the 3D point cloud block with an average height in the first preset interval is determined as a corn crop belt, and the 3D point cloud block with an average height in the second height interval is determined as a soybean crop belt; Step S2.3: Extracting all 3D point clouds of corn crops with height greater than the set height fluctuation threshold . 4. The corn harvesting row line detection method in a corn-soybean complex planting pattern according to claim 1, characterized in that, The specific steps of step S3 include: Step S3.1: constructing a horizontal reference surface with the same height as the laser radar installation point; Step S3.2: projecting the 3D point cloud of the corn crop in the world coordinate system of the harvesting machine acquired in step S2 to the horizontal reference surface constructed in step S3.1; Step S3.3: dynamically extracting a corn crop region of interest (ROI) in the horizontal reference surface according to the distribution of points.
5. The corn harvesting row line detection method in a corn-soybean complex planting pattern according to claim 4, characterized in that, The formula for extracting the corn crop region of interest (ROI) in step S3.3 is as follows: wherein, is the vertical coordinate of the upper boundary of the ROI region; is the horizontal coordinate of the left boundary of the ROI region; is the number of midpoints of the horizontal reference plane; is the vertical coordinate of all the projection points in the horizontal reference plane; is the horizontal coordinate of all the projection points in the horizontal reference plane; is the width of the ROI region, is the length of the ROI region.
6. The method according to claim 1, wherein the method is characterized by, The formula for clustering the points in the ROI region by using a particle swarm algorithm in step S4 is as follows: wherein, , respectively represent the horizontal and vertical coordinates of each point in the ROI region; , respectively are the coefficients of the straight line equation; T represents the distance of the point to the straight line equation.
7. The method according to claim 1, wherein the method is characterized by, The formula for linearly fitting the points in each category after clustering in step S4 by using a least square method in step S5 is as follows: wherein, is a matrix of abscissas of the points in each cluster class; is a matrix of ordinates of the points in each cluster class; K is a matrix of coefficients of the planar polynomial.
8. A system for detecting a corn harvesting row line in a corn-soybean complex cropping pattern according to any one of claims 1-7, characterized in that, The method comprises a point cloud processing module, a point cloud extraction module, an ROI extraction module, a point clustering module, and a row line acquisition module. The point cloud processing module is configured to acquire a 3D point cloud of a working scene in front of the harvester by using a laser radar, process 3D point cloud data, and calculate a corresponding ground clearance of each point of the 3D point cloud; The point cloud extraction module is configured to distinguish crop belts of soybeans and corns according to the corresponding ground clearance of each point of the 3D point cloud, and extract a 3D point cloud set of the corn crops higher than the soybean part; The ROI extraction module is configured to extract a region of interest (ROI) of the corn according to the distribution of the points in the point cloud set; The point clustering module is configured to cluster the points in the ROI region by using a particle swarm algorithm, and obtain a clustering result of the points corresponding to each row of corn; The row line acquisition module is configured to linearly fit the points in each category after clustering by using a least square method, and obtain each row line of the corn in the corn-soybean compound planting belt.