A method and system for monitoring the growth of lettuce

By analyzing the lettuce monitoring image, segmenting the area and calculating the growth change, the problem that the prior art is difficult to carefully evaluate the growth amount of different parts of lettuce is solved, and the precise monitoring of the growth status of lettuce and the improvement of production efficiency is achieved.

CN118261869BActive Publication Date: 2025-01-03HUBEI MAIMAI AGRI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410340138.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-25
Publication Date
2025-01-03
Estimated Expiration
2044-03-25

AI Technical Summary

Technical Problem

The existing lettuce growth monitoring methods are difficult to carefully evaluate the growth status of different parts, making it difficult to detect and deal with growth problems in a timely manner, affecting production efficiency.

Method used

By acquiring and analyzing the lettuce monitoring images, segmenting them into central and non-central areas, calculating the growth change degree, and performing growth evaluation based on preset thresholds, accurately analyzing the growth state of different parts of lettuce.

Benefits of technology

Accurate monitoring of the growth status of various parts of lettuce is achieved, production efficiency is improved, growth problems are identified in a timely manner, resource allocation is optimized, and agricultural production is promoted.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118261869B_ABST
    Figure CN118261869B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for monitoring the growth of lettuce, and relates to the field of agricultural bioinformatics. The method comprises: obtaining a monitoring image of lettuce within a monitoring period, and analyzing the contour information of lettuce in the monitoring image of lettuce; dividing the monitoring image of lettuce into a plurality of observation areas, and dividing the observation area into a central area and a non-central area according to the contour information of lettuce; obtaining the corresponding lettuce pixel point information between adjacent non-central areas under the end frame of the monitoring period, and integrating the non-central areas into at least one merged area with the central area as the integration endpoint; calculating the first growth change degree corresponding to the merged area and the second growth change degree corresponding to the central area respectively according to the change information of the lettuce pixel points within the monitoring period; presetting an evaluation threshold, and performing growth evaluation on the merged area according to the second growth change degree and the first growth change degree. The present invention can distinguish areas of different growth states for lettuce under the monitoring period.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of agricultural bioinformatics, and in particular to a method and system for monitoring the growth of lettuce. Background Art

[0002] In the field of agricultural production and precision agriculture, accurate monitoring of crop growth is one of the important means to improve crop yield and quality; especially for vegetable crops, such as lettuce, which have a short growth cycle and a fast growth rate, it is necessary to monitor their growth status in real time and accurately so as to adjust cultivation management measures in time and achieve efficient and sustainable agricultural production.

[0003] Traditional methods of monitoring lettuce growth mainly rely on manual observation and measurement, which is not only time-consuming and labor-intensive, but also the results are affected by subjective judgment, making it difficult to be accurate and objective. With the development of information technology and image processing technology, by analyzing images taken during the growth of crops, crop growth information can be obtained non-destructively, quickly and accurately, providing a scientific basis for crop growth management and decision-making.

[0004] However, the existing image analysis methods for lettuce growth still have some limitations when applied to lettuce growth monitoring; for example, they can only provide overall growth information of lettuce, and it is difficult to carefully evaluate the growth status of different parts of the lettuce.

[0005] In view of this, this application is hereby filed. Summary of the invention

[0006] The technical problem to be solved by the present invention is to provide a method and system for monitoring the growth of lettuce, which can analyze the growth status of different parts of the lettuce, and can remind relevant personnel to discover and deal with growth problems in time, thereby improving production efficiency.

[0007] In order to solve the above technical problems, the technical solution of the present invention is as follows:

[0008] In a first aspect, a method for monitoring the growth of lettuce is provided, the method comprising:

[0009] Acquire a monitoring image of lettuce within a monitoring period, and analyze contour information of the lettuce in the monitoring image of the lettuce;

[0010] Segmenting the lettuce monitoring image into a plurality of observation areas, and dividing the observation area into a central area and a non-central area according to the lettuce contour information;

[0011] Obtaining the corresponding lettuce pixel information between adjacent non-central areas at the end frame of the monitoring period, and integrating the non-central areas into at least one merged area with the central area as the integration endpoint;

[0012] According to the change information of the lettuce pixels within the monitoring period, respectively calculating the first growth change degree corresponding to the merged area and the second growth change degree corresponding to the central area;

[0013] An evaluation threshold is preset, and growth evaluation is performed on the merged region according to the second growth change degree and the first growth change degree.

[0014] Furthermore, obtaining a monitoring image of lettuce within a monitoring period and analyzing the contour information of the lettuce in the monitoring image of the lettuce include:

[0015] Preprocess the lettuce monitoring image and preset the contour detection threshold according to the lettuce color information;

[0016] The lettuce contour detection is performed on the preprocessed lettuce monitoring image using a contour detection algorithm according to the contour detection threshold, so as to obtain the area to which the lettuce belongs in the lettuce monitoring image.

[0017] Furthermore, the lettuce monitoring image is segmented into a plurality of observation areas, and the observation areas are divided into a central area and a non-central area according to the lettuce contour information, including:

