A crop row recognition method and system

By effectively determining the vertical distance and angle in crop row recognition, line segments that do not meet the threshold are eliminated, forming a strip area of ​​a set width. This solves the problem of inaccurate crop row recognition and achieves efficient and accurate crop row recognition.

CN116310820BActive Publication Date: 2026-04-21NANJING JIMU ROBOT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NANJING JIMU ROBOT TECH CO LTD
Filing Date
2023-03-15
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In existing technologies, crop row identification is inaccurate due to factors such as small row spacing and leaf shading, especially when the row spacing is smaller than the plant spacing.

Method used

By acquiring crop points in the area to be measured, traversing the crop points to form line segments, and making valid judgments based on the vertical distance and angle between the crop points and the line segments, line segments that do not meet the preset threshold are removed, and valid line segments are determined to form a strip area with a set horizontal width, which is defined as a crop row.

Benefits of technology

It improves the accuracy of crop row recognition, solves the problem of inaccurate recognition caused by small row spacing and leaf occlusion, reduces computing power consumption and processing time, and improves computing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116310820B_ABST
    Figure CN116310820B_ABST
Patent Text Reader

Abstract

This invention provides a method and system for identifying crop rows. The method includes: acquiring crop points in a region to be measured; traversing the crop points in the region to be measured to determine several line segments formed by connecting two crop points; validly determining crop points based on the vertical distance between crop points and line segments to determine the valid points and number of valid points corresponding to the line segments; and validly determining line segments based on the number of valid points to determine valid line segments; defining a strip area with a predetermined horizontal width formed by the valid points corresponding to the valid line segments as a crop row to determine several crop rows in the region to be measured. This invention achieves accurate identification of crop rows in the region to be measured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of crop row recognition technology, and in particular to a crop row recognition method and system. Background Technology

[0002] In agricultural production, crop row identification plays a crucial role, specifically in route planning for the spraying of fertilizers, pesticides, and water, and in assessing the crops planted in a plot. Digital image processing algorithms offer significant advantages in automatic identification and are a key technology in modern precision agriculture. However, previous research has shown that crop row identification methods suffer from limitations in simplification and adaptability. Factors such as different growth stages of crops, sunlight exposure, and crop type can all influence the computational results obtained by the algorithms used in these methods.

[0003] Existing methods for identifying crop rows typically employ image binarization. Specifically, first, binarization is used to separate the plant from the background. Second, the binarized image is dilated, followed by erosion to connect plant areas and prevent connections between different blocks. Next, edge detection is performed on the eroded image. Finally, candidate blocks are selected by setting a range for block width and height, and a minimum bounding box is defined for each candidate region to obtain the corner pixel coordinates of the segmented blocks, thus achieving crop row identification. However, this method cannot solve the problem of inaccurate identification caused by small row spacing or leaf occlusion. Furthermore, it fails to accurately identify crop rows when the row spacing is smaller than the plant spacing.

[0004] In view of this, it is necessary to improve the existing crop row identification methods to solve the above problems. Summary of the Invention

[0005] The purpose of this invention is to solve the problem in the prior art that crop rows cannot be accurately identified due to factors such as small row spacing, leaf shading, and when the row spacing is smaller than the plant spacing.

[0006] To achieve the above objectives, in a first aspect, the present invention provides a crop row identification method, comprising:

[0007] Obtain the crop points in the area to be measured, traverse the crop points in the area to be measured, and determine the line segments formed by connecting two crop points;

[0008] The effective determination of crop points is based on the vertical distance between crop points and line segments to determine the effective points and the number of effective points corresponding to the line segments, and the effective determination of line segments is based on the number of effective points to determine the effective line segments.

[0009] The strip region with a set horizontal width formed by the valid points corresponding to the valid line segments is defined as a crop row, so as to determine several crop rows in the area to be measured.

[0010] As a further improvement of the present invention, the step of obtaining crop points in the area to be measured includes:

[0011] Obtain an orthophoto of the area to be measured;

[0012] The orthophoto image is detected by a target detection algorithm, and crops are outlined by detection boxes based on their size. The center point of the detection box is used as the crop point corresponding to the crop.

[0013] As a further improvement of the present invention, a first region and a second region are selected in the region to be measured, and only the crop points located in the first region and the crop points located in the second region are traversed. The two crop points that form the line segment are selected from the crop points located in the first region and the crop points located in the second region, respectively.

[0014] As a further improvement of the present invention, the selection of the first region and the second region is determined by the location of a preset number of crop points;

[0015] The preset quantity includes a first preset quantity or a second preset quantity, wherein the first preset quantity is a fixed value, and the second preset quantity... y represents the number of crop points in the area to be measured, and z represents the empirical coefficient.

[0016] As a further improvement of the present invention, before effectively determining the crop point based on the vertical distance between the crop point and the line segment, the method further includes:

