Method for identifying irrigation state of plant growth area based on image identification

By deeply analyzing the spatial distribution of leaf profiles and color channel quantification in the plant growth area, the neglect of leaf morphological differences and color spatial distribution in the prior art is solved, and a more accurate identification of plant irrigation status is achieved.

CN120107806AInactive Publication Date: 2025-06-06WUXI UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510595618.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-09
Publication Date
2025-06-06
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the process of identifying the irrigation status of the plant growth area, the prior art lacks in-depth analysis of the spatial structural characteristics and morphological differences between leaves between leaves, resulting in misjudgment or misjudgment, which reduces the accuracy and practicality of the identification.

Method used

By obtaining the image of the plant growth area, segmenting the plant area and extracting the coordinate points of each leaf contour, calculating the leaf contour spatial distribution factor, and performing contour alignment and color channel quantification, establishing aligned leaf shape coordinate set and color space symbiosis matrix, evaluating the changes in color heterogeneity indexes, and obtaining the comprehensive stress tendency results of morphological and color color.

Benefits of technology

It improves the accuracy of assessing the leaf space and color change trends of plant populations, improves the accuracy of the judgment of plant irrigation stress status, avoids the one-sidedness of single indicator judgment, and enhances the stability and accuracy of plant moisture stress status detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120107806A_ABST
    Figure CN120107806A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image recognition, in particular to a method for recognizing the irrigation state of a plant growth area based on image recognition, which comprises the following steps: acquiring an image of the plant growth area, segmenting the plant area and extracting contour coordinate points of each leaf; and calculating the mean value of the ratios of the centroid spacing to the perimeter of each contour to obtain a leaf contour space distribution factor, and based on the leaf contour space distribution factor and the segmented plant region pixels. According to the method, by extracting the centroid position and the spatial structure feature of the leaf contour, the spatial distribution difference of each leaf in a plant area is quantified, and further through contour coordinate iteration alignment operation, more stable and unified group leaf shape features are obtained, and interference caused by leaf shape difference is reduced; meanwhile, precise quantification and symbiotic relationship analysis of a pixel color channel are adopted, spatial position information and color differences are combined, and a heterogeneity index of fusion of the leaf shape and color distribution is constructed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image recognition, and in particular to a method for identifying the irrigation status of a plant growth area based on image recognition. Background Art

[0002] The method for identifying the irrigation status of a plant growth area is a method that uses image recognition technology to collect, analyze and extract features of visual information of the plant growth area, thereby automatically identifying the current irrigation status of the plant growth area.

[0003] In the process of identifying the irrigation status of plant growth areas, the existing technology mostly relies on directly extracting image features for classification or judgment, lacking in-depth analysis of the spatial structural characteristics of leaf groups and the morphological differences between leaves; at the same time, the existing technology has not effectively quantified and analyzed the spatial distribution differences of leaf colors, and in practical applications, it ignores the interference factors that may be caused by the heterogeneity of leaf shape and color spatial distribution, resulting in misjudgment or missed judgment in the actual identification process, reducing the accuracy and practicality of judging the irrigation status of plants. Therefore, improvements are needed. Summary of the invention

[0004] The purpose of the present invention is to solve the shortcomings in the prior art and to propose a method for identifying the irrigation status of a plant growth area based on image recognition.

[0005] In order to achieve the above object, the present invention adopts the following technical solution: a method for identifying the irrigation status of a plant growth area based on image recognition, comprising the following steps: Acquire an image of a plant growth area, segment the plant area and extract the coordinate points of each leaf contour, calculate the average of the ratio of the centroid distance to the perimeter of each contour to obtain a leaf contour spatial distribution factor, and based on the leaf contour spatial distribution factor and the segmented plant area pixels, convert the pixel color space and quantize the value of each color channel to obtain a quantized leaf contour and color channel data set; Based on the contour coordinates of the quantized leaf contour and the color channel data set, all leaf contours are iteratively aligned, the sum of the squares of the distances between corresponding points is calculated to obtain the group leaf shape alignment deviation, parameters are adjusted based on the group leaf shape alignment deviation to complete contour alignment, and the co-occurrence frequency of pixel pairs under the set spatial relationship of the quantized color channel value is calculated to establish the aligned leaf shape coordinate set and the color space co-occurrence matrix; Based on the aligned leaf shape coordinate set and the shape coordinates in the color space co-occurrence matrix, the main direction and variance of the leaf group shape synergy are calculated, the main direction cumulative variance contribution rate is calculated to obtain the main shape variation concentration index, the main direction is selected based on the main shape variation concentration index to calculate the projection value of each leaf, and the color matrix statistical measurement is extracted to obtain the group leaf shape variation measurement and the color space heterogeneity index set; Based on the leaf shape variation metric and color space heterogeneity index set of the population, the changes in color heterogeneity indicators were evaluated to obtain the results of the comprehensive stress tendency of morphology and color.

[0006] Preferably, the steps for obtaining the blade profile spatial distribution factor are: After obtaining the plant growth area image, the plant area is identified, the closed contour boundary line of each single leaf inside the plant area is intercepted through the area edge and the complete coordinate points are extracted to generate a set of leaf contour coordinate points in the plant area; Based on the set of leaf contour coordinate points in the plant region, the contour perimeter value of the closed path of each leaf boundary is calculated, the coordinates of the center particle point of the contour boundary are extracted, and the paired Euclidean distances of all the particle points are calculated. At the same time, the grayscale average value, color saturation average value and contour area of ​​each leaf surface are superimposed and extracted to generate a space and visual parameter group between leaf pairs; According to the space between the leaf pairs and the visual parameter group, the leaf outline spatial distribution factor is calculated, and the calculation formula is: in, is the centroid coordinate of the ith leaf, is the centroid coordinate of the other leaf paired with the i-th leaf, is the average grayscale value of the paired leaf surfaces, is the outline area of ​​the corresponding blade, is the mean color saturation, is the contour perimeter, is the angle between the line connecting the paired centroids and the horizontal axis, is the blade profile spatial distribution factor, is the total number of paired leaf pairs.

[0007] Preferably, the steps of acquiring the quantized leaf profile and color channel data set are: Based on the leaf contour spatial distribution factor and the segmented plant region pixels, the plant region pixels are converted from the RGB color space to the HSV color space to obtain the plant region HSV color space pixels; Based on the HSV color space pixels of the plant area, the pixel value interval of each channel in the hue, saturation and lightness channels of the HSV color space pixels of the plant area is evenly divided into a number of sub-intervals of equal length, the sub-interval to which each pixel point belongs is determined one by one, and the original channel value is replaced with the central value of the corresponding sub-interval to obtain a quantized leaf contour and color channel data set.

[0008] Preferably, the steps for obtaining the group leaf shape alignment deviation are: Based on the quantized leaf contour and the leaf contour edge coordinate sequence in the color channel data set, a leaf contour edge point sequence matrix is ​​constructed according to the sequential coding method of the contour points within the boundary line; According to the leaf contour edge point sequence matrix, the corresponding point coordinate values, color channel values ​​and local curvature values ​​of all leaves in the same group are matched to form an alignment parameter matrix including spatial position, color contrast and contour curvature, and obtain a composite difference matrix of leaf corresponding points; Based on the composite difference matrix of the corresponding points of the leaves, the group leaf shape alignment deviation is calculated, and the calculation formula is: in, For the Leaf The original coordinates of the contour points, For the Leaf The coordinates of the contour points after alignment, For the Leaf The brightness difference of each point, For the Leaf The edge curvature difference of each point, is the number of edge points of each leaf, is the total number of leaves, is the leaf shape alignment deviation of the group.

[0009] Preferably, the steps of obtaining the alignment leaf shape coordinate set and the color space co-occurrence matrix are: The edge point coordinates of each leaf are adjusted based on the group leaf shape alignment deviation, and the overall contour structure is matched using a two-dimensional affine transformation to obtain a set of leaf shape edge coordinate points in an aligned state; Calculating a color space co-occurrence frequency comprehensive value according to the leaf shape edge coordinate point set in the aligned state; Based on the color space co-occurrence frequency comprehensive value and the leaf shape edge coordinate point set in the aligned state, each spatial position index and color frequency information are fused to construct a matrix structure to generate an aligned leaf shape coordinate set and a color space co-occurrence matrix.

[0010] Preferably, the step of obtaining the main shape variation concentration index is: Based on the aligned leaf shape coordinate set and the shape coordinates in the color space co-occurrence matrix, extract the two-dimensional position coordinate distribution of the edge points in the image main axis direction of each leaf contour to obtain the leaf shape two-dimensional coordinate distribution matrix; According to the two-dimensional coordinate distribution matrix of the blade shape, a collaborative variation covariance matrix of all edge points in a global unified coordinate system is constructed, and a principal axis variation direction vector group of the collaborative variation covariance matrix is ​​reconstructed by coordinate projection to obtain a shape collaborative variation principal direction matrix; Based on the shape cooperative variation main direction matrix, a main shape variation concentration index is calculated.