[0018] The lettuce monitoring image is evenly divided into multiple regions to obtain the observation region;

[0019] According to the coordinates of the lettuce contour points corresponding to each frame in the monitoring period, the centroid point of the lettuce contour corresponding to each frame is calculated;

[0020] Calculate the change in the position of the centroid between consecutive frames and locate the consecutive time period with the smallest change in the position of the centroid;

[0021] The centroid position in a frame of image within the time window with the smallest centroid change is taken as the center point, and the average distance from all contour points to the center point in the initial frame is calculated to obtain the center length;

[0022] With the center point as the center of the circle and the center length as the radius, the covered observation area is selected as the central area, and the uncovered observation area is selected as the non-central area.

[0023] Furthermore, according to the coordinates of the lettuce contour points corresponding to each frame in the monitoring period, the centroid point of the lettuce contour corresponding to each frame is calculated, including:

[0024] The sum of the products of the horizontal coordinates and the pixel values ​​of all points within the lettuce outline is divided by the sum of the pixel values ​​of all points within the lettuce outline to obtain the horizontal coordinate of the centroid point;

[0025] The sum of the products of the ordinates and pixel values ​​of all points within the lettuce outline is divided by the sum of the pixel values ​​of all points within the lettuce outline to obtain the ordinate of the centroid point.

[0026] Furthermore, the change in the position of the centroid between consecutive frames is calculated, and the continuous time period in which the change in the position of the centroid is the smallest is located, including:

[0027] Traverse the monitoring period time series in sequence, calculate the change in the centroid position for each pair of consecutive frames, and obtain a sequence of changes in the centroid position from each frame to the next frame;

[0028] Preset a moving window and calculate the average value of the change in the centroid position within the moving window;

[0029] The moving window is moved frame by frame to cover the entire sequence, and a continuous time period with the smallest average change in the centroid position is obtained.

[0030] Further, the corresponding lettuce pixel information between adjacent non-central areas under the end frame of the monitoring period is obtained, and the non-central areas are integrated into at least one merged area with the central area as the integration endpoint, including:

[0031] The non-central area under the end frame is numbered, and a lettuce information feature vector set corresponding to the non-central area is constructed according to the pixel point information of the non-central area;

[0032] Create an association weight matrix based on the lettuce information feature vectors of each non-central area and its adjacent areas;

[0033] Traversing each non-central area, and assigning an associated non-central area to the current non-central area according to the associated weight matrix;

[0034] Taking the central area as the endpoint, the associated non-central areas are integrated to obtain the merged area.

[0035] Further, according to the change information of the lettuce pixels within the monitoring period, the first growth change degree corresponding to the merged area and the second growth change degree corresponding to the central area are calculated respectively, including:

[0036] Get the position of the merged area in each frame in the monitoring period;

[0037] For each merged area and the central area, the change rate of each element in the lettuce information feature vector between the initial frame and the end frame is compared;

[0038] The contribution weight of each element in the lettuce information feature vector is preset, and the change rate of each element in the lettuce information feature vector is summarized according to the contribution weight to obtain a first growth change degree corresponding to the merged area and a second growth change degree corresponding to the central area.

[0039] In a second aspect, a lettuce growth monitoring system is provided, comprising:

[0040] An acquisition module is used to acquire the monitoring image of lettuce within the monitoring period and analyze the contour information of lettuce in the monitoring image of lettuce;

[0041] A segmentation module, used for segmenting the lettuce monitoring image into a plurality of observation areas, and dividing the observation area into a central area and a non-central area according to the lettuce contour information;

[0042] An integration module is used to obtain the corresponding lettuce pixel information between adjacent non-central areas at the end frame of the monitoring period, and integrate the non-central areas into at least one merged area with the central area as the integration endpoint;

[0043] A calculation module, used to calculate the first growth change degree corresponding to the merged area and the second growth change degree corresponding to the central area according to the change information of the lettuce pixels within the monitoring period;

[0044] The evaluation module is used to preset an evaluation threshold and perform growth evaluation on the merged area according to the second growth change degree and the first growth change degree.

[0045] According to a third aspect, a computing device includes:

[0046] one or more processors;

[0047] The storage system is used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the above method.

[0048] In a fourth aspect, a computer-readable storage medium stores a program, and the program implements the above method when executed by a processor.

[0049] The above solution of the present invention includes at least the following beneficial effects:

[0050] The above scheme of the present invention can capture subtle growth changes by utilizing image analysis technology, can distinguish areas of lettuce with different growth states during a monitoring period, can accurately determine the relative growth rate and health status of each part of the lettuce during the monitoring period, and provides a quantitative monitoring method for the growth status of lettuce, which helps to promote the sustainable development of agricultural production. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 It is a schematic flow chart of a method for monitoring the growth of lettuce provided in an embodiment of the present invention.

[0052] Figure 2 It is a schematic diagram of a lettuce growth monitoring system provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0053] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0054] like Figure 1 As shown, an embodiment of the present invention provides a method for monitoring the growth of lettuce, the method comprising:

[0055] Step 1, obtaining a monitoring image of lettuce within a monitoring period, and analyzing the contour information of the lettuce in the monitoring image of the lettuce;

[0056] Step 2, dividing the lettuce monitoring image into multiple observation areas, and dividing the observation area into a central area and a non-central area according to the lettuce contour information;

[0057] Step 3, obtaining the lettuce pixel information corresponding to the adjacent non-central areas under the end frame of the monitoring period, and integrating the non-central areas into at least one merged area with the central area as the integration endpoint;

[0058] Step 4, according to the change information of the lettuce pixels within the monitoring period, respectively calculating the first growth change degree corresponding to the merged area and the second growth change degree corresponding to the central area;

[0059] Step 5: preset an evaluation threshold, and perform growth evaluation on the merged region according to the second growth change degree and the first growth change degree.

[0060] In this embodiment, the monitoring period is pre-set, and the lettuce monitoring image within the monitoring period is a sequence of continuously shot lettuce images, wherein, preferably, the image acquisition device is installed on the top of a single lettuce, and during the entire monitoring period, the top view image of the lettuce is regularly taken using the same camera equipment and a fixed shooting angle and shooting position to ensure that the image size is the same and the lighting conditions are as consistent as possible each time the image is taken, so as to reduce the impact of lighting changes on the image quality, so that the acquired lettuce monitoring image at least includes the top view image of a single lettuce.

[0061] In the lettuce growth monitoring method described in the embodiment of the present invention, by automatically acquiring and analyzing the monitoring image of the lettuce, the growth status of the lettuce can be monitored non-invasively and continuously, avoiding the subjectivity and discontinuity of traditional manual monitoring, and significantly improving the accuracy and efficiency of monitoring; the step of dividing the lettuce monitoring image into a central area and a non-central area, and then integrating them into a merged area can clearly identify areas with different growth conditions, which is helpful to optimize the allocation of resources such as water, light and nutrients, as well as environmental management in a targeted manner, thereby improving the overall growth amount and quality of the lettuce; by calculating the growth change degree of the merged area and the central area during the monitoring period, the growth rate of each part of the lettuce can be dynamically tracked, providing data support for timely adjustment of growth conditions and management strategies, which not only helps to identify growth problems in a timely manner, but also helps staff to formulate more reasonable production plans based on growth data, helps to achieve balanced growth of lettuce, reduce resource waste, and promote the sustainability of agricultural production.

[0062] In another optional embodiment of the present invention, the above step 1, obtaining a monitoring image of lettuce within a monitoring period, and analyzing the contour information of the lettuce in the monitoring image of the lettuce, includes:

[0063] Step 11, pre-processing the lettuce monitoring image and presetting the contour detection threshold according to the lettuce color information;

[0064] Step 12: Perform lettuce contour detection on the preprocessed lettuce monitoring image using a contour detection algorithm according to the contour detection threshold, so as to obtain the area to which the lettuce belongs in the lettuce monitoring image.

[0065] In this embodiment, a specific green threshold can be preset as a contour detection threshold based on the color characteristics of lettuce through manual experience, wherein the lettuce monitoring image is preprocessed, including adjusting the brightness and contrast so that the lettuce area in the image has a clear contrast with the background, and then a filtering algorithm (such as Gaussian filtering) can be applied to remove image noise and retain important edge information to prepare for subsequent contour detection. Further, the image can be converted from the RGB color space to the HSV color space. In the HSV color space, a contour detection threshold, that is, a specific green threshold, is applied to identify lettuce pixels so as to accurately separate the lettuce from the background. Further, an edge detection algorithm (such as the Canny algorithm) can be used to identify edges on the image after preprocessing and applying the color threshold. Further, a contour search algorithm (such as the findContours function in the OpenCV library) can be used to identify and extract the contour of the lettuce based on the result of edge detection. At this time, the outer contour of the lettuce and the inner contour of the lettuce may be obtained, which can be further analyzed, for example, by selecting several largest contours as the main lettuce area, and connecting the several largest contours to obtain the area to which the lettuce belongs in the lettuce monitoring image.

[0066] In another optional embodiment of the present invention, the above step 2, dividing the lettuce monitoring image into a plurality of observation areas, and dividing the observation area into a central area and a non-central area according to the lettuce contour information, includes:

[0067] Step 21, evenly dividing the lettuce monitoring image into multiple regions to obtain observation regions;

[0068] Step 22, calculating the centroid point of the lettuce contour corresponding to each frame according to the coordinates of the lettuce contour points corresponding to each frame in the monitoring period;

[0069] Step 23, calculating the change in the position of the centroid between consecutive frames, and locating the continuous time period in which the change in the position of the centroid is the smallest;

[0070] Step 24, taking the centroid position in a frame of image within the time window with the smallest centroid change as the center point, and calculating the average value of the distance from all contour points to the center point in the initial frame to obtain the center length;

[0071] Step 25, taking the center point as the center of the circle and the center length as the radius, select the covered observation area as the central area, and the uncovered observation area as the non-central area.