[0017] Determine the angle between the line containing the line segment and the preset crop row in the area to be measured, and determine whether the angle is greater than the preset angle threshold;

[0018] If so, then the line segment is removed;

[0019] If not, the crop point is determined based on the vertical distance between the crop point and the line segment.

[0020] As a further improvement of the present invention, the effective determination of crop points based on the vertical distance between crop points and line segments includes:

[0021] Determine the vertical distance between the crop point and the line segment, and determine whether the vertical distance is greater than a preset distance threshold;

[0022] If so, then remove the crop point;

[0023] If not, the crop point is taken as the valid point corresponding to the line segment, and the number of valid points corresponding to the line segment is counted.

[0024] As a further improvement of the present invention, the preset distance threshold is taken as the median of the detection frame width corresponding to the crop in the area to be measured.

[0025] As a further improvement of the present invention, the determination of the validity of a line segment based on the number of valid points includes:

[0026] Determine whether the number of valid points corresponding to the line segment is greater than a preset threshold.

[0027] If so, then the line segment is considered a valid line segment;

[0028] If not, then the line segment is removed.

[0029] As a further improvement of the present invention, after determining the effective line segment, it further includes:

[0030] Determine whether there are any other crop points in the area to be measured that are not valid. If there are other crop points, adjust the preset distance threshold upward and / or adjust the preset quantity threshold downward to determine the valid line segments corresponding to the other crop points.

[0031] As a further improvement of the present invention, after defining the crop row, it includes:

[0032] Count the number of crop points in each crop row, and calculate the intra-row density based on the vertical length of the crop row, using the following formula:

[0033]

[0034] Where a is the row density, b is the crop row length, and c is the number of crop points.

[0035] Secondly, the present invention also discloses a crop row identification system, comprising:

[0036] The detection unit is used to acquire crop points in the area to be measured, and to traverse the crop points in the area to be measured to determine several line segments formed by connecting two crop points;

[0037] The calculation unit is used to determine the validity of crop points based on the vertical distance between crop points and line segments, so as to determine the valid points and the number of valid points corresponding to the line segments, and to determine the validity of line segments based on the number of valid points, so as to determine the valid line segments.

[0038] The determination unit is used to define a strip area with a set horizontal width formed by the valid points corresponding to the valid line segments as a crop row, so as to determine several crop rows in the area to be measured.

[0039] Compared with the prior art, the beneficial effects of the present invention are:

[0040] A line segment is formed by connecting two crop points in the area to be measured, and several line segments are formed based on this. First, the angle between the line segment and the preset crop row is determined, and line segments with an angle greater than a preset angle threshold are removed to avoid interference from crop points in other crop rows. Second, crop points are effectively judged based on the vertical distance between the crop point and the line segment, and crop points with a vertical distance greater than a preset distance threshold are removed. Finally, based on the number of effective points corresponding to the line segment, line segments with a number of effective points greater than a preset number threshold are taken as effective line segments to determine the effective points located in the same crop row. The strip area with a set horizontal width formed by the effective points is defined as the crop row, which solves the problem of inaccurate identification of crop rows in the prior art due to small row spacing, leaf shading, and when the row spacing is smaller than the plant spacing. Attached Figure Description

[0041] Figure 1 This is a schematic diagram illustrating the steps of a crop row identification method according to the present invention;

[0042] Figure 2 This is a schematic diagram of an orthophoto of the area to be measured.

[0043] Figure 3 This is a schematic diagram showing how crops are outlined using a detection box.

[0044] Figure 4 This is a schematic diagram showing how several line segments are formed by connecting two crop points in the area to be measured.

[0045] Figure 5 This is a schematic diagram showing the selection of the first and second regions within the area to be measured.

[0046] Figure 6 This is a schematic diagram of establishing a Cartesian coordinate system for the region to be measured with vertex D2 as the origin.

[0047] Figure 7 A flowchart of the specific steps involved in effectively determining crop points based on the vertical distance between crop points and line segments;

[0048] Figure 8 A flowchart illustrating the specific steps involved in effectively determining crop points based on the vertical distance between crop points and line segments;

[0049] Figure 9 A flowchart showing the specific steps involved in determining the validity of a line segment based on the number of valid points;

[0050] Figure 10This is a schematic diagram showing the angle formed by line segments O1O2 and O1O3 formed by crop points O1 and O2 with respect to a preset crop row.

[0051] Figure 11 This is a schematic diagram showing the perpendicular distance between a crop point and a line segment;

[0052] Figure 12 This is a schematic diagram of a strip-shaped area with a defined horizontal width;

[0053] Figure 13 This is a topology diagram of the crop row identification system shown in this invention. Detailed Implementation

