Search

CN-121746933-B - Dynamic adaptive vehicle-mounted multispectral farmland weed detection method

CN121746933BCN 121746933 BCN121746933 BCN 121746933BCN-121746933-B

Abstract

A dynamic adaptive vehicle-mounted multispectral farmland weed detection method relates to the technical field of agricultural information. The invention aims to solve the problems that the existing farmland weed detection method is large in calculated amount and difficult to apply to actual weed detection. The method comprises the steps of obtaining a rough control section description object by using a current longitude, a current latitude, an aging speed average value variable, an aging speed change variable, an aging positioning minimum deviation variable, an aging positioning maximum deviation variable and a multispectral image, constructing a regional rough control section list by using the rough control section description object, obtaining difference evaluation indexes of two rough control section description objects, and obtaining a farmland weed detection result based on the difference evaluation indexes of the rough control section description objects. The invention is used for identifying weeds in farmlands.

Inventors

  • LI XIAOFENG
  • PAN XIN
  • WAN XIANGKUN
  • JIANG TAO

Assignees

  • 中国科学院东北地理与农业生态研究所

Dates

Publication Date
20260508
Application Date
20260224

Claims (9)

  1. 1. A dynamically adaptive method for detecting weeds in a vehicle-mounted multispectral farmland is characterized by comprising the following specific processes: Step one, a weed rough control interval description module WeedIntervalDescriptionModule is established, wherein the input of the WeedIntervalDescriptionModule is a current longitude CurLon, a current latitude CurLat, an aging speed average variable SXSDJZ, an aging speed variation variable SXSDBH, an aging positioning minimum deviation variable SXZXPC, an aging positioning maximum deviation variable SXZDPC and a multispectral image MultiSpecImg, and the input is a rough control interval description object MSDX; The ageing speed mean variable SXSDJZ, the ageing speed variation variable SXSDBH, the ageing positioning minimum deviation variable SXZXPC, and the ageing positioning maximum deviation variable SXZDPC are obtained by: s1, initializing a system and constructing an aging state variable; The ageing state variables comprise an ageing speed average variable SXSDJZ, an ageing speed change variable SXSDBH, an ageing positioning minimum deviation variable SXZXPC and an ageing positioning maximum deviation variable SXZDPC; S2, establishing that the input of a vehicle-mounted platform speed positioning roughness description module VehicleRoughnessModule, vehicleRoughnessModule is system time and vehicle-mounted GPS position information, and outputting the system time and the vehicle-mounted GPS position information as an aging speed average variable SXSDJZ, an aging speed change variable SXSDBH, an aging positioning minimum deviation variable SXZXPC and an aging positioning maximum deviation variable SXZDPC; S3, establishing an aging state automatic updating module, wherein the aging state automatic updating module triggers and calls a vehicle-mounted platform speed positioning roughness description module VehicleRoughnessModule each time to acquire SXSDJZ, SXSDBH, SXZXPC and SXZDPC corresponding to each time; Step two, calling WeedIntervalDescriptionModule, and constructing a region coarse control interval list CCKKList by utilizing the coarse control interval description object output by WeedIntervalDescriptionModule; Step three, a regional coarse control interval difference description module IntervalDiffModule is established, wherein the input of the IntervalDiffModule is two coarse control interval description objects MSDX and MSDX, and the input is a difference evaluation index DiffScore; And step four, calling IntervalDiffModule elements in the rough control interval list CCKKList of the processing area to obtain a farmland weed detection result.
  2. 2. The method for detecting the weeds in the vehicle-mounted multispectral farmland with dynamic adaptation according to claim 1, wherein the system in the S1 is initialized and an aging state variable is constructed, specifically: S101, constructing a region rough control interval list CCKKList, and initializing a region rough control interval list CCKKList into an empty list; S102, establishing an aging control interval duration variable SXSC, and setting SXSC to be a preset value; S103, establishing an aging state variable, and initializing the aging state variable to 0; The ageing state variables comprise an ageing speed average variable SXSDJZ, an ageing speed change variable SXSDBH, an ageing positioning minimum deviation variable SXZXPC and an ageing positioning maximum deviation variable SXZDPC.
  3. 3. The method for detecting weeds in a vehicle-mounted multispectral farmland in a dynamic adaptation manner according to claim 2, wherein the input of the vehicle-mounted platform speed positioning roughness description module VehicleRoughnessModule, vehicleRoughnessModule established in the step S2 is system time and vehicle-mounted GPS position information, and the output is an aging speed average variable SXSDJZ, an aging speed change variable SXSDBH, an aging positioning minimum deviation variable SXZXPC and an aging positioning maximum deviation variable SXZDPC, specifically: S201, establishing a vehicle-mounted platform speed positioning roughness description module VehicleRoughnessModule, and inputting vehicle-mounted GPS position information corresponding to system time and system time; S202, storing the system time and the vehicle-mounted GPS position information corresponding to the system time into a position queue LocQueue based on a time stamp, and cleaning LocQueue that the time stamp is earlier than preset time data; The preset time is obtained by subtracting SXSC from the current time; S203, acquiring an average moving speed of the vehicle-mounted platform in a SXSC time period by using the data in LocQueue, and letting SXSDJZ =the average moving speed of the vehicle-mounted platform in a SXSC time period; s204, acquiring the standard deviation of the speed of the vehicle-mounted platform in the SXSC time period by using the data in LocQueue, and enabling SXSDBH =the standard deviation of the speed of the vehicle-mounted platform in the SXSC time period; S205, obtaining an ageing positioning minimum deviation variable SXZXPC by using SXSDJZ and SXSDBH: Wherein, the Is the basic deviation coefficient of the device, Is the jitter influencing factor and, Is a hyperbolic tangent function; s206, acquiring an aging positioning maximum deviation variable SXZDPC by utilizing SXSDJZ and SXSDBH, wherein the aging positioning maximum deviation variable is specifically as follows: s207, outputs SXSDJZ, SXSDBH, SXZXPC and SXZDPC.
  4. 4. The method for detecting weeds in a vehicle-mounted multispectral farmland with dynamic adaptation according to claim 3, wherein the automatic updating module for establishing an aging state in the step S3 calls the vehicle-mounted platform speed positioning roughness description module VehicleRoughnessModule each time of triggering to obtain SXSDJZ, SXSDBH, SXZXPC and SXZDPC corresponding to each time of triggering, and the method is specifically as follows: S301, starting an independent system timer RoughnessTimer, and setting the triggering interval of RoughnessTimer to be equal to SXSC; s302, when RoughnessTimer is triggered, calling VehicleRoughnessModule constructed in S2 to obtain SXSDJZ, SXSDBH, SXZXPC and SXZDPC corresponding to each trigger.
  5. 5. The method for dynamically adapting to vehicle-mounted multispectral farmland weed detection according to claim 4, wherein the weed coarse control section description module WeedIntervalDescriptionModule in the first step is provided, the input of WeedIntervalDescriptionModule is current longitude CurLon, current latitude CurLat, aging speed average variable SXSDJZ, aging speed variation variable SXSDBH, aging positioning minimum deviation variable SXZXPC, aging positioning maximum deviation variable SXZDPC and multispectral image MultiSpecImg, and the output is coarse control section description object MSDX, specifically: Step one, a weed rough control interval description module WeedIntervalDescriptionModule is established, and the input of WeedIntervalDescriptionModule is a current longitude CurLon, a current latitude CurLat, SXSDJZ, SXSDBH, SXZXPC, SXZDPC and a multispectral image MultiSpecImg; Judging whether a weed target exists in MultiSpecImg by utilizing an image recognition algorithm, outputting a null value and ending if the weed target is not recognized, acquiring pixel coordinates of a weed center on MultiSpecImg if the weed target is recognized, and acquiring a geographic center point WEEDCENTER of the weed by utilizing the pixel coordinates of the weed center on MultiSpecImg, curLon and CurLat; step one, constructing a coarse core interval HXQ by utilizing WEEDCENTER, SXSDJZ and SXZXPC; The HXQ is a geometrical center point of WEEDCENTER and a width of Is a square of (2); the said Obtained by: Wherein, the Is a logarithmic function; Step one, utilizing WEEDCENTER, SXSDBH and SXZDPC to construct a coarse control interval KKQJ; the rough control section KKQJ is a square with WEEDCENTER as a geometric center point and the width of WidthKKQJ; the WidthKKQJ is obtained by: fifthly, extracting pixel areas corresponding to weeds in MultiSpecImg, and forming a weed multispectral description vector MSSL by using the gray average value of all pixels in the pixel areas corresponding to the weeds on each spectrum band; Step one, package CurLon, curLat, HXQ, KKQJ and MSSL into coarse control interval description object MSDX and output MSDX.
  6. 6. The method for dynamically adapting to the vehicle-mounted multispectral farmland weed detection according to claim 5, wherein the step two is characterized in that the pixel coordinates of the weed center on MultiSpecImg are obtained, and then the geographical center point WEEDCENTER of the weed is obtained by using the pixel coordinates of the weed center on MultiSpecImg, curLon and CurLat, specifically: using geographic coordinates of MultiSpecImg center points Obtaining two-dimensional geographic coordinates of pixels of MultiSpecImg center points ; Then, utilize Obtaining pixel coordinates of weed center points The method specifically comprises the following steps: Wherein, the Is the lateral pixel offset of the weed center relative to the MultiSpecImg center, Is the longitudinal pixel offset of the weed center relative to the MultiSpecImg center, Is the pixel position coordinate of the center point of the weed target identification frame on MultiSpecImg, Is a MultiSpecImg-width pixel, which is a pixel of MultiSpecImg width, Is MultiSpecImg the width of the area covering the ground, Is a MultiSpecImg-high-level pixel, Is MultiSpecImg the height of the covered ground area; Finally, will And converting the weed center point into geographic coordinates to obtain the geographic coordinates of the weed center point.
  7. 7. The method for detecting weeds in a vehicle-mounted multispectral farmland with dynamic adaptation according to claim 6, wherein the method is characterized in that WeedIntervalDescriptionModule is invoked in the second step, and a rough control interval list CCKKList of a construction area of an object description object is output by utilizing a rough control interval WeedIntervalDescriptionModule, and specifically comprises the following steps: step two, starting running of the vehicle, and initializing an acquisition cycle variable CaptureCounter to 0; Step two, starting a main acquisition cycle, and setting to be executed once every 5 seconds; Step two, acquiring the current longitude, latitude and multispectral image of the vehicle; Calling WeedIntervalDescriptionModule to obtain a control interval Description object Description; step five, judging whether the Description is empty or not, if yes, executing step seven, and if not, executing step six; Step six, adding the Description to the end of CCKKList; step two, seven let CaptureCounter = CaptureCounter +1; And step two, judging whether the acquisition process is finished, if not, turning to step two, waiting for the next acquisition, and otherwise, outputting CCKKList.
  8. 8. The method for detecting weeds in a vehicle-mounted multispectral farmland with dynamic adaptation according to claim 7, wherein the establishing area coarse control interval difference description module IntervalDiffModule in the third step is characterized in that the input of IntervalDiffModule is two coarse control interval description objects MSDX and MSDX, and the output is a difference evaluation index DiffScore, specifically: Step three, a regional coarse control interval difference description module IntervalDiffModule is established, wherein the input of the IntervalDiffModule is two coarse control interval description objects MSDX and MSDX; Step three, obtaining a spatial distance normalization factor by using Europe distances GeoDist and SXSDJZ of center points of MSDX and MSDX2 The method specifically comprises the following steps: Wherein, the Is a constant; step III, obtaining the ratio of the intersection area and the union area of MSDX1.HXQ and MSDX2.HXQ And utilize Obtaining core interval overlapping degree The method specifically comprises the following steps: Wherein, the Is a rough control interval description object Is used for the coarse core segment of the (c), Is a rough control interval description object Is a coarse core segment of (a); Step three and four, obtaining the ratio of the intersection area and the union area of MSDX1.KKQJ and MSDX2.KKQJ And utilize Obtaining the overlapping degree of the control interval The method specifically comprises the following steps: Wherein, the Is a rough control interval description object Is used for the rough control interval value of (a), Is a rough control interval description object A coarse control interval value of (2); step three, five, obtaining multispectral distance by utilizing cosine distance between MSDX1.MSSL and MSDX2.MSSL The method specifically comprises the following steps: Wherein, the Is a rough control interval description object Is a multi-spectral description vector of weeds, Is a rough control interval description object Is a multi-spectral description vector of weeds, Is a mold length; Step III, sixth, utilize 、 、 And Acquiring a difference evaluation index DiffScore and outputting DiffScore; the difference evaluation index DiffScore is obtained by the following formula: wherein DiffScore is a difference evaluation index, , Representing that the two coarse control interval description objects MSDX and MSDX are identical, Representing that the two coarse control interval description objects MSDX and MSDX are quite different.
  9. 9. The method for detecting the weeds in the vehicle-mounted multispectral farmland in a dynamic adaptation manner according to claim 8, wherein the calling IntervalDiffModule in the fourth step processes elements in the rough control interval list CCKKList of the area to obtain a detection result of the weeds in the farmland, and the detection result specifically comprises the following steps: Step four, CCKKList generated in the step two is acquired, and the total number of elements ListLen in CCKKList is acquired; Initializing an outer layer circulation variable OutCounter to 0; fourthly, taking the element with the index OutCounter in CCKKList as a reference object BaseObj; fourthly, initializing an inner layer circulation variable InCounter to OutCounter +1; step IV, if InCounter is larger than or equal to ListLen, turning to step forty, otherwise, executing step IV; step four, six, taking the element with index InCounter in CCKKList as a comparison object CompObj; Seventhly, invoking IntervalDiffModule of the third step, and inputting BaseObj and CompObj into IntervalDiffModule to obtain DiffScore; judging whether DiffScore is smaller than 0.5, if so Marking CompObj, and then executing the fourth step and the ninth step, otherwise, directly executing the fourth step and the ninth step; step four, nine, making InCounter = InCounter +1, and turning to step four and five; forty steps, let OutCounter = OutCounter +1; step IV, if OutCounter is smaller than ListLen-1, turning to step IV, otherwise turning to step IV, turning to step IV; step forty-two, traversing CCKKList, deleting all marked objects in CCKKList; And fourthly, outputting CCKKList processed in the fourth step as a final farmland weed detection result.

