A vehicle-based weed spraying method, device, equipment and storage medium
By using a camera to identify the location of weeds and calculate the opening delay and continuous spraying time of the nozzles, the system solves the problem of insufficient precision in traditional spraying systems, achieving precise weed spraying and improving efficiency and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- LOVOL HEAVY IND CO LTD
- Filing Date
- 2025-02-19
- Publication Date
- 2026-06-30
AI Technical Summary
Traditional weed spraying systems struggle to achieve precise spraying and cannot cope with complex weed distribution environments, leading to damage to the healthy growth of crops and high costs.
By acquiring images in real time through a camera, identifying the location of weeds using a preset detection model, and calculating the opening delay time and continuous spraying time of the nozzles based on the camera height and tilt angle, the spraying range can be adaptively adjusted.
It improves the accuracy and efficiency of weed spraying, reduces resource waste, and ensures real-time responsiveness and accuracy of spraying while the vehicle is moving forward.
Smart Images

Figure CN120021606B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle spraying technology, and in particular to a vehicle-based weed spraying method, apparatus, equipment and storage medium. Background Technology
[0002] In the process of agricultural modernization, precision agriculture technology has gradually become a key component of agricultural production. The core essence of precision agriculture technology lies in using information technology to conduct refined management of agricultural production. Among these technologies, weed detection and spraying technology, as an important application area of precision agriculture, has received widespread attention and in-depth research in recent years. Traditional weed spraying systems typically employ either a carpet-style spraying mode or a fixed spraying mode. Here, carpet-style spraying refers to the nozzles spraying indiscriminately across the entire farmland as the vehicle moves; fixed spraying mode refers to the nozzles triggering spraying operations at pre-set time intervals.
[0003] However, both carpet spraying and fixed spraying methods struggle to achieve precise weed control, failing to address complex weed distribution environments and potentially harming crop growth while also incurring high costs. Therefore, achieving precise weed control has become a pressing issue. Summary of the Invention
[0004] In view of this, embodiments of this application provide a vehicle-based weed spraying method, apparatus, equipment, and storage medium. This application can accurately detect the location of weeds and achieve adaptive adjustment of the spraying range, effectively improving the accuracy and efficiency of weed spraying and reducing resource waste. Simultaneously, it ensures real-time responsiveness and accuracy of spraying while the vehicle is moving.
[0005] This application mainly includes the following aspects:
[0006] In a first aspect, embodiments of this application provide a vehicle-based weed spraying method, the spraying method comprising:
[0007] (A) For each camera, determine the opening delay time of the nozzle corresponding to the camera based on the height of the camera relative to the horizontal ground and the tilt angle of the camera relative to the orthogonal plane of the horizontal ground;
[0008] (B) Acquire the current image captured by the camera;
[0009] (C) If at least one weed is detected in the current image using a preset detection model, then for each weed, the coordinates of the weed in the image coordinate system are determined, and based on the coordinates of the weed in the image coordinate system, the field of view distance between the weed and the field of view boundary of the camera that is close to the vehicle is determined.
[0010] (D) Based on the maximum spraying distance of the nozzle corresponding to the camera and the field of view distance, determine the continuous spraying time of the nozzle corresponding to the camera;
[0011] (E) Based on the opening delay time of the nozzle corresponding to the camera and the continuous spraying time of the nozzle corresponding to the camera, control the nozzle corresponding to the camera to spray the weed.
[0012] Furthermore, for each camera, determining the opening delay time of the nozzle corresponding to that camera, based on the camera's height relative to the horizontal ground and the camera's tilt angle relative to the orthogonal plane of the horizontal ground, includes:
[0013] For each camera, the blind zone length of the camera's blind zone along the vehicle's orientation direction is determined based on the camera's height relative to the horizontal ground and the camera's tilt angle relative to the orthogonal plane of the horizontal ground.
[0014] The quotient of the blind spot length and the current vehicle speed is determined as the opening delay time of the nozzle corresponding to the camera.
[0015] Furthermore, determining the field-of-view distance between the weed and the camera's field-of-view boundary near the vehicle, based on the weed's coordinates in the image coordinate system, includes:
[0016] Based on the camera's intrinsic parameter matrix and the camera's height relative to the horizontal ground, the coordinates of the weed in the image coordinate system are converted to coordinates in the camera coordinate system.
[0017] Based on the camera extrinsic matrix of the camera, the coordinates of the weed in the camera coordinate system are converted to coordinates in the world coordinate system;
[0018] Based on the coordinates of the weed in the world coordinate system, the field of view distance between the weed and the field of view boundary of the camera near the vehicle is determined.
[0019] Furthermore, determining the continuous spraying time of the nozzle corresponding to the camera based on the maximum spraying distance of the nozzle corresponding to the camera and the field of view includes:
[0020] The product of the preset nozzle working time and the current vehicle speed is determined as the maximum spraying distance of the nozzle corresponding to the camera;
[0021] Determine whether the maximum spraying distance of the nozzle corresponding to the camera is greater than or equal to the field of view distance;
[0022] If the maximum spraying distance of the nozzle corresponding to the camera is greater than or equal to the field of view distance, then the quotient of the field of view distance and the current vehicle speed is determined as the continuous spraying time of the nozzle corresponding to the camera.
[0023] If the maximum spraying distance of the nozzle corresponding to the camera is less than the field of view distance, then return to step (B).
[0024] Secondly, embodiments of this application also provide a vehicle-based weed spraying device, the weed spraying device comprising:
[0025] The delay time determination module determines the opening delay time of the nozzle corresponding to each camera based on the height of the camera relative to the horizontal ground and the tilt angle of the camera relative to the orthogonal plane of the horizontal ground.
[0026] The image acquisition module acquires the current image captured by the camera;
[0027] The distance calculation module, if it detects at least one weed in the current image using a preset detection model, determines the coordinates of each weed in the image coordinate system, and determines the field of view distance between the weed and the camera's field of view boundary that is close to the vehicle based on the coordinates of the weed in the image coordinate system.
[0028] The continuous spraying time determination module determines the continuous spraying time of the nozzle corresponding to the camera based on the maximum sprayable distance of the nozzle corresponding to the camera and the field of view distance.
[0029] The control module controls the nozzle corresponding to the camera to spray the weeds based on the opening delay time and continuous spraying time of the nozzle corresponding to the camera.
[0030] Furthermore, the activation delay time determination module is specifically used for:
[0031] For each camera, the blind zone length of the camera's blind zone along the vehicle's orientation direction is determined based on the camera's height relative to the horizontal ground and the camera's tilt angle relative to the orthogonal plane of the horizontal ground.
[0032] The quotient of the blind spot length and the current vehicle speed is determined as the opening delay time of the nozzle corresponding to the camera.
[0033] Furthermore, when determining the field of view distance between the weed and the camera's field of view boundary near the vehicle based on the weed's coordinates in the image coordinate system, the distance calculation module also has the function of:
[0034] Based on the camera's intrinsic parameter matrix and the camera's height relative to the horizontal ground, the coordinates of the weed in the image coordinate system are converted to coordinates in the camera coordinate system.
[0035] Based on the camera extrinsic matrix of the camera, the coordinates of the weed in the camera coordinate system are converted to coordinates in the world coordinate system;
[0036] Based on the coordinates of the weed in the world coordinate system, the field of view distance between the weed and the field of view boundary of the camera near the vehicle is determined.
[0037] Furthermore, the continuous spraying time determination module is specifically used for:
[0038] The product of the preset nozzle working time and the current vehicle speed is determined as the maximum spraying distance of the nozzle corresponding to the camera;
[0039] Determine whether the maximum spraying distance of the nozzle corresponding to the camera is greater than or equal to the field of view distance;
[0040] If the maximum spraying distance of the nozzle corresponding to the camera is greater than or equal to the field of view distance, then the quotient of the field of view distance and the current vehicle speed is determined as the continuous spraying time of the nozzle corresponding to the camera.
[0041] If the maximum spraying distance of the nozzle corresponding to the camera is less than the field of view distance, then the image acquisition module is used.
[0042] Thirdly, embodiments of this application also provide an electronic device, including: a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory through the bus, and the machine-readable instructions are executed by the processor to perform the steps of the vehicle-based weed spraying method described in the first aspect or any possible implementation of the first aspect.
[0043] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the vehicle-based weed spraying steps described in the first aspect or any possible implementation of the first aspect.
[0044] This application provides a vehicle-based weed spraying method, apparatus, equipment, and storage medium. It acquires images in real time through a camera, identifies weeds using a preset detection model and determines the position of the weeds in the image coordinate system, calculates the opening delay time of the nozzle by combining the camera height and tilt angle, and determines the continuous spraying time based on the distance between the weeds and the camera's field of view boundary and the maximum spraying distance of the nozzle. Finally, it controls the nozzle to accurately spray weeds within a suitable time and range.
[0045] In this way, this application can accurately detect the location of weeds and achieve adaptive adjustment of the spraying range, effectively improving the accuracy and efficiency of weed spraying and reducing resource waste. At the same time, it ensures real-time responsiveness and accuracy of spraying while the vehicle is moving.
[0046] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0047] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0048] Figure 1 One of the flowcharts of a vehicle-based weed spraying method provided in an embodiment of this application is shown;
[0049] Figure 2 The second flowchart of a vehicle-based weed spraying method provided in an embodiment of this application is shown;
[0050] Figure 3 An example diagram showing the location of the camera and weeds provided in an embodiment of this application is shown;
[0051] Figure 4 The third flowchart of a vehicle-based weed spraying method provided in this application embodiment is shown;
[0052] Figure 5 The fourth flowchart illustrates a vehicle-based weed spraying method provided in an embodiment of this application.
[0053] Figure 6 A schematic diagram of a vehicle-based weed spraying device provided in an embodiment of this application is shown.
[0054] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown. Detailed Implementation
[0055] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.
[0056] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0057] The methods, apparatus, electronic devices, or computer-readable storage media described in this application can be applied to any scenario requiring vehicle-based weed spraying. This application does not limit specific application scenarios, and any scheme using the vehicle-based weed spraying method and apparatus provided in this application is within the protection scope of this application.
[0058] It is worth noting that in the process of agricultural modernization, precision agriculture technology has gradually become a key component of agricultural production. The core essence of precision agriculture technology lies in using information technology to conduct refined management of agricultural production. Among these technologies, weed detection and spraying technology, as an important application area of precision agriculture, has received widespread attention and in-depth research in recent years. Traditional weed spraying systems typically employ either a carpet-style spraying mode or a fixed spraying mode. Here, carpet-style spraying refers to the nozzles spraying indiscriminately across the entire farmland as the vehicle moves; fixed spraying refers to the nozzles triggering spraying operations at pre-set time intervals. However, both carpet-style and fixed spraying modes struggle to achieve precise spraying, failing to cope with complex weed distribution environments and potentially harming the healthy growth of crops, while also resulting in high costs. Therefore, how to accurately spray weeds has become an urgent problem to be solved.
[0059] To address the aforementioned issues, this application proposes a vehicle-based weed spraying method, apparatus, equipment, and storage medium. This application can accurately detect the location of weeds and adaptively adjust the spraying range, effectively improving the accuracy and efficiency of weed spraying and reducing resource waste. Simultaneously, it ensures real-time responsiveness and accuracy of spraying while the vehicle is moving.
[0060] To facilitate understanding of this application, the technical solutions provided in this application will be described in detail below with reference to specific embodiments.
[0061] Please see Figure 1 , Figure 1 This is one of the flowcharts for a vehicle-based weed spraying method provided in an embodiment of this application.
[0062] Corn, soybeans, and other grains are important food crops, and weeds are one of the main problems in their cultivation. Weeds compete with crops for soil moisture, nutrients, and sunlight, reducing crop yields and making harvesting more difficult. Furthermore, weeds can become hosts for pests and diseases, further harming crop growth.
[0063] With the development of smart agriculture technology, intelligent spraying systems based on machine vision and automatic control have gradually become a research hotspot. For example, John Deere's See&Spray system integrates computer vision technology, enabling machines to identify weeds and crops and apply herbicides only to weeds. This system uses cameras mounted on the spray booms to capture real-time ground images, employs deep learning detection models to detect crops and weeds in the images, and combines GPS remote sensing and other technologies to trigger and control the spraying. However, this solution is costly, has high requirements for the operating environment, and does not consider the impact of factors such as vehicle speed, weed density, and trigger delay in actual use, which to some extent reduces spraying accuracy.
[0064] In this embodiment, the front of the vehicle is provided with multiple nozzles on the same horizontal line; at least one camera is provided above the multiple nozzles; the horizontal field of view of each camera covers the spraying range of at least one nozzle. As an example, suppose the front of the vehicle is provided with a spray bar, which is placed horizontally on the front of the vehicle and has 12 nozzles. The nozzles spray perpendicular to the ground. A camera is provided above the midpoint of the line between two adjacent nozzles. For each camera, the horizontal field of view of the camera covers the spraying range of two nozzles.
[0065] like Figure 1 As shown in the figure, the vehicle-based weed spraying method provided in this application includes the following steps:
[0066] Step S101: For each camera, determine the opening delay time of the nozzle corresponding to that camera based on the height of the camera relative to the horizontal ground and the tilt angle of the camera relative to the orthogonal plane of the horizontal ground.
[0067] Here, the height of the camera relative to the horizontal ground is detected by a depth sensor installed on the vehicle. The height of the camera relative to the horizontal ground, obtained by the depth sensor, allows for dynamic adjustment of the relative height between the camera and the nozzle, ensuring accurate spraying at various heights. The tilt angle of the camera relative to the plane perpendicular to the horizontal ground is the camera's installation angle.
[0068] The following is combined Figure 2 This explains how, for each camera, the opening delay time of the corresponding nozzle is determined based on the camera's height relative to the horizontal ground and the tilt angle of the camera relative to the orthogonal plane of the horizontal ground.
[0069] Here, the start-up delay time of the nozzle corresponding to the camera is the time required from the moment the weeds are detected until the nozzle actually starts spraying.
[0070] Please see Figure 2 , Figure 2 This is a second flowchart of a vehicle-based weed spraying method provided in an embodiment of this application.
[0071] like Figure 2 As shown, regarding step S101, in a specific implementation, as an example, the following steps may be included:
[0072] Step S1011: For each camera, determine the blind zone length of the camera's blind zone along the vehicle's orientation direction based on the camera's height relative to the horizontal ground and the camera's tilt angle relative to the orthogonal plane of the horizontal ground.
[0073] Here, as Figure 3 As shown in the example, H is the height of the camera relative to the horizontal ground, θ is the camera's mounting angle, and r... blind The blind spot length of the camera blind spot along the vehicle's direction of travel is as follows: Figure 3 As can be seen from this, the blind spot length of the camera blind spot along the vehicle's orientation direction can be calculated using formula (1).
[0074]
[0075] Step S1012: The quotient of the blind spot length and the current vehicle speed is determined as the opening delay time of the nozzle corresponding to the camera.
[0076] Here, as Figure 3As shown in the figure, as an example, the opening delay time of the nozzle corresponding to the camera can be calculated by formula (2).
[0077]
[0078] Among them, t delay V is the opening delay time of the nozzle corresponding to the camera. car This represents the current vehicle speed.
[0079] See again Figure 1 Step S102: Obtain the current image captured by the camera.
[0080] Step S103: If at least one weed is detected in the current image using a preset detection model, then for each weed, the coordinates of the weed in the image coordinate system are determined, and based on the coordinates of the weed in the image coordinate system, the field of view distance between the weed and the field of view boundary of the camera near the vehicle is determined.
[0081] Here, the predictive detection model is an intelligent algorithm model trained on a large amount of image data. Its function is to analyze and process the current image captured by the camera to identify the presence of weeds in the image.
[0082] If no weeds are detected in the current image using the preset detection model, then return to step S102.
[0083] The following is combined Figure 4 This illustrates how to determine the field of view distance between the weed and the camera's field of view boundary near the vehicle, based on the weed's coordinates in the image coordinate system.
[0084] Please see Figure 4 , Figure 4 This is the third flowchart of a vehicle-based weed spraying method provided in an embodiment of this application.
[0085] like Figure 4 As shown, regarding step S103, determining the field of view distance between the weed and the camera's field of view boundary near the vehicle based on the weed's coordinates in the image coordinate system, as an example, in a specific implementation, the following steps may be included:
[0086] Step S1031: Based on the camera intrinsic parameter matrix of the camera and the height of the camera relative to the horizontal ground, convert the coordinates of the weed in the image coordinate system to the coordinates in the camera coordinate system.
[0087] Here, as an example, the coordinates of the weed in the camera coordinate system can be calculated using (3).
[0088]
[0089] Among them, X c Let X be the X-axis coordinate of the weeds in the camera coordinate system, and Y be the Y-axis coordinate of the weeds. c Let Z be the Y-axis coordinate of the weeds in the camera coordinate system. c Let Z be the Z-axis coordinate of the weed in the camera coordinate system, K be the camera intrinsic parameter matrix, u be the X-axis coordinate of the weed in the image coordinate system, and v be the Y-axis coordinate of the weed in the image coordinate system. Where Z... c It is equal to the height of the camera relative to the horizontal ground.
[0090] Step S1032: Based on the camera extrinsic parameter matrix of the camera, convert the coordinates of the weed in the camera coordinate system to the coordinates in the world coordinate system.
[0091] Here, as an example, the coordinates of the weed in the world coordinate system can be calculated using (4).
[0092]
[0093] Among them, X w Let X be the x-axis coordinate of the weed in the world coordinate system, and Y be the y-axis coordinate. w Let Z be the Y-axis coordinate of the weeds in the world coordinate system. w Let T be the Z-axis coordinate of the weeds in the world coordinate system, and T be the camera extrinsic matrix of the image.
[0094] Step S1033: Based on the coordinates of the weed in the world coordinate system, determine the field of view distance between the weed and the field of view boundary of the camera near the vehicle.
[0095] See again Figure 1 Step S104: Based on the maximum spraying distance of the nozzle corresponding to the camera and the field of view distance, determine the continuous spraying time of the nozzle corresponding to the camera.
[0096] Here, the maximum spraying distance of the nozzle corresponding to the camera is the distance the nozzle moves within the preset nozzle working time; where the preset nozzle working time is the longest allowed duration from the start of spraying to the stop of spraying. The continuous spraying time of the nozzle corresponding to the camera is the duration from when the nozzle is turned on to when it is turned off.
[0097] The following is combined Figure 5 This explains how to determine the continuous spraying time of the nozzle corresponding to the camera based on the maximum spraying distance of the nozzle corresponding to the camera and the field of view distance.
[0098] Please see Figure 5 , Figure 5 This is the fourth flowchart of a vehicle-based weed spraying method provided in an embodiment of this application.
[0099] like Figure 5 As shown, regarding step S104, in a specific implementation, as an example, the following steps may be included:
[0100] Step S1041: The product of the preset nozzle working time and the current vehicle speed is determined as the maximum spraying distance of the nozzle corresponding to the camera.
[0101] Here, as an example, assuming the preset nozzle working time is 5 seconds and the current vehicle speed is 1 meter / second, the maximum spraying distance of the nozzle corresponding to the camera is 5 meters.
[0102] Step S1042: Determine whether the maximum spraying distance of the nozzle corresponding to the camera is greater than or equal to the field of view distance.
[0103] The purpose of comparing the maximum spraying distance of the nozzle corresponding to the camera with the field of view distance between the weed and the camera's field of view boundary near the vehicle is to ensure that there is enough time to evenly spray pesticides or herbicides onto the weeds after the nozzle is turned on, while avoiding over-spraying that would cause waste and environmental pollution.
[0104] Step S1043: If the maximum spraying distance of the nozzle corresponding to the camera is greater than or equal to the field of view distance, then the quotient of the field of view distance and the current vehicle speed is determined as the continuous spraying time of the nozzle corresponding to the camera.
[0105] Here, as an example, the continuous spraying time of the nozzle corresponding to the camera can be calculated by (5).
[0106]
[0107] Among them, t spray d represents the continuous spraying time of the nozzle corresponding to the camera. max The maximum spraying distance of the nozzle is 5 meters. As an example, assuming the maximum spraying distance of the nozzle is 5 meters, the distance between the weed and the field of view boundary of the camera near the vehicle is 3 meters, and the current vehicle speed is 5 meters / second, since the maximum spraying distance of 5 meters is greater than the field of view distance of 3 meters, the continuous spraying time of the nozzle is 3m ÷ 5m / s = 0.6 seconds. If the maximum spraying distance of the nozzle corresponding to the camera is greater than or equal to the field of view distance, the time when the weeds begin to be sprayed can be calculated by (6).
[0108]
[0109] Among them, t start This is the time when weeds begin to be sprayed.
[0110] Step S1044: If the maximum spraying distance of the nozzle corresponding to the camera is less than the field of view distance, then return to step S102.
[0111] Here, if the maximum spraying distance of the nozzle corresponding to the camera is less than the field of view distance, the nozzle corresponding to the camera will not be turned on, and the continuous spraying time of the nozzle corresponding to the camera will be 0.
[0112] See again Figure 1 In step S105, based on the opening delay time of the nozzle corresponding to the camera and the continuous spraying time of the nozzle corresponding to the camera, the nozzle corresponding to the camera is controlled to spray the weeds.
[0113] Here, as an example, assuming that the opening delay time of the nozzle corresponding to the camera is 5 seconds and the continuous spraying time of the nozzle corresponding to the camera is 0.6 seconds, then the nozzle corresponding to the camera will turn on after 5 seconds, remain on for 0.6 seconds and then turn off.
[0114] This application provides a vehicle-based weed spraying method. This method accurately detects the location of weeds, enabling adaptive adjustment of the spraying range, effectively improving the accuracy and efficiency of weed spraying and reducing resource waste. Simultaneously, it ensures real-time responsiveness and accuracy of spraying while the vehicle is moving.
[0115] Based on the same application concept, this application also provides a vehicle-based weed spraying device corresponding to the vehicle-based weed spraying method provided in the above embodiments. Since the principle of the device in this application is similar to the vehicle-based weed spraying method in the above embodiments of this application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0116] Please see Figure 6 , Figure 6 This is a schematic diagram of a vehicle-based weed spraying device provided in an embodiment of this application.
[0117] like Figure 6 As shown in the figure, the vehicle-based weed spraying device 210 provided in this application embodiment includes:
[0118] The delay time determination module 211 determines the opening delay time of the nozzle corresponding to each camera based on the height of the camera relative to the horizontal ground and the tilt angle of the camera relative to the orthogonal plane of the horizontal ground.
[0119] Image acquisition module 212 acquires the current image captured by the camera;
[0120] The distance calculation module 213, if at least one weed is detected in the current image using a preset detection model, determines the coordinates of the weed in the image coordinate system for each weed, and determines the field of view distance between the weed and the camera field of view boundary near the vehicle based on the coordinates of the weed in the image coordinate system.
[0121] The continuous spraying time determination module 214 determines the continuous spraying time of the nozzle corresponding to the camera based on the maximum sprayable distance of the nozzle corresponding to the camera and the field of view distance.
[0122] The control module 215 controls the nozzle corresponding to the camera to spray the weeds based on the opening delay time and continuous spraying time of the nozzle corresponding to the camera.
[0123] Furthermore, the activation delay time determination module 211 is specifically used for:
[0124] For each camera, the blind zone length of the camera's blind zone along the vehicle's orientation direction is determined based on the camera's height relative to the horizontal ground and the camera's tilt angle relative to the orthogonal plane of the horizontal ground.
[0125] The quotient of the blind spot length and the current vehicle speed is determined as the opening delay time of the nozzle corresponding to the camera.
[0126] Furthermore, when determining the field of view distance between the weed and the camera's field of view boundary near the vehicle based on the weed's coordinates in the image coordinate system, the distance calculation module 213 also has the function of:
[0127] Based on the camera's intrinsic parameter matrix and the camera's height relative to the horizontal ground, the coordinates of the weed in the image coordinate system are converted to coordinates in the camera coordinate system.
[0128] Based on the camera extrinsic matrix of the camera, the coordinates of the weed in the camera coordinate system are converted to coordinates in the world coordinate system;
[0129] Based on the coordinates of the weed in the world coordinate system, the field of view distance between the weed and the field of view boundary of the camera near the vehicle is determined.
[0130] Furthermore, the continuous spraying time determination module 214 is specifically used for:
[0131] The product of the preset nozzle working time and the current vehicle speed is determined as the maximum spraying distance of the nozzle corresponding to the camera;
[0132] Determine whether the maximum spraying distance of the nozzle corresponding to the camera is greater than or equal to the field of view distance;
[0133] If the maximum spraying distance of the nozzle corresponding to the camera is greater than or equal to the field of view distance, then the quotient of the field of view distance and the current vehicle speed is determined as the continuous spraying time of the nozzle corresponding to the camera.
[0134] If the maximum spraying distance of the nozzle corresponding to the camera is less than the field of view distance, then the image acquisition module 212 is used.
[0135] This application provides a vehicle-based weed spraying device. This device can accurately detect the location of weeds and adaptively adjust the spraying range, effectively improving the accuracy and efficiency of weed spraying and reducing resource waste. Simultaneously, it ensures real-time responsiveness and accuracy of spraying while the vehicle is moving.
[0136] Please see Figure 7 , Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0137] like Figure 7 As shown, the electronic device 300 includes a processor 310, a memory 320, and a bus 330.
[0138] The memory 320 stores machine-readable instructions executable by the processor 310. When the electronic device 300 is running, the processor 310 and the memory 320 communicate via the bus 330. When the machine-readable instructions are executed by the processor 310, they can perform the operations described above. Figure 1 , Figure 2 , Figure 4 and Figure 5 The steps of the vehicle-based weed spraying method in the illustrated method embodiment can be found in the method embodiment for specific implementation methods, which will not be repeated here.
[0139] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can perform the above-described actions. Figure 1 , Figure 2 , Figure 4 and Figure 5 The steps of the vehicle-based weed spraying method in the illustrated method embodiment can be found in the method embodiment for specific implementation methods, which will not be repeated here.
[0140] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.
[0141] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0142] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0143] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0144] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A vehicle-based weed-spraying method, characterized by, The vehicle's front end is equipped with multiple nozzles aligned horizontally; at least one camera is positioned above the nozzles; the horizontal field of view of each camera covers the spraying area of at least one nozzle; the spraying method includes: (A) For each camera, determine the opening delay time of the nozzle corresponding to the camera based on the height of the camera relative to the horizontal ground and the tilt angle of the camera relative to the orthogonal plane of the horizontal ground; (B) Acquire the current image captured by the camera; (C) If at least one weed is detected in the current image using a preset detection model, then for each weed, the coordinates of the weed in the image coordinate system are determined, and based on the coordinates of the weed in the image coordinate system, the field of view distance between the weed and the field of view boundary of the camera that is close to the vehicle is determined. (D) Based on the maximum spraying distance of the nozzle corresponding to the camera and the field of view distance, determine the continuous spraying time of the nozzle corresponding to the camera; (E) Based on the opening delay time of the nozzle corresponding to the camera and the continuous spraying time of the nozzle corresponding to the camera, control the nozzle corresponding to the camera to spray the weed; For each camera, the opening delay time of the corresponding nozzle is determined based on the camera's height relative to the horizontal ground and the camera's tilt angle relative to the orthogonal plane of the horizontal ground, including: For each camera, the blind zone length of the camera's blind zone along the vehicle's orientation direction is determined based on the camera's height relative to the horizontal ground and the camera's tilt angle relative to the orthogonal plane of the horizontal ground. The quotient of the blind spot length and the current vehicle speed is determined as the opening delay time of the nozzle corresponding to the camera; Determining the continuous spraying time of the nozzle corresponding to the camera based on the maximum spraying distance of the nozzle corresponding to the camera and the field of view includes: The product of the preset nozzle working time and the current vehicle speed is determined as the maximum spraying distance of the nozzle corresponding to the camera; Determine whether the maximum spraying distance of the nozzle corresponding to the camera is greater than or equal to the field of view distance; If the maximum spraying distance of the nozzle corresponding to the camera is greater than or equal to the field of view distance, then the quotient of the field of view distance and the current vehicle speed is determined as the continuous spraying time of the nozzle corresponding to the camera. If the maximum spraying distance of the nozzle corresponding to the camera is less than the field of view distance, then return to step (B).
2. The spraying method according to claim 1, characterized in that, The determination of the field of view distance between the weed and the camera's field of view boundary near the vehicle, based on the weed's coordinates in the image coordinate system, includes: Based on the camera's intrinsic parameter matrix and the camera's height relative to the horizontal ground, the coordinates of the weed in the image coordinate system are converted to coordinates in the camera coordinate system. Based on the camera extrinsic matrix of the camera, the coordinates of the weed in the camera coordinate system are converted to coordinates in the world coordinate system; Based on the coordinates of the weed in the world coordinate system, the field of view distance between the weed and the field of view boundary of the camera near the vehicle is determined.
3. A vehicle-based weed-spraying apparatus, characterized by, The weed spraying device includes: The delay time determination module determines the opening delay time of the nozzle corresponding to each camera based on the height of the camera relative to the horizontal ground and the tilt angle of the camera relative to the orthogonal plane of the horizontal ground. The image acquisition module acquires the current image captured by the camera; The distance calculation module, if it detects at least one weed in the current image using a preset detection model, determines the coordinates of each weed in the image coordinate system, and determines the field of view distance between the weed and the camera's field of view boundary that is close to the vehicle based on the coordinates of the weed in the image coordinate system. The continuous spraying time determination module determines the continuous spraying time of the nozzle corresponding to the camera based on the maximum sprayable distance of the nozzle corresponding to the camera and the field of view distance. The control module controls the nozzle corresponding to the camera to spray the weeds based on the opening delay time and continuous spraying time of the nozzle corresponding to the camera. The activation delay time determination module is specifically used for: For each camera, the blind zone length of the camera's blind zone along the vehicle's orientation direction is determined based on the camera's height relative to the horizontal ground and the camera's tilt angle relative to the orthogonal plane of the horizontal ground. The quotient of the blind spot length and the current vehicle speed is determined as the opening delay time of the nozzle corresponding to the camera; The continuous spraying time determination module is specifically used for: The product of the preset nozzle working time and the current vehicle speed is determined as the maximum spraying distance of the nozzle corresponding to the camera; Determine whether the maximum spraying distance of the nozzle corresponding to the camera is greater than or equal to the field of view distance; If the maximum spraying distance of the nozzle corresponding to the camera is greater than or equal to the field of view distance, then the quotient of the field of view distance and the current vehicle speed is determined as the continuous spraying time of the nozzle corresponding to the camera. If the maximum spraying distance of the nozzle corresponding to the camera is less than the field of view distance, then the image acquisition module is used.
4. The spray device of claim 3, wherein, The distance calculation module, when determining the field-of-view distance between the weed and the camera's field-of-view boundary near the vehicle based on the weed's coordinates in the image coordinate system, also has the function of: Based on the camera's intrinsic parameter matrix and the camera's height relative to the horizontal ground, the coordinates of the weed in the image coordinate system are converted to coordinates in the camera coordinate system. Based on the camera extrinsic matrix of the camera, the coordinates of the weed in the camera coordinate system are converted to coordinates in the world coordinate system; Based on the coordinates of the weed in the world coordinate system, the field of view distance between the weed and the field of view boundary of the camera near the vehicle is determined.
5. An electronic device, comprising: include: The device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. The machine-readable instructions are executed by the processor to perform the steps of the vehicle-based weed spraying method as described in any one of claims 1 to 2.
6. A computer readable storage medium characterized by, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the vehicle-based weed spraying method as described in any one of claims 1 to 2.