[0072] In the lettuce growth monitoring method described in the embodiment of the present invention, by evenly dividing the lettuce monitoring image into multiple observation areas, the spatial variability of lettuce growth can be captured more finely, so that growth monitoring is not only limited to the overall situation, but also local differences can be observed, thereby improving the accuracy of growth monitoring; steps 22 and 23 can dynamically track the position changes of the lettuce growth center; steps 24 and 25 calculate the center of mass position within the time window with the smallest change in the center of mass point, and divide the center area and the non-center area based on this, which can ensure that the division of the center area and the non-center area is based on the actual situation of lettuce growth, which is conducive to a more accurate evaluation of the growth status of the lettuce in the future.

[0073] In another optional embodiment of the present invention, the above step 22, according to the coordinates of the lettuce contour points corresponding to each frame in the monitoring period, calculates the centroid point of the lettuce contour corresponding to each frame, including:

[0074] Step 221, dividing the sum of the products of the horizontal coordinates and the pixel values ​​of all points in the lettuce outline by the sum of the pixel values ​​of all points in the lettuce outline to obtain the horizontal coordinate of the centroid point;

[0075] Step 222, the sum of the products of the ordinates and the pixel values ​​of all points within the lettuce outline is divided by the sum of the pixel values ​​of all points within the lettuce outline to obtain the ordinate of the centroid point.

[0076] In the lettuce growth monitoring method described in the embodiment of the present invention, by accurately calculating the center of mass point of the lettuce outline in each frame image, the position change of the lettuce growth center can be dynamically tracked; by weighted averaging the coordinates of all points in the outline and the pixel value, the center of mass coordinates obtained can more accurately reflect the actual growth center of gravity of the lettuce; the complex growth monitoring task can be simplified into an automated image processing process, which significantly improves the efficiency and operability of growth monitoring and helps to achieve continuous and non-invasive growth monitoring.

[0077] In another optional embodiment of the present invention, the above step 23, calculating the change in the position of the centroid between consecutive frames and locating the continuous time period in which the change in the position of the centroid is the smallest, includes:

[0078] Step 231, traverse the monitoring period time series in sequence, calculate the change in the centroid position for each pair of consecutive frames, and obtain a sequence of changes in the centroid position from each frame to the next frame;

[0079] Step 232, preset a moving window, and calculate the average value of the change in the centroid position within the moving window;

[0080] Step 233, the moving window is moved frame by frame to cover the entire sequence, and a continuous time period with the smallest average change in the position of the centroid is obtained.

[0081] In the lettuce growth monitoring method described in the embodiment of the present invention, by calculating the position change of the center of mass point between consecutive frames, the position change of the lettuce during its growth process can be dynamically captured, providing basic data for identifying the growth pattern of the lettuce; using a preset moving window to calculate the average value of the position change of the center of mass point can smooth out short-term random fluctuations and improve the stability and accuracy of the analysis; by moving the moving window frame by frame and finding the continuous time period with the smallest average change, the most stable growth period of the lettuce can be effectively identified, thereby facilitating the accurate positioning of the center position of the lettuce.

[0082] In another optional embodiment of the present invention, the above step 3, obtaining the lettuce pixel information corresponding to the adjacent non-central areas under the end frame of the monitoring period, and integrating the non-central areas into at least one merged area with the central area as the integration endpoint, includes:

[0083] Step 31, numbering the non-central area under the end frame, and constructing a lettuce information feature vector set corresponding to the non-central area according to the pixel point information of the non-central area;

[0084] Step 32, creating an association weight matrix according to the lettuce information feature vectors of each non-central area and its adjacent areas;

[0085] Step 33, traversing each non-central area, and assigning an associated non-central area to the current non-central area according to the associated weight matrix;

[0086] Step 34, taking the central area as an endpoint, integrating the associated non-central areas to obtain a merged area.

[0087] In the lettuce growth monitoring method described in the embodiment of the present invention, by constructing a set of lettuce information feature vectors corresponding to each non-central area, the growth characteristics of the lettuce in each area can be accurately captured, including color, texture, size and other information; the association weight matrix created in step 32 can quantify the similarities or differences between non-central areas, which helps to identify areas where growth conditions may differ significantly; by assigning an associated non-central area to each non-central area and performing regional integration with the central area as the endpoint, spatially adjacent areas with similar growth characteristics can be effectively integrated into a larger merged area, and this integration takes into account the growth characteristics and spatial position, so that the merged area can contain a single leaf or an overlapping leaf area composed of multiple leaves overlapping.

[0088] In another optional embodiment of the present invention, the above step 31, numbering the non-central area under the end frame, and constructing a lettuce information feature vector set corresponding to the non-central area according to the pixel point information of the non-central area, includes:

[0089] Step 311, traverse all pixels in the non-central area, and calculate the lettuce pixel density in the non-central area according to the number of lettuce pixels;

[0090] Step 312, accumulating the RGB values ​​of all lettuce pixels in the non-central area, calculating the color gradient between adjacent pixels, and dividing by the number of lettuce pixels to obtain an average RGB value and an average color gradient;