[0011] Preferably, the steps for obtaining the population leaf shape variation metric and color space heterogeneity index set are: Based on the main shape variation concentration index, a main direction is selected, a two-dimensional coordinate distribution matrix of the blade shape is called, and each blade edge coordinate point is projected along the selected main direction using matrix linear projection, and the spatial position distribution of each blade after projection along the main direction is calculated to generate a set of main direction projection coordinate values ​​of each blade; According to the projection coordinate value set of each leaf main direction, the color space co-occurrence matrix is ​​called, and the range of each regional partition is determined by the space partition method. The difference statistical analysis of the color channel values ​​in each regional partition is carried out in turn, and the regional partition color channel change amplitude measurement, color channel discrete degree calculation and color distribution uniformity analysis are performed respectively to obtain the color matrix statistical measurement set; Based on the color matrix statistical measurement set and the main direction projection coordinate value set of each leaf, the color characteristics and spatial position relationship are matched to obtain the group leaf shape variation measurement and color space heterogeneity index set.

[0012] Preferably, the steps for obtaining the comprehensive stress tendency result of morphology and color are: Based on the leaf shape variation metric of the group and the color space heterogeneity index set, the fluctuation trend of each region is compared to generate the statistical results of regional differences in color channel heterogeneity; According to the statistical results of the regional differences in the color channel heterogeneity, the change direction and degree of the color heterogeneity index are determined, and the results of the comprehensive stress tendency of morphology and color are generated.

[0013] Compared with the prior art, the advantages and positive effects of the present invention are: The present invention quantifies the spatial distribution differences of each leaf in a plant area by extracting the centroid position and spatial structural characteristics of the leaf contour, and then obtains a more stable and unified group leaf shape feature through iterative alignment of contour coordinates, thereby reducing the interference caused by leaf morphological differences; at the same time, precise quantification of pixel color channels and symbiotic relationship analysis are adopted, and spatial position information and color differences are combined to construct a heterogeneity index that integrates leaf shape and color distribution; and then, combined with the main direction analysis of the coordinated changes in the shapes of leaf groups, the morphological variation concentration area of ​​the leaf group is accurately located, thereby improving the accuracy of the assessment of the spatial and color change trends of the leaves of the plant group; based on the comprehensive analysis operation of the color heterogeneity trend index and the spatial variation of leaf morphology, the accuracy of the plant irrigation stress state judgment is improved, the one-sidedness of the single indicator judgment is avoided, the stability and accuracy of the plant water stress state detection are improved, and the plant irrigation management operation is made more targeted. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 It is a schematic diagram of the steps of the present invention. DETAILED DESCRIPTION

[0015] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0016] See also Figure 1 The present invention provides a technical solution, a method for identifying the irrigation status of a plant growth area based on image recognition, comprising the following steps: Acquire the image of the plant growth area, segment the plant area and extract the coordinate points of each leaf contour, calculate the average of the ratio of the centroid distance to the perimeter of each contour to obtain the leaf contour spatial distribution factor, and based on the leaf contour spatial distribution factor and the segmented plant area pixels, convert the pixel color space and quantize the value of each color channel to obtain the quantized leaf contour and color channel data set; Based on the contour coordinates of the quantized leaf contour and color channel data sets, all leaf contours are iteratively aligned, and the sum of the squares of the distances between corresponding points is calculated to obtain the group leaf shape alignment deviation. The parameters are adjusted based on the group leaf shape alignment deviation to complete the contour alignment, and the co-occurrence frequency of pixel pairs under the set spatial relationship of the quantized color channel values ​​is calculated to establish the aligned leaf shape coordinate set and the color space co-occurrence matrix; Based on the alignment of the leaf shape coordinate set and the shape coordinates in the color space co-occurrence matrix, the main direction and variance of the leaf group shape synergy are calculated, and the main direction cumulative variance contribution rate is calculated to obtain the main shape variation concentration index. Based on the main shape variation concentration index, the main direction is selected to calculate the projection value of each leaf, and the color matrix statistical measurement is extracted to obtain the group leaf shape variation measurement and color space heterogeneity index set; Based on the population leaf shape variation metric and color space heterogeneity index set, the changes in color heterogeneity indicators were evaluated to obtain the results of the comprehensive stress tendency of morphology and color.

[0017] The steps to obtain the blade profile spatial distribution factor are: After obtaining the plant growth area image, the plant area is identified, the closed contour boundary line of each single leaf inside the plant area is intercepted through the area edge and the complete coordinate points are extracted to generate a set of leaf contour coordinate points in the plant area; Based on the set of leaf contour coordinate points in the plant region, the contour perimeter value of each leaf boundary closed path is calculated, the coordinates of the center particle of the contour boundary are extracted, and the pairwise Euclidean distance calculation is performed on all the particles. At the same time, the average grayscale value, color saturation mean and contour area of ​​each leaf surface are superimposed and extracted to generate the space and visual parameter group between leaf pairs. According to the space between leaf pairs and the visual parameter group, the leaf outline spatial distribution factor is calculated using the following formula: in, is the centroid coordinate of the ith leaf, is the centroid coordinate of the other leaf paired with the i-th leaf, is the average grayscale value of the paired leaf surfaces, is the outline area of ​​the corresponding blade, is the mean color saturation, is the contour perimeter, is the angle between the line connecting the paired centroids and the horizontal axis, is the blade profile spatial distribution factor, is the total number of paired leaf pairs.

[0018] Specifically, based on the acquired plant growth area images, firstly, the histogram statistics of the RGB color channel components are used to determine a fixed brightness threshold T1 according to the pixel brightness range recorded during the light environment acquisition period. T1 is calculated by the average brightness value and the contrast value of the image obtained by continuous monitoring. Specifically, 12 images taken every 2 hours within 24 hours are selected from a group of acquired images, and the distribution of brightness values ​​in the range of 0 to 255 is recorded pixel by pixel. The average brightness value in the group of images is about 112, and the average contrast value is about 18. Combining the two, T1 is set to 110. Then, a preliminary screening is performed by treating the area with pixel brightness lower than T1 as the background and the area with brightness higher than T1 as the foreground. After the screening is completed, morphological closing and opening operations are performed. The size of the operation structure kernel is taken from one-tenth of the average width of the leaves measured on site. Ten leaves are selected during the on-site measurement and measured one by one. The width at the widest point and the average value are about 5 mm. The structure kernel size is set to the number of pixels corresponding to 0.5 mm. Then edge detection is performed. The gradient amplitude of the foreground area is detected by the Canny edge method to obtain closed or nearly closed edge curves. All short or unclosed areas are eliminated. The elimination standard is that the pixel length of an edge curve is less than 10 pixels or there is no obvious connection between the two ends. It is directly discarded. The remaining edge curves are merged with adjacent or overlapping connected domains through the connection relationship, and closed edges that match the shape of the plant area and are not broken are selected. Then, the minimum outer enclosing rectangle coordinate set of the closed contour is extracted in the form of an external rectangular frame, and then the contour curve is scanned point by point, all inner coordinate points are stored and marked with the corresponding contour boundary number, and finally these coordinates are grouped according to the number to form a coordinate set of each closed leaf contour, and the coordinate point set of the leaf contour of the plant area is obtained after summarization.

[0019] Based on the obtained set of leaf contour coordinate points in the plant area, a boundary path sequence is established for each leaf. Each coordinate point in the path sequence is separated from its adjacent coordinate point by one pixel in the image. A closed path of the leaf can be formed by sequentially connecting these coordinate points, and then the length data of the path is calculated to obtain the perimeter value of the closed path of the leaf boundary. After that, the coordinate points of each path are calculated for the center mass point in the same order. The arithmetic mean of the x-coordinate and the y-coordinate is used as the center of mass coordinate in the center mass point calculation. To ensure the accuracy of the calculation, all coordinate points need to be converted to a unified reference system first. The unified reference system refers to the upper left corner pixel of the original image as the origin, defines the horizontal right as the positive x-axis, and defines the vertical right as the positive x-axis. The downward direction is defined as the positive direction of the y-axis. After the conversion is completed, the coordinates of the centroid of each leaf are obtained in sequence and the coordinates of the particle points are paired with each other. The Euclidean distance of the paired centroids is calculated one by one. The average grayscale value of each leaf surface is obtained by accumulating the grayscale components of the original image after histogram sampling to an integer and then dividing it by the area. The area refers to the number of pixels corresponding to the leaf in the image, and the color saturation mean is the average of the S channel pixel values ​​extracted in the HSV color space. After traversing all the leaves, a data table containing multiple indicators such as the Euclidean distance of paired centroids, grayscale mean difference, color saturation mean, and contour area can be constructed. The data table is organized into a space and visual parameter group between leaf pairs to generate a space and visual parameter group between leaf pairs.

[0020] formula: The benefit of the formula is that it integrates the multi-dimensional calculation of the difference in leaf centroid coordinates, grayscale mean ratio deviation, color saturation, and the angle between the perimeter and the centroid, thus generating a comprehensive index. The degree of convergence and dispersion of the spatial and visual distribution characteristics of leaves is reflected in it. With the help of the mutual influence between various parameters, the overall distribution characteristics of the leaf group can be more accurately expressed and the coordinated quantification of multiple parameters can be achieved.