[0054] The present invention will now be described in detail with reference to the embodiments shown in the accompanying drawings. However, it should be noted that these embodiments are not intended to limit the present invention. Equivalent changes or substitutions in function, method, or structure made by those skilled in the art based on these embodiments are all within the scope of protection of the present invention.

[0055] Please refer to Figures 1 to 12 As shown, this invention illustrates a specific embodiment of a crop row identification method. In this embodiment, the crop row identification method can be applied to electronic devices, such as terminals, servers, ground workstations, and drones. Terminals can be smartphones, tablets, laptops, desktop computers, etc., and drones can be rotary-wing drones or fixed-wing drones. Rotary-wing drones are designed with multiple propellers on their fuselage, which generate strong lift, allowing operators to achieve precise control. Fixed-wing drones, on the other hand, require runways or catapults for launch. Furthermore, rotary-wing drones can hover, while fixed-wing drones cannot. Therefore, rotary-wing drones are preferred to better achieve the beneficial effects disclosed in this invention.

[0056] The application scenario of a crop row recognition method disclosed in this application is as follows: When using a machine to plant crops in a certain plot, the planting parameters in the ideal state (the planting parameters include: crop rows, plant spacing, row spacing, etc.) will be preset inside the machine, and the machine will plant the crops in sequence according to the set planting parameters; while in the actual state, the planting of crops will be affected by factors such as uneven terrain of the plot, machine failures, and lags. Therefore, when sowing crops in sequence in the actual state, there will be a situation of deviation relative to the crop rows in the ideal state. This application is to recognize the crop rows formed by the crops planted in the actual state of the machine, so that the user can evaluate the planting situation of this plot based on this. In this application, the "preset crop row" is the crop row set in the above-mentioned ideal state, the "preset number of crop rows" refers to the number of crop rows set in the ideal state, the "preset number of crop points" refers to the number of crop points set in the ideal state, and the "preset row spacing" refers to the distance between crop rows set in the ideal state.

[0057] As shown in Figure 1 Figure, the crop row recognition method includes the following steps S1 to S3.

[0058] Step S1: Obtain the crop points in the area to be measured, and traverse the crop points in the area to be measured to determine several line segments formed by connecting two crop points.

[0059] Exemplarily, the operator controls the drone to fly above the area to be measured and takes pictures of the area to be measured to obtain an orthophoto map of the area to be measured. The orthophoto map is detected by a target detection algorithm, and the crops are framed by detection boxes according to the crop size, and the center point of the detection box is used as the crop point corresponding to the crop.

[0060] Specifically, the operator controls the remote controller of the drone, or based on the flight control system installed on the drone itself, and realizes the automatic control of the drone through electronic devices such as a computer, and controls the drone to fly to a preset height above the area to be measured (for example, the preset height is set to 5 meters, 9 meters, etc.). The area to be measured is photographed by the imaging unit installed on the drone to obtain an orthophoto map of the area to be measured. Among them, the imaging unit can be the imaging system installed on the drone itself (for example, a camera installed on the drone and the parameters of the camera can be set through the drone), or a detachable and firmly installed imaging device under the drone (for example, a high-pixel camera). This embodiment does not specifically limit the imaging unit. After obtaining the orthophoto map of the area to be measured, the orthophoto map is detected by a target detection algorithm, and the crops are framed by detection boxes according to the crop size, and the center point of the detection box is used as the crop point corresponding to the crop.