[0091] Step 313, constructing a lettuce information feature vector of the non-central area according to the lettuce pixel density, average RGB value and average color gradient of the non-central area.

[0092] In the method for monitoring the growth of lettuce described in the embodiment of the present invention, by calculating the pixel density of lettuce in the non-central area, and accumulating the average RGB value and the average color gradient, the growth characteristics of the lettuce in each area can be captured in detail, including the coverage degree of the lettuce, the color health status and the color change trend; the lettuce information feature vector constructed according to the multiple growth characteristics of the non-central area in step 313 not only reflects the quantitative growth information of the lettuce, but also contains the quality information of the lettuce growth; by analyzing the feature vectors of different non-central areas, the spatial differences in the growth of lettuce can be revealed. For example, some areas may show lower pixel density or unhealthy color indicators due to uneven distribution of resources such as water and light, thereby providing a basis for merging the same leaf areas.

[0093] In another optional embodiment of the present invention, the above step 32, based on the lettuce information feature vectors of each non-central area and its adjacent areas, creates an association weight matrix, including:

[0094] Step 321, for each non-central area and its adjacent areas, calculating the Euclidean distance between the lettuce information feature vectors;

[0095] Step 322, using the Euclidean distance to assign a connection weight between each non-central area and its adjacent area;

[0096] Step 323: Create an association weight matrix for all non-central regions based on the connection weights, wherein each element in the association weight matrix represents a connection weight of a pair of non-central regions.

[0097] In the lettuce growth monitoring method described in the embodiment of the present invention, by calculating the Euclidean distance between the lettuce information feature vectors, the spatial similarity or difference between non-central areas can be accurately evaluated. Euclidean distance, as an intuitive distance measurement, can effectively reflect the degree of proximity of growth characteristics between regions; using Euclidean distance to assign connection weights between each pair of non-central areas provides a method for quantifying the similarity between regions, and the constructed association weight matrix can comprehensively reflect the relationship between all non-central areas. By identifying pairs of regions with high connection weights, non-central areas with similar growth characteristics can be integrated into a larger merged area, thereby more effectively evaluating and monitoring the growth of lettuce; through a clear association weight matrix, it can be clearly explained why certain areas are integrated together, providing an explanatory basis for growth monitoring and evaluation.

[0098] In another optional embodiment of the present invention, the above step 33, traversing each non-central area and assigning an associated non-central area to the current non-central area according to the associated weight matrix, includes:

[0099] Step 331, calculating the neighborhood size ∈ and the minimum sample number M according to the lettuce information feature vector set;

[0100] Step 332, mark each non-central area with a state, which is initially an "unprocessed" state;

[0101] Step 333, select an "unprocessed" area as the current processing area, check the row or column corresponding to the current processing area in the relevance weight matrix, and select the non-central area with a connection weight lower than ∈ as the similar area;

[0102] Step 334, if the number of similar regions found reaches M, the current processing region and these similar regions are marked as "processed" and are deemed to be interrelated. If the number of similar regions found is less than the minimum number, the current processing region is marked as "noise" or "independent region".

[0103] Step 335 is repeated until all non-central areas are processed.

[0104] In the lettuce growth monitoring method described in the embodiment of the present invention, by calculating the neighborhood size ∈ and the minimum sample number M, dynamically adaptive parameters are provided for subsequent regional clustering, so that the clustering process can be automatically adjusted according to the distribution of actual data, thereby improving the accuracy and applicability of the clustering results; effectively grouping areas with similar growth characteristics helps to identify growth patterns and potential growth problems; by marking non-central areas that do not reach the minimum number of similar areas, not only the interference of noise on the monitoring results is reduced, but also the robustness of data analysis is enhanced; the entire process integrates the observation areas through in-depth analysis based on actual growth data, thereby ensuring the scientificity and rationality of regional integration; and is conducive to accurately evaluating and monitoring the growth of lettuce.

[0105] In another optional embodiment of the present invention, the above step 331, calculating the neighborhood size ∈ and the minimum sample number M according to the lettuce information feature vector set, includes:

[0106] Step 3311, for each element in the lettuce information feature vector set, calculate the Euclidean distance to all other elements;

[0107] Step 3312, set parameter k, find the distance of each element to the kth farthest element, and sort them;

[0108] Step 3313, drawing a nearest neighbor distance graph with the horizontal axis being the sorted elements and the vertical axis being the Euclidean distance according to the sorting result;

[0109] Step 3314, find the inflection point where the ordinate increases suddenly in the nearest neighbor distance graph, and use the Euclidean distance corresponding to the inflection point as the neighborhood size ∈;

[0110] Step 3315, adding 1 to the value of the data dimension corresponding to the element in the lettuce information feature vector set as the minimum sample number M.