[0021] The acquisition steps are as follows: first, select the first All the coordinate points corresponding to the leaves, for example, in a 1024×768 resolution image, if the The sum of the horizontal pixel coordinates of the leaves is 254160, and the number of pixels is 360, then pass Calculation can be obtained .

[0022] The steps to obtain are as follows: Consistent, select all the contour coordinate points of the same blade The coordinate values ​​are accumulated in a unified reference system and then divided by the total number of pixels corresponding to the leaf to obtain For example, if The sum of the vertical pixel coordinates of the leaves is 145800, and the number of pixels is still 360. .

[0023] The steps to obtain are: in the pairing relationship, The other leaf that matches the leaf is recorded as , its centroid coordinates Obtained by the same method as above, first locate The corresponding leaf in the contour point set Coordinates, add and divide them according to the reference system. If The total horizontal coordinates of the leaves are 197460, corresponding to 300 pixels. .

[0024] The steps to obtain are as follows: Similarly, according to the leaves All The coordinates are summed and divided by the number of pixels. The calculation is completed in the same way. For example, if the sum of the coordinates is 156900 and the corresponding number of pixels is 300, then .

[0025] The acquisition step is to use the grayscale image data obtained previously to The grayscale values ​​of the leaves in the corresponding pixel area are accumulated and divided by the number of pixels corresponding to the leaves to obtain the average grayscale value. Since the grayscale value ranges from 0 to 255, it is necessary to record the grayscale value of the leaves in advance. The sum of the grayscale values ​​of all pixels of the leaf is divided by the number of pixels after complete accumulation. The total grayscale value of the pixels in the leaf is 45630, and the number of pixels is 360. .

[0026] The steps to obtain are as follows: Similarly, calculate The average gray value of each leaf is obtained by recording the sum of its pixel gray values ​​and dividing it by the corresponding number of pixels. For example, if the sum of the pixel gray values ​​is 54,000 and the number of pixels is 400, then .

[0027] The acquisition step is to directly regard the total number of pixels corresponding to the same leaf in the image coordinate system as the leaf contour area. The area unit here is the number of pixels, which can be converted into the actual area in actual situations. However, in this formula operation, the number of pixels is still used as the area value for calculation. For example, The total number of pixels of a leaf is 360, then .

[0028] The steps to obtain are as follows: Same, take the paired blades The total number of pixels, if The number of leaf pixels is 300. .

[0029] The steps to obtain are: Leaf The channel is counted by accumulating the saturation values ​​of all pixels and dividing them by the number of pixels. The value range is 0 to 255. For example, the average saturation change range obtained by monitoring multiple periods within 24 hours is between 0 and 200. The total pixel saturation of the leaf is 38520, and the number of pixels is 360. .

[0030] The steps to obtain are as follows: Same for leaves The pixel saturation is counted and calculated. If the sum is 24000 and the number of pixels is 300, then .

[0031] The acquisition step is to directly call the blade circumference data obtained previously, for example The closed path of the leaf boundary is analyzed by the coordinate point sequence to obtain a perimeter of 124 pixels. It is recorded in pixels in the image reference system. In order to ensure the legitimacy of the logarithm during calculation, it is necessary to Add 1 to the base, that is Used to map perimeter values.

[0032] The steps for obtaining are as follows: With blades The centroid coordinates of Calculate the angle between the centroid line and the horizontal axis. The calculation method is: And convert to degrees, A measure of spatial directional differences is provided in the formula, for example if , , , ,but .

[0033] is the total number of paired leaf pairs. The paired value can be obtained by performing pairwise matching on all leaves. For example, when there are 4 leaves in the image, they are divided into For comparison, .

[0034] Calculation process: To demonstrate the formula operation process, take And bring in the example parameters, the parameters of the first pair of leaves are as follows: ; The parameters of the second pair of blades are as follows: , first calculate the numerator part separately: Multiplying the above three terms gives ; The second pair of leaves is calculated in the same way: Multiply to get , so the molecular part is ; Then calculate the denominator: The product of the two pairs of leaves is and , the denominator is , and finally we can get .

[0035] This result shows that when When the value is large, it means that the paired leaves have a certain degree of dispersion in terms of centroid distance, grayscale deviation and saturation, and the superposition of perimeter and direction angle information causes a large comprehensive value. When the values ​​tend to a smaller range, it means that the paired leaves have relatively lower differences in various parameters, which means that the leaf groups are closer in visual and spatial distribution.

[0036] The steps to obtain the quantitative leaf contour and color channel dataset are as follows: Based on the leaf contour spatial distribution factor and the segmented plant region pixels, the plant region pixels are converted from the RGB color space to the HSV color space to obtain the plant region HSV color space pixels; Based on the HSV color space pixels in the plant area, the pixel value interval of each channel in the hue, saturation and lightness channels of the HSV color space pixels in the plant area is evenly divided into several sub-intervals of equal length. The sub-interval to which each pixel belongs is determined one by one, and the original channel value is replaced by the central value of the corresponding sub-interval to obtain the quantized leaf contour and color channel dataset.

[0037] Specifically, based on the leaf contour spatial distribution factor obtained above and the segmented plant area pixels, the red component of each pixel in the image is first read point by point. , Green component , blue component , these three values ​​are linearly normalized according to their respective ranges from 0 to 255, Normalized to , Normalized to , Normalized to , and then each normalized pixel is transformed using a fixed formula, where the maximum component can be calculated in sequence With minimum weight , and then find the difference Then, the hue is determined based on the difference and the size relationship between the components. If the specific value of and ,but ;like and ,but ;like and ,but ,like but , due to the need to The range is unified to 0 to 360. If the If it is a negative value, add 360 to process it, and then change the saturation Set to when , otherwise , brightness Then directly take After all operations are completed, By converting the appropriate amplification factor into the range of 0 to 255, and It is also retained in the integer value between 0 and 255. This method completes the RGB to HSV mapping of all pixels. If extreme conditions are found in the conversion process, such as or , then keep the hue at 0 and the brightness at the corresponding maximum or minimum value, the saturation is recorded as 0 or the upper limit of 255, and finally sort and record each pixel , , Numerical value, get the HSV color space pixel of the plant area.

[0038] Based on the HSV color space pixels of the plant area obtained in the previous step, we first need to Find an upper limit of the interval, such as 255, and a lower limit of 0 in the channel and divide the interval into several equal-length intervals. The length of each interval can be calculated by selecting the total number of intervals and the number of intervals. For example, if 255 is divided into 10 segments, the length of each segment is 25.5. Set the center value of each segment to 12.75, 38.25, and so on, and then increase it in saturation. and brightness The same segmentation method is used in the channel, and the pixel value of each channel is judged according to the pre-defined number of intervals. If the value is between the start and end values ​​of a segment, The saturation and brightness channels are also replaced with the values ​​in the same way. The number of intervals can be set in combination with the sampling resolution in the monitoring environment and the range of leaf appearance changes. If the number of intervals is too small, the quantized data will not be fine enough. If it is too large, the storage capacity will increase and the subsequent processing burden will be increased. The appropriate number of intervals is determined based on the actual observation results. For example, each channel can be divided into 10 or 12 segments, and half of the segment length is used as the offset when calculating the center value. This process is continued until all pixels have completed segmentation judgment and value replacement, and finally the quantized leaf contour and color channel data set is obtained.

[0039] The steps for obtaining the group leaf shape alignment deviation are: Based on the leaf contour edge coordinate sequence in the quantized leaf contour and color channel data set, the leaf contour edge point sequence matrix is ​​constructed according to the sequential coding method of the contour points within the boundary line. According to the leaf contour edge point sequence matrix, the corresponding point coordinate values, color channel values ​​and local curvature values ​​of all leaves in the same group are matched to form an alignment parameter matrix including spatial position, color contrast and contour curvature, and obtain the composite difference matrix of the corresponding points of the leaves; Based on the composite difference matrix of the corresponding points of the leaves, the group leaf shape alignment deviation is calculated. The calculation formula is: in, For the Leaf The original coordinates of the contour points, For the Leaf The coordinates of the contour points after alignment, For the Leaf The brightness difference of each point, For the Leaf The edge curvature difference of each point, is the number of edge points of each leaf, is the total number of leaves, is the leaf shape alignment deviation of the group.

