A vision-based self-adaptive harvesting method and device for unmanned harvesters
Through visual recognition and adaptive adjustment, efficient and safe crop harvesting of driverless harvesters is achieved, which solves the problem of low automation in existing technology and improves harvesting efficiency and safety.
Patent Information
- Application Number
- CN202410469095.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-18
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-04-18
AI Technical Summary
Existing unmanned harvesters have a low degree of automation and are difficult to adapt to different crops and terrains, resulting in insufficient harvesting efficiency and safety.
The vision-based adaptive harvesting method is used to identify ridges and inter-ridge passages through cameras, calculate the width of ridges, adjust the width and posture of the harvester, and plan local paths to achieve full unmanned operation.
It achieves precise wheel alignment, avoids crop losses, improves harvesting efficiency and automation, and adapts to different field conditions.
Smart Images

Figure CN118170145B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of unmanned harvesters, and in particular to a vision-based self-adaptive harvesting method and device for unmanned harvesters. Background Art
[0002] In agriculture, crop harvesting is an important direction in the field of harvesters. Improving crop harvesting methods can not only improve harvesting efficiency, but also reduce labor costs and crop losses. Unmanned operation of farmland is an inevitable trend in future agriculture. At present, the automation of crop harvesting also faces some technical and economic challenges. The types, forms, growth environments and harvesting requirements of crops vary, so the design and adaptability of machinery are difficult to unify and standardize. The harvesting effect of crops needs to consider multiple indicators such as harvesting rate, crop integrity and the degree of damage to the original plants. However, the existing harvesting robots have limited environmental perception capabilities and intelligence levels. Therefore, how to improve the automation and intelligence of harvesting machines is one of the challenges currently faced.
[0003] The harvesters with manually adjustable harvesting spacing on the market are composed of one or more driving wheels and can be equipped with one or more positioning discs for positioning operations. The positioning disc can automatically adjust parameters such as the angle, position and number of the discs according to factors such as the ground baseline and the field boundary line to achieve efficient, accurate and economical positioning operations. The harvesters with adjustable spacing can also adjust the spacing between the discs through the knobs or rods on the manual operating table to adapt to different ground and fields. However, the manually adjusted harvesters have a low degree of automation and require human cooperation, which is difficult to meet the harvesting scenarios of large areas of farmland. The operation of the harvesters with adjustable spacing requires certain skills and experience. The operator needs to manually adjust the spacing between the positioning discs according to different crops and terrains to ensure the accuracy and effect of harvesting. If the operation is improper, it may cause damage to the positioning disc or damage to the crop. If the terrain is steep or uneven, the positioning disc may not work properly, affecting the quality and safety of the harvest.
[0004] In order to improve the level of automation, there is currently a public unmanned vehicle technology that can collect ridge images through cameras to obtain the actual boundaries and width of the ridges. The ridge width is used to adjust the distance between the unmanned vehicle rollers and identify the ridge width. However, this method can only make adjustments when the ridges are aligned, and the degree of automation is still low. Summary of the invention
[0005] The purpose of the present invention is to provide a vision-based unmanned harvester adaptive harvesting device and method, the harvester can automatically identify crops and ridge widths in the farmland to be harvested, and output corresponding harvesting path planning plans, thereby improving the efficiency of machine automated harvesting.
[0006] To achieve the above object, the present invention provides a vision-based self-adaptive harvesting method for an unmanned harvester, comprising:
[0007] Step 1, according to the farmland to be harvested, a working area, a starting point and an end point are selected, and a global planning algorithm is determined by using the selected route mode to calculate an initial global path; wherein the working area includes the farmland to be harvested and the turning areas at both ends thereof, the farmland to be harvested includes a plurality of ridges and ridge passages with parallel center lines, and the ridges and ridge passages are spaced apart, and the starting point and the end point are both arranged in the turning areas at both ends of the ridge passages;
[0008] Step 2, after the harvester drives to the starting point, according to the image of the farmland to be harvested collected by the harvester at the starting point, determine the single ridge and the ridge channel, find the ridge closest to the location of the harvester, if the nearest ridge is identified to have crops, then determine the nearest ridge as the ridge to be harvested, and take the ridge channel adjacent to the nearest ridge as the target ridge channel, and enter step 3;
[0009] Step 3, control the harvester to drive to the U-turn area closest to the target field ridge channel, adjust the harvester width, and adjust the posture until the posture reaches the preset standard;
[0010] Step 4, update the current position of the harvester as the starting point, and update the global path according to the starting point, end point and width of the harvester;
[0011] Step 5: Plan local paths according to the updated global path and perform harvesting;
[0012] Step 6: After driving to the end point of the current round of harvesting, drive to the starting point of the next round of harvesting in the updated global path, and return to step 2.
[0013] Furthermore, the “selecting the target ridge channel” in step 2 specifically includes:
[0014] Step 21, according to the identified single ridge and inter-ridge channel in the current image of the farmland to be harvested, obtain a set of pixel feature point coordinates of the inter-ridge channel under the current image viewing angle;
[0015] Step 22, according to the pixel feature point set of the inter-ridge channel, the pixel feature point set is converted into a set of parallel lines in the global coordinate system through the conversion matrix G between the image coordinate system and the vehicle coordinate system and the GPS position of the harvester;
[0016] Step 23, select any adjacent first line and second line in the set of parallel lines, draw a perpendicular line perpendicular to the first line through the first point on the first line, the intersection of the perpendicular line and the second line is the second point, and the length of the first straight line segment connecting the first point and the second point is the actual width w of the ridge;
[0017] Step 24, according to the maximum width W that can be harvested simultaneously by a single wheel of the harvester and the actual width w of the ridge, the number of ridges that can be harvested simultaneously by a single wheel is obtained as N=W / w;
[0018] Step 25, among the N ridges that can be harvested simultaneously by a single wheel, the first inter-ridge channel A outside the first ridge and the Nth inter-ridge channel B outside the Nth ridge are used as target ridge channels.
[0019] Furthermore, the method of “posture adjustment” in step 3 specifically includes:
[0020] Step 31, draw an arbitrary line in the vertical direction between the first inter-ridge channel A and the Nth inter-ridge channel B, the line and the two intersection points of the first inter-ridge channel A and the Nth inter-ridge channel B form a line segment d, the midpoint of the line segment d is O, draw a vertical line p of the line segment d through the midpoint O, make the vertical line p parallel to the first inter-ridge channel A and the Nth inter-ridge channel B, and use the vertical line p as the reference line of the harvester;
[0021] Step 32: when the harvester is not aligned with the reference line, a straight line i is obtained through the center point and the midpoint O of the harvester, and the posture of the harvester is adjusted until the straight line i coincides with the vertical line p, and the direction of the harvester is adjusted in situ to be parallel to the straight line i;
[0022] Step 33, determining whether the area of the closed region formed by connecting the first ridge and the Nth ridge with the boundary of the image is greater than a threshold value, and if so, determining that the posture meets the preset standard.
[0023] Furthermore, step 4 specifically includes:
[0024] Step 41, according to the current GPS position (Xz, Yz, Zz) of the harvester, the harvesting width d of the harvester, and the total length L of the farmland to be harvested in the vertical ridge direction, calculate the number of rounds required to harvest along the ridge direction M=L / l, l=N*w;
[0025] Step 42, after completing a round of harvesting of the field ridges, the vehicle moves forward a distance al in the direction perpendicular to the length of the field ridges in the U-turn area, and then re-updates the global path of the remaining path with the current position of the vehicle as the starting point, where a is a preset multiple.
[0026] Further, the selected route patterns include an S shape and a figure 8 shape.
[0027] The present invention also provides a vision-based self-adaptive harvesting device for an unmanned harvester, comprising:
[0028] A global path planning unit is used to select a working area, a starting point and an end point based on the farmland to be harvested, determine a global planning algorithm using the selected route mode, and calculate an initial global path; wherein the working area includes the farmland to be harvested and the turning areas at both ends thereof, the farmland to be harvested includes a plurality of ridges and ridge passages with parallel center lines, and the ridges and ridge passages are spaced apart, and the starting point and the end point are both arranged in the turning areas at both ends of the ridge passages;
[0029] An identification unit is used to determine a single ridge and an inter-ridge channel according to an image of the farmland to be harvested collected by the harvester after the harvester reaches the starting point and turns around and changes to the starting point of the next target inter-ridge channel in the updated global path, find the ridge closest to the location of the harvester, and if it is identified that the nearest ridge has crops, determine the nearest ridge as the ridge to be harvested, and select the target ridge channel;
[0030] A posture adjustment unit is used to control the harvester to drive to the U-turn area closest to the target ridge channel after selecting the target ridge channel, adjust the harvester width, and perform posture adjustment until the posture reaches a preset standard;
[0031] A path updating unit, which is used to update the current position of the harvester as the starting point, and update the global path according to the starting point, the end point and the width of the harvester;
[0032] A local path generation unit, which is used to plan local paths according to the updated global path and perform harvesting;
[0033] A decision-making unit is used to drive to the starting point of the next round of harvesting in the updated global path after driving to the end point of the current round of harvesting.
[0034] Furthermore, the identification unit specifically includes:
[0035] The inter-ridge channel pixel feature point acquisition subunit is used to obtain a pixel feature point coordinate set of the inter-ridge channel under the current image viewing angle according to the identified single ridge and inter-ridge channel in the current image of the farmland to be harvested;
[0036] A coordinate conversion subunit is used to convert the pixel feature point set of the inter-ridge channel into a set of parallel lines in the global coordinate system through the conversion matrix G between the image coordinate system and the vehicle coordinate system and the GPS position of the harvester;
[0037] A ridge width calculation subunit is used to select any adjacent first and second lines in the parallel line set, draw a perpendicular line perpendicular to the first line through the first point on the first line, the intersection of the perpendicular line and the second line is the second point, and the length of the first straight line segment connecting the first point and the second point is the actual width w of the ridge;
[0038] A subunit for determining the number of ridges to be harvested simultaneously by a single wheel is used to obtain the number of ridges that can be harvested simultaneously by a single wheel, which is N=W / w, according to the maximum width W that can be harvested simultaneously by a single wheel of the harvester and the actual width w of the ridge;
[0039] The target ridge channel determination subunit is used to use the first inter-ridge channel A outside the first ridge and the Nth inter-ridge channel B outside the Nth ridge as target ridge channels among the N ridges that can be harvested simultaneously by a single wheel.
[0040] The posture adjustment unit further specifically includes:
[0041] A harvester reference line determination subunit is used to draw an arbitrary line along the vertical direction of the first inter-ridge channel A and the Nth inter-ridge channel B. The line and the two intersection points of the first inter-ridge channel A and the Nth inter-ridge channel B form a line segment d. The midpoint of the line segment d is O. A vertical line p is drawn through the midpoint O to the line segment d. The vertical line p is parallel to the first inter-ridge channel A and the Nth inter-ridge channel B. The vertical line p is used as the reference line of the harvester.
[0042] The orientation adjustment subunit is used to obtain a straight line i through the center point and the midpoint O of the harvester when the harvester is not aligned with the reference line, adjust the posture of the harvester until the straight line i coincides with the vertical line p, and adjust the orientation of the harvester in situ to be parallel to the straight line i;
[0043] The posture alignment judgment subunit is used to judge whether the area of the closed area formed by connecting the first ridge and the Nth ridge with the boundary of the image is greater than a threshold. If so, it is judged that the posture meets the preset standard.
[0044] Furthermore, the path updating unit specifically includes:
[0045] The harvesting round number calculation subunit is used to calculate the number of harvesting rounds M = L / l, l = N*w required along the ridge direction according to the current GPS position (Xz, Yz, Zz) of the harvester, the harvesting width d of the harvester, and the total length L of the farmland to be harvested in the vertical ridge direction;
[0046] The global path update subunit is used to update the global path of the remaining path after driving al distance in the direction perpendicular to the length of the ridge in the U-turn area after each round of harvesting. a is a preset multiple.
[0047] Further, the selected route patterns include an S shape and a figure 8 shape.
[0048] The main beneficial effects of the present invention are as follows:
[0049] 1. The vision-based path planning method can accurately align the wheels in real time, ensuring the harvesting width while avoiding damage to crops caused by crushing them.
[0050] 2. The harvesting width can be adaptively adjusted according to the actual field conditions.
[0051] 3. The whole process is unmanned. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 Schematic diagram of the distribution of farmland to be harvested according to an embodiment of the present invention.
[0053] Figure 2 Schematic diagram of a global path of a route pattern according to an embodiment of the present invention.
[0054] Figure 3 4 is a schematic diagram of a global path of another route mode according to an embodiment of the present invention.
[0055] Figure 4 It is a schematic diagram of an image of a farmland to be harvested collected by a harvester according to an embodiment of the present invention.
[0056] Figure 5 It is a schematic diagram of a single field ridge and inter-ridge passage identified in an embodiment of the present invention.
[0057] Figure 6 It is a schematic diagram showing that the harvester according to the embodiment of the present invention is not yet aligned with the reference line.
[0058] Figure 7 Schematic diagram of a harvester according to an embodiment of the present invention after being aligned with a reference line. DETAILED DESCRIPTION
[0059] In the drawings, the same or similar reference numerals are used to represent the same or similar elements or elements with the same or similar functions. The embodiments of the present invention are described in detail below in conjunction with the drawings.
[0060] In the description of the present invention, the terms "center", "longitudinal", "lateral", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate directions or positional relationships based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore should not be understood as limiting the scope of protection of the present invention.
[0061] The vision-based self-adaptive harvesting method for an unmanned harvester provided in an embodiment of the present invention includes:
[0062] Step 1: Select the working area, starting point and end point according to the farmland to be harvested, use the selected route pattern such as S-shaped or 8-shaped, determine the global planning algorithm, and calculate the initial global path.
[0063] like Figure 1 and Figure 2 As shown in the figure, the working area includes the farmland to be harvested and the U-turn area. The farmland to be harvested includes multiple ridges with parallel center lines and inter-ridge channels, and the ridges and inter-ridge channels are spaced apart. The ridge direction mentioned in the text refers to its length direction, which is also the center line direction. The direction perpendicular to the length direction of the ridge is the width direction of the ridge, that is, Figure 2 Each inter-ridge channel has a starting point and an end point, and both the starting point and the end point are located on the global path. The global path includes the shape of the path, the target point (such as Figure 2 The shape is determined by the selected route mode, for example Figure 2 The S-shape in Figure 3 The figure 8 in Figure 3 The start in the figure indicates the starting point, and the end in the figure indicates the end point). It can also be other selected shapes. The target point is also the path point of the global path. The start point and the end point are both arranged in the U-turn area at both ends of the farmland to be harvested. In order to intuitively present the U-turn area, you can basically refer to Figure 1 The two ellipses in the figure respectively delineate the areas. The location of the harvester can be obtained through the existing GPS.
[0064] Step 2: The camera on the harvester can be used to obtain images of the field. Based on the images of the farmland to be harvested collected by the harvester, the crops and ridge boundaries in the collected images are identified, and then individual ridges and channels between ridges are determined.
[0065] like Figure 4 and Figure 5 As shown, Figure 4 It is an image of the distribution of the farmland to be harvested. Through the multi-task neural network, it can be identified that the area where the crops are located is the ridge, and the black channel between the crops where the white line is located is the inter-ridge channel. At this time, the "selection of the target ridge channel" in step 2 specifically includes:
[0066] Step 21, based on the identified single ridges and inter-ridge channels in the current image of the farmland to be harvested, obtain a set of pixel feature point coordinates of the inter-ridge channels under the viewing angle of the current image.
[0067] Step 22, based on the pixel feature point set of the inter-ridge channel, the pixel feature point set is converted into a set of parallel lines in the global coordinate system through the conversion matrix G between the image coordinate system and the vehicle coordinate system, and the GPS position of the harvester.
[0068] In one embodiment, the method for obtaining the “conversion matrix G” in step 22 specifically includes:
[0069] In the global coordinate system, select several pairs of feature points on the ground (clear ground points, try not to make them form regular figures, and try to include the entire picture); obtain the position of each feature point relative to the vehicle, respectively expressed as (X1, Y1), (X2, Y2), (X3, Y3), ..., obtain the position of each feature point in the image coordinate system, respectively expressed as (u1, v1), (u2, v2), (u3, v3), ..., and obtain the transformation matrix G. Among them, the transformation matrix G from the image to the ground can be obtained by the least squares method, the method of continuous depth estimation of a ray on the ground and calibration using a calibration plate, or the calibration plate is placed flat on the ground and the plane transformation method is used.
[0070] In one embodiment, step 22 specifically includes:
[0071] Step 221, based on the conversion matrix G and the pixel feature point set (u', v') of the inter-ridge channel, the relative position (X', Y') of the feature point set of the inter-ridge channel relative to the vehicle is calculated according to formula (1):
[0072] (X',Y')=G*(u',v') (1)
[0073] Step 222, according to the GPS position (Xz, Yz, Zz) of the harvester, calculate the parallel line set (Xz, Yz, Zz) of the inter-ridge channel in the global coordinate system according to formula (2) w ,Y w ):
[0074] (X w ,Y w )=(Xz,Yz)+(X',Y') (2).
[0075] Step 23, select any adjacent first line and second line in the set of parallel lines, draw a perpendicular line perpendicular to the first line through the first point on the first line, the intersection of the perpendicular line and the second line is the second point, and the length of the first straight line segment connecting the first point and the second point is the actual width w of the ridge.
[0076] Given the GPS position of the vehicle (Xz, Yz, Zz), the transformation matrix G of the pixel point relative to the vehicle's position is obtained through calibration. Figure 5 As shown in the figure, we first use a multi-task neural network to identify individual ridges and inter-ridge channels, and obtain Figure 4The pixel feature point coordinate set of the inter-ridge channel at the viewing angle is the set of pixel points occupied by the white line. Extract the pixel feature point set of the inter-ridge channel, convert the pixel feature point set to the global coordinate system through the transformation matrix G and the global position of the vehicle, and obtain the set of parallel lines {l1, l2, l3, l4, ...} in the global coordinate system. Select any two adjacent lines (for example, {l1, l2}), take the first point on l1 at will, make a straight line perpendicular to l1 intersect with l2, find the second point of intersection of the straight line and l2, and find the length of the first straight line segment connected by the first point and the second point, that is, find the actual width w of the ridge.
[0077] Step 24, according to the maximum width of the harvester that can be harvested simultaneously by a single wheel W and the actual width of the ridge w, the number of ridges that can be harvested simultaneously by a single wheel is obtained as N=W / w. The harvester is considered to have completed a single round of harvesting when it travels from one end of an inter-ridge channel along the center line direction (the length direction of the ridge) to the other end.
[0078] Step 25, among the N ridges that can be harvested simultaneously by a single wheel, the first inter-ridge channel A outside the first ridge and the Nth inter-ridge channel B outside the Nth ridge are used as target ridge channels. Figure 5 As shown, N=3, three ridges can be harvested simultaneously, and the two bold inter-ridge channels A and B are selected as the targets for the harvester to align. More specifically, the center lines of the inter-ridge channels are aligned with the center lines of the rollers.
[0079] In the above embodiment, other methods can also be used to select the target ridge channel, for example, manually select the ridge channel, manually input the width of the ridge and its channel, or use remote sensing in existing public technologies to identify ridges. This can use existing public technologies to use traditional mathematical methods of image processing (binarization, morphology or clustering methods, etc.) to segment ridges and inter-ridge channels, etc.
[0080] Step 2 also includes: finding the ridge closest to the location of the harvester, and if the nearest ridge is identified as having crops, determining the nearest ridge as the ridge to be harvested, selecting the target ridge channel, and entering step 3. If the nearest ridge is identified as having no crops, driving to the next adjacent ridge channel, and continuing to drive according to the global path of the current version until crops are identified.
[0081] Step 3, control the harvester to drive to the U-turn area closest to the target field ridge channel, adjust the harvester width, and adjust the posture until the posture reaches the preset standard.
[0082] In this embodiment, the width of the harvester is selected according to the width of the ridge, thereby determining the spacing of the harvester rollers, and adjusting the spacing of the harvester rollers and the posture of the harvester accordingly, so that the harvester rollers are aligned with the selected inter-ridge channels, so as to cover the range of the ridge as much as possible, avoid duplication or missed harvesting, and avoid the harvester running over the crops and causing losses. This step requires the use of some control or feedback methods, such as PID control, fuzzy control, etc., to generate corresponding control signals, such as the angle, position, and number of positioning disks, to adjust the spacing of the harvesters.
[0083] In one embodiment, the method of “posture adjustment” in step 3 specifically includes:
[0084] Step 31, draw an arbitrary line in the vertical direction between the first inter-ridge channel A and the Nth inter-ridge channel B, and connect the two intersection points of the line with the first inter-ridge channel A and the Nth inter-ridge channel B to form a second straight line segment d. The midpoint of the second straight line segment d is O, and draw a perpendicular line p of the second straight line segment d through the midpoint O, so that the vertical line p is parallel to the first inter-ridge channel A and the Nth inter-ridge channel B, and use the vertical line p as the reference line of the harvester.
[0085] Step 32, when the harvester is not aligned with the reference line, obtain a straight line i through the center point and midpoint O of the harvester, adjust the posture of the harvester until the straight line i coincides with the vertical line p, and adjust the direction of the harvester in situ to be parallel to the straight line i.
[0086] Step 33, determine whether the area of the closed area formed by connecting the first ridge and the Nth ridge with the boundary of the image is greater than the threshold. If so, it is determined that the posture meets the preset standard. Otherwise, the harvester posture is adjusted according to the global position and direction of the two ridges. The value of the threshold can be obtained by debugging according to the actual height of the camera. For example, the threshold is 1 / 2, such as Figure 6 As shown in FIG. 1 , the quadrilateral formed by the first inter-ridge channel A and the Nth inter-ridge channel B and the upper and lower boundaries of the image in which they are located is a closed area in the middle. If the closed area of the area is less than 1 / 2, it is judged that they are not aligned; Figure 7 As shown, if the enclosed area of the region is equal to or greater than 1 / 2, it is judged to be aligned.
[0087] For example: Set the harvesting ridge range to Figure 6 As shown in the figure, N=3, and the width w of a single ridge is known, then the spacing between the harvester rollers is determined to be d=N*w. Figure 5 and Figure 6Draw an arbitrary line perpendicular to the first inter-ridge channel A and the Nth inter-ridge channel B, obtain the second straight line segment d, calculate the midpoint O(Xo,Yo) of the second straight line segment d, and make a perpendicular line p of the second straight line segment d through point O, so that the perpendicular line p is parallel to the first inter-ridge channel A and the Nth inter-ridge channel B. Then the perpendicular line p is the reference line of the harvester. Figure 5 As shown in , sometimes the harvester is not aligned with the reference line. Connect the center point of the harvester and point O to get a straight line i. Adjust the position of the harvester until i and p coincide. After coincidence, adjust the direction of the harvester to be parallel to i. At this time, the ridge direction calculated by the image is parallel to the harvester direction, as shown in Figure 7 shown.
[0088] In the above embodiment, other methods can also be used to adjust the posture. For example, first plan the center point of the harvester to the vertical line point p, and then rotate it on the spot until the harvester body is parallel to the first inter-ridge channel A and the Nth inter-ridge channel B in the global coordinate system. More precisely, the inner sides of the tires on both sides of the harvester are aligned with the ridge boundary side of the first inter-ridge channel A and the Nth inter-ridge channel B.
[0089] Step 4: Update the current position of the harvester as the starting point, and update the global path according to the starting point, end point, and width of the harvester. The global path can obtain the direction of the ridge through satellite images, but the ridge width can only be roughly known through satellite images, and the exact width cannot be known. Therefore, step 4 will also make actual adjustments based on the ridge width collected by the harvester.
[0090] When updating the global path, according to the current position of the harvester, that is, the GPS position of the harvester (Xz, Yz, Zz), the harvesting width d of the harvester, and the total length L of the vertical ridge length direction of the farmland to be harvested, the harvester harvests along the ridge direction, and the number of rounds required to harvest along the ridge direction can be calculated M=L / l.
[0091] After each round of harvesting of the ridges, the vehicle will drive forward a distance al in the direction perpendicular to the length of the ridges in the U-turn area, and then update the global path of the remaining path with the current position of the vehicle as the starting point, where a is a preset multiple.
[0092] For example, the initial global path of step 1 is set to Figure 1 and Figure 2 The S shape shown in the figure, then, each time the global path is updated, first, the number of ridges in the field to be harvested is estimated, and the number of rounds required to be harvested along the ridge direction is obtained, M = L / l, such as Figure 2 , where L is the center line of the vertical ridge of the farmland to be harvested (parallel to Figure 2The total length in the direction of the dotted line in the figure is l = N*w. After each round of harvesting of the ridges, the vehicle moves forward for a distance l in the direction perpendicular to the length of the ridges in the U-turn area, and then takes the current position of the vehicle as the starting point, and re-updates the global path planning of the remaining path according to the above method.
[0093] For example, the initial global path of step 1 is set to be Figure 3 The 8-shaped shape shown is different from the method for updating the global path provided by the S shape above in that: after the end point of the last round of harvesting in the current plan, the harvester does not drive forward for a distance of l in the U-turn area, at which time the value of a is taken as 1, but takes the endpoint of the next adjacent inter-ridge channel as the current position of the vehicle, that is, the starting point of the harvester, and then updates the global path according to the method provided by the S shape. It is even possible to set the starting point and the end point of the harvester at the same position, but the difference between such path planning and the method for updating the global path provided by the S shape above is that: in the U-turn area, the harvester drives forward for a distance of 2l in a direction perpendicular to the length of the ridge, at which time the value of a is taken as 2, and then takes the current position of the vehicle as the starting point, and re-updates the global path planning of the remaining path. Harvesting in this way can not only harvest the crops on each ridge, but also harvest the crops on the ridge twice to avoid crop waste.
[0094] Step 5: According to the updated global path, a local path is planned using a local path planning method such as a probabilistic road map (RPM) algorithm, a rapid random spreading tree (RRT) algorithm, or a lattice planning algorithm, and then harvested.
[0095] Step 6, turn around and move to the starting point of the next target inter-ridge channel in the updated global path, and return to step 2.
[0096] The embodiment of the present invention further provides a vision-based unmanned harvester adaptive harvesting device, which includes a global path planning unit, a recognition unit, a posture adjustment unit, a path updating unit, a local path generation unit and a decision unit, wherein:
[0097] The global path planning unit is used to calculate the initial global path according to the selected farmland to be harvested, the starting point and the end point. The farmland to be harvested includes multiple ridges and inter-ridge channels with parallel center lines, and the ridges and inter-ridge channels are spaced apart. The starting point and the end point are both located on the global path, and the starting point and the end point are arranged at the U-turn area at both ends of the inter-ridge channel.
[0098] The recognition unit is used to determine the individual ridges and inter-ridge channels based on the images of the farmland to be harvested collected by the harvester at the starting point after the harvester travels to the starting point, and find the ridge closest to the location of the harvester. If the nearest ridge is identified as having crops, the nearest ridge is determined to be the ridge to be harvested, and the ridge channel adjacent to the nearest ridge is used as the target ridge channel.
[0099] The posture adjustment unit is used to control the harvester to drive to the U-turn area closest to the target ridge channel after selecting the target ridge channel, adjust the harvester width, and adjust the posture until the posture reaches the preset standard.
[0100] The path updating unit is used to update the current position of the harvester as the starting point, and update the global path according to the starting point, end point and width of the harvester.
[0101] The local path generation unit is used to plan the local path according to the updated global path and perform harvesting.
[0102] The decision unit is used to drive to the starting point of the next round of harvesting in the updated global path after driving to the end point of the current round of harvesting.
[0103] In one embodiment, the recognition unit specifically includes a ridge channel pixel feature point acquisition subunit, a coordinate conversion subunit, a ridge width calculation subunit, a single round harvesting ridge number determination subunit and a target ridge channel determination subunit, wherein:
[0104] The inter-ridge channel pixel feature point acquisition subunit is used to obtain a set of pixel feature point coordinates of the inter-ridge channel under the current image viewing angle according to the identified single ridge and inter-ridge channel in the current image of the farmland to be harvested.
[0105] The coordinate conversion subunit is used to convert the pixel feature point set of the inter-ridge channel into a set of parallel lines in the global coordinate system through the conversion matrix G between the image coordinate system and the vehicle coordinate system and the GPS position of the harvester.
[0106] The ridge width calculation subunit is used to select any adjacent first line and second line in the set of parallel lines, draw a perpendicular line perpendicular to the first line through the first point on the first line, the intersection of the perpendicular line and the second line is the second point, and the length of the first straight line segment connecting the first point and the second point is the actual width w of the ridge.
[0107] The subunit for determining the number of ridges to be harvested simultaneously in a single round is used to obtain the number of ridges that can be harvested simultaneously in a single round, which is N=W / w, according to the maximum width W that can be harvested simultaneously in a single round of the harvester and the actual width w of the ridge.
[0108] The target ridge channel determination subunit is used to use the first inter-ridge channel A outside the first ridge and the Nth inter-ridge channel B outside the Nth ridge as target ridge channels among the N ridges that can be harvested simultaneously in a single round.
[0109] In one embodiment, the posture adjustment unit specifically includes a harvester baseline determination subunit, a direction adjustment subunit and a posture alignment judgment subunit, wherein:
[0110] The harvester baseline determination subunit is used to draw an arbitrary line along the vertical direction between the first inter-ridge channel A and the Nth inter-ridge channel B. The line forms a line segment d with the two intersection points of the first inter-ridge channel A and the Nth inter-ridge channel B. The midpoint of the line segment d is O. A perpendicular line p is drawn through the midpoint O to the line segment d, so that the vertical line p is parallel to the first inter-ridge channel A and the Nth inter-ridge channel B. The vertical line p is used as the baseline of the harvester.
[0111] The orientation adjustment subunit is used to obtain a straight line i through the center point and midpoint O of the harvester when the harvester is not aligned with the reference line, adjust the posture of the harvester until the straight line i coincides with the vertical line p, and adjust the orientation of the harvester on the spot to be parallel to the straight line i.
[0112] The posture alignment judgment subunit is used to judge whether the area of the closed region formed by connecting the first ridge and the Nth ridge with the boundary of the image is greater than a threshold value. If so, it is determined that the posture meets the preset standard.
[0113] In one embodiment, the path updating unit specifically includes a harvesting round number calculation subunit and a global path updating subunit, wherein:
[0114] The harvesting round number calculation subunit is used to calculate the number of harvesting rounds required along the ridge direction M=L / l, l=N*w according to the current GPS position of the harvester (Xz, Yz, Zz), the harvesting width d of the harvester, and the total length L of the farmland to be harvested in the vertical ridge direction.
[0115] The global path update subunit is used to complete each round of ridge harvesting. After driving forward a distance al in the direction perpendicular to the length of the ridge in the U-turn area, the global path of the remaining path is updated again with the current position of the vehicle as the starting point, and a is a preset multiple.
[0116] Finally, it should be pointed out that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. Those skilled in the art should understand that the technical solutions described in the above embodiments may be modified, or some of the technical features thereof may be replaced by equivalents; these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A vision-based self-adaptive harvesting method for an unmanned harvester, characterized in that: include: Step 1, according to the farmland to be harvested, a working area, a starting point and an end point are selected, and a global planning algorithm is determined by using the selected route mode to calculate an initial global path; wherein the working area includes the farmland to be harvested and the turning areas at both ends thereof, the farmland to be harvested includes a plurality of ridges and ridge passages with parallel center lines, and the ridges and ridge passages are spaced apart, and the starting point and the end point are both arranged in the turning areas at both ends of the ridge passages; Step 2, after the harvester drives to the starting point, according to the image of the farmland to be harvested collected by the harvester at the starting point, determine the single ridge and the inter-ridge channel, find the ridge closest to the location of the harvester, if the nearest ridge is identified to have crops, then determine the nearest ridge as the ridge to be harvested, and take the ridge channel adjacent to the nearest ridge as the target ridge channel, and enter step 3; "selecting the target ridge channel" in step 2 specifically includes: according to the single ridge and the inter-ridge channel in the current image of the identified farmland to be harvested, obtain the pixel feature point coordinate set of the inter-ridge channel under the current image viewing angle, determine the actual width w of the ridge, thereby determining the number of ridges N that can be harvested simultaneously by a single wheel, and finally take the first inter-ridge channel (A) outside the first ridge and the Nth inter-ridge channel (B) outside the Nth ridge as the target ridge channel; Step 3, control the harvester to drive to the U-turn area closest to the target field ridge channel, adjust the harvester width, and adjust the posture until the posture reaches the preset standard; Step 4, update the current position of the harvester as the starting point, and update the global path according to the starting point, end point and width of the harvester; The method of "posture adjustment" in step 3 specifically includes: Step 31, draw an arbitrary line along the vertical direction of the first inter-ridge channel (A) and the Nth inter-ridge channel (B), the line and the two intersection points of the first inter-ridge channel (A) and the Nth inter-ridge channel (B) form a line segment d, the midpoint of the line segment d is O, and draw a vertical line p of the line segment d through the midpoint O, so that the vertical line p is parallel to the first inter-ridge channel (A) and the Nth inter-ridge channel (B), and the vertical line p is used as the reference line of the harvester; Step 32: when the harvester is not aligned with the reference line, a straight line i is obtained through the center point and the midpoint O of the harvester, and the posture of the harvester is adjusted until the straight line i coincides with the vertical line p, and the direction of the harvester is adjusted in situ to be parallel to the straight line i; Step 33, determining whether the area of the closed region formed by connecting the first ridge and the Nth ridge with the boundary of the image is greater than a threshold, and if so, determining that the posture meets the preset standard; Step 5: Plan local paths according to the updated global path and perform harvesting; Step 6: After driving to the end point of the current round of harvesting, drive to the starting point of the next round of harvesting in the updated global path, and return to step 2.
2. The vision-based self-adaptive harvesting method for unmanned harvesters according to claim 1, characterized in that: The "actual width w of the ridge" in step 2 includes: According to the pixel feature point set of the inter-ridge channel, the pixel feature point set is converted into a set of parallel lines in the global coordinate system through the conversion matrix G between the image coordinate system and the vehicle coordinate system, and the GPS position of the harvester; Select any adjacent first and second lines in the set of parallel lines, draw a perpendicular line perpendicular to the first line through the first point on the first line, the intersection of the perpendicular line and the second line is the second point, and the length of the first straight line segment connecting the first point and the second point is the actual width w of the ridge; The "number of ridges N that can be harvested simultaneously by a single wheel" in step 2 includes: According to the maximum width W that can be harvested simultaneously by a single wheel of the harvester and the actual width w of the ridge, the number of ridges that can be harvested simultaneously by a single wheel is obtained as N=W / w.
3. The vision-based self-adaptive harvesting method for unmanned harvesters according to claim 2, characterized in that: Step 4 specifically includes: Step 41, according to the current GPS position (Xz, Yz, Zz) of the harvester, the harvesting width d of the harvester, and the total length L of the farmland to be harvested in the vertical ridge direction, calculate the number of rounds required to harvest along the ridge direction M=L / l, l=N*w; Step 42, after completing a round of harvesting of the field ridges, the vehicle moves forward a distance al in the direction perpendicular to the length of the field ridges in the U-turn area, and then re-updates the global path of the remaining path with the current position of the vehicle as the starting point, where a is a preset multiple.
4. The vision-based self-adaptive harvesting method for unmanned harvesters according to claim 3, characterized in that: Selected route patterns include S-shape and figure-8 shape.
5. A vision-based self-adaptive harvesting device for an unmanned harvester, characterized in that: include: A global path planning unit is used to select a working area, a starting point and an end point according to the farmland to be harvested, determine a global planning algorithm using the selected route mode, and calculate an initial global path; wherein the working area includes the farmland to be harvested and the turning areas at both ends thereof, the farmland to be harvested includes a plurality of ridges and ridge passages with parallel center lines, and the ridges and ridge passages are spaced apart, and the starting point and the end point are both arranged in the turning areas at both ends of the ridge passages; The recognition unit is used to determine the single ridge and the inter-ridge channel according to the image of the farmland to be harvested collected by the harvester at the starting point after the harvester drives to the starting point, find the ridge closest to the location of the harvester, and if the nearest ridge is identified to have crops, determine the nearest ridge as the ridge to be harvested, and take the ridge channel adjacent to the nearest ridge as the target ridge channel; the recognition unit specifically includes an inter-ridge channel pixel feature point acquisition subunit, a ridge width calculation subunit, a single-round harvesting ridge number determination subunit and a target ridge channel determination subunit, wherein: the inter-ridge channel The pixel feature point acquisition subunit is used to obtain the pixel feature point coordinate set of the inter-ridge channel under the current image viewing angle according to the single ridge and inter-ridge channel in the current image of the identified farmland to be harvested; the ridge width calculation subunit is used to determine the actual width w of the ridge; the single-round harvesting ridge number determination subunit is used to determine the number N of ridges that can be harvested simultaneously in a single round; the target ridge channel determination subunit is used to use the first inter-ridge channel (A) outside the first ridge and the Nth inter-ridge channel (B) outside the Nth ridge as the target ridge channel among the N ridges that can be harvested simultaneously in a single round; The posture adjustment unit is used to control the harvester to drive to the U-turn area closest to the target ridge channel after selecting the target ridge channel, adjust the harvester width, and adjust the posture until the posture reaches the preset standard; the posture adjustment unit specifically includes: A harvester reference line determination subunit is used to draw an arbitrary line along the vertical direction of the first inter-ridge channel (A) and the Nth inter-ridge channel (B), and the two intersection points of the line and the first inter-ridge channel (A) and the Nth inter-ridge channel (B) form a line segment d, the midpoint of the line segment d is O, and a vertical line p is drawn through the midpoint O to the line segment d, so that the vertical line p is parallel to the first inter-ridge channel (A) and the Nth inter-ridge channel (B), and the vertical line p is used as the reference line of the harvester; The orientation adjustment subunit is used to obtain a straight line i through the center point and the midpoint O of the harvester when the harvester is not aligned with the reference line, adjust the posture of the harvester until the straight line i coincides with the vertical line p, and adjust the orientation of the harvester in situ to be parallel to the straight line i; A posture alignment judgment subunit is used to judge whether the area of the closed area formed by connecting the first ridge and the Nth ridge with the boundary of the image is greater than a threshold value. If so, it is judged that the posture meets the preset standard; A path updating unit, which is used to update the current position of the harvester as the starting point, and update the global path according to the starting point, the end point and the width of the harvester; A local path generation unit, which is used to plan local paths according to the updated global path and perform harvesting; A decision-making unit is used to drive to the starting point of the next round of harvesting in the updated global path after driving to the end point of the current round of harvesting.
6. The vision-based self-adaptive harvesting device for unmanned harvesters according to claim 5, characterized in that: The identification unit specifically includes: A coordinate conversion subunit is used to convert the pixel feature point set of the inter-ridge channel into a set of parallel lines in the global coordinate system through the conversion matrix G between the image coordinate system and the vehicle coordinate system and the GPS position of the harvester; The ridge width calculation subunit is used to select any adjacent first line and second line in the parallel line set, draw a perpendicular line perpendicular to the first line through the first point on the first line, the intersection of the perpendicular line and the second line is the second point, and the length of the first straight line segment connecting the first point and the second point is the actual width w of the ridge; The subunit for determining the number of ridges to be harvested simultaneously in a single round is used to obtain the number of ridges that can be harvested simultaneously in a single round, which is N=W / w, according to the maximum width W that can be harvested simultaneously in a single round of the harvester and the actual width w of the ridge.
7. The vision-based self-adaptive harvesting device for unmanned harvesters according to claim 6, characterized in that: The path update unit specifically includes: The harvesting round number calculation subunit is used to calculate the number of harvesting rounds M = L / l, l = N*w required along the ridge direction according to the current GPS position (Xz, Yz, Zz) of the harvester, the harvesting width d of the harvester, and the total length L of the farmland to be harvested in the vertical ridge direction; The global path update subunit is used to update the global path of the remaining path after driving al distance in the direction perpendicular to the length of the ridge in the U-turn area after each round of harvesting. a is a preset multiple.
8. The vision-based self-adaptive harvesting device for unmanned harvesters according to claim 5, characterized in that: Selected route patterns include S-shape and figure-8 shape.