[0111] In the lettuce growth monitoring method described in the embodiment of the present invention, the determination of parameters ∈ and M no longer relies on subjective experience or assumptions, but is directly based on the characteristics of the data set itself, thereby improving the adaptability and accuracy of the clustering results; the neighborhood size ∈ is determined by finding the inflection point in the nearest neighbor distance graph, so that the algorithm can effectively identify the natural boundaries of different density areas in the data set, thereby accurately distinguishing the clustering structure, and maintaining a good clustering effect even when the data distribution is complex or there is noise; by finding the distance of each element to the kth farthest element and sorting them, and drawing a nearest neighbor distance graph based on these distances, robust clustering parameters can be effectively identified from the data, reducing the impact of noise data, and improving the robustness of the clustering algorithm.

[0112] In another optional embodiment of the present invention, the above step 4, respectively calculating the first growth change degree corresponding to the merged area and the second growth change degree corresponding to the central area according to the change information of the lettuce pixels within the monitoring period, includes:

[0113] Step 41, obtaining the position of the merged area corresponding to each frame in the monitoring period;

[0114] Step 42, comparing the change rate of each element in the lettuce information feature vector between the initial frame and the end frame for each merged region and the central region;

[0115] Step 43, presetting the contribution weight of each element in the lettuce information feature vector, and summarizing the change rate of each element in the lettuce information feature vector according to the contribution weight to obtain the first growth change degree corresponding to the merged area and the second growth change degree corresponding to the central area.

[0116] In this embodiment, by analyzing the pixel density, average RGB value and color gradient of each merged area and the central area during the monitoring period, quantitative data on its growth can be obtained; specifically, for each merged area and the central area, the pixel density at the beginning and end of the monitoring period is compared, the density change rate is calculated, and the change in the average red, green and blue values ​​of the merged area during the monitoring period is analyzed to evaluate the change in the color of the lettuce, which can reflect the health status and maturity of the lettuce, and calculate the change in the color gradient. The change in the color gradient indicates the activeness of the lettuce growth and the density of the leaves, and then according to the importance of the above-mentioned feature changes and the impact on the growth contribution, a weight is assigned to each change rate. For example, if color change is considered to be an important indicator of lettuce growth and health, then the average RGB value change can be given a higher weight, and the change rate of each element in the lettuce information feature vector is summarized according to the contribution weight, which can be a simple summation or a complex calculation, which is not limited, so that the first growth change degree and the second growth change degree of the merged area and the central area during the monitoring period under the same standard can be obtained.

[0117] In another optional embodiment of the present invention, the above step 5, presetting an evaluation threshold, and performing growth evaluation on the merged region according to the second growth change degree and the first growth change degree, includes:

[0118] Step 51, calculating an evaluation ratio of the second growth change degree to the first growth change degree, and presetting an upper evaluation threshold and a lower evaluation threshold;

[0119] Step 52: if the evaluation ratio is less than the lower evaluation threshold, the corresponding merged area is marked as a slow-growing area;

[0120] If the evaluation ratio is greater than the upper evaluation threshold, the corresponding merged area is marked as an over-growth area;

[0121] If the evaluation ratio belongs to the upper evaluation threshold and the lower evaluation threshold, the corresponding merged area is marked as a balanced growth area.

[0122] In this embodiment, if the evaluation ratio is less than the lower evaluation threshold, it is considered that the growth of the merged area is too slow relative to the central area, which may be due to insufficient resource allocation, unfavorable environmental conditions, etc. At this time, it can be suggested to the relevant personnel to take measures to improve the growth conditions of the merged area, such as increasing irrigation, applying appropriate amounts of fertilizers, or improving lighting conditions;

[0123] If the evaluation ratio is between the upper and lower evaluation thresholds, the growth of the merged area is considered to be relatively balanced and close to the growth rate of the central area. In this case, the current management and cultivation measures can be maintained while continuously monitoring the growth to ensure that the balance is maintained;

[0124] If the evaluation ratio exceeds the upper evaluation threshold, it means that the growth of the merged area is too fast relative to the central area, which may mean that the merged area has absorbed too many resources or that the central area is subject to some kind of restriction. In this case, it may be necessary to advise relevant personnel to investigate the reasons for the limited growth of the central area and consider whether it is necessary to adjust resource allocation to promote overall growth balance.

[0125] In the lettuce growth monitoring method described in the embodiment of the present invention, by calculating the evaluation ratio of the second growth change degree (central area) to the first growth change degree (merged area), a quantitative evaluation index is provided for the growth state of the lettuce, which helps to accurately judge the growth rate and health status of each part of the lettuce within the monitoring period; by presetting the upper and lower evaluation thresholds, the merged area can be divided into a slow growth area, a balanced growth area and an excessive growth area according to the changes in growth rate and growth amount, so that the classification of the growth state is more accurate and convenient for subsequent management decisions and the formulation of intervention measures; by marking the merged areas with different growth states, agricultural producers can more specifically adjust resource allocation (such as water, light, nutrition, etc.), optimize growth conditions, and take corresponding intervention measures for the slow growth area and the excessive growth area to promote the balanced and healthy growth of the lettuce.

[0126] like Figure 2 As shown, an embodiment of the present invention further provides a lettuce growth monitoring system, comprising:

[0127] An acquisition module 10 is used to acquire a monitoring image of lettuce within a monitoring period and analyze the contour information of the lettuce in the monitoring image of the lettuce;