[0040] Specifically, based on the previously obtained quantized leaf contour and the leaf contour edge coordinate sequence in the color channel data set, first determine the edge point index range of each leaf in the image, and number all edge points in the order in which they appear on the same continuous boundary. When numbering, give priority to assigning a starting number to the leftmost pixel on the edge, and then increase the numbers for subsequent pixel points in a clockwise direction. If a coordinate jump position is encountered on the same boundary, detect whether there is a breakpoint according to the coordinate continuity judgment rule sorted out earlier. The breakpoint threshold is obtained by observing the smoothness of the leaf contour during on-site collection. The threshold is set to a Euclidean distance between adjacent coordinate points that does not exceed 2 pixel units. If it exceeds, it is regarded as a breakpoint and another set of numbers is enabled to distinguish different closed boundaries. After the numbering is completed, all sequentially numbered coordinate points are written into a matrix structure in the form of rows and columns, and each row records a point. coordinate, The coordinates and color channel values ​​obtained after quantization processing are used for subsequent cross-leaf or cross-region comparison. Each leaf will eventually obtain several complete or semi-complete contour point sequences. The semi-complete contour point sequences are eliminated according to the missing conditions, and the corresponding leaf ID numbers are marked in the matrix of all point sequences. If some edges are excessively jittered, resulting in a large number of edge line segments in the image, they are reassembled according to the connection relationship of the continuous numbers. The scene data used in the whole process includes the recorded leaf coordinate array and the previously generated color quantization data set, and are compared with the manually set reference standards through line-by-line traversal, such as the coordinate point and They should all fall within the effective range of image resolution from 0 to 1023 or 0 to 767, and the color channel values ​​should be between 0 and 255. Abnormal points should be directly eliminated, and finally the construction of the leaf contour edge point sequence matrix should be completed.

[0041] According to the blade contour edge point sequence matrix obtained above, the point coordinate data is first read row by row within the same group of blades. and The coordinates are recorded as the spatial position reference, and then the corresponding color channel values ​​are extracted and the brightness difference between adjacent points is calculated. When judging the brightness difference, the absolute difference operation will be performed on the brightness values ​​of each point, and the difference will be compared with an empirical threshold. This empirical threshold is based on the on-site observation and statistics of the light and dark transition on the leaf surface. It is set to count the average brightness change range of each leaf after continuously shooting 30 frames of images. For example, the brightness is in the range of 30 to 200 and the smaller value is taken as the threshold. If the threshold is exceeded, it is determined that the two points have a sudden change in color contrast. Subsequently, the data column of the brightness difference is added to the same row of data, and the local curvature value obtained by the coordinate difference and direction difference is recorded in the same row. The calculation of the local curvature value requires the sum of the arc between two adjacent pixels and divided by the number of adjacent points. Then, the data of each edge point is read row by row for all leaves and the integration of color, space and curvature is completed to form a row direction. , , color contrast, local curvature and other fields, and perform subtraction or absolute value comparison on the same row data of adjacent leaves, and finally integrate them into the composite difference matrix of the corresponding points of the leaves.

[0042] formula: The benefit of the formula is that by comprehensively calculating multiple factors such as edge coordinate offset, brightness difference and curvature difference, the overall difference of the leaf group in the alignment process can be evaluated from multiple dimensions, taking into account both the offset of shape geometry and appearance factors such as brightness and curvature. The overall deformation deviation can be quantified in the simulation, providing more details and basis for subsequent analysis.

[0043] The acquisition step is to locate the first Leaf coordinate points, read their Axis components and assigned to To ensure accuracy, the image resolution needs to be set to at least 1024×768 and the coordinates of each pixel need to be fully recorded during the field acquisition phase. Invalid or out-of-range points are then selected. Finally, the valid edge points are accumulated row by row and given an index value. The coordinates can be obtained For example, if the leaf ID is 3, you can directly filter out the rows with ID equal to 3 and record them row by row. Coordinates, if Points The coordinate reading result is 420, then .

[0044] The steps to obtain are as follows: Similar, just take the Leaf Coordinate points Quantity rather than Components, for example, if the corresponding row The coordinate value is 340, then .

[0045] The steps to obtain are: The coordinate points of the blades are adjusted to eliminate the overall translation or rotation caused by shooting or viewing angle differences. After the entire leaf is transformed, re-read the Points Coordinates are marked as For example, after rotating leaf ID 3 clockwise by 2 degrees and translating it horizontally by 10 pixels, the leaf ID 3 is positioned. Points Coordinates, if the point is 388 after transformation, then .

[0046] The steps to obtain are as follows: Same as, but take the first one obtained after alignment or transformation Points Coordinates, write them , for example, under the same rotation and translation, the point ends up If the coordinate value is 355, then .

[0047] The steps to obtain are: Leaf To calculate the brightness difference of a point, we first need to read the brightness value of the point from the original quantized data set, and then perform an absolute difference operation with the target reference leaf or the alignment reference brightness. To determine the reference brightness, we can combine the overall average brightness value of the leaves obtained by the previous statistics, and then perform a difference between the two leaves that need to be aligned or compared. ,in For the Leaf The brightness of a point, The brightness of the corresponding point of the reference leaf is recorded during on-site observation. The brightness range of each leaf is usually between 30 and 200. The brightness of the leaf point is 120, and the corresponding reference brightness is 90. .

[0048] The steps to obtain are: Leaf The edge curvature difference of a point needs to be obtained by geometrically fitting the coordinates of the point and two or more adjacent points in the process of calculating the local curvature of the blade curve, and then subtracting the curvature from the corresponding point of the alignment reference or the corresponding point of the same group of blades. If the curvature of a point is 0.15 and the reference curvature is 0.10, then .

[0049] The steps for obtaining the number of edge points of each leaf are as follows: the number of points should be recorded after the outline coordinates of each leaf are summarized. If the total number of valid edge points of a leaf is finally confirmed to be 420, then .

[0050] The acquisition steps are: the total number of leaves, which represents the number of leaves included in the same set of analysis. For example, if 8 different leaves are photographed in one day and all are confirmed to be aligned for analysis, then .

[0051] Calculation process: The first step is to calculate the molecular part: for each leaf Traverse all its edge points and will Add them up and record the result as the number above the numerator. ; The second step is to calculate the denominator: for the same leaf and all its edge points calculate of and; The third step is to take the square root of the ratio of the numerator to the denominator, and then divide all the leaves Add the results and divide by , and then taking the natural logarithm of the mean gives ; The following is a numerical example: Pick , indicating that there are a total of 2 leaves involved in the calculation, and the , which means that only three key edge points are intercepted for example. The square difference sequence of the original coordinates and the aligned coordinates of the first leaf is (100, 64), (81, 100), and (36, 25), and the squares are accumulated in sequence to obtain: , , , so the sum of the molecules is 26896+32761+3721=63378, the brightness difference They are 30, 25, and 20 respectively, with a curvature difference of are 0.05, 0.08, and 0.02 respectively. , for example, the first point , and the sum of the denominators is approximately 30.0375+25.0064+20.0010=75.0449, so the result for the first leaf is ; The second blade is calculated in a similar way to get a result of 28.35, add the two together to get 57.42, and then divide by Equal to 28.71, finally take ,Right now .

[0052] This result shows that when When the value is between 3.0 and 4.0, it means that different leaves have moderate differences in coordinate offset, brightness and curvature. If it exceeds 4.0, it means that there is a greater deformation deviation between the leaves. If it is lower than 2.0, it means that the overall alignment effect is closer. The value can be used to judge the distribution of leaf deformation and decide whether further morphological correction or color adjustment is needed.

[0053] The steps to obtain the alignment leaf shape coordinate set and color space co-occurrence matrix are: The edge coordinates of each leaf are adjusted based on the group leaf shape alignment deviation, and the overall contour structure is matched using a two-dimensional affine transformation to obtain a set of leaf shape edge coordinate points in an aligned state. According to the leaf shape edge coordinate point set in the aligned state, the color space co-occurrence frequency comprehensive value is calculated. The calculation formula is: in, For horizontal Column and vertical The number of pixel pairs with the same color channel value in the row area, For the The number of pixel pairs in the region whose color channel difference is not zero, Respectively Column and The average pixel brightness value of the row area, For the The grayscale mean value of the co-occurrence of color channels in the region, For the The average value of the direction angle difference of the edge points in the region, The number of grids divided horizontally for color symbiosis analysis, The number of grids divided vertically for color symbiosis analysis, is the comprehensive value of co-occurrence frequency in color space; Based on the comprehensive value of color space co-occurrence frequency and the set of leaf shape edge coordinate points in the aligned state, the spatial position index and color frequency information are fused to construct a matrix structure to generate the aligned leaf shape coordinate set and color space co-occurrence matrix.

[0054] Specifically, based on the group leaf shape alignment deviation, the coordinates of the edge points of each leaf are translated or rotated accordingly. First, the previously determined two-dimensional affine transformation parameter list is obtained, which usually includes specific values ​​such as horizontal displacement, vertical displacement and rotation angle. Then, coordinate transformation is performed for all edge points of each leaf according to a unified rule. If a leaf needs to move a certain number of pixels to the right, a fixed increment is added to the horizontal coordinates of all its points. The vertical coordinate can be operated similarly. The rotation can be mapped to the coordinate transformation matrix by performing sine and cosine calculations on the angle parameters. The horizontal and vertical coordinates of the original point are multiplied by the transformation matrix to obtain the new coordinates. If a point is encountered that exceeds the range of the canvas, it is compared with the previously recorded reference system boundary. When it is larger than the maximum width or maximum height of the image, it is cropped to the limit value to avoid distortion of the coordinate data. After the transformation is completed, each point is formed. A new set of edge point coordinates for each leaf is generated, and the data corresponding to each leaf is distinguished by a serial number. A label column is added in the same table to indicate the mark of the completed alignment processing. Then, the maximum and minimum coordinates of the edge points after alignment are extracted, and the interval difference in the horizontal and vertical directions is used to determine whether the overall size of the leaf meets the previous leaf average size standard. For example, in the previous statistics, the width of a certain variety of leaves is usually between 50 and 80 pixels, and the height is between 90 and 120 pixels. If the width or height of some leaves deviates too much from the preset range after the actual conversion, it is reminded to check the transformation parameters. At this time, the previously recorded leaf shape alignment deviation can be referred to and the rotation angle and translation distance can be appropriately reduced or increased according to its magnitude. After the adjustment, the coordinate update is performed again. Finally, all the fully corrected edge point data are summarized in one place to obtain the set of leaf shape edge coordinate points in the aligned state.

