Pesticide spraying method and system based on image processing
By using drones equipped with cameras to mark target areas and adjusting their flight paths based on wind speed and direction, the problem of drone pesticide spraying shifting in windy conditions has been solved, achieving more precise and efficient pesticide spraying.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JIANGXI QIANJUN WAN MUSHROOM ECOLOGICAL AGRICULTURE DEVELOPMENT CO LTD
- Filing Date
- 2025-04-10
- Publication Date
- 2026-06-26
Smart Images

Figure CN120226652B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of pesticide spraying technology, specifically relating to a pesticide spraying method and system based on image processing. Background Technology
[0002] During the growth process, crops usually need to be sprayed with pesticides regularly to ensure their normal growth.
[0003] Currently, the mainstream method is to spray pesticides manually, but this method is time-consuming and labor-intensive. Therefore, the method of using drones to replace manual spraying has been proposed, which can effectively improve the efficiency of pesticide spraying. However, there are also some drawbacks. Specifically, when drones are used for pesticide spraying in windy weather, the spraying area may be deviated, which may cause accidental damage to other areas that do not need to be sprayed. Summary of the Invention
[0004] Based on this, the present invention provides a pesticide spraying method and system based on image processing, which aims to take into account the influence of wind on pesticide spraying, and to reasonably control the pesticide spraying of drones, so as to achieve better pesticide spraying effect.
[0005] A first aspect of this invention provides an image processing-based pesticide spraying method, applicable to scenarios with drones, the drones being equipped with cameras, the method comprising:
[0006] Control the drone to capture images of the pesticide to be sprayed, and mark the target area in the images of the pesticide to be sprayed;
[0007] Under windless conditions, the pesticide spraying coverage area of the drone at a preset altitude is obtained, and the initial flight path of the drone is planned based on the pesticide spraying coverage area and the target area.
[0008] Determine the target location on the initial flight path, control the drone to move to the target location, and spray pesticides;
[0009] Acquire images of pesticides after spraying, compare them, and determine the offset information;
[0010] Based on the offset information, the flight path is replanned to obtain the target flight path;
[0011] Based on the target flight path, control the drone to carry out pesticide spraying operations.
[0012] Furthermore, the step of determining the target position on the initial flight path includes:
[0013] Obtain meteorological information, which includes at least the prevailing wind direction and wind speed;
[0014] Based on the wind speed, the pesticide spraying coverage area, and the target area, a first safe operating area is determined.
[0015] Based on the prevailing wind direction, determine the largest rectangular area of the first region, and obtain the other regions excluding the largest rectangular area;
[0016] Determine whether the area of other regions is greater than the preset area;
[0017] If it is determined that the area of other regions is greater than the preset area, then the largest rectangular area of the other regions is determined.
[0018] The points on the initial flight path adjacent to the corner and center points of the largest rectangular region are determined as the target locations.
[0019] Furthermore, the step of acquiring images after pesticide spraying and comparing them to determine offset information includes:
[0020] Acquire images of the pesticide sprayed at each of the target locations, and extract the outline of the pesticide sprayed area from the images.
[0021] Based on the coordinates of points on the contour, calculate the root mean square distance between any two images, and take the average value as the first target evaluation value;
[0022] Determine whether the first target evaluation value is greater than the preset evaluation value;
[0023] If the first target evaluation value is determined to be greater than the preset evaluation value, the K-Means algorithm is used to cluster the contour, and the contour of the predicted pesticide spraying area is determined based on the clustering results.
[0024] Obtain the center point of each pesticide spraying area, perform DBSCAN clustering on the center points of each pesticide spraying area, and determine the target center point.
[0025] Furthermore, after the step of determining whether the first target evaluation value is greater than the preset evaluation value, the method further includes:
[0026] If the evaluation value of the first target is determined to be no greater than the preset evaluation value, the flight altitude of the drone will be reduced.
[0027] Furthermore, the step of controlling the drone to reduce its flight altitude if the first target evaluation value is determined to be no greater than a preset evaluation value includes:
[0028] The largest rectangular region of the first region is divided into a preset number of second regions, and the shape of the second region is rectangular.
[0029] Obtain the offset information of the adjacent second regions, and determine whether the adjacent second regions meet the merging requirements based on the offset information of the adjacent second regions;
[0030] If it is determined that the adjacent second region meets the merging requirements, then when controlling the drone to perform pesticide spraying tasks in the merged second region, it will fly at the preset altitude.
[0031] If it is determined that the adjacent second region does not meet the merging requirements, the drone is controlled to fly at a lower altitude.
[0032] Furthermore, the step of determining whether adjacent second regions meet the merging requirements based on the offset information of adjacent second regions includes:
[0033] Control the drone to move to a point on the initial flight path adjacent to the corner and center points of each of the second regions, and acquire images after pesticide spraying;
[0034] Based on the images after pesticide spraying, the second target evaluation value for each of the second regions is determined.
[0035] The difference between the second target evaluation values of adjacent second regions is calculated, and it is determined whether the difference is less than the threshold.
[0036] If the difference is less than the threshold, it means that the adjacent second regions meet the merging requirements;
[0037] If the difference is not less than the threshold, it means that the adjacent second region does not meet the merging requirements.
[0038] Furthermore, after completing a pesticide spraying task at the same flight altitude, a pesticide spraying task at another flight altitude will be carried out. When the drone passes over a location where pesticides have been sprayed, it will not spray pesticides again.
[0039] A second aspect of the present invention provides an image processing-based pesticide spraying system for implementing the image processing-based pesticide spraying method provided in the first aspect of the present invention, the system comprising:
[0040] The first control module is used to control the drone to capture images of pesticides to be sprayed and to mark the target area in the images of pesticides to be sprayed.
[0041] The first path planning module is used to obtain the pesticide spraying coverage area of the drone at a preset altitude under windless conditions, and plan the initial flight path of the drone based on the pesticide spraying coverage area and the target area.
[0042] The first determining module is used to determine the target position on the initial flight path, control the drone to move to the target position, and spray pesticides;
[0043] The second determining module is used to acquire images after pesticide spraying, compare them, and determine the offset information;
[0044] The second path planning module is used to replan the flight path based on the offset information to obtain the target flight path;
[0045] The second control module is used to control the drone to perform pesticide spraying operations according to the target flight path.
[0046] A third aspect of the present invention provides a computer-readable storage medium, comprising:
[0047] The readable storage medium stores one or more programs that, when executed by a processor, implement the image processing-based pesticide spraying method as described in the first aspect.
[0048] A fourth aspect of the present invention provides an electronic device, the electronic device including a memory and a processor, wherein:
[0049] The memory is used to store computer programs;
[0050] When the processor executes the computer program stored in the memory, it implements the pesticide spraying method based on image processing as described in the first aspect.
[0051] This invention provides an image processing-based pesticide spraying method and system. The method involves controlling a drone to capture images of the pesticide to be sprayed and marking the target area within those images; acquiring the pesticide spraying coverage area at a preset altitude under windless conditions; planning the initial flight path of the drone based on the pesticide spraying coverage area and the target area; determining the target position on the initial flight path; controlling the drone to move to the target position and spraying the pesticide; acquiring and comparing images after pesticide spraying to determine offset information; replanning the flight path based on the offset information to obtain the target flight path; and controlling the drone to perform pesticide spraying operations according to the target flight path. Specifically, by fully considering the impact of wind on pesticide spraying, the method rationally controls the drone's pesticide spraying to achieve better spraying results. Attached Figure Description
[0052] Figure 1 This is a flowchart illustrating the implementation of an image processing-based pesticide spraying method according to Embodiment 1 of the present invention.
[0053] Figure 2This is a structural block diagram of a pesticide spraying method system based on image processing provided in Embodiment 2 of the present invention;
[0054] Figure 3 This is a structural block diagram of an electronic device provided in Embodiment 3 of the present invention. Detailed Implementation
[0055] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Several embodiments of the invention are illustrated in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
[0056] It should be noted that when a component is said to be "fixed to" another component, it can be directly on the other component or there may be an intervening component. When a component is said to be "connected to" another component, it can be directly connected to the other component or there may be an intervening component. The terms "vertical," "horizontal," "left," "right," and similar expressions used in this document are for illustrative purposes only.
[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0058] Example 1
[0059] Embodiment 1 of the present invention provides a pesticide spraying method based on image processing, applicable to scenarios with drones. The drones are equipped with cameras. Please refer to [link to documentation]. Figure 1 This is a flowchart of a pesticide spraying method based on image processing, specifically including steps S01 to S06.
[0060] Step S01: Control the drone to capture images of the pesticide to be sprayed and mark the target area in the images of the pesticide to be sprayed.
[0061] Specifically, the image of the area to be sprayed with pesticides is a bird's-eye view, i.e., a top-down view. If the area to be sprayed with pesticides is too large, placing the entire area in one image may result in insufficient image resolution and decreased recognition accuracy. Therefore, the area to be sprayed with pesticides can be manually divided to obtain several images with sufficient resolution. Furthermore, the target area in the image of the area to be sprayed with pesticides can be manually marked. This target area refers to the area where the crops are located. Alternatively, image recognition technology can be used to actively mark the target area.
[0062] Step S02: Obtain the pesticide spraying coverage area of the drone at a preset altitude under windless conditions, and plan the initial flight path of the drone based on the pesticide spraying coverage area and the target area.
[0063] It should be noted that when the drone operates in windless conditions, theoretically, pesticide spraying is vertically downwards, and the final shape of the pesticide sprayed on the crops can be rectangular, circular, etc. To ensure pesticide spraying efficiency, it is necessary to control the drone to operate at a preset altitude. Understandably, the higher the drone's flight altitude, the larger the area covered by pesticide spraying; the lower the drone's flight altitude, the smaller the area covered by pesticide spraying. Of course, the drone's flight altitude is not always better the higher it is; the density of pesticide action on the crops must also be considered. Furthermore, given the known pesticide spraying coverage area and target area, the initial flight path of the drone can be planned. In this embodiment of the invention, the initial flight path is an "S" shape.
[0064] Step S03: Determine the target position on the initial flight path, control the drone to move to the target position, and spray pesticides.
[0065] Specifically, the first step is to obtain meteorological information, which includes at least the prevailing wind direction and wind speed. The prevailing wind direction and wind speed can be obtained from observation data from the meteorological station or from meteorological sensors installed on site.
[0066] Based on the wind speed, the pesticide spraying coverage area, and the target area, a first safe operating area is determined. It is understood that when the wind speed is determined, since the flight altitude is known, the possible pesticide spraying coverage area with the drone as the origin can be calculated. That is, the possible pesticide spraying coverage area is centered around the origin. Combined with the boundary of the target area, the first safe operating area is determined to ensure that the pesticide will not be sprayed outside the target area.
[0067] Based on the prevailing wind direction, determine the largest rectangular area of the first region and obtain other regions besides the largest rectangular area. The largest rectangular area is in the direction perpendicular to the prevailing wind direction, that is, the prevailing wind direction is parallel to the long side of the largest rectangular area, so as to understand the lateral distribution pattern of wind speed in farmland.
[0068] Determine whether the area of other regions is greater than the preset area;
[0069] If it is determined that the area of other regions is greater than the preset area, then the largest rectangular area of the other regions is determined.
[0070] The target location is determined by the points on the initial flight path that are adjacent to the corner points and center point of the largest rectangular region. Each rectangular region has four corner points and one center point, and adjacent rectangles may share corner points.
[0071] Step S04: Acquire images after pesticide spraying and compare them to determine offset information.
[0072] In this embodiment of the invention, images of pesticide spraying at each target location are obtained, and the contour of the pesticide spraying area in the images after pesticide spraying is extracted. The images before and after pesticide spraying have certain differences, which can be identified by existing image processing techniques. In addition, Canny edge detection can be used to extract the contour.
[0073] Based on the coordinates of points on the contour, the root mean square distance between any two images is calculated, and the average value is taken as the first target evaluation value. The formula for the root mean square distance is:
[0074]
[0075] x i and y i These are the coordinates of corresponding points on the contours of the two images, where n is the number of points. The smaller the RMSD value, the more similar the contours are.
[0076] Determine whether the first target evaluation value is greater than the preset evaluation value;
[0077] If the first target evaluation value is greater than the preset evaluation value, it indicates that the shape of the pesticide sprayed area is relatively stable. Then, the K-Means algorithm is used to cluster the contours, and based on the clustering results, the predicted contour of the pesticide spraying area is determined. Specifically, firstly, feature vectors need to be extracted for each contour. These features should be able to describe key information such as the shape, size, and position of the contour. Then, K feature vectors of contours are randomly selected as initial cluster centers. For each contour feature vector, its distance to the K cluster centers is calculated. For each cluster, the mean of all contour feature vectors in that cluster is calculated and used as the new cluster center. This process is continuously updated. The category and cluster center of the contours are assigned until the cluster centers no longer change, and the clustering results are obtained. Further, after completing K-Means clustering, each contour is divided into the corresponding cluster. At this time, each cluster needs to be analyzed. For example, the number of contours in each cluster is counted and some common features (such as average geometric features, main shape patterns, etc.) are extracted. Specifically, the contour features (such as coordinate points) in each cluster are subjected to PCA analysis to find the main component directions. Then, based on these main component directions, a new contour that can represent the main shape features of the contours in the cluster is generated.
[0078] When the shape of the pesticide sprayed area is relatively stable, the center point of each pesticide spraying area is further obtained. DBSCAN clustering is then performed on these center points to determine the target center point. It should be noted that DBSCAN clustering does not require a preset number of clusters; it can actively divide the center point of each pesticide spraying area into an appropriate number of cluster centers. Furthermore, if there is only one cluster center, it indicates good positional consistency, and this cluster center is determined as the target center point. If there are two cluster centers, the distance between the two cluster centers is calculated, and it is determined whether the distance is less than a preset distance. If the distance is less than the preset distance, the midpoint between the two cluster centers is determined as the target center point. If there are more than two cluster centers, it indicates that the wind may be unstable, leading to poor positional consistency. In this case, the drone's flight altitude is lowered to reduce the impact of wind on pesticide spraying.
[0079] Furthermore, if the first target evaluation value is determined to be no greater than the preset evaluation value, it indicates that the shape of the pesticide spray is unstable, which may also be affected by wind. In this case, the drone's flight altitude will be reduced. It can be seen that when the position and shape of the pesticide spray are uncontrollable due to wind influence, this can be improved by reducing the drone's flight altitude. However, this will reduce spraying efficiency. Therefore, in this embodiment of the invention, the drone is controlled to operate at different altitudes according to the influence of wind.
[0080] It should be noted that the largest rectangular area of the first region is divided into a preset number of second regions, and the shape of the second region is rectangular;
[0081] Obtain the offset information of adjacent second regions, and determine whether adjacent second regions meet the merging requirements based on the offset information of adjacent second regions. Specifically, control the drone to move to the point on the initial flight path adjacent to the corner point and center point of each second region to obtain the image after pesticide spraying.
[0082] Based on the images after pesticide spraying, the second target evaluation value for each of the second regions is determined.
[0083] The difference between the second target evaluation values of adjacent second regions is calculated, and it is determined whether the difference is less than the threshold.
[0084] If the difference is less than the threshold, it means that the adjacent second regions meet the merging requirements;
[0085] If the difference is not less than the threshold, it means that the adjacent second region does not meet the merging requirements;
[0086] If it is determined that the adjacent second region meets the merging requirements, then when controlling the drone to perform pesticide spraying tasks in the merged second region, it will fly at the preset altitude.
[0087] If it is determined that the adjacent second region does not meet the merging requirements, the drone is controlled to fly at a lower altitude.
[0088] Step S05: Based on the offset information, replan the flight path to obtain the target flight path.
[0089] Specifically, after obtaining the outline of the predicted pesticide spraying area and the target center point, the flight path is replanned based on the target area to obtain the target flight path. In order to ensure the efficiency and order of the drone operation, after the pesticide spraying task at the same flight altitude is completed, the pesticide spraying task at another flight altitude is executed. When the drone passes over the location where pesticides have been sprayed, it will not spray pesticides again.
[0090] Step S06: Control the drone to perform pesticide spraying operations according to the target flight path.
[0091] In summary, the pesticide spraying method based on image processing proposed in this invention involves controlling a drone to capture images of the pesticide to be sprayed and marking the target area in the images; acquiring the pesticide spraying coverage area of the drone at a preset altitude under windless conditions; planning the initial flight path of the drone based on the pesticide spraying coverage area and the target area; determining the target position on the initial flight path; controlling the drone to move to the target position and spraying pesticide; acquiring and comparing images after pesticide spraying to determine offset information; replanning the flight path based on the offset information to obtain the target flight path; and controlling the drone to perform pesticide spraying operations based on the target flight path. Specifically, by fully considering the influence of wind on pesticide spraying, the method reasonably controls the pesticide spraying of the drone, resulting in better pesticide spraying effects.
[0092] Example 2
[0093] Embodiment 2 of the present invention provides a pesticide spraying system 200 based on image processing. Please refer to [link / reference]. Figure 2 Here is a structural block diagram of an image processing-based pesticide spraying system 200, which includes:
[0094] The first control module 21 is used to control the drone to capture images of pesticides to be sprayed and to mark the target area in the images of pesticides to be sprayed.
[0095] The first path planning module 22 is used to obtain the pesticide spraying coverage area of the drone at a preset altitude under windless conditions, and plan the initial flight path of the drone based on the pesticide spraying coverage area and the target area.
[0096] The first determining module 23 is used to determine the target position on the initial flight path, control the drone to move to the target position, and spray pesticides;
[0097] The second determining module 24 is used to acquire images after pesticide spraying, compare them, and determine the offset information;
[0098] The second path planning module 25 is used to replan the flight path based on the offset information to obtain the target flight path;
[0099] The second control module 26 is used to control the drone to perform pesticide spraying operations according to the target flight path. After the pesticide spraying task at the same flight altitude is completed, the pesticide spraying task at another flight altitude is executed. When the drone passes the location where pesticides have been sprayed, it will not spray pesticides again.
[0100] Furthermore, in some other embodiments of the present invention, the first determining module 23 includes:
[0101] The first acquisition unit is used to acquire meteorological information, which includes at least the prevailing wind direction and wind speed.
[0102] The first determining unit is used to determine a first safe operating area based on the wind speed, the pesticide spraying coverage area, and the target area.
[0103] The second determining unit is used to determine the largest rectangular area of the first region based on the prevailing wind direction, and to obtain other regions besides the largest rectangular area;
[0104] The first judgment unit is used to determine whether the area of other areas is greater than the preset area;
[0105] The third determining unit is used to determine the largest rectangular area of other areas if the area of other areas is determined to be greater than the preset area.
[0106] The fourth determining unit is used to determine the points on the initial flight path that are adjacent to the corner points and center points of the largest rectangular region as the target positions.
[0107] Furthermore, in some other embodiments of the present invention, the second determining module 24 includes:
[0108] The second acquisition unit is used to acquire images of pesticide spraying at each of the target locations and extract the outline of the pesticide spraying area in the images.
[0109] The calculation unit is used to calculate the root mean square distance between any two images based on the coordinates of points on the contour, and take the average value as the first target evaluation value.
[0110] The second judgment unit is used to determine whether the first target evaluation value is greater than the preset evaluation value;
[0111] The first clustering unit is used to cluster the contour using the K-Means algorithm if the first target evaluation value is determined to be greater than the preset evaluation value, and to determine the contour of the predicted pesticide spraying area based on the clustering results.
[0112] The second clustering unit is used to obtain the center point of each pesticide spraying area, and performs DBSCAN clustering on the center points of each pesticide spraying area to determine the target center point.
[0113] Furthermore, in some other embodiments of the present invention, the second determining module 24 includes:
[0114] The control unit is used to control the drone to reduce its flight altitude if it determines that the first target evaluation value is not greater than a preset evaluation value.
[0115] Furthermore, in some other embodiments of the present invention, the control unit includes:
[0116] The sub-unit is used to divide the largest rectangular region of the first region into a preset number of second regions, wherein the shape of the second region is rectangular.
[0117] The judgment subunit is used to obtain the offset information of the adjacent second regions, and to determine whether the adjacent second regions meet the merging requirements based on the offset information of the adjacent second regions. Specifically, the drone is controlled to move to the point on the initial flight path adjacent to the corner point and center point of each second region to obtain the image after pesticide spraying.
[0118] Based on the images after pesticide spraying, the second target evaluation value for each of the second regions is determined.
[0119] The difference between the second target evaluation values of adjacent second regions is calculated, and it is determined whether the difference is less than the threshold.
[0120] If the difference is less than the threshold, it means that the adjacent second regions meet the merging requirements;
[0121] If the difference is not less than the threshold, it means that the adjacent second region does not meet the merging requirements;
[0122] The first control subunit is used to control the drone to fly at the preset altitude when performing pesticide spraying tasks in the merged second area if it is determined that the adjacent second areas meet the merging requirements.
[0123] The second control subunit is used to control the UAV to fly at a lower altitude if it is determined that the adjacent second region does not meet the merging requirements.
[0124] Example 3
[0125] Embodiment 3 of the present invention proposes an electronic device, please refer to [link / reference]. Figure 3 This is a structural block diagram of an electronic device, including a memory 20, a processor 10, and a computer program 30 stored in the memory and executable on the processor. When the processor 10 executes the computer program 30, it implements the pesticide spraying method based on image processing as described above.
[0126] In some embodiments, the processor 10 may be a central processing unit (CPU), controller, microcontroller, microprocessor or other data processing chip, used to run program code stored in memory 20 or process data, such as executing access restriction programs.
[0127] The memory 20 includes at least one type of readable storage medium, such as flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 20 can be an internal storage unit of an electronic device, such as the hard disk of the electronic device. In other embodiments, the memory 20 can also be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. Furthermore, the memory 20 can include both internal and external storage units of the electronic device. The memory 20 can be used not only to store application software and various types of data of the electronic device, but also to temporarily store data that has been output or will be output.
[0128] This invention also proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the image processing-based pesticide spraying method described above.
[0129] Those skilled in the art will understand that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequential list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can mean any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0130] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0131] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0132] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0133] The above embodiments merely illustrate several implementation methods of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this patent should be determined by the appended claims.
Claims
1. A pesticide spraying method based on image processing, characterized in that, Applied to scenarios involving drones, wherein the drones are equipped with cameras, the method includes: Control the drone to capture images of the pesticide to be sprayed, and mark the target area in the images of the pesticide to be sprayed; Under windless conditions, the pesticide spraying coverage area of the drone at a preset altitude is obtained, and the initial flight path of the drone is planned based on the pesticide spraying coverage area and the target area. Determine the target location on the initial flight path, control the drone to move to the target location, and spray pesticides; Acquire images of pesticides after spraying, compare them, and determine the offset information; Based on the offset information, the flight path is replanned to obtain the target flight path; Control the drone to perform pesticide spraying operations according to the target flight path; The step of determining the target position on the initial flight path includes: Obtain meteorological information, which includes at least the prevailing wind direction and wind speed; Based on the wind speed, the pesticide spraying coverage area, and the target area, a first safe operating area is determined. Based on the prevailing wind direction, determine the largest rectangular area of the first region, and obtain the other regions excluding the largest rectangular area; Determine whether the area of other regions is greater than the preset area; If it is determined that the area of other regions is greater than the preset area, then the largest rectangular area of the other regions is determined. The points on the initial flight path adjacent to the corner and center points of the largest rectangular region are determined as the target positions; The step of acquiring images after pesticide spraying, comparing them, and determining offset information includes: Acquire images of the pesticide sprayed at each of the target locations, and extract the outline of the pesticide sprayed area from the images. Based on the coordinates of points on the contour, calculate the root mean square distance between any two images, and take the average value as the first target evaluation value; Determine whether the first target evaluation value is greater than the preset evaluation value; If the first target evaluation value is determined to be greater than the preset evaluation value, the K-Means algorithm is used to cluster the contour, and the contour of the predicted pesticide spraying area is determined based on the clustering results. Obtain the center point of each pesticide spraying area, perform DBSCAN clustering on the center points of each pesticide spraying area, and determine the target center point.
2. The pesticide spraying method based on image processing according to claim 1, characterized in that, After the step of determining whether the first target evaluation value is greater than the preset evaluation value, the method further includes: If the evaluation value of the first target is determined to be no greater than the preset evaluation value, the flight altitude of the drone will be reduced.
3. The pesticide spraying method based on image processing according to claim 2, characterized in that, The step of controlling the drone to reduce its flight altitude if the first target evaluation value is determined to be no greater than a preset evaluation value includes: The largest rectangular region of the first region is divided into a preset number of second regions, and the shape of the second region is rectangular. Obtain the offset information of the adjacent second regions, and determine whether the adjacent second regions meet the merging requirements based on the offset information of the adjacent second regions; If it is determined that the adjacent second region meets the merging requirements, then when controlling the drone to perform pesticide spraying tasks in the merged second region, it will fly at the preset altitude. If it is determined that the adjacent second region does not meet the merging requirements, the drone is controlled to fly at a lower altitude.
4. The pesticide spraying method based on image processing according to claim 3, characterized in that, The step of determining whether adjacent second regions meet the merging requirements based on the offset information of adjacent second regions includes: Control the drone to move to a point on the initial flight path adjacent to the corner and center points of each of the second regions, and acquire images after pesticide spraying; Based on the images after pesticide spraying, the second target evaluation value for each of the second regions is determined. The difference between the second target evaluation values of adjacent second regions is calculated, and it is determined whether the difference is less than the threshold. If the difference is less than the threshold, it means that the adjacent second regions meet the merging requirements; If the difference is not less than the threshold, it means that the adjacent second region does not meet the merging requirements.
5. The pesticide spraying method based on image processing according to claim 4, characterized in that, After completing a pesticide spraying mission at the same flight altitude, the drone will then perform a pesticide spraying mission at another flight altitude. When the drone passes over a previously sprayed pesticide location, it will not spray pesticides again.
6. A pesticide spraying system based on image processing, characterized in that, The system for implementing the image processing-based pesticide spraying method as described in any one of claims 1-5 includes: The first control module is used to control the drone to capture images of pesticides to be sprayed and to mark the target area in the images of pesticides to be sprayed. The first path planning module is used to obtain the pesticide spraying coverage area of the drone at a preset altitude under windless conditions, and plan the initial flight path of the drone based on the pesticide spraying coverage area and the target area. The first determining module is used to determine the target position on the initial flight path, control the drone to move to the target position, and spray pesticides; The second determining module is used to acquire images after pesticide spraying, compare them, and determine the offset information; The second path planning module is used to replan the flight path based on the offset information to obtain the target flight path; The second control module is used to control the drone to perform pesticide spraying operations according to the target flight path.
7. A computer-readable storage medium, characterized in that, include: The readable storage medium stores one or more programs that, when executed by a processor, implement the image processing-based pesticide spraying method as described in any one of claims 1-5.
8. An electronic device, characterized in that, The electronic device includes a memory and a processor, wherein: The memory is used to store computer programs; When the processor executes the computer program stored in the memory, it implements the pesticide spraying method based on image processing as described in any one of claims 1-5.
Citation Information
Patent Citations
Unmanned aerial vehicle pesticide spray path planning system and unmanned aerial vehicle pesticide spray path planning method
CN106327024A
A real-time self-feedback UAV precision spraying operation method and system
CN118092464A