Camellia oleifera disease and pest identification system based on image recognition technology
By constructing an image frame sequence structure and multidimensional label encoding, and combining convolutional neural networks and long short-term memory networks, the problem of insufficient dynamic modeling in pest and disease identification in existing technologies is solved, enabling accurate identification and early recognition of pests and diseases, and improving the accuracy and response speed of the identification system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGXI UNIV
- Filing Date
- 2025-06-30
- Publication Date
- 2026-06-05
AI Technical Summary
Existing technologies lack dynamic modeling of lesion evolution in agricultural pest and disease identification, resulting in high rates of false and false identification. They are unable to support complex scenarios with high-density lesions and chronic pathological conditions, and lack attention to texture details and primary color shifts, affecting the timing of prevention and control and the efficiency of resource allocation.
By constructing an image frame sequence structure, extracting the evolution trajectory of lesions, and using convolutional neural networks and long short-term memory networks, calculating the edge texture features of lesions and the spacing between the main color center points, generating morphological evolution change combinations, constructing multidimensional label codes and performing logical reconstruction, generating stage labeling coding sequences, and achieving accurate identification of pests and diseases.
It significantly improves the ability to judge the stages of pest and disease development, enhances the ability to understand image semantics, and improves the system's sensitivity to distinguish the early, middle and spread stages of diseases, ensuring the accuracy and response speed of identification.
Smart Images