[0128] A segmentation module 20, for segmenting the lettuce monitoring image into a plurality of observation areas, and dividing the observation area into a central area and a non-central area according to the lettuce contour information;

[0129] An integration module 30 is used to obtain the corresponding lettuce pixel information between adjacent non-central areas at the end frame of the monitoring period, and integrate the non-central areas into at least one merged area with the central area as the integration endpoint;

[0130] A calculation module 40, for calculating the first growth change degree corresponding to the merged area and the second growth change degree corresponding to the central area according to the change information of the lettuce pixels within the monitoring period;

[0131] The evaluation module 50 is used to preset an evaluation threshold and perform growth evaluation on the merged region according to the second growth change degree and the first growth change degree.

[0132] It should be noted that the system is a system corresponding to the above method, and all implementation methods in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.

[0133] The embodiment of the present invention further provides a computing device, comprising: a processor, a memory storing a computer program, wherein when the computer program is executed by the processor, the method described above is executed. All implementations in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.

[0134] The embodiment of the present invention also provides a computer-readable storage medium storing instructions, which, when executed on a computer, enable the computer to execute the method described above. All implementations in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.

[0135] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0136] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0137] In the embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.

[0138] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0139] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0140] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.

[0141] In addition, it should be noted that in the system and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. Moreover, the steps of performing the above-mentioned series of processing can naturally be performed in chronological order according to the order of description, but it is not necessary to perform them in chronological order, and some steps can be performed in parallel or independently of each other. For those of ordinary skill in the art, it is understood that all or any steps or components of the method and system of the present invention can be implemented in any computing system (including processors, storage media, etc.) or a network of computing systems in hardware, firmware, software or a combination thereof, which can be achieved by those of ordinary skill in the art using their basic programming skills after reading the description of the present invention.

[0142] Therefore, the purpose of the present invention can also be achieved by running a program or a group of programs on any computing system. The computing system can be a well-known general system. Therefore, the purpose of the present invention can also be achieved by simply providing a program product containing a program code that implements the method or system. That is to say, such a program product also constitutes the present invention, and the storage medium storing such a program product also constitutes the present invention. Obviously, the storage medium can be any well-known storage medium or any storage medium developed in the future. It should also be pointed out that in the system and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. In addition, the steps of performing the above-mentioned series of processing can naturally be performed in chronological order according to the order of description, but it is not necessary to perform them in chronological order. Some steps can be performed in parallel or independently of each other.

