A spraying device and method for a line-of-sight target crop protection unmanned aerial vehicle
By using visual recognition and dynamic adjustment of the nozzles of the row-to-target agricultural drone spraying device, the problem of the inability of traditional agricultural drone nozzles to be adjusted in real time has been solved, achieving precise spraying and efficient utilization of pesticides.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SOUTH CHINA AGRICULTURAL UNIVERSITY
- Filing Date
- 2026-04-22
- Publication Date
- 2026-07-31
AI Technical Summary
Traditional plant protection drone nozzles cannot dynamically adjust according to the actual direction of crop rows, the position of plant targets, and changes in terrain in farmland, resulting in inaccurate spraying and low pesticide utilization.
The plant protection drone spraying device adopts row-to-target spraying. It obtains crop row information in real time through a visual recognition module, drives the nozzle to make horizontal and pitch adjustments, and realizes precise angle adjustment and closed-loop control of the nozzle.
It improves spraying accuracy, reduces pesticide waste, and enhances the adaptability of agricultural drones to complex farmland environments.
Smart Images

Figure CN122482008A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of agricultural drone operation technology, specifically to a row-to-target spraying device and method for agricultural drones. Background Technology
[0002] In recent years, agricultural drones, as an emerging agricultural plant protection tool, have been rapidly and widely applied and developed in the field of agricultural production due to their many significant advantages, such as fast operation speed, flexible mobility, safe operation, unaffected by terrain and environmental factors, and energy saving and environmental protection.
[0003] However, with the expanding application of agricultural drones, the problem of insufficient spraying accuracy has become increasingly prominent. In traditional agricultural drone operations, fixed nozzles are mostly used for spraying, and the spray width and angle cannot be dynamically adjusted according to the actual working conditions throughout the flight. The fundamental limitation of fixed nozzles lies in the lack of dynamic adjustment capability. They cannot adjust the spray width and angle in real time according to the actual direction of crop rows in the field, the specific location of the target plants, or the undulations of the terrain to actively adapt to complex working environments. This limitation makes it difficult for the pesticide to achieve precise target coverage, resulting in low pesticide utilization and serious waste, thereby reducing the overall operational effectiveness of agricultural drones. Summary of the Invention
[0004] The purpose of this invention is to overcome the above-mentioned problems and provide a row-to-target spraying device for agricultural drones. This spraying device can achieve rapid and precise angle adjustment of the nozzle, calculate the real spatial deviation between the crop row and the spraying target line through real-time visual information, and perform closed-loop compensation to achieve precise row-to-target spraying during agricultural drone operations, so as to adapt to different operating objects and improve spraying accuracy and system reliability.
[0005] Another objective of this invention is to provide a method for spraying agricultural drones that target rows and targets the plant.
[0006] The objective of this invention is achieved through the following technical solution: A row-and-target-target agricultural drone spraying device includes a drone body and a spraying mechanism, a row-and-target-target adjustment mechanism, and a visual recognition module installed on the drone body. The row-to-target spraying mechanism includes a mounting rod and multiple row-to-target spraying units mounted on the mounting rod. Each row-to-target spraying unit includes a horizontal adjustment mechanism for driving the nozzle of the spraying mechanism to swing horizontally and a pitch adjustment mechanism for driving the nozzle of the spraying mechanism to swing vertically. The nozzle of the spraying mechanism is connected to the drive end of the pitch adjustment mechanism, and the pitch adjustment mechanism is connected to the drive end of the horizontal adjustment mechanism. The visual recognition module is used to acquire images of the crops below and upload them to the central control system. The central control system processes the images, identifies the center line of the crop row, calculates the horizontal deviation angle and pitch deviation angle between the crop and the reference direction, and generates corresponding control commands. The horizontal adjustment mechanism and the pitch adjustment mechanism execute the corresponding control commands, respectively driving the nozzle of the spraying mechanism to swing horizontally and vertically.
[0007] In a preferred embodiment of the present invention, the horizontal adjustment mechanism includes a horizontal drive servo and a horizontal transmission assembly. The horizontal drive servo is fixedly mounted on a mounting rod via a mounting base. The horizontal transmission assembly includes a horizontal transmission belt and two horizontal transmission pulleys. One horizontal transmission pulley is connected to the output shaft of the horizontal drive servo, and the other horizontal transmission pulley is rotatably connected to the mounting base. The axis of the horizontal transmission pulley extends vertically. With the above structure, using a horizontal drive servo in conjunction with the transmission assembly consisting of the horizontal transmission belt and horizontal transmission pulleys, the servo power is smoothly transmitted to the rotating components, driving the nozzle to swing in the horizontal plane. This enables rapid response and precise angle adjustment of the nozzle in the horizontal direction, meeting the real-time tracking requirements of crop row direction.
[0008] Furthermore, the pitch adjustment mechanism includes a pitch mounting bracket, a pitch drive servo, and a pitch transmission assembly. The pitch mounting bracket is fixedly connected to another horizontal transmission pulley. The top of the pitch mounting bracket is slidably mounted on the mounting base in an arc shape, and the center of the arc-shaped sliding of the pitch mounting bracket is collinear with the axis of the other horizontal transmission pulley. The pitch drive servo is fixedly mounted on the pitch mounting bracket. The pitch transmission assembly includes a pitch transmission belt and two pitch transmission pulleys. One of the pitch transmission pulleys is connected to the output shaft of the pitch drive servo via a synchronous transmission structure, and the other pitch transmission pulley is rotatably connected to the pitch mounting bracket. The axis of the pitch transmission pulley extends horizontally. The nozzle of the spraying mechanism is fixedly connected to the bottom of the pitch transmission belt. Through the above structure, the pitch drive servo drives the pitch transmission pulley via the synchronous transmission structure, causing the pitch transmission belt to circulate in the vertical plane. The nozzle fixed at the bottom of the belt then swings vertically, achieving a wide range and smooth adjustment of the nozzle's pitch angle, effectively compensating for target deviation caused by terrain undulations or changes in UAV altitude.
[0009] A method for spraying agricultural drones targeting rows and targets includes the following steps: The agricultural drone flies to the airspace above the crops according to the planned path, acquires images of the crops below through the visual recognition module, and uploads them to the central control system; The central control system processes the image, identifies the center line of the crop row, calculates its horizontal deviation angle and pitch deviation angle from the reference direction, and generates corresponding control commands. The horizontal adjustment mechanism and the pitch adjustment mechanism execute the corresponding control commands, respectively driving the nozzle of the spraying mechanism to swing horizontally and vertically. The actual deflection angle of the nozzle is detected in real time by an angle sensor and fed back to the central control system. The central control system compares the actual deflection angle with the desired deflection angle to form a closed-loop control, so as to dynamically adjust the nozzle orientation and achieve precise row-to-target spraying.
[0010] In a preferred embodiment of the present invention, the agricultural drone needs to be calibrated before operation. The central control system drives the row-to-target adjustment mechanism to return the nozzle to the mechanical zero position, drives the nozzle to perform scanning motion within a certain range of horizontal and pitch angles, records the readings of the angle sensor, establishes a precise mapping relationship table between control commands and actual angles, and establishes a precise mapping relationship between the control signal pulse width and the actual angle. ,in, This represents the pulse width corresponding to the servo motor's center position. This is the pulse width when the output shaft rotation angle is the actual angle. This is the proportionality coefficient.
[0011] In a preferred embodiment of the present invention, the central control system, based on camera parameters and the current flight altitude and attitude data of the agricultural drone, maps the center line of the crop row in the extracted two-dimensional image onto a horizontal plane in a three-dimensional world coordinate system through inverse perspective transformation, thereby obtaining the actual target line of the crop row on the horizontal plane. The system calculates the angle between the actual target line and the preset reference direction in the world coordinate system to obtain the horizontal deviation angle in the world coordinate system. By reading the drone's attitude data, the system calculates whether the crop row meets a certain flight altitude and adjusts the nozzle pitch angle in a timely manner. The reference direction is the preset flight path direction or the projection of the forward axis of the drone's body coordinate system onto the horizontal plane.
[0012] Furthermore, after acquiring crop row images, the images undergo color space conversion and threshold segmentation preprocessing. The crop row features are enhanced using deep learning algorithms. Then, Hough transform or least squares line fitting algorithms are used to fit a straight line representing the direction of the crop row as the center line of the crop row.
[0013] Furthermore, the central control system implements inverse perspective transformation through a homography matrix H. This homography matrix H is calculated from the camera's intrinsic parameters and extrinsic parameters relative to the horizontal plane. The homography matrix H maps image pixel coordinates to the world coordinate system, thus realizing the transformation from two-dimensional pixel coordinates to three-dimensional spatial coordinates. The conversion is then performed, and two points on the center line of the crop row are calculated. The direction vector of the line is obtained. Finally, calculate the horizontal deviation angle. and pitch deviation angle ; Wherein, assuming the reference direction is along the X-axis, the reference vector is: The direction vector of the crop row centerline is The direction vector corresponding to the vertical vanishing point is Calculated from the intrinsic parameter matrix .
[0014] In a preferred embodiment of the present invention, the camera parameter matrix is obtained in Matlab using a checkerboard calibration method during camera calibration. Along with distortion coefficients, used to correct camera distortion and determine the camera's mounting extrinsic parameters relative to the agricultural drone body, and the central control system to calculate and realize two-dimensional pixel coordinates. to three-dimensional coordinates The transformation occurs when points in the world coordinate system lie on the same plane. Let s be the scale factor, then the homography matrix H is calculated as follows: .
[0015] In a preferred embodiment of the present invention, the central control system employs a fuzzy PID control algorithm, dynamically adjusts the PID parameters according to the magnitude and rate of change of the deviation angle, obtains the control quantity through PID calculation, and generates a corresponding PWM signal based on the precise mapping relationship between the pre-calibrated control quantity and the servo motor PWM pulse width, outputting it to the servo adjustment module to drive the nozzle deflection to achieve stable and rapid angle adjustment.
[0016] Compared with the prior art, the present invention has the following advantages: 1. This invention acquires real-time images of the crops below through a visual recognition module. The central control system identifies the center line of the crop row and calculates the horizontal and vertical deviation angles. This drives the horizontal adjustment mechanism and the vertical adjustment mechanism to adjust the spray head in the horizontal and vertical directions, respectively. This achieves dynamic tracking of the spray head's spray angle to the crop row and the target, overcoming the shortcomings of traditional fixed spray heads that cannot be adjusted in real time. This allows the pesticide to accurately cover the target crop, significantly improving spraying accuracy and pesticide utilization, and reducing pesticide waste.
[0017] 2. The spraying device of the present invention can actively adapt to the actual direction of crop rows, plant position and terrain changes in farmland based on visual recognition results. By adjusting the nozzle in real time with two degrees of freedom, horizontal and vertical, the device can maintain good target performance under different crop row spacing, different growth stages and complex terrain conditions, thus enhancing the adaptability of plant protection drones to diverse farmland operation environments. Attached Figure Description
[0018] Figure 1 This is a three-dimensional structural diagram of the row-to-target agricultural drone spraying device of the present invention.
[0019] Figure 2 This is a three-dimensional structural schematic diagram of the row-target adjustment mechanism of the present invention. Detailed Implementation
[0020] To enable those skilled in the art to fully understand the technical solutions of the present invention, the present invention will be further described below in conjunction with embodiments and accompanying drawings, but the embodiments of the present invention are not limited thereto.
[0021] Example 1 Combination Figure 1-2 The row-to-target agricultural drone spraying device of this embodiment includes a drone body 1 and a spraying mechanism, a row-to-target adjustment mechanism, and a visual recognition module disposed on the drone body 1. The drone body 1 is equipped with a main control system and a power supply module. The main control system adopts a Raspberry Pi, and specific details can be found in existing technologies. The power supply module provides power to the spraying mechanism, the row-to-target adjustment mechanism, and the visual recognition module. Specifically, the power supply module includes a DC power supply and a power regulator board. The DC power supply provides a 14.4V DC voltage by connecting four 5000mAh 21700 lithium batteries in series. The power regulator board is an uninterruptible power supply expansion board (UPS HAT(E)), which steps down the 14.4V DC voltage through an internal high-power step-down chip to provide a stable 5V / 6A power output to the Raspberry Pi.
[0022] Combination Figure 1-2 The spraying mechanism includes a medicine tank, a medicine tube, and a nozzle 2; the row-to-target spraying mechanism includes a mounting rod 3 and multiple row-to-target spraying units mounted on the mounting rod 3. Each row-to-target spraying unit includes a horizontal adjustment mechanism for driving the nozzle 2 of the spraying mechanism to swing horizontally and a pitch adjustment mechanism for driving the nozzle 2 of the spraying mechanism to swing vertically. The nozzle 2 of the spraying mechanism is connected to the drive end of the pitch adjustment mechanism, and the pitch adjustment mechanism is connected to the drive end of the horizontal adjustment mechanism.
[0023] Combination Figure 1-2 The visual recognition module is a high-definition camera 4, which is an IMX219 sensor camera 4. It is connected to the Raspberry Pi through a camera CSI cable and transmits the collected image data to the Raspberry Pi's internal storage in real time. The Raspberry Pi reads the raw data of the agricultural drone during flight from the MPU6050 through the Raspberry Pi I2C interface, and then calculates the heading angle of the agricultural drone during flight from the Raspberry Pi.
[0024] Combination Figure 1-2The horizontal adjustment mechanism includes a horizontal drive servo motor 5 and a horizontal transmission assembly. The horizontal drive servo motor 5 is fixedly mounted on the mounting rod 3 via a mounting base 6. The horizontal transmission assembly includes a horizontal transmission belt 7 and two horizontal transmission pulleys 8. One horizontal transmission pulley 8 is connected to the output shaft of the horizontal drive servo motor 5, and the other horizontal transmission pulley 8 is rotatably connected to the mounting base 6. The axis of the horizontal transmission pulley 8 extends vertically. Through this structure, using the horizontal drive servo motor 5 in conjunction with the transmission assembly consisting of the horizontal transmission belt 7 and the horizontal transmission pulleys 8, the servo motor power is smoothly transmitted to the rotating components, driving the nozzle 2 to swing in the horizontal plane. This enables rapid response and precise angle adjustment of the nozzle 2 in the horizontal direction, meeting the real-time tracking requirements of crop row direction.
[0025] Furthermore, the pitch adjustment mechanism includes a pitch mounting bracket 9 (partial structure hidden in the figure), a pitch drive servo 10, and a pitch transmission assembly. The pitch mounting bracket 9 is fixedly connected to another horizontal transmission pulley 8. The top of the pitch mounting bracket 9 is slidably mounted on the mounting base 6 in an arc shape, and the center of the arc-shaped sliding of the pitch mounting bracket 9 is collinear with the axis of the other horizontal transmission pulley 8. The pitch drive servo 10 is fixedly mounted on the pitch mounting bracket 9. The pitch transmission assembly includes a pitch transmission belt 11 and two pitch transmission pulleys 12. One pitch transmission pulley 12 is connected to the output shaft of the pitch drive servo 10 through a synchronous transmission structure, and the other pitch transmission pulley 12 is rotatably connected to the pitch mounting bracket 9. The axis of the pitch transmission pulley 12 extends horizontally. The nozzle 2 of the spraying mechanism is fixedly connected to the bottom of the pitch transmission belt 11. Through the above structure, the pitch drive servo 10 drives the pitch drive pulley 12 through the synchronous transmission structure, which in turn drives the pitch drive belt 11 to circulate in the vertical plane. The nozzle 2, which is fixed at the bottom of the belt, swings vertically accordingly, realizing a wide range and smooth adjustment of the pitch angle of the nozzle 2, effectively compensating for the target deviation caused by terrain undulations or changes in the altitude of the UAV.
[0026] Example 2 The row-to-target agricultural drone spraying method of this embodiment includes the following steps: The agricultural drone flies to the top of the crops according to the planned path, acquires images of the crops below through the visual recognition module, and uploads them to the central control system.
[0027] The central control system processes the image, identifies the center line of the crop row, calculates its horizontal and vertical deviation angles from the reference direction, and generates corresponding control commands. The horizontal adjustment mechanism and the vertical adjustment mechanism execute the corresponding control commands, respectively driving the nozzle 2 of the spraying mechanism to swing horizontally and vertically.
[0028] The actual deflection angle of the nozzle 2 is detected in real time by an angle sensor and fed back to the central control system. The central control system compares the actual deflection angle with the expected deflection angle to form a closed-loop control, so as to dynamically adjust the position of the nozzle 2 and achieve precise row-to-target spraying.
[0029] Furthermore, after acquiring crop row images, the images undergo color space conversion and threshold segmentation preprocessing. The crop row features are enhanced using deep learning algorithms. Then, Hough transform or least squares line fitting algorithms are used to fit a straight line representing the direction of the crop row as the center line of the crop row.
[0030] Furthermore, the agricultural drone needs to be calibrated before operation. The central control system drives the row-to-target adjustment mechanism to return the nozzle 2 to the mechanical zero position, drives the nozzle 2 to perform scanning motion within a certain range of horizontal and pitch angles, records the readings of the angle sensor, and establishes a precise mapping relationship table between control commands and actual angles. The precise mapping relationship between the control signal pulse width and the actual angle is as follows: ,in, This represents the pulse width corresponding to the servo motor's center position. This is the pulse width when the output shaft rotation angle is the actual angle. This is the proportionality coefficient.
[0031] Furthermore, based on the parameters of camera 4 and the current flight altitude and attitude data of the agricultural drone, the central control system maps the center line of the crop row in the extracted two-dimensional image onto the horizontal plane in the three-dimensional world coordinate system through inverse perspective transformation, thereby obtaining the actual target line of the crop row on the horizontal plane. The system calculates the angle between the actual target line and the preset reference direction in the world coordinate system, thereby obtaining the horizontal deviation angle in the world coordinate system. By reading the drone's attitude data, the system calculates whether the crop row meets a certain flight altitude and adjusts the pitch angle of the nozzle 2 in a timely manner. The reference direction is the preset flight path direction or the projection of the forward axis of the drone's body coordinate system onto the horizontal plane.
[0032] Furthermore, the central control system implements inverse perspective transformation through a homography matrix. The homography matrix H is calculated from the intrinsic parameters of camera 4 and the extrinsic parameters of camera 4 relative to the horizontal plane. The homography matrix H maps the image pixel coordinates to the world coordinate system, realizing the transformation from two-dimensional pixel coordinates to three-dimensional spatial coordinates. The conversion is then performed, and two points on the center line of the crop row are calculated. The direction vector of the line is obtained. Finally, calculate the horizontal deviation angle. and pitch deviation angle ; Wherein, assuming the reference direction is along the X-axis, the reference vector is: The direction vector of the crop row centerline is The direction vector corresponding to the vertical vanishing point is Calculated from the intrinsic parameter matrix .
[0033] Furthermore, during the calibration of camera 4, a checkerboard calibration method was used to obtain the parameter matrix of camera 4 in Matlab. The distortion coefficients are used to correct distortion in camera 4 and determine the mounting parameters of camera 4 relative to the agricultural drone body, and the central control system calculates and realizes the two-dimensional pixel coordinates. to three-dimensional coordinates The transformation occurs when points in the world coordinate system lie on the same plane. Let s be the scale factor, then the homography matrix H is calculated as follows: .
[0034] Furthermore, the central control system adopts a fuzzy PID control algorithm, dynamically adjusts the PID parameters according to the magnitude and rate of change of the deviation angle, obtains the control quantity through PID calculation, and generates a corresponding PWM signal based on the precise mapping relationship between the pre-calibrated control quantity and the servo motor PWM pulse width, outputting it to the servo adjustment module to drive the nozzle 2 to deflect and achieve stable and rapid angle adjustment.
[0035] The present invention has the following beneficial effects: 1. This invention acquires real-time images of the crops below through a visual recognition module. The central control system identifies the center line of the crop row and calculates the horizontal and vertical deviation angles. This drives the horizontal adjustment mechanism and the vertical adjustment mechanism to adjust the spray head in the horizontal and vertical directions, respectively. This achieves dynamic tracking of the spray head's spray angle to the crop row and the target, overcoming the shortcomings of traditional fixed spray heads that cannot be adjusted in real time. This allows the pesticide to accurately cover the target crop, significantly improving spraying accuracy and pesticide utilization, and reducing pesticide waste.
[0036] 2. The spraying device of the present invention can actively adapt to the actual direction of crop rows, plant position and terrain changes in farmland based on visual recognition results. By adjusting the nozzle in real time with two degrees of freedom, horizontal and vertical, the device can maintain good target performance under different crop row spacing, different growth stages and complex terrain conditions, thus enhancing the adaptability of plant protection drones to diverse farmland operation environments.
[0037] 3. By integrating the transmission mechanisms for both horizontal and pitch degrees of freedom into a compact space, the mass and rotational inertia of moving parts are significantly reduced, thereby improving the system's response speed and dynamic performance.
[0038] The above are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above content. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.
Claims
1. A spraying device for a line-to-target agricultural unmanned aerial vehicle, characterized in that, Includes the drone itself and the spraying mechanism, row-to-target adjustment mechanism, and visual recognition module installed on the drone itself; The row-to-target spraying mechanism includes a mounting rod and multiple row-to-target spraying units mounted on the mounting rod. Each row-to-target spraying unit includes a horizontal adjustment mechanism for driving the nozzle of the spraying mechanism to swing horizontally and a pitch adjustment mechanism for driving the nozzle of the spraying mechanism to swing vertically. The nozzle of the spraying mechanism is connected to the drive end of the pitch adjustment mechanism, and the pitch adjustment mechanism is connected to the drive end of the horizontal adjustment mechanism. The visual recognition module is used to acquire images of the crops below and upload them to the central control system. The central control system processes the images, identifies the center line of the crop row, calculates the horizontal deviation angle and pitch deviation angle between the crop and the reference direction, and generates corresponding control commands. The horizontal adjustment mechanism and the pitch adjustment mechanism execute the corresponding control commands, respectively driving the nozzle of the spraying mechanism to swing horizontally and vertically.
2. The row-to-target spraying device for the plant protection UAV according to claim 1, characterized in that, The horizontal adjustment mechanism includes a horizontal drive servo and a horizontal transmission assembly. The horizontal drive servo is fixedly mounted on a mounting rod via a mounting base. The horizontal transmission assembly includes a horizontal transmission belt and two horizontal transmission pulleys. One horizontal transmission pulley is connected to the output shaft of the horizontal drive servo, and the other horizontal transmission pulley is rotatably connected to the mounting base. The axis of the horizontal transmission pulley extends vertically.
3. The row-to-target spraying device for the plant protection UAV according to claim 2, characterized in that, The pitch adjustment mechanism includes a pitch mounting bracket, a pitch drive servo, and a pitch transmission assembly. The pitch mounting bracket is fixedly connected to another horizontal transmission pulley. The top of the pitch mounting bracket is slidably mounted on the mounting base in an arc shape, and the center of the arc-shaped sliding of the pitch mounting bracket is collinear with the axis of the other horizontal transmission pulley.
4. The row-to-target spraying device for the plant protection UAV according to claim 3, characterized in that, The pitch drive servo is fixedly mounted on the pitch mounting bracket. The pitch transmission assembly includes a pitch transmission belt and two pitch transmission pulleys. One pitch transmission pulley is connected to the output shaft of the pitch drive servo via a synchronous transmission structure, and the other pitch transmission pulley is rotatably connected to the pitch mounting bracket. The axis of the pitch transmission pulley extends horizontally. The nozzle of the spraying mechanism is fixedly connected to the bottom of the pitch transmission belt.
5. The method for spraying on the target of any one of claims 1-4, characterized in that, Includes the following steps: The agricultural drone flies to the airspace above the crops according to the planned path, acquires images of the crops below through the visual recognition module, and uploads them to the central control system; The central control system processes the image, identifies the center line of the crop row, calculates its horizontal deviation angle and pitch deviation angle from the reference direction, and generates corresponding control commands. The horizontal adjustment mechanism and the pitch adjustment mechanism execute the corresponding control commands, respectively driving the nozzle of the spraying mechanism to swing horizontally and vertically. The actual deflection angle of the nozzle is detected in real time by an angle sensor and fed back to the central control system. The central control system compares the actual deflection angle with the desired deflection angle to form a closed-loop control, so as to dynamically adjust the nozzle orientation and achieve precise row-to-target spraying.
6. The method for spraying agricultural drones targeting rows and targets according to claim 5, characterized in that, Before operation, agricultural drones need to be calibrated. The central control system drives the row-to-target adjustment mechanism to return the nozzle to the mechanical zero position, drives the nozzle to scan within a certain horizontal and pitch angle range, records the angle sensor readings, and establishes a precise mapping relationship between control commands and actual angles. The precise mapping relationship between control signal pulse width and actual angles is also established. ,in, This represents the pulse width corresponding to the servo motor's center position. This is the pulse width when the output shaft rotation angle is the actual angle. This is the proportionality coefficient.
7. The method for spraying agricultural drones targeting rows and targets according to claim 5, characterized in that, The central control system, based on camera parameters and the current flight altitude and attitude data of the agricultural drone, maps the center line of the crop row in the extracted two-dimensional image onto a horizontal plane in a three-dimensional world coordinate system through inverse perspective transformation, obtaining the actual target line of the crop row on the horizontal plane. It calculates the angle between the actual target line and the preset reference direction in the world coordinate system, obtaining the horizontal deviation angle in the world coordinate system. By reading the drone's attitude data, it calculates whether the crop row meets a certain flight altitude and adjusts the nozzle pitch angle in a timely manner. The reference direction is the preset flight path direction or the projection of the forward axis of the drone's body coordinate system onto the horizontal plane.
8. The method for spraying agricultural drones targeting rows and targets according to claim 7, characterized in that, After acquiring crop row images, the images undergo color space conversion and threshold segmentation preprocessing. The crop row features are enhanced using deep learning algorithms. Then, Hough transform or least squares line fitting algorithms are used to fit a straight line representing the direction of the crop row as the center line of the crop row.
9. The method for spraying agricultural drones targeting rows and targets according to claim 7, characterized in that, The central control system implements inverse perspective transformation through a homography matrix H. This homography matrix H is calculated from the camera's intrinsic parameters and extrinsic parameters relative to the horizontal plane. The homography matrix H maps image pixel coordinates to the world coordinate system, realizing the transformation from two-dimensional pixel coordinates to three-dimensional spatial coordinates. The conversion is then performed, and two points on the center line of the crop row are calculated. The direction vector of the straight line is obtained, and finally the horizontal deviation angle and pitch deviation angle are calculated.
10. The method for spraying agricultural drones targeting rows and targets according to claim 5, characterized in that, The camera was calibrated using a checkerboard calibration method, and the camera parameter matrix was obtained in Matlab. Along with distortion coefficients, used to correct camera distortion and determine the camera's mounting extrinsic parameters relative to the agricultural drone body, and the central control system to calculate and realize two-dimensional pixel coordinates. to three-dimensional coordinates The conversion.