Figure CN120765974B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image analysis technology, and in particular to a camellia oleifera pest and disease identification system based on image recognition technology. Background Technology
[0002] Image analysis technology is a core subfield of computer vision. It mainly studies how to extract useful information from digital images and perform pattern recognition and intelligent judgment. It often relies on machine learning or deep learning algorithms to achieve automated information recognition and processing. Image analysis is widely used in many scenarios such as medical diagnosis, industrial inspection, security monitoring, and intelligent agriculture. Especially in the agricultural field, image analysis can significantly improve the efficiency and accuracy of pest and disease identification.
[0003] The camellia oleifera pest and disease identification system based on image recognition technology aims to solve the problems of low efficiency and high misjudgment faced by traditional inspections. It realizes intelligent perception of crop health status, timely diagnosis and prevention and control suggestions. The goal is to build a sustainable, highly accurate and fast identification tool to serve the early detection and precise intervention of pests and diseases in the camellia oleifera planting process, thereby reducing the intensity of pesticide use and ensuring the yield and quality of economic crops.
[0004] Existing technologies for identifying agricultural pests and diseases largely rely on the static features of single-frame images, lacking dynamic modeling of the lesion evolution process. This often makes effective identification difficult. Due to the failure to incorporate time dimension and sequence information, traditional technologies are prone to misidentification or missed identification when the image input has chaotic numbering or slow lesion changes. They also lack attention to mesoscale indicators such as texture details and main color shift, resulting in insufficient differentiation between adjacent lesion states. Common methods use static category labeling or classifier outputs that lack interpretable coding structures, which is not conducive to tracking the disease evolution path and is difficult to support the formulation of subsequent precise intervention strategies. This is particularly prominent when facing complex scenarios such as high-density lesions and chronic disease evolution, often causing a chain reaction of increased misjudgment rates and delayed control, affecting yield and the efficiency of control resource allocation. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of existing technologies and propose a camellia oleifera pest and disease identification system based on image recognition technology.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: A camellia oleifera pest and disease identification system based on image recognition technology includes:
[0007] Image frame order structure construction module: Based on the evolution trajectory of Camellia oleifera lesions, extract the temporal order of images, generate a sequence sorting index through the shooting time information, filter out discontinuous data with numbers and merge timestamps to generate a continuous sequence composition list;
[0008] Lesion evolution sequence screening module: Based on the continuous sequence composition list, the module extracts the edge texture features of lesions through a convolutional neural network, calculates the area value of the contour lines in the previous and next frames to obtain the area change, compares the spacing of the main color center points and obtains the offset path, and generates a combination of morphological evolution changes.
[0009] Multidimensional label encoding construction module: Based on the morphological evolution change combination group, the inter-frame evolution features are modeled through a long short-term memory network, the ratio of the pixel area of the lesion region in each frame to the total pixels is calculated, the segment value numbers corresponding to each parameter are aggregated in sequence and the label encoding is assembled to generate a label encoding synthesis vector set;
[0010] Tag legality combination parsing module: Based on the tag encoding synthesis vector set, the tag segment value fields are combined in pairs, the pairs that do not meet the continuous segment value arrangement structure are filtered out, the tag combination groups with tag encoding combination frequency above the threshold are retained and logically reconstructed to generate a continuous logical tag set group;
[0011] Stage-level coding generation module: Based on the continuous logical label set group, it determines the closed edge segment and color offset direction label segment value, matches the area jump value and position offset segment value, queries and queries the combination rule set to form segment groups, obtains the number of the aggregated segment group code, and generates the stage calibration coding sequence.
[0012] As a further aspect of the present invention, the image frame sequence structure construction module includes:
[0013] The time index generation submodule extracts image capture time information based on the evolution trajectory of camellia oleifera lesions, reads the capture time field and establishes the correspondence between images and time, arranges the image frame time sequence using the time field, compares the row image number field and detects the number increment pattern, filters out frames with missing numbers, removes duplicate record frame data, establishes a unified frame order index sequence by matching the number and time field, merges frame groups with adjacent time field intervals less than a set valley value and synchronizes the timestamps to generate a time index sequence set.
[0014] The continuous sequence mapping submodule calculates the difference between the timestamp fields between frames and records the interval values based on the time index sequence set. It filters the sequence gaps by using the time interval threshold, deletes data frame records that are higher than the interval peak and removes the corresponding images of the intermittent frames, fills in the missing frame data and merges the frame number segments according to the time sequence, constructs a continuous image frame order structure, renumbers and combines the frame sets, and generates a continuous sequence mapping list.
[0015] As a further aspect of the present invention, the lesion evolution sequence screening module includes:
[0016] Edge difference extraction submodule: Based on the continuous sequence composition list, separate the image gray values and obtain the gray level change segments of the region boundary, extract edge texture features through convolutional neural network, extract the outer edge position of lesion contour by scanning pixel gradient line by line and mark the coordinate point set, calculate the difference of the coordinates of corresponding numbered contour points between frames and filter the pixel offset coordinates, obtain the edge change segment and mark the pixel change set, and generate the edge pixel difference set.
[0017] Area change calculation submodule: Based on the edge pixel difference set, it tracks the closed boundary of the connection area of adjacent pixels, calculates the lesion area value in the region, extracts the area change amplitude between consecutive frames using the frame number mapping comparison method, constructs a change trend list using the inter-frame difference sequence, marks the direction of area increase or decrease, and generates a dynamic area feature sequence.
[0018] The morphological combination construction submodule: Based on the area dynamic feature sequence, the pixel range of the main color region of the lesion in each frame is obtained and the position of the peak number of frequency pixel blocks is extracted. The centroid coordinates of the pixels are located, the center point of the main color position is obtained, the Euclidean distance between the coordinate values of the frames is calculated and the offset path is generated. The area change value and the centroid path are numbered and then merged into a structural segment pair sequence to generate a morphological evolution change combination group.
[0019] As a further aspect of the present invention, the convolutional neural network is configured according to the formula:
[0020]
[0021] in: Indicates position Edge enhancement convolution response value, Indicates the convolution kernel at the th... The weight value of each position. Indicates the position in the image pixel grayscale values, Indicates the position in the image grayscale gradient value, This represents the fusion weight coefficient of the pixel value channel. This represents the fusion weight coefficient of the grayscale gradient channels. This indicates the row index of the current output feature map. This indicates the column index of the currently output feature map. This indicates the index position along the row direction in the convolution kernel. This indicates the index position along the column direction in the convolution kernel.
[0022] As a further aspect of the present invention, the separation of image grayscale values refers to converting the original color image into a single-channel grayscale image. Specifically, the brightness values of the red, green, and blue channels of the pixels in each frame of the tea leaf image are read sequentially, and the corresponding grayscale values are generated by weighted superposition. The original multi-channel pixel information is then replaced to form a unified grayscale image structure.
[0023] As a further aspect of the present invention, the multidimensional tag encoding construction module includes:
[0024] Area ratio calculation submodule: Based on the morphological evolution change combination group, the pixel points of the lesion area in each frame image are marked and the lesion pixel positions are extracted. The total number of lesion pixels in a single frame is obtained, and the total number of pixels in the whole frame image is counted. After the time-dependent modeling of the lesion area ratio sequence of consecutive frames is performed by the long short-term memory network, the dynamic change trend is captured. The ratio of lesion area to total pixels is calculated and the ratio sequence is recorded to generate the frame area ratio sequence.
[0025] Direction vector extraction submodule: Based on the frame area ratio sequence, extract pixel blocks of the main color region of each frame image and obtain the set of main color pixels, calculate the centroid of the main color pixels, obtain the center position of the coordinate point of the main color region within the frame, calculate the coordinates of the centroid of the main color between each frame and extract the direction angle value, divide the direction angle interval, obtain the offset direction segment number and match it one-to-one with the frame index to generate a color offset direction sequence.
[0026] Tag segment value assembly submodule: Based on the color offset direction sequence, obtain the area ratio segment number, offset direction segment number, and position offset quantity segment number in each frame. Combine the three segment numbers into a single frame tag encoding field by fixing the number splicing order. Splice the tag fields of each sequence and aggregate them into an overall tag vector set according to the frame order to generate a tag encoding composite vector set.
[0027] As a further aspect of the present invention, the long short-term memory network is configured according to the formula:
[0028]
[0029] in: Indicates the first The dynamic state output value of the frame is used to reflect the degree of evolutionary response in the time series. Indicates the first The frame output gate control factor controls whether the time-state is output. Indicates the first The frame is used as the retention factor for the memory item. Indicates the first The memory state value of the frame. Indicates the first The frame is used to update the activation control coefficients of the current input. This represents the weight matrix for the state update operation. Represents the set of input vectors. Indicates the first The dynamic state output value of the frame. Indicates the first The ratio of the area of lesions in a frame to the total number of pixels in the entire frame. Indicates the first Frame and the The absolute jump variable of the ratio of lesion area between frames is calculated as follows: , Indicates the first The compactness index of the lesion area in the frame. Indicates the bias term. Indicates frame order index, This represents the hyperbolic tangent function.
[0030] As a further aspect of the present invention, the marked lesion area refers to the location and pixel-level identification of areas exhibiting abnormal color and texture features in each frame of the image. Specifically, the image is first converted from RGB to a color model with brightness-chroma separation through color space transformation. Then, a color range threshold is set based on the common brownish-red and grayish-brown tones of camellia oleifera lesions. A set of pixels that meet the conditions is extracted, and high-brightness and shadow interference areas that are close to the color tone of healthy leaves are excluded. Closed and semi-closed abnormal color connected areas are extracted as preliminary lesion candidate areas. The area is verified based on the lower limit, the degree of edge irregularity, and the texture roughness. The set of pixels that conform to the typical lesion morphology is retained as the lesion marked area.
[0031] As a further aspect of the present invention, the continuous logical tag set group includes:
[0032] Segment value pair filtering submodule: Based on the tag encoding synthesized vector set, extract segment value fields of adjacent frame positions in the tag field sequence, combine the field sliding window frame by frame to form tag segment value pairs, calculate the difference of segment values of each number to obtain the record difference sequence, filter field groups with discontinuous segment values, count the cumulative number of identical segment value pairs in the entire sequence, compare it with the frequency threshold, delete segment value pairs with a cumulative number of times lower than the set threshold, and generate a high-frequency legal segment value combination set;
[0033] The logical set construction submodule: Based on the high-frequency legal segment value combination set, it constructs the preceding and following relationships of each segment value combination field, connects the preceding and following segment value numbers in the combination field and establishes a chain mapping table, uses the chain extension method to concatenate the continuous connected segment values backward to construct the tag segment sequence, calls the segment value structure in each chain and determines whether it is closed, filters the structure group that meets the condition of chain head and chain tail coincidence, uses the chain group number to map the corresponding tag frame order, establishes a full sequence connection table, and generates a continuous logical tag set group.
[0034] As a further aspect of the present invention, the stage level coding generation module includes:
[0035] Tag segment group determination submodule: Based on the continuous logical tag set group, extract the closed edge segment value in the tag field and identify the closed number field, filter and extract the numbered mark area with closed features through coordinate connectivity, match the fields in the set, extract the offset direction segment value and locate it to the tag field in the same frame, match the area jump segment value and position offset segment value corresponding to the above position frame by frame, combine the segment value fields to establish a three-segment group comparison structure, match the field configuration template in the combination rule set, filter out non-compliant combinations, and generate a tag combination segment group list;
[0036] The stage coding generation submodule: Based on the tag combination segment group list, it splits the segment group number field structure and extracts the index value in each combination position, maps the segment value combination field to the preset coding rule table one by one, locates the mapped coding number, merges the number sequence according to the original frame order, establishes the mapping index between the frame and the stage number using the sequential sequence structure, integrates the mapping relationships and outputs the continuous segment number result, and generates the stage calibration coding sequence.
[0037] Compared with the prior art, the advantages and positive effects of the present invention are as follows:
[0038] 1. In this invention, by combining the correlation features between the temporal sequence of images and the evolution trajectory of lesions, a structured representation of image sequences is achieved. The shooting time is used to form a timeline index and clean up redundant images, effectively improving the continuity and reliability of input data.
[0039] 2. In this invention, by comparing edge texture changes and the offset path of the main color center, the morphological dynamics of lesions are comprehensively judged, and the evolutionary state of lesion expansion and discoloration is accurately depicted, which significantly enhances the ability to judge the stage of pest and disease development and improves the image semantic understanding ability.
[0040] 3. In this invention, a calibration coding sequence with traceability and stage-based classification capability is constructed by using a multi-dimensional matching strategy, including closed regions, color offset direction, and area jumps, which greatly improves the system's sensitivity to the early, middle, and spread stages of diseases. Attached Figure Description
[0041] Figure 1 This is a system flowchart of the present invention;
[0042] Figure 2 This is a schematic diagram of the system framework of the present invention. Detailed Implementation
[0043] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0044] In the description of this invention, it should be understood that the terms "length," "width," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientation or positional relationships, are based on the orientation or positional relationships shown in the accompanying drawings and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, in the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0045] Example
[0046] Please see Figure 1 This invention provides a technical solution: a camellia oleifera pest and disease identification system based on image recognition technology, comprising:
[0047] Image frame order structure construction module: Based on the evolution trajectory of Camellia oleifera lesions, extract the temporal order of images, generate a sequence sorting index through the shooting time information, filter out discontinuous data with numbers and merge timestamps to generate a continuous sequence composition list;
[0048] Lesion evolution sequence screening module: Based on a continuous sequence composition list, the module extracts the edge texture features of lesions through a convolutional neural network, calculates the area value of the contour lines in the previous and next frames to obtain the area change, compares the spacing of the main color center points and obtains the offset path, and generates a combination of morphological evolution changes.
[0049] Multidimensional label encoding construction module: Based on the combination of morphological evolution changes, the inter-frame evolution features are modeled through a long short-term memory network, the ratio of the pixel area of the lesion region in each frame to the total pixels is calculated, the segment value numbers corresponding to each parameter are aggregated in sequence and the label encoding is assembled to generate a label encoding synthesis vector set;
[0050] Tag legality combination parsing module: Based on the tag encoding synthesis vector set, the tag segment value fields are combined in pairs, the pairs that do not meet the continuous segment value arrangement structure are filtered out, the tag combination groups with tag encoding combination frequency above the threshold are retained and logically reconstructed to generate a continuous logical tag set group;
[0051] Stage-level coding generation module: Based on a continuous logical label set group, it determines the label segment value of the closed edge segment and the color offset direction, matches the area jump value and the position offset segment value, queries and queries the combination rule set to form a segment group, obtains the number of the aggregated segment group code, and generates the stage calibration coding sequence.
[0052] The image frame order structure construction module includes:
[0053] The time index generation submodule extracts image capture time information based on the evolution trajectory of camellia oleifera lesions, reads the capture time field and establishes the correspondence between images and time, arranges the image frame time sequence using the time field, compares the row image number field and detects the number increment pattern, filters out frames with missing numbers, removes duplicate record frame data, establishes a unified frame order index sequence by matching the number and time field, merges frame groups with adjacent time field intervals less than a set valley value and synchronizes the timestamps to generate a time index sequence set.
[0054] The continuous sequence composition submodule calculates the difference between the timestamp fields between frames and records the interval values based on the time index sequence set. It filters the sequence gaps by using the time interval threshold, deletes data frame records that are higher than the interval peak and removes the corresponding images of the gap frames, fills in the missing frame data and merges the frame number segments according to the time sequence, constructs the continuous image frame order structure, renumbers and combines the frame sets, and generates a continuous sequence composition list.
[0055] The time index generation submodule: Based on the evolution trajectory of camellia oleifera lesions, it uses the image EXIF information parsing method to extract the image capture time field row, converts it into time field format, establishes the correspondence between image and time through a time image mapping structure, arranges the image frame order in ascending order of time field, compares the image number field sequentially and performs number sequence increment detection, marks and filters out numbered skip frame records, calls the hash digest algorithm to compare the image file fingerprint and identify redundant items in the image data, removes duplicate frame data with completely identical hash values, constructs a unified frame order index sequence by comparing the consistency of image number and time field sequence, merges image frames with time field differences between adjacent frames less than a set valley value, synchronously adjusts the time field of frame groups, and generates a time index sequence set;
[0056] The continuous sequence mapping submodule, based on a time-indexed sequence set, calculates the execution time interval using the difference in the frame time field, records and extracts the time interval range values between each image frame, sets the peak time interval as a filtering condition, deletes frame records higher than the peak and removes the corresponding image data, marks the break positions between frames and organizes them into numbered segments, calls the image frame interpolation processing method to fill in the missing numbered segments, constructs a timestamp field for the interpolated frames, integrates the corrected image frames by numbering, constructs a structured frame sequence set by combining the number and time fields, generates a continuous image frame sequence structure, outputs the correspondence between the renumbered frame path, time field, and number field, and generates a continuous sequence mapping list.
[0057] The lesion evolution sequence screening module includes:
[0058] Edge difference extraction submodule: Based on a continuous sequence of image composition lists, the gray values of the image are separated and the gray level change segments of the region boundary are obtained. Edge texture features are extracted through a convolutional neural network. The outer edge position of the lesion contour is extracted by scanning the pixel gradient line by line and the coordinate point set is marked. The difference between the coordinates of the corresponding numbered contour points between frames is calculated and the pixel offset coordinates are filtered out to obtain the edge change segment and mark the pixel change set, and generate the edge pixel difference set.
[0059] Area change calculation submodule: Based on the edge pixel difference set, it tracks the closed boundary of the connection area of adjacent pixels, calculates the lesion area value in the region, extracts the area change amplitude between consecutive frames by frame number mapping comparison, constructs a change trend list using the inter-frame difference sequence, marks the direction of area increase or decrease, and generates a dynamic feature sequence of area.
[0060] The morphological combination construction submodule is based on the area dynamic feature sequence. It obtains the pixel range of the main color region of the lesion in each frame and extracts the position of the peak number of frequency pixel blocks. It locates the centroid coordinates of the pixels, obtains the center point of the main color position, calculates the Euclidean distance between the coordinate values of the frames and generates the offset path. It numbers the area change value and the centroid path pair and then merges them into a structural segment pair sequence to generate the morphological evolution change combination group.
[0061] Edge difference extraction submodule: Based on a continuous sequence map list, the image pixel matrix is converted to grayscale using an image grayscale channel separation method. Single-channel matrices are extracted and grayscale values are calculated. The Sobel operator is used to calculate gradients in the horizontal and vertical directions to generate edge response maps. Non-maximum grayscale change segments are extracted. A convolutional neural network is used to extract edge texture features from the image. The network structure is defined as a combination of three convolutional layers and two pooling layers, with a kernel size of 3×3, a stride of 1, and ReLU activation. The output is flattened and connected to a fully connected layer to obtain edge feature maps. Gradient response abrupt changes are extracted, and the coordinates of the outer edge boundary are located to form a coordinate point set. Frame number matching is used to calculate the coordinate difference between points with the same number in adjacent frames and filter out zero-difference point pairs. Non-zero difference points are recorded and their pixel positions are marked. The output is a set of image points showing edge pixel changes, generating an edge pixel difference set.
[0062] Area change calculation submodule: Based on the edge pixel difference set, the contour closure tracking method is used to detect pixel difference regions. The contour lookup function is called to locate the boundaries of continuous pixel blocks in the binary image and identify closed contour regions. The pixel values within the closed regions are counted to obtain the total area of the lesion region. The area of the same region in the previous and next frames is calculated by number mapping. The increase or decrease in area between frames is obtained and recorded as change values. The area difference between consecutive frames is sorted by number to construct a sequence list. The direction of increase or decrease is determined based on the positive or negative value of the area difference to generate a dynamic feature sequence of area.
[0063] The morphological combination construction submodule: Based on the area dynamic feature sequence, the image color space is converted using the image dominant color extraction method, converting the RGB image to the HSV color space. The frequency of dominant color distribution in each pixel block is counted, and the position index of the pixel block with the highest frequency is obtained to obtain the region mask map. The centroid coordinates of the pixels are calculated in the mask map, and the center point is obtained as the dominant color position. The coordinates of the dominant color center point of each frame are paired with the previous frame, the Euclidean distance between the corresponding points is calculated and recorded as the path displacement value, the area change value and path displacement value of each frame are paired and assigned number labels, the numbered segment pairs are combined into a structured segment pair sequence, and the output is organized into a morphological evolution change combination group.
[0064] Convolutional neural networks are based on the formula:
[0065]
[0066] in: Indicates position Edge enhancement convolution response value at the location, Indicates the convolution kernel at the th... The weight value of each position. Indicates the position in the image pixel grayscale values, Indicates the position in the image grayscale gradient value, This represents the fusion weight coefficient of the pixel value channel. This represents the fusion weight coefficient of the grayscale gradient channels. This indicates the row index of the current output feature map. This indicates the column index of the currently output feature map. This indicates the index position along the row direction in the convolution kernel. Indicates the index position along the column direction in the convolution kernel;
[0067] Execution process: First, extract the index position of the current pixel from the input image. grayscale value at By combining adjacent pixels to construct a grayscale difference map, the grayscale gradient value at the corresponding location can be obtained. Fusion weighting coefficients are applied to the image pixel channels and gradient channels respectively. and To form a weighted combination term The weighted values are compared with the positions in the convolution kernel. weight value The multiplication method is used, and a weighted sum is performed throughout the entire convolution kernel region to finally obtain the position. Edge enhancement convolution response value .
[0068] Image grayscale separation refers to converting the original color image into a single-channel grayscale image. Specifically, it involves sequentially reading the brightness values of the red, green, and blue channels of pixels in each frame of the tea leaf image, generating the corresponding grayscale value through a weighted superposition method, and replacing the original multi-channel pixel information to form a unified grayscale image structure.
[0069] The multidimensional tag encoding building module includes:
[0070] Area ratio calculation submodule: Based on the combination of morphological evolution changes, it marks the pixels of the lesion region in each frame image and extracts the lesion pixel position, obtains the total number of lesion pixels in a single frame, and counts the total number of pixels in the whole frame image. After performing time-dependent modeling on the lesion area ratio sequence of consecutive frames through a long short-term memory network, it captures the dynamic change trend, calculates the ratio of lesion area to total pixels and records the ratio sequence, and generates the frame area ratio sequence.
[0071] Direction vector extraction submodule: Based on the frame area ratio sequence, extract the pixel blocks of the main color region of each frame image and obtain the set of main color pixels, calculate the centroid of the main color pixels, obtain the center position of the coordinate point of the main color region within the frame, calculate the coordinates of the centroid point of the main color between each frame and extract the direction angle value, divide the direction angle interval, obtain the offset direction segment number and match it with the frame index one by one to generate the color offset direction sequence.
[0072] Tag segment value assembly submodule: Based on the color offset direction sequence, obtain the area ratio segment number, offset direction segment number and position offset quantity segment number in each frame. Combine the three segment numbers into a single frame tag encoding field by a fixed number splicing order. Splice the tag fields of each sequence and aggregate them into an overall tag vector set according to the frame order to generate a tag encoding composite vector set.
[0073] Area ratio calculation submodule: Based on morphological evolution and change combination group, it adopts a long short-term memory network model, sets the input frame sequence length to 10 frames, and the input of each frame is a normalized lesion area ratio. The hidden layer dimension is set to 64, the number of stacked network layers is 2, and a bidirectional structure is enabled. It extracts the number of pixels in the lesion region of each frame image, counts the total number of pixels in the image as the divisor and normalizes the ratio, constructs the input sequence in frame order, establishes a time step state transition path to pass into the network, sets an update gate to control the state output, caches the state output tensor of each frame, and concatenates the predicted values according to the frame index to generate the frame area ratio sequence.
[0074] Direction vector extraction submodule: Based on the frame area ratio sequence, extract the position of the main color region, set the number of clusters to 3, select brightness-independent color channels and perform clustering, adopt the optimal initialization strategy for the cluster center, limit the number of iterations to 300, set the error threshold to 1%, select the largest category pixel region, extract the pixel coordinate set of the largest category pixel region and count the centroid position, calculate the angle offset between the main color centroids of adjacent frames, divide the complete angle interval into 8 segments, map the number to the frame index one by one, and generate the color offset direction sequence;
[0075] Tag segment value assembly submodule: Based on the color offset direction sequence, the area ratio segment number, direction segment number and position offset segment number are integrated by segment number splicing method. The area ratio is divided into ten segments from zero to one, the direction number adopts the aforementioned mapping, and the position offset is divided into five segments according to the displacement distance. The three numbers are spliced in a unified order to form a single frame tag field. Each frame is arranged according to the tag in order to form a tag vector set, and a tag encoding composite vector set is generated.
[0076] Long Short-Term Memory (LSTM) networks are based on the formula:
[0077]
[0078] in: Indicates the first The dynamic state output value of the frame is used to reflect the degree of evolutionary response in the time series. Indicates the first The frame output gate control factor controls whether the time-state is output. Indicates the first The frame is used as the retention factor for the memory item. Indicates the first The memory state value of the frame. Indicates the first The frame is used to update the activation control coefficients of the current input. This represents the weight matrix for the state update operation. Represents the set of input vectors. Indicates the first The dynamic state output value of the frame. Indicates the first The ratio of the area of lesions in a frame to the total number of pixels in the entire frame. Indicates the first Frame and the The absolute jump variable of the ratio of lesion area between frames is calculated as follows: , Indicates the first The compactness index of the lesion area in the frame. Indicates the bias term. Indicates frame order index, Represents the hyperbolic tangent function;
[0079] Execution process: First, process each frame of the morphological evolution combination group, extract the total number of pixels in the lesion region and the total number of pixels in the entire frame, and calculate the ratio of lesion area. And combined with the difference between the ratio of the previous frame and the previous frame. As a structural indicator characterizing area mutations, the compactness coefficient of the lesion region was extracted. As geometric constraint parameters reflecting the degree of convergence of the region's morphology, the three indicators are combined with the dynamic state output of the previous frame. Concatenate into input sequence vector Vectors are weighted by a weight matrix With bias term After linear combination, the input is fed to the hyperbolic tangent activation unit, which outputs the activation response of the current frame, and then combines it with the memory state of the previous frame. With gate coefficient , Weighted summation, updated to the current frame state, and passed through the output gate. Control whether to output the current status response This constitutes a continuous dynamic sequence of frame area ratios.
[0080] Marking lesion areas refers to locating and identifying pixels-level regions in each frame of an image that exhibit abnormal color and texture features. Specifically, the image is first converted from RGB to a brightness-chroma separation color model through color space transformation. Then, a color range threshold is set based on the common brownish-red and grayish-brown tones of camellia oleifera lesions. Pixel sets that meet the criteria are extracted, and bright and shadow interference areas that are close to the color tone of healthy leaves are excluded. Closed and semi-closed abnormally connected regions are extracted as preliminary lesion candidate areas. The regions are then verified based on the lower limit of area, the degree of edge irregularity, and the texture roughness. Pixel sets that conform to the typical lesion morphology are retained as the lesion marking areas.
[0081] The continuous logical label set group includes:
[0082] The segment value pair filtering submodule: Based on the tag encoding and vector set synthesis, it extracts the segment value fields of adjacent frame positions in the tag field sequence, combines the field sliding window frame by frame to form tag segment value pairs, calculates the difference of segment values of each number to obtain the record difference sequence, filters the field groups with discontinuous segment values, counts the cumulative number of identical segment value pairs in the entire sequence, compares it with the frequency threshold, deletes segment value pairs with a cumulative number of times lower than the set threshold, and generates a set of high-frequency legal segment value combinations;
[0083] The logical set construction submodule: Based on the high-frequency legal segment value combination set, it constructs the preceding and following relationships of each segment value combination field, connects the segment value numbers of the preceding and following items in the combination field and establishes a chain mapping table, uses the chain extension method to splice the continuous connected segment values backward to construct the tag segment sequence, calls the segment value structure in each chain and judges whether it is closed, filters the structure group that meets the condition of chain head and chain tail coincidence, uses the chain group number to map the corresponding tag frame order, establishes a full sequence connection table, and generates a continuous logical tag set group;
[0084] The segment value pair filtering submodule: Based on the tag encoding and vector set synthesis, the window step size is set to 1 and the window width is set to 2. It extracts the two adjacent tag fields between frames in the tag vector sequence, and then obtains the number of the three segment values in each frame field. It calls the offset comparison structure to form a pairing group of the number segments of the current frame and the next frame, records the difference of the number of each segment in the group, calculates the difference using a fixed-length integer mapping method, calculates the difference of the integer value after number conversion, sets the segment value difference tolerance to 1, marks the segment value combination with the difference exceeding the limit as a non-continuous field, calls the counting accumulation structure to record each segment value combination, sets the frequency threshold to 5, constructs a filtering table structure to traverse each combination and deletes combinations below the threshold, outputs the set of remaining field groups, and generates a set of high-frequency legal segment value combinations.
[0085] The logical set construction submodule extracts the field pairs of each segment value from the high-frequency legal segment value combination set. Using the preceding segment number as the starting point and the following segment number as the connection target, it establishes a forward mapping dictionary table and a reverse mapping index structure. It performs chain-like concatenation in frame order, setting the concatenation termination condition to reach the maximum chain length (maximum 20 field units). It establishes a chain structure record unit, marking the starting and ending segment numbers. It uses the condition that the chain's starting number equals its ending number to determine if it is closed. It extracts the chain group structure that satisfies the closure judgment rule, maps each frame segment value in the chain group to the original tag index position, establishes a many-to-one structure index table between the chain group sequence number and the frame number, and generates a continuous logical tag set group.
[0086] The stage level coding generation module includes:
[0087] The tag segment group determination submodule: Based on the continuous logical tag set group, it extracts the closed edge segment value from the tag field and identifies the closed number field. It filters and extracts the numbered marking area with closed features through coordinate connectivity, matches the fields in the set, extracts the offset direction segment value and locates it to the tag field in the same frame, matches the area jump segment value and position offset segment value corresponding to the above position frame by frame, combines the segment value field to establish a three-segment group comparison structure, matches the field configuration template in the combination rule set, filters out non-compliant combinations, and generates a list of tag combination segment groups;
[0088] Stage coding generation submodule: Based on the tag combination segment group list, it splits the segment group number field structure and extracts the index value in each combination position, maps the segment value combination field to the preset coding rule table one by one, locates the mapped coding number, merges the number sequence according to the original frame order, uses the sequential sequence structure to establish the mapping index between the frame and the stage number, integrates the mapping relationships and outputs the continuous segment number result, and generates the stage calibration coding sequence.
[0089] The tag segment group determination submodule is based on a continuous logical tag set group. The segment value filtering condition is set to the field number being contained in the closed segment value index set. The closed edge segment values in the tag fields of each frame are extracted and the number index is marked. The closed number segment is determined to perform inter-frame connectivity using the number adjacency judgment condition. The segment difference threshold is set to 1. The set of frame numbers that meet the connectivity relationship is extracted. The offset direction segment value is extracted according to the number index and located to the same row number field position. At the same time, the area jump segment value and position offset segment value of each frame are extracted. Then, they are concatenated in the order of area number, direction number, and position number to form a three-segment group structure. The field template matching table is set to a fixed number set. The number fields of each group are compared with the configuration items in the table. The mismatched structure is eliminated, and a tag combination segment group list is generated.
[0090] Stage coding generation submodule: Based on the tag combination segment group list, extract each combination character in a set order to form a fixed three-field number group. Set the mapping rule table as a static number lookup table, look up the corresponding coding number according to the field combination item, arrange and merge the mapped coding numbers according to the original frame order, build a mapping array and establish a dictionary structure with frame index, match the sequence of each frame number with the coding number, and generate the stage calibration coding sequence.
[0091] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1. A camellia oleifera pest and disease identification system based on image recognition technology, characterized in that, The system includes: Image frame order structure construction module: Based on the evolution trajectory of Camellia oleifera lesions, extract the temporal order of images, generate a sequence sorting index through the shooting time information, filter out discontinuous data with numbers and merge timestamps to generate a continuous sequence composition list; Lesion evolution sequence screening module: Based on the continuous sequence composition list, the module extracts the edge texture features of lesions through a convolutional neural network, calculates the area value of the contour lines in the previous and next frames to obtain the area change, compares the spacing of the main color center points and obtains the offset path, and generates a combination of morphological evolution changes. Multidimensional label encoding construction module: Based on the morphological evolution change combination group, the inter-frame evolution features are modeled through a long short-term memory network, the ratio of the pixel area of the lesion region in each frame to the total pixels is calculated, the segment value numbers corresponding to each parameter are aggregated in sequence and the label encoding is assembled to generate a label encoding synthesis vector set; Tag legality combination parsing module: Based on the tag encoding synthesis vector set, the segment value fields of the tags are combined in pairs, the pairs that do not meet the continuous segment value arrangement structure are filtered out, the tag combination groups with tag encoding combination frequency above the threshold are retained and logically reconstructed to generate a continuous logical tag set group; Stage-level coding generation module: Based on the continuous logical label set group, determine the label segment value of the closed edge segment and the color offset direction, match the area jump value and the position offset segment value, query the combination rule set to form a segment group, obtain the number of the aggregated segment group code, and generate the stage calibration coding sequence; The lesion evolution sequence screening module includes: Edge difference extraction submodule: Based on the continuous sequence composition list, the image grayscale values are separated and the grayscale change segments of the region boundary are obtained. Edge texture features are extracted through a convolutional neural network. The pixel gradient is scanned line by line to extract the outer edge position of the lesion contour and the coordinate point set is marked. The difference between the coordinates of the corresponding numbered contour points between frames is calculated and the pixel offset coordinates are screened to obtain the edge change segment and mark the pixel change set, and generate the edge pixel difference set. Area change calculation submodule: Based on the edge pixel difference set, it tracks the closed boundary of the connection area of adjacent pixels, calculates the lesion area value in the region, extracts the area change amplitude between consecutive frames using the frame number mapping comparison method, constructs a change trend list using the inter-frame difference sequence, marks the direction of area increase or decrease, and generates a dynamic area feature sequence. The morphological combination construction submodule: Based on the area dynamic feature sequence, the pixel range of the main color region of the lesion in each frame is obtained and the position of the peak number of frequency pixel blocks is extracted. The centroid coordinates of the pixels are located, the center point of the main color position is obtained, the Euclidean distance between the coordinate values of the frames is calculated and the offset path is generated. The area change value and the centroid path are numbered and then merged into a structural segment pair sequence to generate a morphological evolution change combination group.
2. The camellia oleifera pest and disease identification system based on image recognition technology according to claim 1, characterized in that, The image frame sequence structure construction module includes: The time index generation submodule extracts image capture time information based on the evolution trajectory of camellia oleifera lesions, reads the capture time field and establishes the correspondence between images and time, arranges the image frame time sequence using the time field, compares the image number field and detects the number increment pattern, filters out frames with missing numbers, removes duplicate record frame data, establishes a unified frame order index sequence by matching the number and time field, merges frame groups with adjacent time field intervals less than a set valley value and synchronizes the timestamps to generate a time index sequence set. The continuous sequence mapping submodule calculates the difference between the timestamp fields between frames and records the interval values based on the time index sequence set. It filters the sequence gaps by using the time interval threshold, deletes data frame records that are higher than the interval peak and removes the corresponding images of the intermittent frames, fills in the missing frame data and merges the frame number segments according to the time sequence, constructs a continuous image frame order structure, renumbers and combines the frame sets, and generates a continuous sequence mapping list.
3. The camellia oleifera pest and disease identification system based on image recognition technology according to claim 1, characterized in that, The convolutional neural network follows the formula: ; in: Indicates position Edge enhancement convolution response value, Indicates the convolution kernel at the th... The weight value of each position. Indicates the position in the image pixel grayscale values, Indicates the position in the image grayscale gradient value, This represents the fusion weight coefficient of the pixel value channel. This represents the fusion weight coefficient of the grayscale gradient channels. This indicates the row index of the current output feature map. This indicates the column index of the currently output feature map. This indicates the index position along the row direction in the convolution kernel. This indicates the index position along the column direction in the convolution kernel.
4. The camellia oleifera pest and disease identification system based on image recognition technology according to claim 1, characterized in that, The separation of image grayscale values refers to converting the original color image into a single-channel grayscale image, sequentially reading the brightness values of the red, green, and blue channels of pixels in each frame of tea leaf image, generating the corresponding grayscale value through weighted superposition, and replacing the original multi-channel pixel information to form a unified grayscale image structure.
5. The camellia oleifera pest and disease identification system based on image recognition technology according to claim 1, characterized in that, The multidimensional label encoding construction module includes: Area ratio calculation submodule: Based on the morphological evolution change combination group, the pixel points of the lesion area in each frame image are marked and the lesion pixel positions are extracted. The total number of lesion pixels in a single frame is obtained, and the total number of pixels in the whole frame image is counted. After the time-dependent modeling of the lesion area ratio sequence of consecutive frames is performed by the long short-term memory network, the dynamic change trend is captured. The ratio of lesion area to total pixels is calculated and the ratio sequence is recorded to generate the frame area ratio sequence. Direction vector extraction submodule: Based on the frame area ratio sequence, extract pixel blocks of the main color region of each frame image and obtain the set of main color pixels, calculate the centroid of the main color pixels, obtain the center position of the coordinate point of the main color region within the frame, calculate the coordinates of the centroid of the main color between each frame and extract the direction angle value, divide the direction angle interval, obtain the offset direction segment number and match it one-to-one with the frame index to generate a color offset direction sequence. Tag segment value assembly submodule: Based on the color offset direction sequence, obtain the area ratio segment number, offset direction segment number, and position offset quantity segment number in each frame. Combine the three segment numbers into a single frame tag encoding field by fixing the number splicing order. Splice the tag fields of each sequence and aggregate them into an overall tag vector set according to the frame order to generate a tag encoding composite vector set.
6. The camellia oleifera pest and disease identification system based on image recognition technology according to claim 5, characterized in that, The Long Short-Term Memory (LSTM) network is configured according to the formula: ; in: Indicates the first The dynamic state output value of the frame is used to reflect the degree of evolutionary response in the time series. Indicates the first The frame output gate control factor controls whether the time-state is output. Indicates the first The frame is used as the retention factor for the memory item. Indicates the first The memory state value of the frame. Indicates the first The frame is used to update the activation control coefficients of the current input. The weight matrix represents the state update operation. Represents the set of input vectors. Indicates the first The dynamic state output value of the frame. Indicates the first The ratio of the area of lesions in a frame to the total number of pixels in the entire frame. Indicates the first Frame and the The absolute jump variable of the ratio of lesion area between frames is calculated as follows: , Indicates the first The compactness index of the lesion area in the frame. Indicates the bias term. Indicates frame order index, This represents the hyperbolic tangent function.
7. The camellia oleifera pest and disease identification system based on image recognition technology according to claim 5, characterized in that, The process of marking the lesion region pixels in each frame of the image involves locating and identifying the regions exhibiting abnormal color and texture features in each frame. First, the image is converted from RGB to a color model that separates brightness and chromaticity through color space transformation. Then, a color range threshold is set based on the common brownish-red and grayish-brown tones of camellia oleifera lesions. A set of pixels that meet the criteria is extracted, and bright and shadow interference areas that are close to the color tone of healthy leaves are excluded. Closed and semi-closed abnormally connected regions are extracted as preliminary lesion candidate areas. The regions are then verified based on the lower limit of area, the degree of edge irregularity, and the texture roughness. The set of pixels that conform to the typical lesion morphology is retained as the lesion marking area.
8. The camellia oleifera pest and disease identification system based on image recognition technology according to claim 1, characterized in that, The tag validity combination parsing module includes: Segment value pair filtering submodule: Based on the tag encoding synthesized vector set, extract segment value fields of adjacent frame positions in the tag field sequence, apply a sliding window to combine fields frame by frame to form tag segment value pairs, calculate the difference of segment values of each number to obtain a record difference sequence, filter out non-contiguous segment value field groups, count the cumulative number of identical segment value pairs in the entire sequence, compare it with the frequency threshold, delete segment value pairs with a cumulative number of times lower than the set threshold, and generate a high-frequency legal segment value combination set; The logical set construction submodule: Based on the high-frequency legal segment value combination set, it constructs the preceding and following relationships of each segment value combination field, connects the preceding and following segment value numbers in the combination field and establishes a chain mapping table, uses the chain extension method to concatenate the continuous connected segment values backward to construct the tag segment sequence, calls the segment value structure in each chain and determines whether it is closed, filters the structure group that meets the condition of chain head and chain tail coincidence, uses the chain group number to map the corresponding tag frame order, establishes a full sequence connection table, and generates a continuous logical tag set group.
9. The camellia oleifera pest and disease identification system based on image recognition technology according to claim 1, characterized in that, The stage level coding generation module includes: Tag segment group determination submodule: Based on the continuous logical tag set group, extract the closed edge segment value in the tag field and identify the closed number field, filter and extract the numbered mark area with closed features through coordinate connectivity, match the fields in the set, extract the offset direction segment value and locate it to the tag field in the same frame, match the area jump segment value and position offset segment value corresponding to the above position frame by frame, combine the segment value fields to establish a three-segment group comparison structure, match the field configuration template in the combination rule set, filter out non-compliant combinations, and generate a tag combination segment group list; The stage coding generation submodule: Based on the tag combination segment group list, it splits the segment group number field structure and extracts the index value in each combination position, maps the segment value combination field to the preset coding rule table one by one, locates the mapped coding number, merges the number sequence according to the original frame order, establishes the mapping index between the frame and the stage number using the sequential sequence structure, integrates the mapping relationships and outputs the continuous segment number result, and generates the stage calibration coding sequence.