Description

Dynamic adaptive vehicle-mounted multispectral farmland weed detection method Technical Field The invention relates to the technical field of agricultural information, in particular to a dynamic adaptive vehicle-mounted multispectral farmland weed detection method. Background Modern agriculture is changing from extensive to precise, and precise identification of farmland weeds is a prerequisite for implementing pesticide-reducing and synergistic operations such as variable spraying, laser weeding and the like. In actual operation, the multispectral sensor is carried on the vehicle-mounted platforms such as an unmanned vehicle, an intelligent tractor and the like to detect weeds, so that the method is a key link for realizing accurate positioning. However, the field environment is complex and changeable, and how to ensure that the same weed in the continuously shot images is accurately and uniquely identified in the vehicle running process, so that repeated counting or missing detection is avoided, the precision of the subsequent weeding operation and the pesticide utilization rate are directly related, and the method is an industry pain point to be solved urgently at present. Although the weed identification technology of a single frame image is relatively mature, the prior art scheme still has significant limitations in the vehicle-mounted mobile operation scene (1) based on the traditional geometric distance and positioning de-duplication method, the GPS positioning and the simple Euclidean distance threshold value are usually relied on to judge whether the weeds in adjacent frames are the same target. However, in actual operation, the farmland ground is uneven, the vehicle-mounted platform is difficult to keep absolute constant speed, and a commonly used GPS/RTK positioning system has a drift error of 0.5-2 m under a dynamic environment, so that the instantaneous speed fluctuation (0.1-1.5 m/s) of the vehicle in a short time can cause dead reckoning. This results in a very difficult adaptation of the fixed distance threshold when processing successive multi-frame images. Too large a threshold value can cause dense weed groups to be misjudged as one plant, and too small a threshold value can cause the same plant of weeds to be misjudged as multiple plants due to positioning drift. This "two-way misjudgment" results in a low weed detection accuracy. (2) The characteristic anchoring method based on hyperspectral fingerprints utilizes equipment with extremely high spectral resolution to extract the spectral fingerprints of weeds for unique matching. The method can be performed in a laboratory environment with constant illumination, but in an outdoor field environment, the spectral characteristics of the same strain of weeds can be remarkably shifted due to solar angle change, cloud cover and even radiation degree difference caused by dust in the air, so that the weed identification accuracy is low. (3) Advanced visual method based on three-dimensional reconstruction (such as SLAM) utilizes SLAM technology to restore three-dimensional scene so as to solve repositioning problem and improve weed identification accuracy, but the method has extremely high requirement on calculation resources, so that the weed identification calculation amount is large, the method generally depends on expensive high-end GPU server, the agricultural operation environment is bad, the vehicle-mounted terminal is generally low-power consumption embedded equipment, and the huge real-time calculation amount is difficult to support, so that the method is difficult to be applied to actual weed detection. Disclosure of Invention The invention provides a dynamic adaptive vehicle-mounted multispectral farmland weed detection method, which aims to solve the problems that the existing farmland weed detection method is large in calculated amount and difficult to apply to actual weed detection. A dynamically adaptive method for detecting weeds in an on-vehicle multispectral farmland comprises the following steps: Step one, a weed rough control interval description module WeedIntervalDescriptionModule is established, wherein the input of the WeedIntervalDescriptionModule is a current longitude CurLon, a current latitude CurLat, an aging speed average variable SXSDJZ, an aging speed variation variable SXSDBH, an aging positioning minimum deviation variable SXZXPC, an aging positioning maximum deviation variable SXZDPC and a multispectral image MultiSpecImg, and the input is a rough control interval description object MSDX; Step two, calling WeedIntervalDescriptionModule, and constructing a region coarse control interval list CCKKList by utilizing the coarse control interval description object output by WeedIntervalDescriptionModule; Step three, a regional coarse control interval difference description module IntervalDiffModule is established, wherein the input of the IntervalDiffModule is two coarse control interval description objects MSDX and MS