[0055] formula: The usefulness of the formula lies in that it measures the interaction between the co-occurrence relationship of color channels and the brightness of spatial positions from multiple dimensions. It comprehensively calculates parameters such as the number of pixel pairs, channel differences, brightness, and edge direction angles, providing an intuitive measure for evaluating the overall coordination and degree of difference in leaf color distribution, which facilitates subsequent more detailed analysis of areas with abnormal color or distribution.

[0056] The acquisition steps are as follows: divide the image into column sum After the line, for the coordinates falling in Column and The color of all pixels within the range of the row partition is compared. When there are two pixels with exactly the same color channel value, the pixel pair is recorded and the total number is accumulated. The larger the number of identical pixel pairs, the more obvious the color concentration in the partition. To ensure the accuracy of the value, it is necessary to judge pixel by pixel and ensure that the RGB or HSV channels meet the same threshold. The setting of the threshold refers to the external light source and camera sensitivity. A group of 200 images are collected on-site to analyze the pixel distribution. The channel difference of the actual pixel unchanged area is statistically within 3, so the color channel difference is less than 3. The absolute value of the color channel difference is determined to be the same. For example, if a total of 120 pairs of pixels with the same channel value are found in a certain partition scan, then .

[0057] The steps to obtain are: still use all the pixels in the same partition, but this time the focus is on counting the number of pixel pairs whose color channel difference is not zero. It is necessary to compare the three-channel values ​​​​of each pixel with the reference channel and make a difference. If the absolute value of the difference between a pair of pixels is in the range of 1 to 3, it is accumulated to In order to ensure the statistical objectivity, we collected 50 representative leaf local images and performed partition detection by testing the images taken under stable lighting conditions. Finally, we found that when the difference of more than 70 pairs of pixels in the indoor environment is non-zero, it can be generally considered that the color of this area fluctuates slightly. Therefore, in the calculation In the process of scanning, the actual number obtained is used as the value. For example, if 85 pairs of pixels are detected in a partition and the difference is not zero, then .

[0058] The steps to obtain are: in the horizontal Within the partition range of a column, extract the brightness value of all pixels in the column (can be in HSV mode) Or directly perform weighted averaging on RGB), then add up the brightness of all pixels and divide by the number of pixels in the column to get the average brightness, and use the average brightness as In order to reduce the interference of local reflection or shadow of light, take the arithmetic mean and filter out the abnormal values. For example, when the brightness of some positions in the same column suddenly reaches 255 or 0 during acquisition, it should be eliminated and then added normally. If the number of valid pixels in a column is 500 and the total brightness is 32000, then .

[0059] The steps to obtain are: in the vertical The partition range of the row is divided into In a similar way, count the brightness values ​​of all pixels in the row and find their average value. For example, if a row spans 800 pixels in the image, of which 700 are valid pixels and the total brightness is 45900, then .

[0060] The steps to obtain are: in the Within the partition, the color channel of the area is grayed out. The gray value of each pixel can be converted from the original RGB or HSV channel. Then all the gray values ​​in the area are accumulated and divided by the number of pixels in the area to get the gray mean. For example, if the area contains 360 pixels and the total gray value is 44280, then .

[0061] The steps to obtain are: in the In the partition, only the direction angles of the edge point pixels are recorded, and the average value of these direction angles is obtained. , if there are 20 valid edge pixels in a partition, and the direction angle of each pixel is between -60° and 30°, then the sum is divided by 20 to get ,but .

[0062] The acquisition steps are as follows: The number of grids divided horizontally for color symbiosis analysis needs to be determined according to the image resolution and detection requirements. If the resolution is 1920×1080 and each grid is expected to contain 80 pixels in width, then .

[0063] The acquisition steps are as follows: the number of grids divided vertically by color symbiosis analysis, and Similarly, by dividing the image height by the desired grid height, at a height of 1080, if each grid is 60 pixels high, then .

[0064] Calculation process: The first step is to traverse the partitions in row and column order: From 1 to , From 1 to , for each Statistics by region , , , , , ; The second step is Evaluate and compare and Multiply and take the absolute value; The third step is to divide the above product by , get the local value under a single partition; The fourth step is to perform double loop accumulation of the local values ​​of all partitions. ; Example numerical input: , , forming 4 partitions, each partition is counted separately , , , , , , and so on to obtain , , , Parameters such as Partition: The other partitions are calculated in the same way and their results are accumulated, and the final summary is ,like , , , The calculation process is similar. After adding all together, the total is 920.57. , A total of 4 partitions give .

[0065] This result shows that when In a larger value range, it means that the overall color space has a variety of subtle differences and has local high brightness or high saturation areas. A smaller value indicates that the color distribution is more uniform. and Further analysis of parameters such as color difference can be performed to determine which partitions have obvious color differences.

[0066] Based on the color space co-occurrence frequency comprehensive value and the leaf shape edge coordinate point set obtained in the previously aligned state, it is necessary to merge the co-occurrence frequency result with the edge coordinate point information in the partition corresponding to each leaf. In the specific implementation, the co-occurrence frequency result of each partition will be read from the previous calculation results. or Count, then traverse the aligned edge point coordinates, determine the partition index to which these coordinate points belong, if a certain coordinate point has a column number equal , line number equal , it means that the coordinate point falls on The coordinates of the point and the color frequency data obtained by partition statistics are then integrated into a record. After multiple partitions are aligned, they can be assembled into a matrix structure according to the correspondence between rows, columns and leaf IDs. Each row of records includes leaf ID, coordinates, and color frequency data. ,coordinate , the number of color pairs or the number of differences in the corresponding partitions, and other fields. When there are many leaves in the image, all leaf edge points in each partition can be traversed by batch processing, and this information can be summarized to obtain the final aligned leaf shape coordinate set and color space co-occurrence matrix.

[0067] The steps to obtain the main shape variation concentration index are: Based on the alignment of the leaf shape coordinate set and the shape coordinates in the color space co-occurrence matrix, the two-dimensional position coordinate distribution of the edge points in the image main axis direction of each leaf contour is extracted to obtain the leaf shape two-dimensional coordinate distribution matrix; According to the two-dimensional coordinate distribution matrix of the blade shape, the collaborative variation covariance matrix of all edge points in the global unified coordinate system is constructed, and the principal axis variation direction vector group of the collaborative variation covariance matrix is ​​reconstructed by coordinate projection to obtain the shape collaborative variation principal direction matrix; Based on the main direction matrix of shape synergy change, the main shape variation concentration index is calculated. The calculation formula is: in, is the shape co-variation principal direction matrix, is the Frobenius norm of the principal direction matrix, The main direction matrix Line The difference in the projected length of the blade shape of the column, The main direction matrix Line The shape coordinates of the columns are local curvature offsets, is the determinant of the principal direction matrix, is the dimension of the principal direction matrix, is the main shape variation concentration index.

[0068] Specifically, based on the alignment of the leaf shape coordinate set and the shape coordinates in the color space co-occurrence matrix, the corresponding reference scale is first established in the main axis direction of the image and the edge points of each leaf are projected to the main axis direction in sequence. During the projection, the angle between the main axis direction and the horizontal or vertical direction needs to be calculated based on the previously confirmed image resolution information and the position of the reference system origin, and the angle between each leaf edge point is calculated by Coordinates and The projection coordinates are obtained by performing vector dot product on the coordinates, and then the normalization correctness of the main axis direction vector is checked during the calculation process. If the main axis direction is found to be offset by about 1 to 2 degrees during the on-site measurement, it is necessary to readjust the angle of the main axis vector before projection and record the new angle value. Then, the projection results of all edge points are marked with continuous serial numbers and grouped by leaf ID. If the edges of some leaves are curved, the projection values ​​will be unevenly distributed inside the same leaf, which needs to be recorded in the distribution matrix as the position difference of adjacent points. The local sections where the continuous projection values ​​differ by more than 30 pixels are specially marked. This threshold is obtained through measurement statistics of leaves of the same variety, and its specific setting is The placement process is to collect 50 leaves of the same variety outdoors, measure the maximum edge curvature of each leaf under the same lighting and shooting angle, and perform superposition analysis on the imaging effect of the edge curvature multiple times and extract the projection differential distribution. Finally, 30 pixels are selected as the cutoff value. If it exceeds the value, it is regarded as a mutation point and marked. After completing these records, all the projection coordinates of the same leaf are connected into a sequence to form a two-dimensional coordinate distribution matrix. Each row or column of the matrix corresponds to the coordinate value of a certain edge point in the direction parallel to the main axis and the orthogonal direction, and contains the mapping position of the point in the original image and the partition number. When all leaves have obtained the corresponding projection coordinate sequence, these matrix information are summarized and sorted to obtain the two-dimensional coordinate distribution matrix of the leaf shape.