[0143] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for monitoring the growth of lettuce, characterized in that: The method comprises: Acquire a monitoring image of lettuce within a monitoring period, and analyze contour information of the lettuce in the monitoring image of the lettuce; Segmenting the lettuce monitoring image into a plurality of observation areas, and dividing the observation area into a central area and a non-central area according to the lettuce contour information; Obtaining the corresponding lettuce pixel information between adjacent non-central areas at the end frame of the monitoring period, and integrating the non-central areas into at least one merged area with the central area as the integration endpoint; According to the change information of the lettuce pixels within the monitoring period, respectively calculating the first growth change degree corresponding to the merged area and the second growth change degree corresponding to the central area; Preset an evaluation threshold, and perform growth evaluation on the merged area according to the second growth change degree and the first growth change degree; Acquire the monitoring images of lettuce within the monitoring period, and analyze the contour information of lettuce in the monitoring images of lettuce, including: Preprocess the lettuce monitoring image and preset the contour detection threshold according to the lettuce color information; Performing lettuce contour detection on the preprocessed lettuce monitoring image using a contour detection algorithm according to the contour detection threshold, so as to obtain the area to which the lettuce belongs in the lettuce monitoring image; The lettuce monitoring image is divided into a plurality of observation areas, and the observation area is divided into a central area and a non-central area according to the lettuce contour information, including: The lettuce monitoring image is evenly divided into multiple regions to obtain the observation region; According to the coordinates of the lettuce contour points corresponding to each frame in the monitoring period, the centroid point of the lettuce contour corresponding to each frame is calculated; Calculate the change in the position of the centroid between consecutive frames and locate the consecutive time period with the smallest change in the position of the centroid; The centroid position in a frame of image within the time window with the smallest centroid change is taken as the center point, and the average distance from all contour points to the center point in the initial frame is calculated to obtain the center length; With the center point as the circle center and the center length as the radius, the covered observation area is selected as the central area, and the uncovered observation area is selected as the non-central area; According to the coordinates of the lettuce contour points corresponding to each frame in the monitoring period, the centroid point of the lettuce contour corresponding to each frame is calculated, including: The sum of the products of the horizontal coordinates and the pixel values ​​of all points within the lettuce outline is divided by the sum of the pixel values ​​of all points within the lettuce outline to obtain the horizontal coordinate of the centroid point; The sum of the products of the ordinates and pixel values ​​of all points within the lettuce outline is divided by the sum of the pixel values ​​of all points within the lettuce outline to obtain the ordinate of the centroid point; Calculate the change in the centroid position between consecutive frames and locate the consecutive time period with the smallest change in the centroid position, including: Traverse the monitoring period time series in sequence, calculate the change in the centroid position for each pair of consecutive frames, and obtain a sequence of changes in the centroid position from each frame to the next frame; Preset a moving window and calculate the average value of the change in the centroid position within the moving window; The moving window is moved frame by frame to cover the entire sequence, and a continuous time period with the smallest average change in the centroid position is obtained; Obtaining the corresponding lettuce pixel information between adjacent non-central areas at the end frame of the monitoring period, and integrating the non-central areas into at least one merged area with the central area as the integration endpoint, including: The non-central area under the end frame is numbered, and a lettuce information feature vector set corresponding to the non-central area is constructed according to the pixel point information of the non-central area; Create an association weight matrix based on the lettuce information feature vectors of each non-central area and its adjacent areas; Traversing each non-central area, and assigning an associated non-central area to the current non-central area according to the associated weight matrix; Taking the central area as the endpoint, the associated non-central areas are integrated to obtain the merged area; The method of numbering the non-central area under the end frame and constructing a lettuce information feature vector set corresponding to the non-central area according to the pixel point information of the non-central area includes: Traverse all pixels in the non-central area and calculate the pixel density of lettuce in the non-central area according to the number of lettuce pixels; Accumulate the RGB values ​​of all lettuce pixels in the non-central area, calculate the color gradient between adjacent pixels, and divide it by the number of lettuce pixels to get the average RGB value and average color gradient; The lettuce information feature vector of the non-central area is constructed according to the lettuce pixel density, average RGB value and average color gradient in the non-central area; The step of creating an association weight matrix according to the lettuce information feature vectors of each non-central area and its adjacent areas includes: For each non-central region and its adjacent regions, calculate the Euclidean distance between the lettuce information feature vectors; Use Euclidean distance to assign a connection weight between each non-central region and its neighboring regions; According to the connection weights, an association weight matrix is ​​created for all non-central regions, wherein each element in the association weight matrix represents the connection weight of a pair of non-central regions; The traversing each non-central area and assigning an associated non-central area to the current non-central area according to the associated weight matrix includes: Calculate the neighborhood size based on the lettuce information feature vector set and the minimum number of samples M; Mark each non-central area with a state, initially in the "unprocessed" state; Select an "unprocessed" area as the current processing area, check the row or column corresponding to the current processing area in the association weight matrix, and select the non-central area with a connection weight lower than ϵ as the similar area; If the number of similar regions found reaches M, the current processing region and these similar regions are marked as "processed" and considered to be related to each other. If the number of similar regions found is less than the minimum number, the current processing region is marked as "noise" or "independent region"; This process was repeated until all non-central areas were processed; The neighborhood size is calculated according to the lettuce information feature vector set and the minimum number of samples M, including: For each element in the lettuce information feature vector set, calculate the Euclidean distance to all other elements; Set parameter k, find the distance of each element to the kth farthest element, and sort them; According to the sorting results, draw a nearest neighbor distance graph with the horizontal axis being the sorted elements and the vertical axis being the Euclidean distance; Find the inflection point where the ordinate increases suddenly in the nearest neighbor distance graph, and use the Euclidean distance corresponding to the inflection point as the neighborhood size ; The value of the data dimension corresponding to the element in the lettuce information feature vector set plus 1 is taken as the minimum sample number M.

2. The method for monitoring the growth of lettuce according to claim 1, characterized in that: According to the change information of the lettuce pixels within the monitoring period, the first growth change degree corresponding to the merged area and the second growth change degree corresponding to the central area are calculated respectively, including: Get the position of the merged area in each frame in the monitoring period; For each merged area and the central area, the change rate of each element in the lettuce information feature vector between the initial frame and the end frame is compared; The contribution weight of each element in the lettuce information feature vector is preset, and the change rate of each element in the lettuce information feature vector is summarized according to the contribution weight to obtain a first growth change degree corresponding to the merged area and a second growth change degree corresponding to the central area.

3. A lettuce growth monitoring system, characterized in that: Applied in the method as claimed in claim 1, comprising: An acquisition module is used to acquire the monitoring image of lettuce within the monitoring period and analyze the contour information of lettuce in the monitoring image of lettuce; A segmentation module, used for segmenting the lettuce monitoring image into a plurality of observation areas, and dividing the observation area into a central area and a non-central area according to the lettuce contour information; An integration module is used to obtain the corresponding lettuce pixel information between adjacent non-central areas at the end frame of the monitoring period, and integrate the non-central areas into at least one merged area with the central area as the integration endpoint; A calculation module, used to calculate the first growth change degree corresponding to the merged area and the second growth change degree corresponding to the central area according to the change information of the lettuce pixels within the monitoring period; The evaluation module is used to preset an evaluation threshold and perform growth evaluation on the merged area according to the second growth change degree and the first growth change degree.

4. A computing device, characterized in that include: one or more processors; A storage system for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-2.

5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program, which, when executed by a processor, implements the method according to any one of claims 1 to 2.