[0061] It should be noted that the area to be measured refers to the area where the crop row identification operation will be performed (i.e., implemented using the crop row identification method shown in this application). This area can be the entire plot or a specific section within the plot. For example, refer to... Figure 2 As shown, the region formed by vertices A1, A2, A3, A4, A5, and A6 is defined as the first structural region; the region formed by vertices B1, B2, B3, and B4 is defined as the second structural region; and the region formed by vertices C1, C2, C3, and C4 is defined as the third structural region, for the convenience of detailed explanation of the different structural regions below. The first structural region is the entire area of ​​the land parcel, consisting of... Figure 2 It is known that the first structural region is not a regular quadrilateral. When the area to be measured is the first structural region (i.e., when crop row identification is required for all crops in the entire plot), it is necessary to ensure that each crop in the plot is included in the orthophoto map, thereby obtaining the orthophoto map of the third structural region. If it is necessary to perform crop row identification on crops in a certain area of ​​the first structural region (e.g., Figure 2 If the second structural region (shown in the diagram) is used, its orthophoto map can be directly obtained. However, since the third structural region includes areas where no crops are planted or where crop varieties differ from those planted in the first structural region (which can also be understood as areas different from the first structural region), using the orthophoto map of the third structural region as the orthophoto map of the area to be measured, and then applying a target detection algorithm to detect this orthophoto map, it is easy for external factors (i.e., other areas in the third structural region that differ from the first structural region) to cause large errors in subsequent detection and calculation. Therefore, for plots that are not regular quadrilaterals, it is preferable to select a specific area of ​​crops to perform crop row identification. Of course, adjustments can be made according to the specific scenario.

[0062] An orthophoto map is a set of digital orthophotos generated by digitally differentiating and mosaicking aerial (or space) photographs and cropping them according to a certain map area. It is an image that simultaneously possesses map geometric accuracy and image features. A target detection algorithm is an algorithm used to identify targets and their locations in an image. This application acquires an orthophoto map of the area to be measured by shooting, and then uses a target detection algorithm to detect targets in the orthophoto map to accurately determine all crop points in the area to be measured. Furthermore, since the size of the crops varies, and the orthophoto map is taken from above the area to be measured, in order to better achieve accurate determination of the specific location of crop points and subsequently accurate determination of crop rows, crops are outlined using detection boxes based on their size, and the center point of the detection box is used as the corresponding crop point.

[0063] Reference Figure 3 The schematic diagram of the crop shown from a top view angle. The crop is surrounded by a dashed line, and the dashed line is the detection frame. In the figure, the detection frame is set as a regular quadrilateral for illustrative purposes, but the detection frame can also be other shapes, such as a circle, etc. Here, the vertical length of the detection frame is the width of the detection frame, and the horizontal length of the detection frame is the length of the detection frame.

[0064] After obtaining the crop points in the area to be measured, select any two crop points from the crop points in the area to be measured, and traverse the crop points in the area to be measured based on this to form a number of line segments from two crop points in the crop points in the area to be measured. For example, the crop points in the area to be measured are obtained through a target detection algorithm and are respectively crop point E1, crop point E2, crop point E3, crop point E4... crop point E78, crop point E79, crop point E80. A line segment E1E2 is formed by crop point E1 and crop point E2, a line segment E1E3 is formed by crop point E1 and crop point E3... a line segment E1E80 is formed by crop point E1 and crop point E80... a line segment E2E3 is formed by crop point E2 and crop point E3... and so on.

[0065] Combined with Figure 4 As shown, it can be seen from the figure that crop points O1 to O8 are crop points of the same crop row. When forming line segments, a line segment O1O2 is formed by crop point O1 and crop point O2, a line segment O1O3 is formed by crop point O1 and crop point O3, a line segment O1O4 is formed by crop point O1 and crop point O4... a line segment O2O3 is formed by crop point O2 and crop point O3, a line segment O2O4 is formed by crop point O2 and crop point O4... and so on. Crop points of the same crop row form a relatively large number of line segments, and all these line segments are subsequently detected. In fact, only one line segment is needed to determine the crop row for the crops in the same crop row. To avoid the situation where crop points deviate from the crop row, multiple line segments can be formed for combined judgment. Therefore, it is not necessary to perform operations on each line segment formed by two crop points of the crop points in the same crop row, resulting in a relatively large number of invalid line segments, which in turn leads to excessive waste of computing power and an increase in the operation time. Therefore, in order to reduce a series of problems (such as the aforementioned waste of computing power, etc.) caused by the increase in the number of operation iterations due to subsequent detection of all line segments formed by two crop points of all crop points in the same crop row, select a first area and a second area in the area to be measured, and the two crop points forming the line segment are respectively selected from the crop points located in the second area and the crop points located in the second area to reduce the number of operations on invalid line segments, so as to save computing power, reduce the operation time, and improve the operation efficiency.

[0066] Specifically, a first region and a second region are selected in the area to be measured. Only the crop points located in the first region and the crop points located in the second region are traversed. The two crop points forming the line segment are respectively selected from the crop points in the first region and the crop points in the second region. Among them, the selection of the first region and the second region is determined by the positions of the crop points of a preset quantity. The preset quantity includes a first preset quantity and a second preset quantity. The first preset quantity is a fixed value, and the second preset quantity y is the number of crop points in the area to be measured, and z is an empirical coefficient.

[0067] Refer Figure 5 As shown, the area formed by vertex D1, vertex D2, vertex D3, and vertex D4 is the area to be measured, and the crop points in the area to be measured are obtained. The user sets a fixed value according to the preset number of crop rows in the area to be measured, and defines this fixed value as the first preset quantity. For example, if the first preset quantity is set to 10, the area formed by 10 crop points in the area to be measured is used as the first region, and the area formed by another 10 crop points in the area to be measured is used as the second region. To ensure that when determining the line segment based on the crop points in the first region and the crop points in the second region subsequently, there is a corresponding line segment for each preset crop row, so as to prevent the situation of missing a certain crop row, when selecting the crop points of the first preset quantity, the direction perpendicular to the preset crop row in the area to be measured is used as the reference selection direction. For example, when the first preset quantity is 10, the area formed by the crop points O1 to O10 in Figure 5 is used as the first region or the second region, or the area formed by the crop points O11 to O20 in Figure 5 is used as the first region or the second region. At the same time, when setting the fixed value according to the preset number of crop rows in the area to be measured, to ensure that there is a corresponding line segment for each preset crop row and to prevent the situation that there is no corresponding line segment for a certain crop row due to over-seeding or missed seeding of a certain crop row, the fixed value is set to be greater than the preset number of crop rows (for example, twice the preset number of crop rows), so as to ensure that there is a corresponding line segment for each preset crop row when forming the line segment subsequently, and thus prevent the situation of missing crop rows.

[0068] Of course, a second preset quantity can also be set to determine the first region and the second region according to the positions of the crop points of the second preset quantity. The second preset quantity y represents the number of crop points in the area to be measured, and z represents an empirical coefficient. Specifically, after acquiring the crop points in the area to be measured, the number of crop points in the area is counted (i.e., the actual number of crop points). A second preset quantity is determined based on this number. The user can also randomly set an empirical coefficient based on the number of crop points in the area. For example, if the number of crop points in the area to be measured is 200, and to reduce the number of invalid line segments generated by connecting two crop points, the user randomly sets an empirical coefficient of 100 based on the number of crop points in the area. Therefore, the second preset quantity... The area formed by 50 crop points in the area to be measured is designated as the first area, and the area formed by another 50 crop points in the area to be measured is designated as the second area. Similarly, when selecting a second preset number of crop points, a preset crop row perpendicular to the area to be measured is used as the selection benchmark to ensure that each preset crop row has a corresponding line segment when line segments are subsequently formed. The empirical coefficient is randomly determined by the user based on the number of crop points in the area to be measured to reduce the number of line segments formed subsequently, thereby reducing the computational power consumption for subsequent line segment detection. Alternatively, the empirical coefficient can be set to 0, and all line segments formed by two crop points in the area to be measured will be detected, with the second preset number not less than the preset number of crop rows in the area to be measured.

[0069] It should be noted that the selection method for crop points forming line segments can be as follows: A line segment can be formed by connecting any two crop points in the area to be measured, and several line segments can be formed from the crop points in the area to be measured, to prevent the omission of any crop point; alternatively, a first and second region can be determined based on the location of a preset number (i.e., a first preset number or a second preset number) of crop points, using a preset crop line perpendicular to the area to be measured as a reference. One crop point can be selected from the crop points in the first region and one from the crop points in the second region to form a line segment, and several line segments can be formed from the crop points in the first region and the crop points in the second region. This ensures that each preset crop row has a corresponding line segment, reduces the number of subsequent calculations on invalid line segments, saves computing power, reduces computation time, and improves computational efficiency. Therefore, whether the line segments formed by all crop points are detected, or only the line segments formed by the selected crop points in the first and second regions are detected, as long as the corresponding line segments are guaranteed for each crop row to prevent missing crop rows, this embodiment does not limit the specific method of selecting the two crop points forming the line segments.

[0070] More specifically, participants Figure 6As shown, a Cartesian coordinate system is established with vertex D2 of the area to be measured as the origin. The line containing vertices D2 and D3 is the X-axis, and the line containing vertices D1 and D2 is the Y-axis. Crop points are marked in the established Cartesian coordinate system, and the coordinates corresponding to different crop points are determined. The crop points are sorted sequentially according to the ordinates contained in their respective coordinates (e.g., from largest to smallest or smallest to largest). The area formed by the first preset number (e.g., 10) of crop points is designated as the first or second area, and the area formed by the next preset number (e.g., 10) of crop points is designated as the second or first area.

[0071] Of course, a Cartesian coordinate system can also be established with vertex D1, vertex D3, or vertex D4 as the origin, and the area formed by a preset number of crop points can be determined based on the ordinate of the crop points. The specific determination method can be deduced from the above method, and will not be repeated here in this embodiment.

[0072] Step S2: Based on the vertical distance between the crop point and the line segment, the crop point is effectively determined to identify the effective points and the number of effective points corresponding to the line segment. Based on the number of effective points, the line segment is effectively determined to identify the effective line segment.

[0073] For example, the reference Figure 7 As shown, before effectively determining the crop point based on the vertical distance between the crop point and the line segment, the following steps S211 to S214 are also included.

[0074] Step S211: Determine the angle between the straight line containing the line segment and the preset crop row in the area to be measured.

[0075] Step S212: Determine whether the included angle is greater than the preset included angle threshold; if yes, proceed to step S213; if no, proceed to step S214.

[0076] Step S213: Remove the line segment.

[0077] Step S214: Effectively determine the crop point based on the vertical distance between the crop point and the line segment.

[0078] Specifically, with Figure 10 The line segments O1O2 formed by crop points O1 and O2, and O1O3 formed by crop points O1 and O3, are shown as examples for illustrative purposes. The angle between the line containing line segment O1O2 and the preset crop row in the area to be measured (i.e., Figure 10 ∠1 in the figure, and the angle formed by the straight line containing line segment O1O3 and the preset crop row in the area to be measured (i.e., Figure 10the included angle ∠2), determine the magnitudes of ∠1 and ∠2, and remove the line segments corresponding to the included angles greater than the preset included angle threshold. For example, if the preset included angle threshold is set to 45°, then the line segments with included angles greater than 45° are removed. From Figure 10 it can be seen that the included angle ∠1 formed by the line segment O1O2 and the preset crop row in the area to be measured is less than 45°, so the crop points are effectively determined based on the vertical distance between the crop points and the line segment O1O2. However, the included angle ∠2 formed by the straight line where the line segment O1O3 is located and the preset crop row in the area to be measured is greater than 45°, so the line segment O1O3 is removed. By setting the preset included angle threshold, the line segments with included angles greater than the preset included angle threshold are removed to remove the line segments formed by the crop points that clearly do not belong to the same crop row, preventing interference from the crop points of adjacent crop rows. At the same time, in order to reduce the computing power consumption caused by effectively determining the crop points based on the vertical distance between the crop points and the line segment and effectively determining the line segment based on the number of valid points corresponding to the line segment, so as to save the computing power, reduce the operation time, and further improve the operation efficiency.

[0079] Refer Figure 8 As shown, effectively determining the crop points based on the vertical distance between the crop points and the line segment includes the following steps S221 to step S224.

[0080] Step S221: Determine the vertical distance between the crop point and the line segment.

[0081] Step S222: Judge whether the vertical distance is greater than the preset distance threshold; if so, execute step S223; if not, execute step S224.

[0082] Step S223: Remove the crop point;

[0083] Step S224: Take the crop point as the valid point corresponding to the line segment and count the number of valid points corresponding to the line segment.

[0084] Specifically, as combined with Figure 11 shown, after judging the line segment based on the included angle formed by the straight line where the line segment is located and the preset crop row in the area to be measured, the line segment with an included angle not greater than (i.e., less than or equal to) the preset included angle threshold is obtained, that is, the line segment O1O2. Determine the vertical distances from the crop point O1 to the crop point O9 to the line segment O1O2 to Figure 11Taking crop point O7 and crop point O8 as examples to illustrate the vertical distance. Draw a straight line through crop point O7 perpendicular to the straight line where line segment O1O2 lies, and form an intersection point F1 with the straight line where line segment O1O2 lies. The length of the line segment O7F1 formed by crop point O7 and intersection point F1 is the vertical distance between crop point O7 and line segment O1O2; similarly, draw a straight line through crop point O8 perpendicular to the straight line where line segment O1O2 lies, and form an intersection point F2 with the straight line where line segment O1O2 lies. The length of the line segment O8F2 formed by crop point O8 and intersection point F2 is the vertical distance between crop point O8 and line segment O1O2. Eliminate the crop points with a vertical distance greater than the preset distance threshold. For example, if the preset distance threshold is set to 1 meter, then eliminate the crop points with a vertical distance greater than 1 meter. If the vertical distance between crop point O7 and line segment O1O2 (i.e., the length of line segment O7F1) is greater than 1 meter, then eliminate crop point O7; if the vertical distance between crop point O7 and line segment O1O2 (i.e., the length of line segment O7F1) is not greater than (i.e., less than or equal to) 1 meter, then crop point O7 is used as the valid point corresponding to line segment O1O2, and count the number of valid points corresponding to line segment O1O2.

[0085] It should be noted that in order to ensure that the preset distance threshold is more adaptable to the crops in the measurement area, take the median of the width of the detection frames corresponding to the crops in the measurement area as the preset distance threshold, so as to ensure the accuracy of the valid points corresponding to the obtained line segments. Of course, the preset distance threshold can also be set to other values, for example, the preset row spacing between the crop rows in the measurement area, etc. By setting the preset distance threshold, eliminate the crop points far from the line segment, so as to obtain the crop points close to the line segment, and recognize the crop points close to the line segment as the crop points in the same crop row.

[0086] In addition, when judging the crop points based on whether the vertical distance between the crop points and the line segment is greater than the preset distance threshold, since the distances between the two crop points forming the line segment and the line segment are 0, which are surely not greater than the preset distance threshold, so judging the vertical distances between the two crop points forming the line segment and the line segment belongs to invalid operations. In order to save computing power, save operation time, and further improve the operation efficiency, only judge the crop points in the measurement area after eliminating the two crop points forming the line segment, so as to avoid invalid operations.

[0087] See Figure 9 As shown, the effective determination of the line segment based on the number of valid points includes the following steps S231 to step S233.

[0088] Step S231, judge whether the number of valid points corresponding to the line segment is greater than the preset number threshold; if so, execute step S232; if not, execute step S233.

[0089] Step S232: Treat the line segment as a valid line segment.

[0090] Step S233: Remove the line segment.

[0091] Specifically, the number of valid points corresponding to a line segment is determined, and line segments with a number of valid points greater than a preset threshold are considered valid line segments. Figure 11 Taking line segment O1O2 as an example, the preset quantity threshold is set to 10. If the number of valid points corresponding to line segment O1O2 is 11 (11 > 10), then line segment O1O2 is considered a valid line segment; if the number of valid points corresponding to line segment O1O2 is 8 (8 ≤ 10), then O1O2 is discarded. By taking different values ​​of the preset quantity threshold and judging line segments based on whether the number of valid points is greater than the preset quantity threshold, it can be understood as judging line segments based on the number of crop points located in the same crop row. If the number of crop points located in the same crop row is greater than the preset quantity threshold, then the line segment is considered a valid line segment; if the number of crop points located in the same crop row is not greater than the preset quantity threshold, then the line segment is discarded. The preset quantity threshold can be determined based on the preset number of crop points in the same crop row under ideal conditions. To avoid errors caused by multiple crop points located in the same crop row being discarded because the number of valid points is not greater than the preset quantity threshold due to reasons such as missed planting, the preset quantity threshold can be appropriately adjusted downwards.

[0092] After determining the valid line segments, it is determined whether there are any other crop points in the area to be measured that are not valid points, i.e., whether there are crop points in the area to be measured that have not been assigned a valid line segment. If there are other crop points, the preset distance threshold is adjusted upwards and / or the preset quantity threshold is adjusted downwards to determine the valid line segments corresponding to the other crop points. Specifically, if there are crop points in the area to be measured that have not been assigned a valid line segment (e.g., crop points M1 to M20), two crop points are selected using the selection method described in step S1 above to form a line segment, and several line segments are formed based on this (e.g., line segment M1M2, line segment M1M3, line segment M1M4, etc.). Then, based on the aforementioned step S2, the validity of the line segment and the number of valid points are determined, and the validity of the line segment is judged based on the number of valid points. If the preset distance threshold is initially set to N1, then it is subsequently set to N2, where N2 > N1, to prevent crop points from being mistakenly identified as not belonging to a particular crop row due to their actual deviation from the crop row. Similarly, if the preset quantity threshold is initially set to N3, then it is subsequently set to N4, where N4 < N3, to prevent multiple missed plantings in a particular crop row from being mistakenly identified as not belonging to that row. Adjustments can be made only to the preset distance threshold (i.e., upward adjustment), only to the preset quantity threshold (i.e., downward adjustment), or both, as long as the effective line segments corresponding to the remaining crop points can be determined.

[0093] Step S3: Define the strip area with a set horizontal width formed by the valid points corresponding to the valid line segments as a crop row, so as to determine several crop rows in the area to be measured.

[0094] Specifically, with Figure 11 For example, if line segment O1O2 is determined to be a valid line segment, and the valid points corresponding to valid line segment O1O2 are crop points O1, O2, and O6, then the bar-shaped area with a set horizontal width formed by crop points O1, O2, and O6 is defined as a crop row. Since in reality, the crop points corresponding to crops in the same crop row are not located on an exact straight line and may shift due to various circumstances, a set width is formed in the horizontal direction, and a bar-shaped area is formed based on this set width (i.e., ...). Figure 12 The area formed by the bar shown is defined as the area that encloses only crop point O1, crop point O2 and crop point O6, and the bar area is defined as the crop row corresponding to crop point O1, crop point O2 and crop point O6.

[0095] After defining the crop rows, the number of crop points in each crop row is counted. This counted number of crop points is the actual number of crop points in the current state. The row density of the crop row is calculated based on its vertical length using the following formula:

[0096]

[0097] Where a is the row density, b is the crop row length, and c is the number of crop points. The horizontal direction refers to the direction perpendicular to the pre-defined crop rows in the area to be measured, and the vertical direction refers to the direction in which the pre-defined crop rows in the area to be measured are located.

[0098] Furthermore, based on a specific example of the crop row identification method described above, this embodiment also discloses a crop row identification system 100, which... Figure 13 As shown, the crop row identification system 100 includes: a detection unit 101, a calculation unit 102, and a determination unit 103.

[0099] The detection unit 101 is used to acquire crop points in the area to be measured, traverse the crop points in the area to be measured, and determine a number of line segments formed by connecting two crop points; the calculation unit 102 is used to determine the validity of crop points based on the vertical distance between crop points and line segments, to determine the valid points and the number of valid points corresponding to the line segments, and to determine the validity of line segments based on the number of valid points, to determine the valid line segments; the determination unit 103 is used to define the strip area with a set horizontal width formed by the valid points corresponding to the valid line segments as crop rows, to determine a number of crop rows in the area to be measured.

[0100] It should be noted that the logic contained in step S1 of the aforementioned crop row identification method is implemented by the detection unit 101 in the crop row identification system 100, the logic contained in step S2 of the aforementioned crop row identification method is implemented by the calculation unit 102 in the crop row identification system 100, and the logic contained in step S3 of the aforementioned crop row identification method is implemented by the determination unit 103 in the crop row identification system 100. The specific implementation methods can be referred to above, and will not be repeated here.

[0101] The detailed descriptions listed above are merely specific descriptions 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.

[0102] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.

[0103] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. A method for identifying crop rows, characterized in that, include: Obtain the crop points in the area to be measured, traverse the crop points in the area to be measured, and determine the line segments formed by connecting two crop points; Determine the angle formed between the line containing the line segment and the preset crop row in the area to be measured. When the angle is less than or equal to the preset angle threshold, the crop point is effectively determined based on the vertical distance between the crop point and the line segment to determine the effective point and the number of effective points corresponding to the line segment. The line segment is effectively determined based on the number of effective points to determine the effective line segment. The strip region with a set horizontal width formed by the valid points corresponding to the valid line segments is defined as a crop row, so as to determine several crop rows in the area to be measured.

2. The crop row identification method according to claim 1, characterized in that, The acquisition of crop points in the area to be measured includes: Obtain an orthophoto of the area to be measured; The orthophoto image is detected by a target detection algorithm, and crops are outlined by detection boxes based on their size. The center point of the detection box is used as the crop point corresponding to the crop.

3. The crop row identification method according to claim 1, characterized in that, In the area to be measured, select a first region and a second region, and only traverse the crop points located in the first region and the crop points located in the second region. The two crop points that form the line segment are selected from the crop points located in the first region and the crop points located in the second region, respectively.

4. The crop row identification method according to claim 3, characterized in that, The selection of the first and second regions is determined by the location of a preset number of crop points; The preset quantity includes a first preset quantity or a second preset quantity, wherein the first preset quantity is a fixed value, and the second preset quantity... , The number of crop points in the area to be measured. This is an empirical coefficient.

5. The crop row identification method according to claim 2, characterized in that, When the included angle is greater than a preset included angle threshold, the line segment is discarded.

6. The crop row identification method according to claim 5, characterized in that, The method of effectively determining crop points based on the vertical distance between crop points and line segments includes: Determine the vertical distance between the crop point and the line segment, and determine whether the vertical distance is greater than a preset distance threshold; If so, then remove the crop point; If not, the crop point is taken as the valid point corresponding to the line segment, and the number of valid points corresponding to the line segment is counted.

7. The crop row identification method according to claim 6, characterized in that, The preset distance threshold is the median of the detection frame width corresponding to the crops in the area to be measured.

8. The crop row identification method according to claim 6, characterized in that, The determination of the validity of a line segment based on the number of valid points includes: Determine whether the number of valid points corresponding to the line segment is greater than a preset threshold. If so, then the line segment is considered a valid line segment; If not, then the line segment is removed.

9. The crop row identification method according to claim 8, characterized in that, After determining the valid line segments, the following steps are also included: Determine whether there are any other crop points in the area to be measured that are not valid. If there are other crop points, adjust the preset distance threshold upward and / or adjust the preset quantity threshold downward to determine the valid line segments corresponding to the other crop points.

10. The crop row identification method according to any one of claims 1 to 9, characterized in that, After defining it as a crop row, it includes: Count the number of crop points in each crop row, and calculate the intra-row density based on the vertical length of the crop row, using the following formula: ;in, Inline density, The length of the crop row. This represents the number of crop points.

11. A crop row identification system, characterized in that, include: The detection unit is used to acquire crop points in the area to be measured, and to traverse the crop points in the area to be measured to determine several line segments formed by connecting two crop points; The calculation unit is used to determine the angle formed between the straight line containing the line segment and the preset crop row in the area to be measured, and when the angle is less than or equal to the preset angle threshold, to determine the effective point of the crop point based on the vertical distance between the crop point and the line segment, so as to determine the effective point and the number of effective points corresponding to the line segment, and to determine the effective line segment based on the number of effective points. The determination unit is used to define a strip area with a set horizontal width formed by the valid points corresponding to the valid line segments as a crop row, so as to determine several crop rows in the area to be measured.

Citation Information

Patent Citations

  • Method and system for estimating density of plants in crop seedling stage based on RGB images

    CN112614147A

  • Device for detecting line of crop

    JP1994014611A