[0069] According to the obtained two-dimensional coordinate distribution matrix of the leaf shape, all edge points are first mapped to the global unified coordinate system according to the overall division method. The setting of the global unified coordinate system needs to be combined with the camera calibration parameters and image resolution during on-site shooting. If shooting indoors, the upper left corner of the image can be set as the coordinate origin and each pixel corresponds to an integer coordinate, thereby forming a system with consistent horizontal and vertical measurement units. Subsequently, all edge points of different leaves are unified into a large coordinate table under the global coordinates, and any point in the table is scanned in parallel. and Coordinates are used to match the pairing relationship between adjacent points. By analyzing the relative positions of paired edge points, a collaborative variation covariance matrix reflecting the overall distribution is constructed. The rows and columns of the matrix correspond to the parallel direction of the main axis and the orthogonal direction or other characteristic directions, respectively, forming a multi-dimensional statistical structure. The covariance matrix is ​​then reconstructed by coordinate projection. By mapping the matrix to a new axial space, the main axis variation direction vector group that best reflects the trend of group leaf shape changes is found. Each vector of the main axis vector group represents a characteristic projection direction. These directions can reveal the main collaborative variation patterns of group leaves in morphology. In order to implement this process, a fixed bracket needs to be installed on site to ensure consistent imaging angles and to be used in image segmentation. In the analysis stage, the shooting area at the same height is divided, and the morphological information of each leaf is projected onto the horizontal and vertical coordinate dimensions. The coordinate components of the corresponding edge points are decomposed row by row and column by column according to the generated two-dimensional coordinate distribution matrix of the leaf shape. After these coordinate components are combined into a matrix form, the matrix is ​​subjected to eigendecomposition or singular value decomposition to extract the principal axis vector. The eigendecomposition used here needs to be performed on the basis of an accurate numerical matrix. The error range of aspects such as illumination intensity and lens distortion can be found out through repeated shooting and comparison, and abnormal coordinate points that obviously deviate from normal values ​​can be eliminated or replaced. When all edge points appear in the global coordinate system according to fixed rules and multiple comparisons are completed, the main direction matrix of shape coordinated change can be finally obtained.

[0070] formula: The benefit of the formula is that it comprehensively considers the norm of the main direction matrix of the shape, the local curvature offset of the coordinates, and the overall determinant information. It can quantify the concentration of the main morphological variations of the leaf population in the same indicator, has higher flexibility in identifying the core reasons for the shape differences between leaves, and includes the length difference and curvature factors into the quantification scope.

[0071] The steps to obtain the matrix are as follows: This matrix is ​​the main direction matrix of shape synergistic change. Its construction needs to be based on the coordinates of all leaf edge points obtained previously, separate the two-dimensional coordinate distribution aligned to the unified coordinate system, and then extract several vectors that best represent the shape changes of the leaf group, arrange and combine these vectors and integrate them into a matrix in the form of appropriate rows and columns. , value example: For a group with 8 leaves, each leaf is projected to obtain several representative vectors, and these vectors are connected to form a dimensional matrix, where Related to the number of principal axes or features extracted previously, if three main directions are obtained through principal axis analysis, then Can or By taking dozens of images on site and performing extraction and projection on each leaf, the corresponding vector group can be obtained and formed. For example, in an actual test, three main direction vectors are obtained, each vector contains two components, which can be organized into a of .

[0072] The steps to obtain are: This is the Frobenius norm of the main direction matrix, which means that the matrix The value obtained by adding the squares of all elements and then taking the square root is calculated as follows: ,in and for The number of rows and columns requires that the size of the main direction matrix be confirmed in advance, and then the data of each element of the matrix is ​​read out, their square values ​​are accumulated, and finally the square root is taken to obtain the Frobenius norm. When obtaining, the matrix can be read after the image analysis is completed. All values ​​in the table are processed and this operation is performed, for example, when for Dimensions and element values ​​are , then first square and add them to get , and then take the square root to get .

[0073] The steps to obtain are: This is the main direction matrix Line The difference in the projected length of the blade shape of the column indicates that The element reflects the difference in the projection length of different leaves on the principal axis vector. Through the previous steps, the projection values ​​of a certain main direction of multiple leaves are extracted and then the difference operation is performed. A standard reference leaf can be defined first and its length in this direction can be recorded. , and then the projection length of the target blade Take a difference , if the projection length of a leaf in the main direction 1 is 95 pixels, and the projection length of the reference leaf in the same direction is 90 pixels, then After summarizing the differences of each blade, the corresponding positions of the main direction matrix can be filled in To form Partial data, if there are 8 leaves and 3 main axes, then or A matrix in which each element corresponds to the length difference between a certain leaf and the reference leaf.

[0074] The steps to obtain are: This is the main direction matrix Line The local curvature offset of the shape coordinates of the column indicates that at the position of the element, the difference between the change of the edge curvature in this direction and the reference value needs to be recorded. The local curvature is first calculated at the edge point of each leaf, and then aggregated or weighted averaged in the projection direction to obtain a curvature value representing the leaf relative to the reference shape, and then compared with the reference curvature to make a difference. , if the reference curvature value is 0.12 and the measured curvature value of the blade is 0.15, then .

[0075] The steps to obtain are: after obtaining the main direction matrix Then, we can obtain the , for example when for When ,but .

[0076] The steps to obtain are: This is the dimension of the main direction matrix, which is mainly determined by the number of eigenvectors set when extracting the main direction of the shape. If it is a 2D projection, 2 or 3 main eigenvectors can be taken and combined into one or The matrix of You can choose 2 or 3.

[0077] Calculation process: Step 1: Calculation , for the matrix Take the square root of the sum of the squares of each element; Step 2: Right Perform accumulation and square root; Step 3: Divide the two and add 1 to the denominator, then add the absolute value ; Step 4: Take the natural logarithm of the result to get ; Example operation: Let the matrix for , the elements are , which has been calculated before , the determinant can only be directly calculated for square matrices. Here, for example, by padding or other expansion methods, the matrix is ​​mapped to The main directions are expressed as ,Then , in this example , , , , , , , , bring them into as follows: Taking the square root gives , and then Substituting in, the denominator is , so the above molecule is , plus ,have to ,final ,Right now .

[0078] This result shows that when When the value exceeds 1.2 or 1.3, the leaf group shows a certain degree of shape difference and local curvature difference in the main shape direction. If it further increases to 2.0 or above, it means that the shape variation is more dispersed. If it is lower than 1.0, it means that the overall variation is more concentrated and the difference between leaves is not high. Based on this value, we can intuitively judge whether the shape of the group tends to be unified and in which directions the difference is obvious.

[0079] The steps for obtaining the leaf shape variation metric and color space heterogeneity index set of the population are as follows: The main direction is selected based on the main shape variation concentration index, and the two-dimensional coordinate distribution matrix of the leaf shape is called. The matrix linear projection is used to project each leaf edge coordinate point along the selected main direction, and the spatial position distribution of each leaf after projection along the main direction is calculated to generate a set of projection coordinate values ​​of each leaf in the main direction. According to the projection coordinate value set of each leaf main direction, the color space co-occurrence matrix is ​​called, and the range of each regional partition is determined by the space partition method. The difference statistical analysis of the color channel values ​​in each regional partition is carried out in turn, and the regional partition color channel change amplitude measurement, color channel discrete degree calculation and color distribution uniformity analysis are performed respectively to obtain the color matrix statistical measurement set; Based on the color matrix statistical measurement set and the main direction projection coordinate value set of each leaf, the color characteristics and spatial position relationship are matched to obtain the group leaf shape variation measurement and color space heterogeneity index set.

