Intelligent pest and disease damage identification and targeted spraying method and system based on machine vision
Through multi-spectral image correction, environmental compensation, multi-scale feature extraction and multi-modal feature fusion, error accumulation and environmental impact problems in pest identification and targeted spraying are solved, and high-precision pest control is achieved.
Patent Information
- Application Number
- CN202510914000.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-03
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2045-07-03
AI Technical Summary
The prior art problems such as accumulation of multi-spectral image correction errors under the conditions of light change, inaccurate pest recognition, environmental factors affecting the spraying effect, image quality is affected by water droplets, large regional growth errors, insufficient prediction of prevention and control timing and range, resulting in poor results of intelligent identification of pests and diseases and targeted spraying.
Through spectral-space joint correction, environmental compensation, multi-scale feature extraction, topological flow analysis, curvature flow optimization, multi-modal feature fusion and timing dynamic analysis of multi-spectral images, precise identification of pests and diseases and targeted spraying are achieved.
It realizes high-precision pest identification and precise spraying in complex environments, improves prevention and control efficiency and accuracy, reduces pesticide use, and reduces environmental pollution.
Smart Images

Figure CN120472280A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to machine vision, and in particular to a method and system for intelligent identification and targeted spraying of pests and diseases based on machine vision. Background Art
[0002] Intelligent identification and precise control of crop pests and diseases are key technologies in modern agricultural production, directly impacting crop yield and quality. With global climate change and shifts in agricultural production methods, the frequency, scope, and complexity of pest and disease outbreaks are increasing. Traditional manual inspections and standardized spraying methods are no longer sufficient to meet the demands of modern agricultural production. Machine vision-based intelligent pest and disease identification and targeted spraying technology, by combining computer vision, artificial intelligence, and precision spraying, enables early detection, precise identification, and targeted control of pests and diseases. This not only improves control efficiency, reduces pesticide usage, and reduces environmental pollution, but is also crucial for promoting intelligent and sustainable agricultural production.
[0003] Current research focuses on deep learning-based image recognition and empirical model-based spraying control. For recognition, convolutional neural networks are primarily used for feature extraction and classification of pest and disease images, or traditional machine learning methods such as support vector machines and random forests are employed for identification. For spraying control, spray intensity is primarily adjusted using preset spraying parameters and simple PID control. Some systems incorporate GPS-based navigation and positioning for regionalized spraying. Under ideal conditions, these methods can achieve basic recognition and spraying functions, laying the foundation for intelligent pest control.
[0004] However, the existing technology still has many specific problems: (1) Under the condition of changing light, there are deviations in the spectral response characteristics and spatial positions between the various bands of multispectral images, and the traditional step-by-step correction method is prone to error accumulation; (2) When the color of pests and plants is similar, it is difficult to achieve accurate identification by relying solely on the characteristics of the spatial domain or a single spectral domain; (3) For hidden pests such as leaf rollers, because they are wrapped inside the leaves, the existing recognition methods based on surface features often fail; (4) During the spraying process, the dynamic changes of environmental factors (such as wind speed, temperature, and humidity) will significantly affect the spraying effect, and the existing fixed parameter control strategy is difficult to adapt to such changes; (5) In actual applications, the reflection of water droplets and mist will seriously affect the image quality, and traditional image enhancement methods often ignore the spectral-spatial joint characteristics of multispectral data; (6) When performing region growing, traditional algorithms are prone to leakage at weak boundaries, resulting in inaccurate target area division; (7) Due to the lack of temporal analysis of the development laws of pests and diseases, the existing system is difficult to make accurate predictions on the timing and scope of prevention and control, which often leads to delayed prevention and control or excessive scope. The above problems seriously restrict the actual application effect of intelligent identification of pests and diseases and targeted spraying technology. Summary of the Invention
[0005] The purpose of the invention is to provide a method and system for intelligent identification and targeted spraying of pests and diseases based on machine vision, in order to solve at least one problem existing in the prior art.
[0006] The technical solution, a machine vision-based intelligent pest and disease identification and targeted spraying method, includes the following steps:
[0007] Step S1: Acquire a multispectral image sequence containing spatial coordinates, wavelength, and time from an image acquisition device, combine it with temperature data, humidity data, and illumination data collected by an environmental sensor, obtain a fused image sequence through multi-source data processing, and obtain a final fused image based on temporal feature extraction;
[0008] Step S2: Obtain the final fused image, extract the target region through multi-scale feature transformation and topological flow analysis, obtain the precise boundary by combining curvature flow optimization, and perform regional feature extraction and regional relationship analysis to obtain the regional feature set, regional boundary set, and regional relationship description;
[0009] Step S3: Obtain regional feature sets, regional relationship descriptions, and regional boundary sets, combine historical data and environmental parameters, and obtain a status assessment report, behavior pattern description, and prevention and control plan through multimodal feature fusion, time series dynamic analysis, and status assessment;
[0010] Step S4: Obtain the control plan, status assessment report, and area boundary set, and generate the final optimization plan and adjustment parameter set through target area optimization, trajectory planning, parameter adaptive control, and real-time monitoring, and send them to the spraying device.
[0011] A machine vision-based intelligent pest identification and targeted spraying system, including:
[0012] at least one processor; and,
[0013] a memory communicatively connected to at least one of the processors; wherein,
[0014] The memory stores instructions that can be executed by the processor, and the instructions are used to be executed by the processor to implement the machine vision-based intelligent pest identification and targeted spraying method.
[0015] Beneficial effects: The present invention not only achieves high-precision correction of multispectral data and elimination of environmental interference, but also can accurately extract target areas under complex backgrounds, accurately evaluate the status of pests and diseases and predict their behavior, thus achieving high-precision and low-loss pest and disease control. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a flow chart of the present invention.
[0017] Figure 2 It is a flow chart of step S1 of the present invention.
[0018] Figure 3 It is a flow chart of step S2 of the present invention.
[0019] Figure 4 It is a flow chart of step S3 of the present invention.
[0020] Figure 5 It is a flow chart of step S4 of the present invention. DETAILED DESCRIPTION
[0021] like Figure 1 As shown, the present invention proposes a method for intelligent identification and targeted spraying of pests and diseases based on machine vision, comprising the following steps:
[0022] Step S1: Obtain a multispectral image sequence I(x, y, λ, t) containing spatial coordinates (x, y), wavelength λ, and time t from an image acquisition device. Combined with the temperature data T(t), humidity data H(t), and illumination data L(t) collected by the environmental sensor, a fused image sequence is obtained through multi-source data processing, and the final fused image I_final(x, y, λ) is obtained based on temporal feature extraction.
[0023] Step S2: Obtain the final fused image I_final(x, y, λ), extract the target area through multi-scale feature transformation and topological flow analysis, obtain the precise boundary by combining curvature flow optimization, and perform regional feature extraction and regional relationship analysis to obtain the regional feature set F_final, the regional boundary set C_final and the regional relationship description Relations.
[0024] Step S3: Obtain the regional feature set F_final, regional relationship description Relations, and regional boundary set C_final. Combined with historical data and environmental parameters, through multimodal feature fusion, time series dynamic analysis, and state assessment, obtain the state assessment report Report, behavior pattern description BF, and prevention and control plan Plan.
[0025] Step S4: Obtain the control plan Plan, status assessment report Report, and area boundary set C_final. Through target area optimization, trajectory planning, parameter adaptive control, and real-time monitoring, generate the final optimization plan O and adjustment parameter set AP, and send them to the spraying device.
[0026] like Figure 2 As shown, according to one aspect of the present application, step S1 is further:
[0027] Step S11, obtain the original multispectral image sequence I(x, y, λ, t) of spatial coordinates (x, y), wavelength λ and time t, construct a spectral response matrix R(λ) that characterizes the response characteristics of different bands, calculate the deviation matrix D(x, y) that characterizes the spatial position deviation between different bands, multiply the spectral response matrix R(λ) by the original multispectral image sequence I, and calculate the square of the difference with the deviation matrix D(x, y), and perform a minimization operation after weighted summation with the spectral-spatial smoothing term Ω(I) to obtain the corrected multispectral image sequence I'(x, y, λ, t).
[0028] Step S12: Obtain the corrected multispectral image sequence I'(x, y, λ, t) and environmental sensor data E(t), construct an environmental impact model M(E) based on temperature T(t), humidity H(t) and light L(t), multiply the environmental impact model M(E) by the position weighting function W(x, y) to obtain a compensation coefficient C(x, y, t), perform a tensor compensation operation on the compensation coefficient C(x, y, t) and the corrected multispectral image sequence I'(x, y, λ, t), and obtain an environmentally compensated image I''(x, y, λ, t).
[0029] Step S13, obtain the compensated image I''(x, y, λ, t), extract the feature tensor F(x, y) containing local directionality and texture complexity, calculate the enhancement parameter matrix P(x, y) through the feature-parameter mapping function g, and perform a nonlinear enhancement operation on the enhancement parameter matrix P(x, y) and the compensated image I''(x, y, λ, t) to obtain the enhanced image I'''(x, y, λ, t).
[0030] Step S14, obtain at least three consecutive frames of enhanced images {I'''(x, y, λ, t-2), I'''(x, y, λ, t-1), I'''(x, y, λ, t)}, calculate the temporal feature flow field V(x, y, t) that describes the changing characteristics of the image sequence, obtain the temporal weight matrix W(t) based on the stability analysis of the temporal feature flow field, and weightedly sum the temporal weight matrix W(t) with the enhanced image I'''(x, y, λ, t) at the corresponding moment to obtain the final fused image I_final(x, y, λ).
[0031] In one embodiment of the present application, an original multispectral image sequence I(x, y, λ, t) is collected, where (x, y) is the spatial coordinate, λ is the wavelength, and t is the acquisition time; a spectral-spatial joint correction method is used to construct a spectral response matrix R(λ) to represent the response characteristics of different bands; a spatial position deviation matrix D(x, y) is calculated to represent the spatial position deviation between different bands; and a joint optimization function is applied: F(I)=argmin{||R(λ)·ID(x, y)|| 2 +α·Ω(I)}, where Ω(I) is the spectral-spatial smoothing term and α is the weight coefficient; the output is the corrected multispectral image sequence I'(x, y, λ, t).
[0032] Based on the corrected image I'(x, y, λ, t) and environmental sensor data E(t) = {temperature T(t), humidity H(t), light L(t)}, an environmental compensation algorithm is used; an environmental impact model is constructed: M(E) = f(T, H, L), where f is a linear mapping function; the compensation coefficient is calculated: C(x, y, t) = M(E)·W(x, y), where W(x, y) is a position weighted function; compensation is applied to obtain the environmentally compensated image I''(x, y, λ, t) = I'(x, y, λ, t)ΘC(x, y, t), where Θ is a newly defined tensor compensation operator.
[0033] Based on the compensated image I''(x, y, λ, t), a feature tensor F(x, y) is constructed through an adaptive enhancement method based on local features, which includes features such as local directionality and texture complexity. The enhancement parameter matrix P(x, y) is calculated: P=g(F), where g is the feature-parameter mapping function. Adaptive enhancement is applied to obtain the enhanced image I'''(x, y, λ, t)=h(I'', P), where h is a nonlinear enhancement function.
[0034] Based on the enhanced continuous multi-frame images {I'''(x, y, λ, t-2), I'''(x, y, λ, t-1), I'''(x, y, λ, t)}, a temporal feature flow field V(x, y, t) is constructed through the temporal fusion algorithm to describe the changing characteristics in the image sequence; based on the stability analysis of the feature flow field, the temporal weight matrix W(t) is calculated; and by applying temporal fusion, the final fused image I_final(x, y, λ)=∑[W(t)·I'''(x, y, λ, t)].
[0035] This embodiment achieves high-precision correction of multispectral data and elimination of environmental interference through a spectral-spatial joint correction method. Specifically, the following are embodied: the construction method of the spectral response matrix enables accurate characterization of the response characteristics between different bands, and the introduction of the spatial position deviation matrix solves the position deviation problem in the multispectral image acquisition process; the correction of spectral response and spatial position is unified into a joint optimization function for processing, avoiding the error accumulation caused by traditional step-by-step correction; by introducing an environmental impact model and a tensor compensation operator, accurate compensation for environmental factors such as temperature, humidity, and light is achieved, and the dynamic calculation of the compensation coefficient ensures the stability of image quality under environmental changes; an adaptive enhancement method based on local features is adopted, and the selective enhancement of image details is achieved through the combination of feature tensors and enhancement parameter matrices; finally, by constructing a temporal feature flow field and a temporal weight matrix, the temporal consistency problem in the image sequence is solved. This embodiment enables the system to obtain high-quality multispectral image data in complex environments, laying a solid data foundation for subsequent pest and disease identification.
[0036] According to one aspect of the present application, step S11 is further as follows:
[0037] Step S111: Obtain an original multispectral image sequence I(x, y, λ, t) containing spatial coordinates (x, y), wavelength λ, and time t, calculate the signal-to-noise ratio SNR(λ) of each band according to the noise model N(λ) of the sensor, construct an adaptive filter kernel K(λ) for each band, and perform a convolution operation on the filter kernel K(λ) and the original image I(x, y, λ, t) to obtain a filtered image sequence I_f(x, y, λ, t).
[0038] Step S112: Obtain the filtered image sequence I_f(x, y, λ, t), read the spectral response reference data B(λ) from the pre-stored calibration data, calculate the spectral response curve S(x, y, λ) at each spatial position (x, y), and calculate the inter-band correlation coefficient matrix C(λ) based on the response curve. i ,λ j ), perform eigendecomposition on the correlation coefficient matrix to obtain the principal eigenvector v(λ) and eigenvalue σ(λ), and construct the spectral response matrix R(λ)=v(λ)·σ(λ).
[0039] Step S113: Obtain the spectral response matrix R(λ) and the filtered image sequence I_f(x, y, λ, t), calculate the cross-correlation function ρ(x, y, Δλ) between each adjacent band, construct the displacement field U(x, y, λ) based on the cross-correlation peak position, and perform surface fitting on the displacement field to obtain the spatial position deviation function D(x, y).
[0040] Step S114: Obtain the spectral response matrix R(λ), the spatial position deviation function D(x, y), and the filtered image sequence I_f(x, y, λ, t), and construct a joint optimization objective function J(I)=||R(λ)·ID(x, y)|| 2 , calculate the gradient ▽J(I) of the objective function with respect to the image I, iteratively update the image data based on the gradient information, and obtain the preliminary corrected image sequence I_c(x, y, λ, t).
[0041] Step S115, obtain the preliminary corrected image sequence I_c(x, y, λ, t), calculate the local spectral-spatial consistency index L(x, y), construct a weight function w(x, y) based on the consistency index, and apply weighted smoothing to the preliminary corrected image: I'(x, y, λ, t)=I_c(x, y, λ, t)Θw(x, y), where Θ represents the local weighted average operation, to obtain the final corrected multispectral image sequence I'(x, y, λ, t).
[0042] This embodiment achieves high-quality basic data acquisition through a multispectral image preprocessing system. The adaptive filtering algorithm effectively suppresses various imaging noises through dynamic adjustment of the noise model and the filter kernel; in the spectral response analysis process, accurate spectral calibration is achieved through the introduction of spectral response benchmark data and correlation coefficient matrix; the position deviation calculation solves the spatial registration problem of multispectral images through the construction of cross-correlation function and displacement field; the joint correction process achieves unified correction of spectral and spatial information through the optimization of the objective function; and finally, the stability and reliability of the correction results are ensured through the application of local consistency indicators and weight functions. This embodiment effectively solves various technical problems in multispectral imaging and provides a high-quality data foundation for subsequent feature extraction and analysis.
[0043] like Figure 3 As shown, according to one aspect of the present application, step S2 is further:
[0044] Step S21: Get the final fused image I_final(x, y, λ), and construct a scale transformation operator S(k)={s1, s2, ..., s k}, perform feature transformation on the final fused image I_final and each scale operator sᵢ to obtain the feature tensor F(x, y, k). Calculate the adaptive weight w(k) for each scale. Take the weighted sum of the feature tensor F(x, y, k) and the corresponding weight w(k) to obtain the multi-scale feature map M(x, y). k is a preset natural number.
[0045] Step S22: Obtain the multi-scale feature map M(x, y) and the final fused image I_final(x, y, λ), calculate the gradient of the multi-scale feature map M(x, y) and multiply it with the gradient enhancement function G of the final fused image I_final to obtain the topological flow field V(x, y), calculate the divergence D(x, y) of the flow field V(x, y), filter the seed point set S according to the divergence value, and perform region growing operation from the seed point set S based on the flow field V(x, y) and the divergence D(x, y) to obtain the initial region map R(x, y).
[0046] Step S23, obtain the initial region map R(x, y) and the multi-scale feature map M(x, y), extract the boundary curve C(s) of the initial region map R(x, y), calculate the curvature κ of the boundary curve C(s) and multiply it with the feature weight function β(M(C(s))) to obtain the curvature field K(s); based on the boundary curve, calculate the boundary normal vector N(s); multiply the curvature field K(s) with the boundary normal vector N(s) to obtain the boundary evolution rate ΨC / Ψt, where Ψ is the partial derivative, iteratively update the boundary curve until the modulus of the evolution rate is less than the preset threshold ε, and obtain the optimized boundary curve C_final as the region boundary set.
[0047] Step S24: Obtain the boundary curve C_final and the final fused image I_final (x, y, λ), calculate the shape feature matrix H of the boundary curve, the spectral feature matrix L and the texture feature matrix T within the region, respectively, and combine them to form a regional descriptor D = {H, L, T}, calculate the reliability index R of each feature in the descriptor D, screen and combine the features according to the reliability index R, and obtain the final regional feature set F_final.
[0048] Step S25: Obtain the boundary set {C_final}, construct a region adjacency graph G based on the boundary set, calculate the spatial relationship matrix P and feature similarity matrix S between regions, combine the adjacency graph G with the relationship matrix {P, S} to perform relationship analysis operations, and obtain the region relationship description Relations.
[0049] In one embodiment of the present application, based on the fused image I_final(x, y, λ), a scale transformation operator S(k) is constructed by a multi-scale feature extraction algorithm: S(k)={s1, s2, ..., s k}, where k is the number of scales and each sᵢ represents a scale level; calculate the feature tensor of each scale: F(x, y, k) = T(I_final, S(k)), where T is the feature transformation function, which comprehensively considers spatial and spectral information; generate a multi-scale feature map: M(x, y) = ∑[w(k) · F(x, y, k)], where w(k) is the adaptive weight of each scale.
[0050] Based on the multi-scale feature map M(x, y) and the original fused image I_final(x, y, λ), a topological flow field is constructed through a region growing algorithm based on topological flow: V(x, y) = ▽M(x, y)·G(I_final), where G is the gradient enhancement function. The flow field divergence is calculated: D(x, y) = div(V); the seed point set is determined: S = {(x, y) | D(x, y) > θ}, where θ is the adaptive threshold; and region growing is applied to obtain the initial region map R(x, y) = Growth(S, V, D), where Growth is a growth function based on the flow field.
[0051] Based on the initial region map R(x, y) and the feature map M(x, y), the initial boundary curve is extracted through the boundary optimization algorithm based on curvature flow: C(s)=Boundary(R), where s is the curve parameter and Boundary represents the boundary curve extraction function; the curvature field is calculated: K(s)=κ(C(s))·β(M(C(s))), where κ is the curvature calculation function and β is the feature weight function; curvature flow evolution is applied: ΨC / Ψt=K(s)·N(s), where N(s) is the normal vector; iterative optimization is performed until convergence: C_final=lim(C(t)), when ||ΨC / Ψt||<ε; the optimized boundary curve C_final is output.
[0052] Based on the optimized boundary C_final and the original fused image I_final(x, y, λ), the regional descriptor is constructed through the regional feature extraction algorithm: D={shape feature matrix H, spectral feature matrix L, texture feature matrix T}; where H=Shape(C_final), Shape represents the shape feature extraction function; L=Spectral(I_final, C_final), Spectral represents the spectral feature extraction function; T=Texture(I_final, C_final), Texture represents the texture feature extraction function; calculate the feature reliability: R=Reliability(D), where Reliability is the feature reliability evaluation function; perform feature screening and combination to obtain the final regional feature set F_final=Select(D, R), where Select is the feature selection function and R is the corresponding reliability index.
[0053] Based on all the extracted regional feature sets {F_final} and regional boundary sets {C_final}, the regional adjacency graph is constructed through the regional relationship analysis algorithm: G=BuildGraph({C_final}), where BuildGraph represents the regional adjacency graph function; the relationship features between regions are calculated: E={spatial relationship matrix P, feature similarity matrix S}, where P=SpatialRel({C_final}), SpatialRel represents the spatial relationship calculation function; S=FeatureSim({F_final}), FeatureSim represents the feature similarity calculation function; the regional relationship description Relations=AnalyzeRel(G, E) is generated, where AnalyzeRel represents the regional relationship analysis function.
[0054] This embodiment realizes accurate target area extraction under complex background by introducing topological flow theory and curvature flow algorithm. In the process of multi-scale feature extraction, the system can capture target features at different spatial scales through the cooperation of feature transformation function and adaptive weight; the construction method of topological flow field combines gradient information and structural information, so that the regional growth process can accurately track the target boundary; the boundary optimization algorithm based on curvature flow realizes the refined evolution of boundary curve by introducing feature weight function, and the construction of curvature field ensures the smoothness and accuracy of boundary shape; in the process of regional feature extraction, the combination of shape feature extraction function Shape, spectral feature extraction function Spectral and texture feature extraction function Texture ensures the comprehensive feature characterization of target area; through the synergistic effect of spatial relationship matrix and feature similarity matrix in regional relationship analysis, not only the accurate segmentation of single target is achieved, but also the topological association between targets is established, which is of great significance for understanding the distribution pattern of complex pests and diseases.
[0055] According to one aspect of the present application, step S22 is further as follows:
[0056] Step S221, obtain the multi-scale feature map M(x, y) and the fused image I_final(x, y, λ), calculate the spatial gradient vector field ▽M(x, y) of the multi-scale feature map M(x, y), construct the second-order derivative matrix H(x, y), calculate the characteristic curvature κ(x, y) based on the gradient vector field and the second-order derivative matrix, and convolve the curvature value with the preset morphological operator φ(x, y) to obtain the initial topological flow field V0(x, y).
[0057] Step S222: Obtain the initial topological flow field V0(x, y) and the fused image I_final(x, y, λ), calculate the local structure tensor T(x, y) of the image, construct the anisotropic function A(x, y) based on the structure tensor eigenvalues λ1(x, y) and λ2(x, y), and combine the initial flow field V0(x, y) with the anisotropic function A(x, y) to obtain the enhanced flow field V(x, y) = V0(x, y)·(1+A(x, y)).
[0058] Step S223, obtain the enhanced flow field V(x, y), calculate the divergence of the flow field D(x, y) = div(V), construct a local extreme value detection operator E(x, y), apply extreme value detection to the divergence graph D(x, y) to obtain the candidate seed point set S0, calculate the stability index σ(x, y) of each candidate point, and filter according to the stability index to obtain the final seed point set S = {p|(x, y), σ(x, y)>τ}.
[0059] Step S224: Obtain the seed point set S, the enhanced flow field V(x, y), and the fused image I_final(x, y, λ), construct a local growth region R_i with each seed point as the center, calculate the flow field direction θ(x, y) and intensity ρ(x, y) of the region boundary point, dynamically adjust the growth step Δr(x, y) according to the direction and intensity information, and gradually expand the growth region to obtain multiple sub-region sets {R_i}.
[0060] Step S225, obtain the sub-region set {R_i}, calculate the boundary strength B(i, j) and region similarity S(i, j) between adjacent regions, construct the region merging cost function C(i, j) = f(B(i, j), S(i, j)), merge the corresponding regions when the cost function value is less than the threshold, perform a split operation on the regions with an area less than the threshold, and finally obtain the initial region map R(x, y).
[0061] This embodiment achieves accurate target segmentation in complex backgrounds through the topological flow region growing algorithm. In the process of constructing the initial topological flow field, the structural features of the image are accurately captured through the combination of the gradient vector field and the second-order derivative matrix. The introduction of the characteristic curvature makes the boundary detection more sensitive; the flow field enhancement process effectively improves the detection ability of weak boundaries through the construction of the structure tensor and the anisotropic function; the seed point selection algorithm ensures the reliability of the growth starting point through the combination of divergence calculation and stability index; in the process of region growth, directional growth is achieved through the dynamic adjustment of the flow field direction and intensity, overcoming the defect of easy leakage of the traditional region growing algorithm; the region merging process ensures the integrity and accuracy of the segmentation results through the comprehensive evaluation of boundary strength and regional similarity. This embodiment is particularly suitable for processing complex targets in pest and disease images, and can accurately distinguish regions with similar morphology but different attributes.
[0062] like Figure 4 As shown, according to one aspect of the present application, step S3 is further:
[0063] Step S31, obtain the regional feature set F_final, relationship description Relations and boundary curve C_final, extract the context feature Context(r) for each target region r, construct the feature tensor T(r)={F_final(r), Relations(r), Context(r)}, calculate the association matrix A(i, j) between different modal features, perform SoftMax operation on each row of the association matrix A to obtain the weight w(i), and add the weighted sum of each component of the feature tensor T(r) and the corresponding weight w(i) to obtain the fused feature tensor F_fused.
[0064] Step S32: Obtain the fused feature tensor F_fused and the historical feature sequence H={F_fused(tk)}, k=1, 2, ..., n, calculate the time series flow V(t) of the feature sequence, extract the change rate matrix Δ, trend matrix Tr and periodic feature matrix P of the time series flow V(t), and combine these feature matrices to obtain the time series feature descriptor TD.
[0065] Step S33: Obtain the fused feature F_fused, the time series feature TD, and the environmental parameter set E = {temperature T, humidity H, light L}, construct the state vector S(t), calculate the density index D, the diffusion rate R, and the hazard level H, and combine and analyze these indicators to obtain the status assessment report Report.
[0066] Step S34: Obtain the state vector S(t) and historical behavior data B={S(tk)}, k=1, 2, ..., m, extract the activity pattern feature A, migration feature M, and aggregation feature C, construct the behavior feature space BF={A, M, C} as the behavior pattern description, perform prediction operations based on the behavior feature space, and obtain the prediction result P(t+1) for the next moment.
[0067] Step S35: Obtain the status assessment report Report, behavior characteristics BF, prediction results P(t+1) and historical control effect data H_effect, construct a decision feature matrix D, calculate the optimal spraying time t*, spraying range R and pesticide concentration C, combine the optimization parameter set T={t*, R*, C*} with the historical effect data H_effect, and obtain the control plan Plan.
[0068] In one embodiment of the present application, based on the regional feature set F_final, the relationship description Relations, the regional relationship graph G and the original fused image I_final(x, y, λ), a multimodal feature fusion algorithm is used to construct a feature tensor space: T(r)={F_final(r), Relations(r), Context(r)}, where r represents the target region and Context is the context feature extraction function; the inter-modal correlation matrix is calculated: A(i, j)=CrossCorr(T_i, T_j), where CrossCorr is the cross-modal correlation function; dynamic weighted fusion is applied to obtain a fused feature tensor F_fused(r)=∑[w(i)T_i(r)], where the weight w(i)=SoftMax(A(i,:)).
[0069] Based on the fused feature tensor F_fused and the historical feature sequence H={F_fused(tk)}, k=1, 2, ..., n, the time series dynamic feature extraction algorithm is used to construct the time series feature flow: V(t)=TemporalFlow(F_fused, H), where TemporalFlow is the time series flow calculation function; dynamic features are extracted: D(t)={change rate matrix Δ, trend matrix Tr, periodic feature matrix P}, where Δ=RateChange(V(t)), RateChange is the change rate calculation function; Tr=TrendAnalysis(V(t)), TrendAnalysis is the trend analysis function; P=CyclicPattern(V(t)), CyclicPattern is the periodic pattern extraction function; generate the time series feature descriptor TD=CombineTemp(D(t)), where CombineTemp is the time series feature combination function.
[0070] Based on the fusion feature F_fused, the time series feature TD and the environmental parameter set E={temperature T, humidity H, light L}, the state assessment algorithm is used to construct the state vector: S(t)=StateVector(F_fused, TD, E), where StateVector is the state mapping function; the hazard level is calculated: L(t)={density index D, diffusion rate R, hazard level H}, where D=DensityIndex(S(t)), DensityIndex represents the density calculation function; R=SpreadRate(S(t)), SpreadRate represents the diffusion rate calculation function; H=HarmLevel(S(t)), HarmLevel represents the hazard assessment function; and a state assessment report Report=EvaluateState(L(t)) is generated, where EvaluateState represents the state assessment function.
[0071] Based on the state vector S(t) and historical behavior data B={S(tk)}, k=1, 2, ..., m, a behavior pattern analysis algorithm is used to construct a behavior feature space: BF={activity pattern A, migration feature M, cluster feature C}, where A=ActivityPattern(S(t), B), ActivityPattern is the activity pattern extraction function; M=MigrationFeature(S(t), B), MigrationFeature is the migration feature calculation function; C=ClusterFeature(S(t), B), ClusterFeature is the cluster feature analysis function; behavior prediction modeling is performed to obtain the prediction result P(t+1)=BehaviorPredict(BF), where BehaviorPredict is the behavior prediction function and BF is the behavior pattern description.
[0072] Based on the status assessment report Report, behavior pattern description BF, prediction result P(t+1) and historical control effect data H_effect, the control strategy generation algorithm is used to construct a decision feature matrix: D=DecisionMatrix(Report, BF, P(t+1)), where DecisionMatrix represents the decision feature matrix function; the control parameters are calculated: T={spraying time t*, spraying range R*, pesticide concentration C*}, where t*=OptimalTime(D), OptimalTime represents the timing optimization function; R*=OptimalRange(D), OptimalRange represents the range optimization function; C*=OptimalConc(D), OptimalConc represents the concentration optimization function; the control plan Plan=GeneratePlan(T, H_effect) is generated, where GeneratePlan represents the control plan generation function.
[0073] This embodiment achieves accurate assessment of the status of pests and diseases and behavior prediction by introducing multimodal feature fusion and time series dynamic analysis methods. In the multimodal feature fusion process, the organic combination of spatial features, temporal features and contextual information is achieved through the construction of feature tensors and the calculation of inter-modal correlation matrices; cross-modal correlation functions and dynamic weight calculation methods enable feature information from different sources to be adaptively fused according to their importance; the time series dynamic feature extraction algorithm accurately captures the dynamic characteristics of pest and disease development through the construction of time series feature streams, and the synergistic effect of the change rate matrix, trend matrix and periodic feature matrix enables the system to fully grasp the development laws of pests and diseases; in the state assessment process, a complete pest and disease hazard degree assessment system is established through a comprehensive analysis of density index, diffusion rate and hazard level; behavioral pattern analysis, through the combination of activity pattern characteristics, migration characteristics and aggregation characteristics, can not only describe the current state, but also predict the development trend of pests and diseases, providing a scientific basis for the formulation of prevention and control strategies. This embodiment improves the accuracy and predictability of pest and disease control.
[0074] According to one aspect of the present application, step S31 is further as follows:
[0075] Step S311: Obtain the regional feature set F_final, relationship description Relations and boundary curve C_final, construct a local feature window W(r) for each target region r, calculate the statistical moment feature M(r), texture feature T(r) and shape feature S(r) in the window, and combine these features with the original feature F_final(r) to form an enhanced feature vector E(r).
[0076] Step S312: Obtain the enhanced feature vector E(r), relationship description Relations, and context feature Context(r), calculate the mutual information matrix I(i, j) between different feature modes, construct a feature graph G_f based on the mutual information, apply spectral clustering to the feature graph to obtain the modal group M_k, and calculate the association matrix A(i, j) between the modal groups.
[0077] Step S313: Obtain the modal group M_k and the association matrix A(i, j), construct a feature importance evaluation function L(f), calculate the local importance l_local(f) and cross-modal importance l_cross(f) of each feature within its modal group, and weightedly combine the two importance indicators to obtain a comprehensive importance score S(f).
[0078] Step S314: Obtain the feature importance score S(f) and the modal group M_k, construct an attention function α(f) based on the importance score, calculate the intra-group weight w_intra(k) and inter-group weight w_inter(k) of each modal group, and normalize the weights to obtain the final dynamic weight coefficient w(f).
[0079] Step S315: Obtain the enhanced feature vector E(r) and weight coefficient w(f), perform weighted feature combination to obtain the initial fused feature F0_fused, construct feature consistency constraint C(F), optimize the fused feature under the constraint condition, and obtain the final fused feature tensor F_fused.
[0080] In another embodiment of the present application, step S31 may also be:
[0081] Step S311, obtain the regional feature set F_final, relationship description Relations and fused image I_final(x, y, λ), construct a local feature window W(r) for each target region r, calculate the statistical moment feature M(r), texture feature T(r) and shape feature S(r) in the window, calculate the regional growth history feature H(r, t) = {area change rate A'(t), shape change rate S'(t), texture change rate T'(t)}, and combine the spatial feature with the historical feature to form an enhanced feature vector E(r).
[0082] Step S312, obtain the enhanced feature vector E(r) and the time series feature sequence {E(r, tk)} in the historical database, k=1, 2, ..., n, calculate the autocorrelation function R(τ) and cross-correlation function C(τ) of the feature sequence, extract the periodic feature P(r) and trend feature Tr(r), construct the time series feature descriptor TS(r)={P(r), Tr(r)}, and combine the time series feature descriptor with the spatial feature to obtain the spatiotemporal feature vector ST(r).
[0083] Step S313: Obtain the spatiotemporal feature vector ST(r), relationship description Relations and context feature Context(r), calculate the mutual information matrix I(i, j) between different feature modes, calculate the coupling degree C(s, t) of each temporal feature with the spatial feature, construct an enhanced feature graph G_f based on the mutual information and coupling degree, apply spectral clustering to the feature graph to obtain the modal group M_k, and calculate the association matrix A(i, j) between the modal groups.
[0084] Step S314: Obtain the modal group M_k and the association matrix A(i, j), construct the spatiotemporal feature importance evaluation function L(f, t), calculate the local importance l_local(f), cross-modal importance l_cross(f), and temporal importance l_temp(f) of each feature within its modal group, and optimize the weight coefficients {w_l, w_c, w_t} of the three importance indicators based on the dynamic programming algorithm to obtain the comprehensive importance score S(f).
[0085] Step S315: Obtain the feature importance score S(f) and modal group M_k, construct the temporal attention mechanism α(f, t), calculate the intra-group weight w_intra(k), inter-group weight w_inter(k) and temporal weight w_temp(k) of each modal group, and normalize the weights to obtain the dynamic weight coefficient w(f, t).
[0086] Step S316: Obtain the spatiotemporal feature vector ST(r) and the weight coefficient w(f, t), perform weighted feature combination to obtain the initial fused feature F0_fused, construct the spatiotemporal consistency constraint C(F, t) and the feature evolution constraint E(F, t), optimize the fused feature under the dual constraint conditions, and obtain the final fused feature tensor F_fused.
[0087] Step S317, obtain the fused feature tensor F_fused and the historical feature database, calculate the feature evolution trajectory T(r, t), extract the key time point sequence {t_k}, build a prediction model P(r, t) based on the time series pattern, generate the feature prediction value F_pred(t+Δt) at the future time t+Δt, and combine the predicted feature with the current feature to obtain the enhanced fused feature F_fused_enhanced.
[0088] This embodiment achieves comprehensive characterization and dynamic tracking of pest and disease characteristics through multimodal feature fusion and time series analysis methods. In the process of enhancing feature vector construction, a multi-dimensional feature description of the target is established through the combination of statistical moment features, texture features, and historical features; time series feature analysis accurately captures the periodicity and trend of pest and disease development through the calculation of autocorrelation functions and cross-correlation functions; feature importance assessment achieves adaptive feature selection through the dynamic balance of local importance, cross-modal importance, and time series importance; the time series attention mechanism ensures the spatiotemporal coherence of feature fusion through the dual constraints of spatiotemporal consistency constraints and feature evolution constraints; the feature prediction module achieves accurate prediction of the development trend of pests and diseases through the coordination of evolutionary trajectories and prediction models. This embodiment not only improves the richness of feature expression, but also enhances the system's ability to understand the laws of pest and disease development.
[0089] like Figure 5 As shown, according to one aspect of the present application, step S4 is further:
[0090] Step S41, obtain the prevention and control plan Plan, the regional boundary set C_final and the status assessment report Report, calculate the impact field IF(x, y) according to the boundary data C_final and the assessment report Report, calculate the urgency E, the hazard H and the prevention and control difficulty D based on the impact field IF(x, y), construct the priority matrix P(x, y) = {E, H, D}, perform regional optimization operation on the impact field IF(x, y) and the priority matrix P(x, y), and obtain the optimized spraying area R_opt.
[0091] Step S42: Obtain the spraying area R_opt, priority data P, and environmental parameters E = {wind speed W, temperature T, humidity H}, construct a constraint field CF based on the environmental parameters E and the spraying area R_opt, calculate the optimal position matrix Pos, velocity matrix V, and acceleration matrix A, perform trajectory generation operation on the control point parameters CP = {Pos, V, A} and the constraint field CF to obtain the optimal spraying trajectory T.
[0092] Step S43: Obtain the spraying trajectory T, control parameters CP and real-time environmental data E_real, construct a spraying dynamics model SM, calculate the optimal flow rate Q based on the spraying dynamics model SM and the real-time environmental data E_real, calculate the optimal pressure P based on the flow rate Q, calculate the optimal atomization degree A based on the pressure P, and combine the spraying parameters SP={Q, P, A} with the dynamics model SM to generate the control instruction C.
[0093] Step S44: Obtain a control instruction C. Based on the control instruction C, obtain a real-time image stream I_real(t). Extract coverage features C, deposition features D, and drift features F from the real-time image stream I_real(t). Construct a monitoring feature space MF = {C, D, F}. Calculate the uniformity index U, utilization index R, and loss rate index L based on the monitoring feature space MF. Construct an effect index set E = {U, R, L}. Combine the monitoring feature MF with the effect index E to generate monitoring feedback F.
[0094] Step S45: Obtain monitoring feedback F, effect index E, and historical optimization data H_opt, construct an optimization objective function OF, calculate the trajectory correction amount ΔT, parameter correction amount ΔP, and area correction amount ΔR based on the optimization objective function OF, construct an adjustment parameter set AP={ΔT, ΔP, ΔR}, combine the adjustment parameter set AP with the historical optimization data H_opt to generate the final optimization solution O, and send the final optimization solution O and the adjustment parameter set AP to the spraying device.
[0095] In one embodiment of the present application, based on the prevention and control plan Plan, the optimization parameter set T, the pest and disease area boundary set {C_final} and the status assessment report Report, the target area optimization algorithm is used to construct a prevention and control impact field: IF(x, y)=ImpactField(C_final, Report), where ImpactField is the impact field generation function, taking into account the spread trend of pests and diseases; the priority matrix is calculated: P(x, y)={urgency E, hazard H, prevention and control difficulty D}, where E=EmergencyLevel(IF), EmergencyLevel represents the urgency evaluation function; H=HarmWeight(IF), HarmWeight represents the hazard weight calculation function; D=DifficultyScore(IF), DifficultyScore represents the difficulty scoring function; and the optimal spraying area R_opt=OptimizeRegion(P, IF) is generated, where OptimizeRegion is the regional optimization function.
[0096] Based on the optimized spraying area R_opt, priority data P and environmental parameters E={wind speed W, temperature T, humidity H}, the trajectory planning algorithm is used to construct the environmental constraint field: CF=ConstraintField(E, R_opt), where ConstraintField is the constraint field construction function; the trajectory control point is calculated: CP={position matrix Pos, velocity matrix V, acceleration matrix A}, where Pos=OptimalPosition(CF, P), OptimalPosition is the position optimization function; V=VelocityControl(CF, Pos), VelocityControl represents the velocity control function; A=AccelerationPlan(CF, V), AccelerationPlan represents the acceleration planning function; the optimal spraying trajectory is generated T=GenerateTrajectory(CP, CF), where GenerateTrajectory is the trajectory generation function.
[0097] Based on the spraying trajectory T, control parameters CP and real-time environmental data E_real, a spraying model is constructed through a parameter adaptive control algorithm: SM=SprayModel(T, CP), where SprayModel is the spraying dynamics model; the spraying parameters are calculated: SP={flow rate Q, pressure P, atomization degree A}, where Q=FlowControl(SM, E_real), FlowControl is the flow control function; P=PressureAdapt(SM, Q), PressureAdapt is the pressure adaptation function; A=AtomizationOpt(SM, P), AtomizationOpt is the atomization optimization function; real-time control instructions are generated: C=ControlCommand(SP, SM), where ControlCommand represents the control instruction generation function.
[0098] Based on the control instruction C, spraying parameters SP and real-time image stream I_real(t), the monitoring feature space is constructed through the effect monitoring algorithm: MF={coverage feature C, deposition feature D, drift feature F}, where C=CoverageFeature(I_real), CoverageFeature is the coverage feature extraction function; D=DepositionFeature(I_real), DepositionFeature is the deposition feature extraction function; F=DriftFeature(I_real), DriftFeature is the drift feature extraction function; the effect index is calculated: E={uniformity U, utilization R, loss rate L}; where U=UniformityIndex(MF), UniformityIndex is the uniformity calculation function; R=UtilizationRate(MF), UtilizationRate is the utilization calculation function; L=LossRate(MF), LossRate is the loss rate calculation function; real-time feedback is generated: F=GenerateFeedback(E, MF), where GenerateFeedback is the real-time feedback function.
[0099] Based on the monitoring feedback F, effect index E and historical optimization data H_opt, the closed-loop optimization algorithm is used to construct the optimization objective function: OF=ObjectiveFunction(F, E), where ObjectiveFunction is a multi-objective optimization function; the adjustment parameters are calculated: AP={trajectory correction ΔT, parameter correction ΔP, region correction ΔR}, where ΔT=TrajectoryUpdate(OF), TrajectoryUpdate is the trajectory update function; ΔP=ParameterUpdate(OF), ParameterUpdate is the parameter update function; ΔR=RegionUpdate(OF), RegionUpdate is the region update function; the optimization plan is generated: O=OptimizePlan(AP, H_opt), where the optimization plan function is extracted.
[0100] This embodiment achieves high-precision, low-loss pest and disease control by constructing an intelligent targeted spraying control system. During the target area optimization process, the optimal allocation of control resources is achieved through the synergistic effect of the influence field and the priority matrix; the trajectory planning algorithm ensures the smoothness and executability of the spraying trajectory through the coordination of the environmental constraint field and the control point optimization; the spraying parameter adaptive control system achieves precise regulation of flow, pressure and atomization through the establishment of a spraying dynamics model; the real-time monitoring system establishes a complete control effect evaluation system through comprehensive analysis of coverage characteristics, deposition characteristics and drift characteristics; the closed-loop optimization mechanism ensures the continuous optimization of the control effect through dynamic adjustment of trajectory correction, parameter correction and area correction. This embodiment improves the utilization rate of pesticides, reduces environmental pollution, and achieves savings and environmental protection in agricultural control.
[0101] According to one aspect of the present application, step S42 is further as follows:
[0102] Step S421, obtain the spraying area R_opt, priority data P and environmental parameters E = {wind speed W, temperature T, humidity H}, calculate the wind field distribution function W(x, y, z), construct the temperature gradient field ▽T(x, y, z) and the humidity gradient field ▽H(x, y, z), combine these gradient fields with the preset physical constraint function φ(E), and obtain the environmental constraint field CF.
[0103] Step S422: Obtain the environmental constraint field CF and the spraying area R_opt, calculate the priority gradient ▽P(x, y) within the area, construct a cost function J(x, y) based on the constraint field, perform path point sampling in the cost function space to obtain the candidate point set Q, and apply density clustering to the candidate points to obtain the key control point set Pos.
[0104] Step S423: Obtain the control point set Pos and the environmental constraint field CF, calculate the minimum cost path L(i, j) between adjacent control points, construct the speed constraint function v(s), apply the dynamic programming algorithm to each path segment to obtain the speed profile V(s), and combine the speed profiles of all path segments to obtain the complete speed matrix V.
[0105] Step S424: Obtain the velocity matrix V and the path set L(i, j), calculate the velocity change rate dV / dt, construct the acceleration constraint condition A_max(s), optimize the velocity curve under the constraint condition to obtain the acceleration sequence A(s), and smooth the acceleration sequence to obtain the final acceleration matrix A.
[0106] Step S425: Obtain the control point Pos, velocity matrix V, and acceleration matrix A, construct the cubic spline basis function B(t), calculate the path interpolation point sequence P(t), and perform curvature optimization on the interpolation points to obtain a smooth trajectory T as the optimal spraying trajectory.
[0107] This embodiment uses a trajectory planning algorithm to achieve the generation of the optimal spraying path in complex environments. In the environmental constraint modeling process, a complete environmental impact assessment system is established through a comprehensive analysis of the wind field distribution function, temperature gradient field, and humidity gradient field. Control point optimization ensures the rationality of key point distribution through the coordination of cost function and density clustering. The speed planning process achieves a smooth speed transition through the combination of the minimum cost path and the speed constraint function. Acceleration optimization ensures the stability of the motion process through the introduction of constraint conditions. The trajectory smoothing process generates a spraying trajectory that satisfies dynamic constraints and has good smoothness through the application of cubic spline basis functions. This embodiment improves the accuracy and efficiency of spraying operations.
[0108] According to one aspect of the present application, step S43 is further as follows:
[0109] Step S431, obtain the spraying trajectory T, control parameters CP={Pos, V, A}, construct the nozzle motion equation M(t), calculate the fluid dynamics parameter set F={Reynolds number Re, Weber number We}, and combine the motion equation with the fluid parameters to obtain the spraying dynamics model SM.
[0110] Step S432: Obtain the dynamic model SM and real-time environmental data E_real, calculate the droplet distribution function D(r), construct the coverage uniformity objective function U(Q), solve the optimization problem to obtain the optimal flow parameter Q, and perform time series smoothing on the flow parameter to obtain the flow control sequence Q(t).
[0111] Step S433: Obtain the flow sequence Q(t) and the dynamic model SM, calculate the system pressure response function P(Q), construct the pressure fluctuation constraint condition ΔP_max, solve the optimal pressure trajectory P(t) under the constraint condition, and perform feedback correction on the pressure trajectory to obtain the real-time pressure parameter P.
[0112] Step S434: Obtain the pressure parameter P and the flow parameter Q, calculate the atomization characteristic function φ(P, Q), construct the droplet spectrum distribution model D(d, P, Q), optimize the droplet spectrum distribution to obtain the optimal atomization parameter A, and generate the atomization control sequence A(t).
[0113] Step S435: Obtain flow rate Q(t), pressure P(t) and atomization degree A(t), construct actuator response model R(t), calculate control delay τ(t), and generate compensated control instruction sequence C(t).
[0114] This embodiment achieves precise control of the spraying process through a parameter adaptive control system. During the construction of the dynamic model, the dynamic characteristics of the spraying system are accurately described by combining the nozzle motion equation and the fluid mechanics parameter set; flow optimization achieves precise control of the spraying volume through the coordination of the droplet distribution function and the coverage uniformity objective function; pressure regulation ensures the stability of the spraying pressure through the introduction of the pressure response function and pressure fluctuation constraints; atomization characteristic optimization achieves the best atomization effect through the establishment of a droplet spectrum distribution model; control instruction generation ensures the timely and effective execution of control instructions through the application of the actuator response model and control delay compensation. This embodiment improves the uniformity of spraying and the utilization rate of the liquid medicine.
[0115] According to one aspect of the present application, step S44 is further as follows:
[0116] Step S441: Obtain control instruction C, spraying parameters SP = {Q, P, A} and real-time image stream I_real(t), calculate the time difference feature ΔI(t) of the image sequence, extract the motion vector field V(x, y, t), and calculate the spraying trajectory feature T(t) based on the motion vector.
[0117] Step S442: Obtain the trajectory feature T(t) and the real-time image stream I_real(t), calculate the coverage function C(x, y, t) of the target area, construct the coverage uniformity index U(t), analyze the dynamic changes in coverage, and obtain the coverage effect evaluation result E_c.
[0118] Step S443: Acquire the real-time image stream I_real(t), construct the droplet recognition operator D(x, y), calculate the droplet distribution density ρ(x, y), analyze the deposition space distribution characteristics, and obtain the deposition feature matrix D_f.
[0119] Step S444: obtain the motion vector field V(x, y, t), calculate the drift distance field L(x, y), construct the drift influence function I(L), evaluate the drift loss and obtain the drift feature vector F_d.
[0120] Step S445: Obtain the coverage assessment result E_c, step deposition feature D_f and drift feature F_d, construct a comprehensive evaluation function G(E_c, D_f, F_d), calculate the weight w_i of each indicator, and obtain the final monitoring feedback F.
[0121] This embodiment achieves precise evaluation and dynamic optimization of control effectiveness through a real-time monitoring and evaluation system. During image feature extraction, the spraying process is accurately tracked through the calculation of time-difference features and motion vector fields. Coverage effect evaluation achieves quantitative evaluation of spray coverage through the construction of coverage functions and uniformity indicators. Deposition analysis accurately characterizes liquid deposition through the application of droplet recognition operators and density distribution. Drift assessment quantifies liquid drift losses through the combination of drift distance fields and influence functions. Comprehensive evaluation establishes a complete effect evaluation system through the construction of evaluation functions. This embodiment provides a reliable basis for the continuous optimization of the spraying process.
[0122] In another embodiment of the present application, a multispectral camera was used to capture images of tomato plants at 8:00 AM. The wavelengths were set to {450 nm, 550 nm, 660 nm, 730 nm, 850 nm}, with a spatial resolution of 0.5 mm / pixel. Environmental data was also acquired simultaneously: temperature 24°C, relative humidity 85%, and light intensity 15,000 lux. Preprocess each band image: construct the spectral response matrix R(λ), where the response coefficient of the 450nm band is 0.85, the response coefficient of the 550nm band is 0.92, the response coefficient of the 660nm band is 0.95, the response coefficient of the 730nm band is 0.88, and the response coefficient of the 850nm band is 0.82; calculate the spatial position deviation matrix D(x, y), and the maximum deviation between adjacent bands is 2 pixels; apply the joint optimization function, iterate the optimization 10 times, and set the convergence threshold to 0.001; compensate for environmental effects, with a humidity compensation coefficient of 1.15 and a temperature compensation coefficient of 0.95; finally output the corrected 5-band image sequence, with a 35% improvement in signal-to-noise ratio.
[0123] Construct a multi-scale feature map M(x, y): Set the scale sequence S(k) = {1, 2, 4, 8} pixels; compute the feature tensor at each scale, including gradient magnitude and direction information; set the scale weights to {0.4, 0.3, 0.2, 0.1}. Perform region growing based on topological flow: Initialize the topological flow field V(x, y) with a flow field strength threshold of 0.15; calculate the divergence D(x, y), and select points with divergence values greater than 0.25 as seed points; set the initial growth step size to 0.5 pixels and adjust it dynamically based on the flow field strength; set the region merging threshold to 0.85 and the split area threshold to 50 square pixels.
[0124] A spatiotemporal feature vector (ST(r)) was constructed, comprising: morphological features (lesion area, perimeter, and roundness); spectral features (reflectance of each band and the Normalized Difference Vegetation Index (NDVI); textural features (energy, contrast, and correlation of the gray-level co-occurrence matrix); and temporal features (area growth rate and NDVI change rate). Status assessment and prediction were performed, and damage severity indicators were calculated: density index D = lesion area / leaf area (threshold 0.05); spread rate R = 24-hour area growth rate (threshold 20%). Temporal predictions were conducted, predicting the extent of spread over the next 24 hours based on data from the previous three days.
[0125] Construct an environmental constraint field: wind speed influence weight 0.4; temperature influence weight 0.3; humidity influence weight 0.3. Implement spraying control: flow rate parameter is a base flow rate of 2.5 L / min, with a dynamic adjustment range of ±20%. Pressure parameter is a base pressure of 0.3 MPa, with an adjustment step of 0.02 MPa. Atomization parameters are a target particle size of 100 microns, with an allowable deviation of ±15 microns.
[0126] Compared with the traditional step-by-step correction, the spectral-spatial joint correction of this embodiment improves the position accuracy by 40% and the spectral response accuracy by 25%. The boundary positioning accuracy of the topological flow region growth reaches the sub-pixel level, and the weak boundary detection rate is improved by 35%. Through time series feature analysis, the accuracy of disease development prediction reaches 85%, and the warning lead time is increased to 24 hours. Through adaptive spraying control, the liquid utilization rate is increased by 40% and the coverage uniformity is increased by 30%. In the experiment for 7 consecutive days, the system's detection rate for early diseases (lesion area less than 1% of the leaf area) reached 90%, the missed detection rate was less than 5%, and the false detection rate was less than 3%. The amount of liquid used in targeted spraying is reduced by 45% compared with traditional methods, and the prevention and control effect is improved by 35%. In some embodiments, spraying can be carried out using a fixed spraying system, a slide-rail mobile spraying system, or an unmanned aerial vehicle spraying system.
[0127] According to one aspect of the present application, a machine vision-based intelligent pest identification and targeted spraying system includes:
[0128] at least one processor; and,
[0129] a memory communicatively connected to at least one of the processors; wherein,
[0130] The memory stores instructions that can be executed by the processor, and the instructions are used to be executed by the processor to implement the machine vision-based intelligent identification and targeted spraying method of pests and diseases as described in any of the above embodiments.
[0131] In summary, the present invention processes multispectral images to analyze features beyond the visible light range. Spectral response analysis captures subtle differences between pests and plants across different wavelengths. Joint spatial-spectral analysis extracts richer discriminative features. Multimodal feature fusion provides multidimensional analysis. Feature importance assessment and dynamic weight calculation highlight the most discriminative features. Feature combination optimization amplifies subtle differences, thereby solving the problem of identifying pests and plants with similar colors. Topological flow analysis can detect abnormal leaf morphology; curvature analysis and flow field enhancement can detect leaf curling features; and region growing and merging can identify abnormal leaf structures, thereby solving the problem of identifying hidden pests such as leaf rollers. Environmental factors are considered in the spray control system. The environmental constraint field includes humidity effects, while real-time monitoring allows for dynamic parameter adjustment. Adaptive filtering reduces noise caused by water droplet reflections. Joint correction and optimization compensate for image degradation caused by fog, thereby solving the problem of water droplet / fog interference. The present invention can achieve precision pest control in agricultural production, including early pest and disease identification and early warning, precise pesticide application, reduced pesticide usage, and reduced environmental pollution and pesticide residues. It can also enable intelligent agricultural equipment control, trajectory planning for automated spraying equipment, real-time optimization of spraying parameters, and immediate evaluation of pest control effects. In agricultural production management, it can also analyze pest and disease development trends, evaluate and record pest control effects, and optimize pesticide use.
[0132] It should be noted that the various specific technical features described in the above specific embodiments can be combined in any appropriate manner without contradiction. To avoid unnecessary repetition, the present invention will not further describe various possible combinations.
Claims
1. A method for intelligent identification and targeted spraying of pests and diseases based on machine vision, characterized in that: The steps include: Step S1: Acquire a multispectral image sequence containing spatial coordinates, wavelength, and time from an image acquisition device, combine it with temperature data, humidity data, and illumination data collected by an environmental sensor, obtain a fused image sequence through multi-source data processing, and obtain a final fused image based on temporal feature extraction; Step S2: Obtain the final fused image, extract the target region through multi-scale feature transformation and topological flow analysis, obtain the precise boundary by combining curvature flow optimization, and perform regional feature extraction and regional relationship analysis to obtain the regional feature set, regional boundary set, and regional relationship description; Step S3: Obtain regional feature sets, regional relationship descriptions, and regional boundary sets, combine historical data and environmental parameters, and obtain a status assessment report, behavior pattern description, and prevention and control plan through multimodal feature fusion, time series dynamic analysis, and status assessment; Step S4: Obtain the control plan, status assessment report, and area boundary set, and generate the final optimization plan and adjustment parameter set through target area optimization, trajectory planning, parameter adaptive control, and real-time monitoring, and send them to the spraying device.
2. The method for intelligent identification and targeted spraying of pests and diseases based on machine vision according to claim 1, characterized in that: The step S1 is specifically as follows: Step S11, obtaining an original multispectral image sequence including spatial coordinates, wavelength, and time, constructing a spectral response matrix representing the response characteristics of different bands, calculating a deviation matrix representing the spatial position deviation between different bands; multiplying the spectral response matrix by the original multispectral image sequence to obtain a product result; Based on the product result and the deviation matrix, the square error is calculated, and the weighted sum of the square error and the preset spectral-spatial smoothing term is minimized to obtain the corrected multispectral image sequence; Step S12: collecting environmental sensor data, including temperature data, humidity data, and light data; constructing an environmental impact model based on the environmental sensor data; multiplying the environmental impact model by a position weighting function to obtain a compensation coefficient; performing a tensor compensation operation on the compensation coefficient and the corrected multispectral image sequence to obtain an environmentally compensated image; Step S13: extracting a first feature tensor including local directionality and texture complexity based on the environment-compensated image; Based on the first eigentensor, the enhanced parameter matrix is calculated through the feature-parameter mapping function; Perform nonlinear enhancement operation on the enhancement parameter matrix and the compensated image to obtain an enhanced image; Step S14: acquiring at least three consecutive frames of enhanced images, and calculating a temporal characteristic flow field describing the changing characteristics of the image sequence; The stability analysis of the time series characteristic flow field is performed to obtain the time series weight matrix; the time series weight matrix is weighted and summed with the enhanced image at the corresponding moment to obtain the final fused image.
3. The method for intelligent identification and targeted spraying of pests and diseases based on machine vision according to claim 2, characterized in that: The step S2 is specifically as follows: Step S21: construct a scale transformation operator including k scale levels, perform feature transformation operation on the final fused image and each scale transformation operator to obtain a second feature tensor; Calculate the adaptive weights of each scale level, perform weighted summation on the second feature tensor and the corresponding weights to obtain a multi-scale feature map; k is a preset natural number; Step S22: Calculate the gradient of the multi-scale feature map and multiply it with the gradient enhancement function of the final fused image to obtain a topological flow field; Calculate the divergence value of the topological flow field and obtain a set of seed points based on the divergence value; perform region growing operations based on the topological flow field and the divergence value, starting from the seed point set, to obtain an initial region map; Step S23: extract the boundary curve of the initial region map, calculate the curvature of the boundary curve and multiply it with the feature weight function to obtain the curvature field; based on the boundary curve, calculate the boundary normal vector; multiply the curvature field with the boundary normal vector to obtain the boundary evolution speed, iteratively update the boundary curve until the modulus of the boundary evolution speed is less than a preset threshold, and obtain the optimized boundary curve as the region boundary set; Step S24: Based on the region boundary set and the final fused image, the shape feature matrix of the boundary curve, the spectral feature matrix and the texture feature matrix within the region are calculated, and the results are combined to form a region descriptor; the reliability index of each feature in the region descriptor is calculated; and based on the reliability index, the features are screened and combined to obtain the final region feature set; Step S25: construct a region adjacency graph based on the region boundary set; calculate the spatial relationship matrix and feature similarity matrix between regions based on the region adjacency graph and the final region feature set to form a relationship matrix; The regional adjacency graph is combined with the relationship matrix to perform relationship analysis operations and obtain the regional relationship description.
4. The method for intelligent identification and targeted spraying of pests and diseases based on machine vision according to claim 3, characterized in that: The step S3 is specifically as follows: Step S31: Based on the regional feature set, regional relationship description, and regional boundary set, context features are extracted for each target region to construct a third feature tensor; based on the third feature tensor, a correlation matrix between different modal features is calculated; a SoftMax operation is performed on each row of the correlation matrix to obtain a weight; and each component of the third feature tensor is weighted summed with the corresponding weight to obtain a fused feature tensor. Step S32: Obtain a historical feature sequence, and calculate the time series flow of the feature sequence based on the historical feature sequence and the fused feature tensor; extract the change rate matrix, trend matrix, and period feature matrix of the time series flow, perform combination operations, and obtain a time series feature descriptor; Step S33: construct a state vector based on the fused feature tensor, the time series feature descriptor, and the environmental sensor data, calculate the density index, the diffusion rate, and the hazard level; perform a combined analysis of the density index, the diffusion rate, and the hazard level to obtain a state assessment report; Step S34: Obtain historical behavior data, extract activity pattern features, migration features, and aggregation features based on the historical behavior data and state vector, and construct a behavior feature space as a behavior pattern description; Based on the description of the behavior pattern, a prediction operation is performed to obtain the prediction result for the next moment; Step S35: Obtain historical control effect data, and construct a decision feature matrix based on the historical control effect data, status assessment report, behavior pattern description and prediction results; Based on the decision feature matrix, the optimized parameter set is calculated, including the optimal spraying time, spraying range and pesticide concentration; the optimized parameter set is combined with historical control effect data to obtain the control plan.
5. The method for intelligent identification and targeted spraying of pests and diseases based on machine vision according to claim 4, characterized in that: The step S4 is specifically as follows: Step S41: Calculate the impact field based on the control plan, the status assessment report, and the regional boundary set; construct a priority matrix based on the impact field, including urgency, hazard, and control difficulty; perform regional optimization calculations on the impact field and the priority matrix to obtain an optimized spraying area; Step S42: Based on the environmental sensor data and the spraying area, a constraint field is constructed and control point parameters are calculated, including the optimal position matrix, velocity matrix, and acceleration matrix; the control point parameters are combined with the constraint field to perform trajectory generation operations to obtain the optimal spraying trajectory; Step S43: constructing a spraying dynamics model based on the optimal spraying trajectory; acquiring real-time environmental data, and calculating optimal spraying parameters, including optimal flow rate, optimal pressure, and optimal atomization, based on the spraying dynamics model and the real-time environmental data; and combining the optimal spraying parameters with the spraying dynamics model to generate control instructions; Step S44: acquiring a real-time image stream based on the control instruction; constructing a monitoring feature space based on the real-time image stream, including coverage features, deposition features, and drift features; Based on the monitoring feature space, calculate the effect indicator set, including uniformity indicator, utilization indicator and loss rate indicator; combine the monitoring feature space with the effect indicator set to generate monitoring feedback; Step S45: Obtain historical optimization data, and construct an optimization objective function based on the historical optimization data and monitoring feedback; Based on the optimization objective function, a set of adjustment parameters is constructed, including trajectory correction, parameter correction and area correction; The adjustment parameter set is combined with the historical optimization data to generate the final optimization plan, and the final optimization plan and the adjustment parameter set are sent to the spraying device.
6. The method for intelligent identification and targeted spraying of pests and diseases based on machine vision according to claim 5, characterized in that: The step S11 is specifically as follows: Step S111: obtaining an original multispectral image sequence including spatial coordinates, wavelength, and time; calculating the signal-to-noise ratio of each band based on the original multispectral image sequence using a preconfigured sensor noise model; constructing an adaptive filter kernel for each band based on the signal-to-noise ratio; and performing a convolution operation on the adaptive filter kernel and the original multispectral image sequence to obtain a filtered image sequence; Step S112: reading spectral response reference data from pre-stored calibration data; Calculating a spectral response curve at each spatial position based on the spectral response benchmark data and the filtered image sequence; Based on the spectral response curve, the inter-band correlation coefficient matrix is calculated; Perform eigendecomposition on the correlation coefficient matrix to obtain the main eigenvectors and eigenvalues, and construct the spectral response matrix; Step S113: Calculate the cross-correlation function between each adjacent band based on the spectral response matrix and the filtered image sequence; construct a displacement field based on the peak position of the cross-correlation function; perform surface fitting on the displacement field to obtain a spatial position deviation function; Step S114: constructing a joint optimization objective function based on the spectral response matrix, the spatial position deviation function, and the filtered image sequence, and calculating the gradient information of the joint optimization objective function with respect to the image; iteratively updating the image data based on the gradient information to obtain a preliminary corrected image sequence; Step S115: Based on the preliminary corrected image sequence, calculate the local spectral-spatial consistency index and construct a weight function based on the consistency index; based on the weight function, perform weight smoothing on the preliminary corrected image sequence to obtain the final corrected multispectral image sequence.
7. The method for intelligent identification and targeted spraying of pests and diseases based on machine vision according to claim 5, characterized in that: The step S22 is specifically as follows: Step S221: Calculate the spatial gradient vector field of the multi-scale feature map and construct a second-order derivative matrix; calculate the characteristic curvature based on the gradient vector field and the second-order derivative matrix; Convolve the characteristic curvature with the preset morphological operator to obtain the initial topological flow field; Step S222: Calculate the local structure tensor of the final fused image; construct an anisotropy function based on the eigenvalue of the local structure tensor; The enhanced flow field is obtained by combining the initial topological flow field with the anisotropic function; Step S223: Calculate the scatter diagram of the enhanced flow field and construct a local extreme value detection operator; Based on the local extreme value detection operator, the extreme value detection is performed on the scatter graph to obtain a set of candidate seed points; Calculate the stability index of each candidate point in the candidate seed point set; and obtain the final seed point set based on the stability index. Step S224: Based on the final seed point set, a local growth region is constructed with each seed point as the center, and the flow field direction and intensity of the region boundary points are calculated; the growth step size is dynamically adjusted according to the flow field direction and intensity; based on the growth step size, the growth region is gradually expanded to obtain a predetermined set of sub-regions; Step S225: Based on the sub-region set, calculate the boundary strength and region similarity between adjacent regions and construct a region merging cost function; when the region merging cost function value is less than a preset threshold, merge the corresponding regions to obtain an initial region map.
8. The method for intelligent identification and targeted spraying of pests and diseases based on machine vision according to claim 5, characterized in that: The step S31 is specifically as follows: Step S311: Based on the regional feature set, the regional relationship description, and the regional boundary set, a local feature window is constructed for each target region; statistical moment features, texture features, and shape features are calculated within the local feature window, and combined to form an enhanced feature vector; Step S312: Calculate the mutual information matrix between different eigenmodes based on the enhanced eigenvectors; Based on the mutual information matrix, construct the feature map; Apply spectral clustering to the feature graph to obtain modal groups and calculate the correlation matrix between the modal groups; Step S313: construct a feature importance evaluation function based on the modal group and the correlation matrix; Based on the feature importance evaluation function, the local importance and cross-modal importance of each feature within its modality group are calculated and combined to obtain a comprehensive importance score; Step S314: construct an attention function based on the comprehensive importance score and calculate the intra-group weight and inter-group weight of each modality group; Normalize the intra-group weights and inter-group weights to obtain the final dynamic weight coefficient; Step S315: Based on the enhanced feature vector and the dynamic weight coefficient, perform weighted feature combination to obtain the initial fusion feature; Construct feature consistency constraints, optimize the initial fusion features based on the feature consistency constraints, and obtain the final fusion feature tensor.
9. The method for intelligent identification and targeted spraying of pests and diseases based on machine vision according to claim 5, characterized in that: The step S42 is specifically as follows: Step S421: Calculate the wind field distribution function based on the environmental sensor data and the spraying area, and construct the temperature gradient field and the humidity gradient field; combine the temperature gradient field and the humidity gradient field with the preset physical constraint function to obtain the environmental constraint field; Step S422: Based on the environmental constraint field, calculate the priority gradient within the spraying area and construct a cost function based on the constraint field; perform path point sampling in the cost function space to obtain a candidate point set; apply density clustering to the candidate point set to obtain a key control point set; Step S423: Based on the set of key control points and the environmental constraint field, the minimum cost path between adjacent control points is calculated to construct a speed constraint function; based on the speed constraint function, a dynamic programming algorithm is applied to each path segment to obtain a speed profile; The velocity profiles of all path segments are combined to obtain a complete velocity matrix; Step S424: Calculate the velocity change rate based on the velocity matrix and the minimum cost path, and construct the acceleration constraint condition; Based on the acceleration constraint condition, the velocity curve of the velocity profile is optimized to obtain the acceleration sequence; Smoothing the acceleration sequence to obtain the final acceleration matrix; Step S425: Based on the key control point set, the velocity matrix and the acceleration matrix, a cubic spline basis function is constructed to calculate a path interpolation point sequence; and the curvature of the path interpolation point sequence is optimized to obtain an optimal spraying trajectory.
10. A machine vision-based intelligent pest identification and targeted spraying system, characterized in that: include: at least one processor; as well as, a memory communicatively connected to at least one of the processors; wherein, The memory stores instructions that can be executed by the processor, and the instructions are used to be executed by the processor to implement the machine vision-based intelligent identification and targeted spraying method of pests and diseases according to any one of claims 1 to 9.
Citation Information
Patent Citations
Intelligent pesticide spraying control method and system based on pesticide spraying machine
CN114903022A
Fruit tree pest detection method based on machine vision
CN119515784A
Cited By
Intelligent pressure compensation adjusting method and system for multi-stage adjustable atomizing nozzle
CN120724868A
Embedded image enhancement method and system for large-target-surface image sensor
CN120725933A
An embedded image enhancement method and system for a large target area image sensor
CN120725933B
Cloud collaborative atomized liquid spectral data intelligent analysis system
CN121195919A
Farmland field seed rapid detection method and system
CN121236604A