Agricultural scene path planning method, system and equipment and storage medium
By using monocular RGB cameras and image preprocessing technology in agricultural autonomous driving, the positioning problem of weak RTK-GNSS signal is solved, and precise positioning and autonomous driving path planning in agricultural scenarios are achieved.
Patent Information
- Application Number
- CN202411800662.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-03-18
AI Technical Summary
Existing agricultural autonomous driving technologies rely almost entirely on RTK-GNSS, resulting in the inability to achieve precise positioning and autonomous driving in areas with weak or trustless RTK-GNSS signals (such as indoors).
A monocular RGB camera is used to obtain farmland images, and through technologies such as color image ashing, grayscale image enhancement, and area of interest selection, rapid preprocessing and semantic segmentation of images are achieved, driving areas are demarcated and the driving path center line is extracted.
In agricultural scenarios, it is possible to accurately locate the autonomous driving path, reduce the amount of calculation, eliminate irrelevant features, enhance the reliability of image recognition, and improve the effects of feature extraction, image segmentation and recognition.
Smart Images

Figure CN119645035A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of path planning technology, and more specifically, to an agricultural scene path planning method, system, device and storage medium. Background Art
[0002] In recent years, smart agriculture has emerged in response to the actual demand for intelligent agricultural operations. Smart agriculture combines artificial intelligence technology, autonomous driving technology, big data analysis and application with agricultural planting and agronomy to achieve unmanned, automated, intelligent and digital agricultural management. Based on cloud computing, Internet of Things / Internet of Vehicles, high-precision positioning, sensor recognition and other technologies, various sensor nodes and wireless communication networks deployed at agricultural production sites are used to build intelligent perception, intelligent early warning, intelligent decision-making and intelligent analysis of the entire agricultural production process, while promoting the agricultural machinery industry towards intelligence and digitalization.
[0003] High-precision positioning / navigation methods are very important in the existing technologies of agricultural autonomous driving. This method completely relies on the Global Navigation Satellite System (GNSS) for preliminary positioning. RTK (Real-time kinematic) real-time dynamic carrier phase differential technology is a differential method for real-time processing of carrier phase observations of two measurement stations. The carrier phase collected by the base station is sent to the user receiver to calculate the difference coordinates. This new satellite positioning measurement method can obtain centimeter-level positioning accuracy in real time in the field, which is different from the previous static, fast static, and dynamic measurements that all need to be solved afterwards to obtain centimeter-level accuracy. The principle of RTK positioning technology is as follows: Using the real-time dynamic positioning technology of carrier phase observations, the satellite data observed by the GPS receiver at the base station is sent out in real time through the data communication link (radio station), and the GPS receiver of the nearby mobile station observes the satellite while receiving the radio signal from the base station. By real-time processing of the received signal, the three-dimensional coordinates of the mobile station with centimeter-level accuracy are given.
[0004] Existing agricultural autonomous driving technology is almost entirely dependent on RTK-GNSS (Real-time Kinematic Differential Global Positioning System). RTK-GNSS equipment can only be used in areas with good outdoor GNSS signals and has certain regional restrictions. In areas with weak RTK-GNSS signals and in areas without RTK-GNSS signals (such as indoors), autonomous driving solutions that rely on positioning technology for path planning often result in problems such as inaccurate positioning, path deviation, and inability to achieve autonomous driving. Summary of the invention
[0005] The technical problem to be solved by the present invention is to address the above-mentioned deficiencies in the prior art. One purpose of the present invention is to provide an agricultural scene path planning method that can achieve accurate positioning of the autonomous driving path.
[0006] The second purpose of the present invention is to provide a rapid preprocessing system for agricultural scene images.
[0007] A third object of the present invention is to provide a computer device.
[0008] A fourth objective of the present invention is to provide a computer storage medium.
[0009] In order to achieve the above-mentioned objective 1, the present invention provides an agricultural scene path planning method, comprising the following steps:
[0010] Step 1. During the driving process of the agricultural machinery, an RGB image of the farmland is obtained through a monocular RGB camera;
[0011] Step 2. Pre-processing the RGB image to obtain a pre-processed image;
[0012] Step 3. Obtaining a region of interest according to the pre-processed image, and performing segmentation processing on the pre-processed image;
[0013] Step 4. Classify only each pixel in the region of interest, and predefine the category of each pixel by using a semantic segmentation method;
[0014] Step 5. Divide the drivable area according to the predefined pixels, extract two boundary lines, and use the midline of the two boundary lines as the midline of the driving path of the drivable area.
[0015] As a further improvement, the pre-processing includes:
[0016] The conversion from RGB to grayscale image uses the maximum value method for graying: grayscale value = max(R, G, B);
[0017] Grayscale image enhancement processing, according to the different spaces where the image enhancement processing process is located, image enhancement adopts spatial domain enhancement method or frequency domain enhancement method; frequency domain enhancement method is to calculate the transformation coefficient value of the image within the specified transformation domain of the image, make corrections, and then obtain the enhanced image through inverse transformation; spatial domain enhancement method is to directly perform enhancement processing in the two-dimensional space where the image is located to enhance the pixels that make up the image.
[0018] Furthermore, the spatial domain enhancement method includes grayscale transformation enhancement, and the grayscale transformation function of the grayscale transformation enhancement includes:
[0019] Linear transformation function, let r be the grayscale before transformation, s be the grayscale after transformation, then the linear transformation function: s = a*r+b; where a is the slope of the line, and b is the intercept on the y-axis;
[0020] The logarithmic transformation function is used to expand the low gray value part of the image and compress the high gray value part to achieve the purpose of emphasizing the low gray value part of the image. The logarithmic transformation function is as follows:
[0021] s = clog(1+r);
[0022] Where c is a constant;
[0023] The antilogarithmic transformation function is used to expand the high gray value part of the image and compress the low gray value part to achieve the purpose of emphasizing the high gray value part of the image.
[0024] Furthermore, the linear transformation function applies image inversion, and the image is inverted to obtain an image negative, which can effectively enhance the white or gray details in the dark area of the image.
[0025] Furthermore, the spatial domain enhancement method includes histogram enhancement, and the histogram enhancement includes the following steps:
[0026] a) Histogram statistics. Image histogram is a function between the statistical characteristics of each grayscale value of the image and the grayscale value of the image. It counts the number of occurrences or probabilities of each grayscale level in the image. Graphically, the horizontal axis is the grayscale level of each pixel in the image, represented by r, and the vertical axis is the number of pixels with this grayscale level or the probability of this grayscale level appearing P (r i );
[0027] P(r i )=n i / N;
[0028] Where N is the total number of pixels, n i is the number of pixels at the kth gray level, r k represents the kth gray level;
[0029] The processing steps are as follows:
[0030] 1) Get the source image's first address and image width and height;
[0031] 2) Initialize the grayscale count variable;
[0032] 3) Scan the pixels in the image one by one and perform grayscale technical statistics;
[0033] 4) Calculate the grayscale probability density;
[0034] b) Histogram equalization, which performs a specified mapping transformation on the pixel degrees in the original image so that the probability density of the grayscale of the transformed image is evenly distributed, that is, the transformed image is an image with evenly distributed grayscale levels, the dynamic range of the image grayscale is increased, and the contrast is improved; the basic principles are as follows:
[0035] Assume that r and s distributions represent the grayscale values of the original image and the transformed image at the point (x, y), the total number of grayscale levels is L, and s = T(r), T(r) is the transformation function; here the image enhancement transformation function needs to meet the following two conditions:
[0036] Condition 1: T(r) is a single-valued, single-increasing function in the range of 0≤r≤L–1;
[0037] Condition 2: For 0≤r≤L–1, 0≤T(r)≤L–1;
[0038] Assume that N is the total number of pixels in an image, n k is the number of pixels of the kth gray level, r k represents the kth gray level, then the gray level in the image is r k The probability of a pixel appearing is:
[0039]
[0040] The transformation function for homogenizing it is:
[0041]
[0042] The processing steps are as follows:
[0043] 1) Get the source image's first address and image width and height;
[0044] 2) Temporarily allocate memory to save the new image and initialize it to 0;
[0045] 3) Obtain the probability density of the grayscale distribution of the source image by calling the grayscale histogram statistical function;
[0046] 4) Perform histogram equalization on the grayscale distribution of the source image;
[0047] 5) Scan the pixels in the source image one by one, and write the result of histogram equalization to the target image corresponding to the current point;
[0048] 6) Copy the image processed by grayscale histogram equalization to the source image.
[0049] Furthermore, the region of interest of the image is determined by collecting the image on a small scale and marking the region of interest by manual identification.
[0050] Furthermore, the data statistics are performed on the four corners of the region of interest, and the pixel coordinates of the four corners are defined by the weighted average method. The calculation formula is as follows:
[0051]
[0052] In order to achieve the above-mentioned second objective, the present invention provides an agricultural scene path planning system, comprising:
[0053] An image acquisition module is used to acquire RGB images of farmland through a monocular RGB camera during the driving process of the agricultural machinery;
[0054] A pre-processing module, used for pre-processing the RGB image to obtain a pre-processed image;
[0055] A segmentation module, used for obtaining a region of interest according to the pre-processed image, and performing segmentation processing on the pre-processed image;
[0056] A pre-definition module, used for classifying only each pixel in the region of interest, and pre-defining the category of each pixel by a semantic segmentation method;
[0057] The boundary extraction module is used to divide the drivable area according to predefined pixels and extract two boundary lines, and the midline of the two boundary lines is used as the midline of the driving path of the drivable area.
[0058] In order to achieve the third objective above, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-mentioned agricultural scene path planning method when executing the computer program.
[0059] In order to achieve the above-mentioned fourth objective, the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the above-mentioned agricultural scene path planning method is implemented.
[0060] Beneficial Effects
[0061] Compared with the prior art, the present invention has the following advantages:
[0062] 1. The present invention uses color image graying processing, grayscale image enhancement and ROI selection technologies to effectively reduce the amount of calculation, eliminate unnecessary feature factors in the image, and select feature values through the selected preprocessing method according to the actual needs of agricultural scene images, thereby creating a good foundation for subsequent image recognition and realizing accurate positioning of the autonomous driving path.
[0063] 2. The main purpose of image preprocessing in the present invention is to eliminate irrelevant information in the image, restore useful real information, enhance the detectability of relevant information and simplify data to the maximum extent, thereby improving the reliability of feature extraction, image segmentation, matching and recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 is a flow chart of the present invention;
[0065] Figure 2 is a flow chart of histogram equalization in the present invention;
[0066] Figure 3 This is a schematic diagram of marking ROI in the present invention. DETAILED DESCRIPTION
[0067] The present invention will be further described below with reference to the specific embodiments in the accompanying drawings.
[0068] See also Figure 1 to Figure 3 , an agricultural scene path planning method, comprising the following steps:
[0069] Step 1. During the driving process of the agricultural machine, an RGB image of the farmland is obtained through a monocular RGB camera, that is, the monocular RGB camera is installed at the front end of the agricultural machine to capture images in the forward direction;
[0070] Step 2. Pre-process the RGB image to obtain a pre-processed image, mainly graying;
[0071] Step 3. Obtain the region of interest ROI based on the pre-processed image and perform segmentation processing on the pre-processed image;
[0072] Step 4. Classify only each pixel in the region of interest (ROI), and predefine the category of each pixel through semantic segmentation method;
[0073] Step 5. Divide the drivable area according to the predefined pixels, extract two boundary lines, and use the center line of the two boundary lines as the center line of the driving path of the drivable area. That is, the semantic segmentation and semantic line detection model is used to extract the center line from the pre-processed image as the center line of the driving path of the drivable area.
[0074] Through graying processing and ROI setting, the algorithm calculation amount is greatly reduced, the drivable area is delineated, regional redundancy is provided for safe driving, and the center line of the driving line is extracted to provide a specific driving route for local path planning.
[0075] Specifically, the pre-processing includes:
[0076] 1. From RGB to grayscale image conversion, the maximum value method is used for graying, and the maximum value of the RGB value of each pixel in the RGB color image is selected as the grayscale value. That is: grayscale value = max(R, G, B). The amount of calculation is small, and it is easy to find feature points in agricultural scenes.
[0077] Of course, graying can also be done by weighted averaging, which is to average the RGB values of each pixel in the color image according to a certain weight, and then get the corresponding grayscale value. The weights usually used are determined based on the survey results of the human eye's sensitivity to different colors. Since the human eye is most sensitive to green, followed by red, and lowest to blue. Therefore, the usual weight settings are: red channel weight: 0.299; green channel weight: 0.587; blue channel weight: 0.114. For each pixel, multiply its RGB value by the weight of the corresponding channel, and then add the three products to get the grayscale value. Grayscale value = 0.299*R+0.587*G+0.114*B.
[0078] Graying can also be done by using a simple average method, where the average of the RGB values of each pixel in the color image is used as the grayscale value. This method does not take into account the sensitivity of the human eye to different colors, and simply defines the average of the three channel values as the grayscale value. Grayscale value = (R+G+B) / 3.
[0079] 2. Grayscale image enhancement processing, according to the different spaces where the image enhancement processing process is located, image enhancement adopts spatial domain enhancement method or frequency domain enhancement method. Frequency domain enhancement method is to calculate the transformation coefficient value of the image in the specified transformation domain of the image, make corrections, and then obtain the enhanced image through inverse transformation. Spatial domain enhancement method is to directly perform enhancement processing in the two-dimensional space where the image is located to enhance the pixels that constitute the image.
[0080] 2.1. Spatial domain enhancement method includes grayscale transformation enhancement, and the grayscale transformation function of grayscale transformation enhancement includes:
[0081] 2.1.1. Linear transformation function, let r be the grayscale before transformation, s be the grayscale after transformation, then the linear transformation function is: s = a*r+b; where a is the slope of the line, and b is the intercept on the y-axis. Choosing different a and b values will have different effects:
[0082] Enhance the contrast of the image;
[0083] Reduce the contrast of the image;
[0084] The grayscale value of the entire image moves up or down, that is, the image becomes brighter or darker as a whole, but the contrast of the image will not change;
[0085] The bright areas of the image become darker, and the dark areas become brighter;
[0086] Constant transformation, unchanged;
[0087] The image is inverted.
[0088] When performing image enhancement, the most commonly used linear transformation function is image inversion. Inverting the image to obtain an image negative can effectively enhance the white or gray details in the dark area of the image.
[0089] 2.1.2. The logarithmic transformation function is used to expand the low gray value part of the image and compress the high gray value part to achieve the purpose of emphasizing the low gray value part of the image. The logarithmic transformation function is as follows.
[0090] s = clog(1+r);
[0091] Here, c is a constant.
[0092] 2.1.3. The antilogarithmic transformation function is opposite to the logarithmic transformation function. It is used to expand the high gray value part of the image and compress the low gray value part to achieve the purpose of emphasizing the high gray value part of the image.
[0093] The logarithmic transformation function and the antilogarithmic transformation function can realize the nonlinear transformation of the image grayscale. In practical applications, the linear transformation function, the logarithmic transformation function, and the antilogarithmic transformation function can be used individually or in combination.
[0094] 2.2. Spatial domain enhancement methods include histogram enhancement. Image histogram is a very important image analysis tool in image processing. It describes the grayscale content of an image. The histogram of any image contains rich information. The distribution of grayscale in the image histogram can provide many features of image information, so the effect of enhancing image contrast can be achieved by changing the shape of the histogram. Histogram enhancement includes the following steps:
[0095] a) Histogram statistics: The image histogram is a function between the statistical characteristics of each grayscale value of the image and the grayscale value of the image, which counts the number of occurrences or probabilities of each grayscale level in the image. Graphically, the horizontal axis is the grayscale level of each pixel in the image, represented by r, and the vertical axis is the number of pixels with this grayscale level or the probability of this grayscale level appearing P (r i ).
[0096] P(r i )=n i / N
[0097] Where N is the total number of pixels, n i is the number of pixels at the kth gray level, r k Represents the kth gray level.
[0098] The processing steps are as follows:
[0099] 1) Get the source image's first address and image width and height;
[0100] 2) Initialize the grayscale count variable;
[0101] 3) Scan the pixels in the image one by one and perform grayscale technical statistics;
[0102] 4) Calculate the grayscale probability density.
[0103] Histogram statistics can understand the grayscale distribution of an image and modify the grayscale density of the image, thereby selectively highlighting the required image features to meet the needs.
[0104] b) Histogram equalization, which performs a specified mapping transformation on the pixel degrees in the original image so that the probability density of the grayscale of the transformed image is evenly distributed, that is, the image after the transformation is an image with evenly distributed grayscale levels, the dynamic range of the image grayscale is increased, and the contrast is improved. The basic principles are as follows:
[0105] Assume that r and s distributions represent the grayscale values of the original image and the transformed image at the point (x, y), the total number of grayscale levels is L, and s = T(r), T(r) is the transformation function. Here, the image enhancement transformation function needs to meet the following two conditions:
[0106] Condition 1: T(r) is a single-valued, single-increasing function in the range of 0≤r≤L–1;
[0107] Condition 2: for 0≤r≤L–1, 0≤T(r)≤L–1.
[0108] Of course, the inverse transformation from s to r is
[0109] r=T -1 (S)(0≤s≤L–1), T -1 (S) also satisfies the above two conditions for s.
[0110] Assume N is the total number of pixels in an image, n k is the number of pixels of the kth gray level, r k represents the kth gray level, then the gray level in the image is r k The probability of a pixel appearing is:
[0111]
[0112] The transformation function for homogenizing it is:
[0113]
[0114] By using the above formula to transform the grayscale of the image, you can get the histogram equalized image.
[0115] The processing steps are as follows:
[0116] 1) Get the source image's first address and image width and height;
[0117] 2) Temporarily allocate memory to save the new image and initialize it to 0;
[0118] 3) Obtain the probability density of the grayscale distribution of the source image by calling the grayscale histogram statistical function;
[0119] 4) Perform histogram equalization on the grayscale distribution of the source image;
[0120] 5) Scan the pixels in the source image one by one, and write the result of histogram equalization to the target image corresponding to the current point;
[0121] 6) Copy the image processed by grayscale histogram equalization to the source image.
[0122] Specifically, the region of interest ROI of an image is determined by collecting images on a small scale and marking the region of interest ROI by manual identification.
[0123] Furthermore, the four corners of the region of interest ROI are statistically analyzed, and the pixel coordinates of the four corners are defined by weighted average method, such as Figure 3 The four corners A, B, C, and D marked in the figure are calculated by taking the coordinates of point A as an example:
[0124]
[0125] Similarly, the coordinate values of B, C, and D can be obtained.
[0126] An agricultural scene path planning system, comprising:
[0127] An image acquisition module is used to acquire RGB images of farmland through a monocular RGB camera during the driving process of the agricultural machinery;
[0128] A pre-processing module, used for pre-processing the RGB image to obtain a pre-processed image;
[0129] A segmentation module is used to obtain a region of interest ROI according to a pre-processed image and perform segmentation processing on the pre-processed image;
[0130] The predefined module is used to classify only each pixel in the region of interest (ROI), and to predefine the category of each pixel through the semantic segmentation method;
[0131] The boundary extraction module is used to divide the drivable area according to predefined pixels and extract two boundary lines, and the midline of the two boundary lines is used as the midline of the driving path of the drivable area.
[0132] A computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-mentioned agricultural scene path planning method when executing the computer program.
[0133] A computer-readable storage medium stores a computer program, which implements the above-mentioned agricultural scene path planning method when executed by a processor.
[0134] The above are only preferred embodiments of the present invention. It should be pointed out that for those skilled in the art, several modifications and improvements can be made without departing from the structure of the present invention, which will not affect the effect of the implementation of the present invention and the practicality of the patent.
Claims
1. A path planning method for agricultural scenes, characterized in that: The following steps are involved: Step 1. During the driving process of the agricultural machinery, an RGB image of the farmland is obtained through a monocular RGB camera; Step 2. Pre-processing the RGB image to obtain a pre-processed image; Step 3. Obtaining a region of interest (ROI) according to the pre-processed image, and performing segmentation processing on the pre-processed image; Step 4. Classify only each pixel in the region of interest (ROI), and predefine the category of each pixel by semantic segmentation method; Step 5. Divide the drivable area according to the predefined pixels, extract two boundary lines, and use the midline of the two boundary lines as the midline of the driving path of the drivable area.
2. The agricultural scene path planning method according to claim 1, characterized in that: The pre-treatment comprises: The conversion from RGB to grayscale image uses the maximum value method for graying: grayscale value = max(R, G, B); Grayscale image enhancement processing, according to the different spaces where the image enhancement processing process is located, image enhancement adopts spatial domain enhancement method or frequency domain enhancement method; frequency domain enhancement method is to calculate the transformation coefficient value of the image within the specified transformation domain of the image, make corrections, and then obtain the enhanced image through inverse transformation; spatial domain enhancement method is to directly perform enhancement processing in the two-dimensional space where the image is located to enhance the pixels that make up the image.
3. The agricultural scene path planning method according to claim 2, characterized in that: The spatial domain enhancement method includes grayscale transformation enhancement, and the grayscale transformation function of the grayscale transformation enhancement includes: Linear transformation function, let r be the grayscale before transformation, s be the grayscale after transformation, then the linear transformation function: s = a*r+b; where a is the slope of the line, and b is the intercept on the y-axis; The logarithmic transformation function is used to expand the low gray value part of the image and compress the high gray value part to achieve the purpose of emphasizing the low gray value part of the image. The logarithmic transformation function is as follows: s = clog(1+r); Where c is a constant; The antilogarithmic transformation function is used to expand the high gray value part of the image and compress the low gray value part to achieve the purpose of emphasizing the high gray value part of the image.
4. The agricultural scene path planning method according to claim 3 is characterized in that: The linear transformation function applies image inversion, which inverts the image to obtain an image negative, and can effectively enhance white or gray details in dark areas of the image.
5. The agricultural scene path planning method according to claim 3, characterized in that: The spatial domain enhancement method includes histogram enhancement, and the histogram enhancement includes the following steps: a) Histogram statistics. Image histogram is a function between the statistical characteristics of each grayscale value of the image and the grayscale value of the image. It counts the number of occurrences or probabilities of each grayscale level in the image. Graphically, the horizontal axis is the grayscale level of each pixel in the image, represented by r, and the vertical axis is the number of pixels with this grayscale level or the probability of this grayscale level appearing P (r i ); P(r i )=n i / N; Where N is the total number of pixels, n i is the number of pixels at the kth gray level, r k represents the kth gray level; The processing steps are as follows: 1) Get the source image's first address and image width and height; 2) Initialize the grayscale count variable; 3) Scan the pixels in the image one by one and perform grayscale technical statistics; 4) Calculate the grayscale probability density; b) Histogram equalization, which performs a specified mapping transformation on the pixel degrees in the original image so that the probability density of the grayscale of the transformed image is evenly distributed, that is, the transformed image is an image with evenly distributed grayscale levels, the dynamic range of the image grayscale is increased, and the contrast is improved; the basic principles are as follows: Assume that r and s distributions represent the grayscale values of the original image and the transformed image at the point (x, y), the total number of grayscale levels is L, and s = T(r), T(r) is the transformation function; here the image enhancement transformation function needs to meet the following two conditions: Condition 1: T(r) is a single-valued, single-increasing function in the range of 0≤r≤L–1; Condition 2: For 0≤r≤L–1, 0≤T(r)≤L–1; Assume N is the total number of pixels in an image, n k is the number of pixels of the kth gray level, r k represents the kth gray level, then the gray level in the image is r k The probability of a pixel appearing is: The transformation function for homogenizing it is: The processing steps are as follows: 1) Get the source image's first address and image width and height; 2) Temporarily allocate memory to save the new image and initialize it to 0; 3) Obtain the probability density of the grayscale distribution of the source image by calling the grayscale histogram statistical function; 4) Perform histogram equalization on the grayscale distribution of the source image; 5) Scan the pixels in the source image one by one, and write the result of histogram equalization to the target image corresponding to the current point; 6) Copy the image processed by grayscale histogram equalization to the source image.
6. The agricultural scene path planning method according to claim 1, characterized in that: Specifically, the region of interest (ROI) of an image is determined by collecting images on a small scale and marking the region of interest (ROI) by manual identification.
7. The agricultural scene path planning method according to claim 6, characterized in that: The data of the four corners of the region of interest (ROI) are counted, and the pixel coordinates of the four corners are defined by the weighted average method. The calculation formula is as follows:
8. An agricultural scene path planning system, characterized in that: include: An image acquisition module is used to acquire RGB images of farmland through a monocular RGB camera during the driving process of the agricultural machinery; A pre-processing module, used for pre-processing the RGB image to obtain a pre-processed image; A segmentation module, used for obtaining a region of interest (ROI) according to the pre-processed image, and performing segmentation processing on the pre-processed image; A pre-definition module, used for classifying only each pixel of the region of interest (ROI), and pre-defining the category of each pixel by a semantic segmentation method; The boundary extraction module is used to divide the drivable area according to predefined pixels and extract two boundary lines, and the midline of the two boundary lines is used as the midline of the driving path of the drivable area.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, an agricultural scene path planning method as described in any one of claims 1-7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, an agricultural scene path planning method as described in any one of claims 1-7 is implemented.