[0080] Specifically, the main direction is selected based on the main shape variation concentration index. First, the main axis vector with the highest score is extracted from the main shape variation concentration index results obtained previously, and the horizontal and vertical component values ​​corresponding to the vector are read. Then, the main axis vector is normalized to ensure that relatively accurate coordinate values ​​can be obtained through the vector dot product method during projection. Then, when calling the two-dimensional coordinate distribution matrix of the leaf shape, it is necessary to first confirm the correspondence between the row and column labels of the matrix and the external reference coordinates, including the unified identification of all aligned leaves in the same image, and the edge points of each leaf are indexed by serial number and stored in a corresponding table. This table will indicate in detail the index point. coordinate, Coordinates and the internal sequence number of the same leaf, and then perform a vector dot product operation on each index point. The operation formula can be written as the projection value ,in are the main direction vectors obtained previously. Axis and The component of the axis, so that several projection values ​​can be obtained continuously in the same leaf. During the calculation process, it is necessary to perform an absolute range check on these projection values. If the projection value exceeds the sum of the width and height of the image limit pixels measured in advance, it is necessary to compare the possible offset in the shooting environment and determine whether there is an external noise or lens distortion. If it is confirmed that the projection value is too large and exceeds the specified value of 30 pixels, it will be included in the abnormal summary. The 30-pixel setting here is obtained by testing 50 leaves of the same variety under uniform indoor lighting conditions. The specific method is to shoot these leaves in different time periods and compare the average length of the main axis direction with the scale data laid out before shooting. Through multiple comparisons, it is found that deviations of more than 30 pixels often mean that the lens is tilted or the leaf is greatly twisted, so this threshold can be flexibly adjusted in practice. Once an abnormality is found, the point is marked as an unstable coordinate point in the projection result. After the filtering is completed, the projection values ​​of each leaf in the main axis direction are sorted into a special index array and used The leaf ID is used as the index, and the projection value of each leaf is arranged from small to large or from left to right. If there is a leaf with overlapping projection values ​​or highly concentrated in a local area, density estimation is performed next to the projection sequence of the corresponding leaf. The density estimation can be counted according to the number of projection points appearing in the unit pixel interval. If the local concentration exceeds the preset threshold of 5 points, it means that the edge of the leaf is folded or the curvature is large in a certain interval. The setting of these 5 points is also the result of statistics after monitoring the change of leaf curvature when collecting leaves of the same variety. By manually counting the high curvature area, it is known that the overlap of more than 5 points in a short distance usually means that the inner or outer edge of the leaf is protruding. After completing the above detection and screening, the position distribution of each leaf after projection along the main direction is finally obtained, and a list file or array is formed as the final coordinate set. Finally, the projection coordinate value set is written into the summary table according to the leaf ID, which is convenient for subsequent spatial matching and color analysis to generate the projection coordinate value set of each leaf in the main direction.

[0081] According to the main direction projection coordinate value set of each leaf, first obtain the upper and lower boundaries of the projection value of each leaf in the set, and use this to deduplicate the projection range of adjacent leaves. If there is a lot of overlap in the projection intervals of two leaves, it is necessary to confirm whether there are leaves with obvious overlap in distribution according to the previous main direction vector normalization results. If there is overlap, it will be regarded as an overlapping area in the subsequent color analysis. When calling the color space co-occurrence matrix, it is necessary to first read the matrix data structure constructed previously, including the row and column numbers and color pixel partition information of each grid, and ensure that these row and column numbers correspond to the coordinate projection values ​​one by one. In terms of the spatial division method, the width or height direction can be divided into specified intervals according to the overall resolution of the image and the leaf projection situation. For example, set the horizontal grid width to 40 pixels and the vertical grid height to 30 pixels, and generate several grid areas, each of which has a corresponding row and column number. Then traverse the projection coordinates of each leaf, determine the area to which the coordinates belong, and read the color channel value in the corresponding area, and count the numerical conditions of each channel in the area. The statistical content includes the maximum and minimum values ​​and the average. If the difference between the average and the maximum number exceeds a predetermined threshold of 50, (This 50-pixel level threshold is inferred from the color fluctuation range of leaves under outdoor shooting conditions, and is determined by performing a difference comparison test on a group of leaf images under high brightness and a group of leaf images under low brightness). This indicates that a large color change occurs in the area, and it is necessary to focus on marking it when determining the change range of the color channel in the regional partition. Then, when calculating the discreteness of the color channel, it is necessary to calculate the variance and standard deviation of the color channel in the area according to the number of pixels. If the standard deviation exceeds 20, it is judged to be too discrete. The value of 20 is taken from the average color fluctuation range of the 300 leaf images previously counted. If the discreteness is large, it is recorded as a high discrete area. Finally, the uniformity of color distribution should be observed, that is, whether there are points concentrated on a very small number of hues or saturations in each area. This process can equally divide the channel histogram into several segments to see whether the count of a single segment is greater than the preset threshold of 200 pixels. This 200 pixels is the pixel threshold of a leaf local area estimated based on the resolution and shooting distance. If the number of pixels in a segment is significantly higher than this value, it is considered to be unevenly distributed and recorded in the result table. After traversing all areas, a set of color matrix statistical metrics can be obtained.

[0082] Based on the color matrix statistical measurement set and the main direction projection coordinate value set of each leaf, first read the upper and lower intervals of the projection coordinates of each leaf respectively, and compare the color analysis results of the corresponding area in the statistical measurement set. If a leaf is projected to the horizontal coordinate interval of 300 to 360 and the vertical coordinate interval of 500 to 550, then find the grid rows and columns that coincide with the interval in the color matrix statistical measurement, and retrieve the color channel amplitude, discreteness and uniformity results in these grids one by one. If it is found that there are too many grids with discreteness exceeding the empirical threshold of 15, it is recorded that the color fluctuation of the leaf in the corresponding section is obvious. The threshold of 15 is derived from the average fluctuation statistics of leaf saturation under outdoor natural light conditions. After comparing different weather and light source brightness, a quantitative standard suitable for this scene is obtained, and then all grids in the same leaf are summarized. The statistics of the grids are used to obtain the color feature set, and then whether there is a concentrated or sparse distribution phenomenon in the projected coordinates is examined. These spatial positions and color feature information are comprehensively identified. If similar projections and similar color features appear between multiple leaves, they are considered to have similar color features in the same morphological interval. If the projection intervals of leaves are similar but the color features are quite different, they are clearly marked as areas with strong heterogeneity when recording. After completing this leaf-by-leaf and area-by-area matching, the matching relationship between the main direction projection interval of the group leaves and the color channel anomalies or the number of discrete grids can be listed in the final table. These matching data are sorted into the same list, and combined with information such as leaf ID to establish a set of indicators for subsequent analysis, forming a group leaf shape variation measurement and color space heterogeneity indicator set.

[0083] The steps for obtaining the results of morphological and color comprehensive stress tendency are as follows: Based on the leaf shape variation metric and color space heterogeneity index set of the population, the fluctuation trend of each region is compared to generate the statistical results of regional differences in color channel heterogeneity; According to the statistical results of regional differences in color channel heterogeneity, the change direction and degree of color heterogeneity indicators were determined to generate comprehensive morphological and color stress tendency results.

[0084] Specifically, to compare the fluctuation trend of each region, first read the group leaf shape variation measure and color space heterogeneity index set, and compare them according to the existing regional division method, extract the color channel discreteness, saturation mean fluctuation amplitude and brightness variation range obtained by statistics for each region, and then make a comprehensive judgment based on the edge distribution and shape variation information of each leaf in the region. When it is found that the color channel values ​​of multiple leaves in a certain region exceed the preset threshold, the fluctuation intensity of the region will be recorded in the result table, and the specific values ​​of the channel value exceeding the threshold will be further split. For example, if there are partition points on the red channel that are higher than the set threshold of 60, they are summarized together according to the projection coordinates. The 60 here comes from the statistics of multiple shooting data in the previous step. By measuring the red channel distribution in 200 images and comparing their average with the range, it is found that the red channel floats around 0 to 50 under normal circumstances. If it exceeds 50, it is defined as a significant fluctuation. Therefore, 60 is set as a reserved space and used as a reference value in the final detection. Similarly, other color channels also correspond to their respective preset thresholds, and then compare multiple regions. When calculating the degree of difference, the recorded standard deviation and variance data should be used to measure the fluctuation trend of the area in the time dimension or between individual leaves. If a certain area shows a continuous increase in saturation and brightness and exceeds the statistical benchmark value, it is marked as a high fluctuation area, and these high fluctuation areas are subsequently checked in a targeted manner. By checking the distribution of edge pixels, it is confirmed whether it is caused by the color characteristics of the leaves themselves or the offset caused by external environmental factors. At the same time, the comparison of all partitions should be recorded. If similar fluctuation patterns appear in adjacent partitions, they are summarized into the same category. Finally, combined with the recorded information of multiple leaves, these areas with high color channel heterogeneity are listed uniformly. When summarizing, the coordinate range of the area is matched with the degree of fluctuation one by one, and the large-range discrete values, obvious offset values, and the number of repetitions exceeding the baseline are presented one by one in the same list, and then a longitudinal comparison is performed in the list. If the channel values ​​of multiple areas are repeatedly higher than the threshold in the same time period, it is judged as a situation of high color fluctuation. If only individual leaves exceed the limit in individual partitions, it is listed as a single point burst, and finally the statistical results of regional differences in color channel heterogeneity are generated.

[0085] According to the statistical results of regional differences in color channel heterogeneity, each regional record entry in the statistical results is first extracted, and the fluctuation direction of the region is analyzed. If it is observed that most fluctuations develop from low values ​​to high values ​​and exceed a benchmark amplitude of 30, it is defined as an upward direction. The 30 here is the floating range calculated by longitudinally comparing the red channel and the saturation channel after tracking the evolution of the leaf color cycle on site for several months. When calculating, the average channel values ​​of 10 leaves in a certain period of time are subtracted and continuously recorded, and then a comprehensive evaluation is made for all time periods to finally select this value as a reference benchmark. When it is confirmed that multiple regions show fluctuations in the same direction and the amplitude is between 30 and 80, they are uniformly classified into a moderate change category. If the amplitude exceeds 80, it is classified as a large change category. Then all marked change categories are compared with the existing heterogeneity indicators to confirm the region If the dispersion is higher than the set benchmark of 40 at the same time, it will be marked as a high heterogeneous area when classified, otherwise it will be marked as a low heterogeneous area. By reviewing the statistical results line by line in this way, the specific distribution of the change direction and degree of change can be finally obtained. Then, the leaf ID and spatial position are compared to confirm whether similar changes are shown in different partitions of the same leaf. If a large difference is found in the partitions, the inconsistent changes are emphasized. If it is found that a large range of leaves are consistently shifted in the direction of high values, a note is added. After completing the registration of the change direction and amplitude, a change statistics table containing all areas is summarized and matched with the shape variation information. If both show high fluctuations, they are classified as a category with high stress tendency, otherwise they are classified as medium or low stress tendency. Finally, the morphological and color information of the corresponding leaves is recorded to obtain the comprehensive stress tendency results of morphological and color.

[0086] The above are only preferred embodiments of the present invention and are not intended to limit the present invention in other forms. Any technician familiar with the profession may use the technical contents disclosed above to change or modify them into equivalent embodiments with equivalent changes and apply them to other fields. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the technical solution of the present invention still falls within the protection scope of the technical solution of the present invention.

Claims

1. A method for identifying the irrigation status of a plant growth area based on image recognition, characterized in that: The following steps are involved: Acquire an image of a plant growth area, segment the plant area and extract the coordinate points of each leaf contour, calculate the average of the ratio of the centroid distance to the perimeter of each contour to obtain a leaf contour spatial distribution factor, and based on the leaf contour spatial distribution factor and the segmented plant area pixels, convert the pixel color space and quantize the value of each color channel to obtain a quantized leaf contour and color channel data set; Based on the contour coordinates of the quantized leaf contour and the color channel data set, all leaf contours are iteratively aligned, the sum of the squares of the distances between corresponding points is calculated to obtain the group leaf shape alignment deviation, parameters are adjusted based on the group leaf shape alignment deviation to complete contour alignment, and the co-occurrence frequency of pixel pairs under the set spatial relationship of the quantized color channel value is calculated to establish the aligned leaf shape coordinate set and the color space co-occurrence matrix; Based on the aligned leaf shape coordinate set and the shape coordinates in the color space co-occurrence matrix, the main direction and variance of the leaf group shape synergy are calculated, the main direction cumulative variance contribution rate is calculated to obtain the main shape variation concentration index, the main direction is selected based on the main shape variation concentration index to calculate the projection value of each leaf, and the color matrix statistical measurement is extracted to obtain the group leaf shape variation measurement and the color space heterogeneity index set; Based on the leaf shape variation metric and color space heterogeneity index set of the population, the color heterogeneity index changes are evaluated to obtain the results of the comprehensive stress tendency of morphology and color; The steps for obtaining the blade profile spatial distribution factor are as follows: After obtaining the plant growth area image, the plant area is identified, the closed contour boundary line of each single leaf inside the plant area is intercepted through the area edge and the complete coordinate points are extracted to generate a set of leaf contour coordinate points in the plant area; Based on the set of leaf contour coordinate points in the plant region, the contour perimeter value of the closed path of each leaf boundary is calculated, the coordinates of the center particle point of the contour boundary are extracted, and the paired Euclidean distances of all the particle points are calculated. At the same time, the grayscale average value, color saturation average value and contour area of ​​each leaf surface are superimposed and extracted to generate a space and visual parameter group between leaf pairs; According to the space between the leaf pairs and the visual parameter group, the leaf outline spatial distribution factor is calculated, and the calculation formula is: in, is the centroid coordinate of the ith leaf, is the centroid coordinate of the other leaf paired with the i-th leaf, is the average grayscale value of the paired leaf surfaces, is the outline area of ​​the corresponding blade, is the mean color saturation, is the contour perimeter, is the angle between the line connecting the paired centroids and the horizontal axis, is the blade profile spatial distribution factor, is the total number of paired leaf pairs.

2. The method for identifying the irrigation status of a plant growth area based on image recognition according to claim 1, characterized in that: The steps for obtaining the quantized leaf contour and color channel data set are: Based on the leaf contour spatial distribution factor and the segmented plant region pixels, the plant region pixels are converted from the RGB color space to the HSV color space to obtain the plant region HSV color space pixels; Based on the HSV color space pixels of the plant area, the pixel value interval of each channel in the hue, saturation and lightness channels of the HSV color space pixels of the plant area is evenly divided into a number of sub-intervals of equal length, the sub-interval to which each pixel point belongs is determined one by one, and the original channel value is replaced with the central value of the corresponding sub-interval to obtain a quantized leaf contour and color channel data set.

3. The method for identifying the irrigation status of a plant growth area based on image recognition according to claim 1, characterized in that: The steps for obtaining the group leaf shape alignment deviation are: Based on the quantized leaf contour and the leaf contour edge coordinate sequence in the color channel data set, a leaf contour edge point sequence matrix is ​​constructed according to the sequential coding method of the contour points within the boundary line; According to the leaf contour edge point sequence matrix, the corresponding point coordinate values, color channel values ​​and local curvature values ​​of all leaves in the same group are matched to form an alignment parameter matrix including spatial position, color contrast and contour curvature, and obtain a composite difference matrix of leaf corresponding points; Based on the composite difference matrix of the corresponding points of the leaves, the group leaf shape alignment deviation is calculated, and the calculation formula is: in, For the Leaf The original coordinates of the contour points, For the Leaf The coordinates of the contour points after alignment, For the Leaf The brightness difference of each point, For the Leaf The edge curvature difference of each point, is the number of edge points of each leaf, is the total number of leaves, is the leaf shape alignment deviation of the group.

4. The method for identifying the irrigation status of a plant growth area based on image recognition according to claim 1, characterized in that: The steps of obtaining the alignment leaf shape coordinate set and the color space co-occurrence matrix are as follows: The edge point coordinates of each leaf are adjusted based on the group leaf shape alignment deviation, and the overall contour structure is matched using a two-dimensional affine transformation to obtain a set of leaf shape edge coordinate points in an aligned state; Calculating a color space co-occurrence frequency comprehensive value according to the leaf shape edge coordinate point set in the aligned state; Based on the color space co-occurrence frequency comprehensive value and the leaf shape edge coordinate point set in the aligned state, each spatial position index and color frequency information are fused to construct a matrix structure to generate an aligned leaf shape coordinate set and a color space co-occurrence matrix.

5. The method for identifying the irrigation status of a plant growth area based on image recognition according to claim 1, characterized in that: The steps for obtaining the main shape variation concentration index are as follows: Based on the aligned leaf shape coordinate set and the shape coordinates in the color space co-occurrence matrix, extract the two-dimensional position coordinate distribution of the edge points in the image main axis direction of each leaf contour to obtain the leaf shape two-dimensional coordinate distribution matrix; According to the two-dimensional coordinate distribution matrix of the blade shape, a collaborative variation covariance matrix of all edge points in a global unified coordinate system is constructed, and a principal axis variation direction vector group of the collaborative variation covariance matrix is ​​reconstructed by coordinate projection to obtain a shape collaborative variation principal direction matrix; Based on the shape cooperative variation main direction matrix, a main shape variation concentration index is calculated.

6. The method for identifying the irrigation status of a plant growth area based on image recognition according to claim 1, characterized in that: The steps for obtaining the population leaf shape variation metric and color space heterogeneity index set are as follows: Based on the main shape variation concentration index, a main direction is selected, a two-dimensional coordinate distribution matrix of the blade shape is called, and each blade edge coordinate point is projected along the selected main direction using matrix linear projection, and the spatial position distribution of each blade after projection along the main direction is calculated to generate a set of main direction projection coordinate values ​​of each blade; According to the projection coordinate value set of each leaf main direction, the color space co-occurrence matrix is ​​called, and the range of each regional partition is determined by the space partition method. The difference statistical analysis of the color channel values ​​in each regional partition is carried out in turn, and the regional partition color channel change amplitude measurement, color channel discrete degree calculation and color distribution uniformity analysis are performed respectively to obtain the color matrix statistical measurement set; Based on the color matrix statistical measurement set and the main direction projection coordinate value set of each leaf, the color characteristics and spatial position relationship are matched to obtain the group leaf shape variation measurement and color space heterogeneity index set.

7. The method for identifying the irrigation status of a plant growth area based on image recognition according to claim 1, characterized in that: The steps for obtaining the comprehensive stress tendency result of morphology and color are as follows: Based on the leaf shape variation metric of the group and the color space heterogeneity index set, the fluctuation trend of each region is compared to generate the statistical results of regional differences in color channel heterogeneity; According to the statistical results of the regional differences in the color channel heterogeneity, the change direction and degree of the color heterogeneity index are determined, and the results of the comprehensive stress tendency of morphology and color are generated.

Citation Information

Cited By

  • Apple tree growth state intelligent identification system

    CN120495687A

  • Illumination control method and system based on plant state

    CN122002673A