Quantitative analysis method and system for Chinese cabbages
Through deep segmentation algorithm and adaptive color scale analysis, the soft leaf rate and shortened stem information of Chinese cabbage are quantitatively analyzed, which solves the problem of inaccurate information in the existing technology, achieves accurate quantitative analysis of Chinese cabbage, and promotes agricultural automation. .
Patent Information
- Application Number
- CN202410638671.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-22
- Publication Date
- 2024-09-06
AI Technical Summary
In the prior art, there is great human subjectivity in the identification of soft leaf rate, shortened stem information and leaf ball information of Chinese cabbage, resulting in inaccurate information.
The deep segmentation algorithm is used to locate the side and cross-section contours of Chinese cabbage, and the adaptive color scale analysis method is combined to calculate the leaf ball information and shortened stem information, and the deep learning system is used to output quantitative analysis indicators.
It achieves accurate quantitative analysis of Chinese cabbage, reduces human subjectivity, assists agronomy professionals in completing complex experiments, and promotes agricultural automation and modernization.
Smart Images

Figure CN118608940A
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of image processing methods, and in particular to a Chinese cabbage quantitative analysis method. Background Art
[0002] Chinese cabbage is the largest vegetable crop in my country, with an annual planting area of nearly 2.67 million hectares. 2 , with an output value of more than 60 billion yuan, accounting for about 15% of the total vegetable planting area in the country. Soft leaf rate, shortened stem information and leaf ball information are important phenotypic traits, but the identification of soft leaf rate, shortened stem information and leaf ball information is still based on traditional visual inspection, which has a large degree of human subjectivity and causes inaccurate identification information. Summary of the invention
[0003] The technical problem to be solved by the present invention is how to provide a method for accurately outputting quantitative analysis indicators of Chinese cabbage such as soft leaf rate, shortened stem information, and leaf ball information to achieve the purpose of quantitative analysis.
[0004] In order to solve the above technical problems, the technical solution adopted by the present invention is: a Chinese cabbage quantitative analysis method, comprising the following steps:
[0005] The depth segmentation algorithm is used to locate the side and cross-sectional contours of the Chinese cabbage respectively;
[0006] Calculate the head information using the side profile of Chinese cabbage;
[0007] Based on the components of Chinese cabbage in the profile, the segmentation algorithm is used to locate the shortened stem of Chinese cabbage, and the adaptive color scale analysis method is used to locate the heart area of Chinese cabbage.
[0008] Calculate and output the quantitative analysis indicators of Chinese cabbage.
[0009] A further technical solution is that the method of using a depth segmentation algorithm to locate the side and cross-sectional contours of the Chinese cabbage comprises the following steps:
[0010] A binary classification deep segmentation network was constructed to mark the side and cross-section areas of the Chinese cabbage as binary classification targets respectively. Then the segmentation model was trained to accurately segment the side and cross-section target contours of the Chinese cabbage.
[0011] A further technical solution is that in order to obtain the true size of the Chinese cabbage, it is necessary to locate a reference object of known size; the known variable Pixel cabbage Size is the pixel size of Chinese cabbage. accord To refer to the actual size of an object, Pixel accord The specific size of the Chinese cabbage is cabbage Calculated using the following formula:
[0012]
[0013] In order to achieve accurate positioning of reference objects, positioning solutions are designed for simple targets and complex targets respectively.
[0014] A further technical solution is that the simple target refers to a regular-shaped target existing in the Chinese cabbage image, which is implemented using Hough detection, which includes target detection for straight line edges and target detection for circular arc edges.
[0015] A further technical solution is that complex targets refer to irregularly shaped targets in the Chinese cabbage image, and their positioning is performed using a deep segmentation network.
[0016] A further technical solution is to use an adaptive color scale analysis method to locate the Chinese cabbage area, specifically including:
[0017] Based on the segmentation of HSV color space in plant leaves, a HSV color segmentation threshold adjustment tool for cabbage leaves and stalks was developed. A large amount of cabbage image data was classified and analyzed by color through statistical analysis methods, and finally the stalk positioning parameters were obtained, which were used to calculate the cabbage leaf area.
[0018] The present invention also discloses a Chinese cabbage quantitative analysis system based on deep learning, comprising:
[0019] A Chinese cabbage side and cross-sectional contour calculation module, used to locate the Chinese cabbage side and cross-sectional contours respectively using a depth segmentation algorithm;
[0020] A leaf head information calculation module, used to calculate the leaf head information using the side profile of the Chinese cabbage;
[0021] The cabbage heart area positioning module is used to locate the shortened stem of Chinese cabbage based on the cabbage components in the profile using a segmentation algorithm and locate the cabbage heart area using an adaptive color scale analysis method;
[0022] The quantitative analysis index calculation and output module is used to calculate and output the quantitative analysis index of Chinese cabbage.
[0023] The beneficial effects of the above technical solution are as follows: the method first uses a deep segmentation algorithm to locate the side and cross-sectional contours of Chinese cabbage respectively; secondly, the cabbage side contour is used to calculate the head information; then based on the Chinese cabbage components in the cross-sectional contour, the segmentation algorithm is used to locate the shortened stem of Chinese cabbage, and the adaptive color scale analysis method is used to locate the heart area of the cabbage; finally, the soft leaf rate, shortened stem information, head information and other quantitative analysis indicators of Chinese cabbage are calculated and output to achieve the purpose of quantitative analysis. The method can assist agricultural professionals to complete various complex comparative experiments, fully liberate manpower, and lay a solid foundation for agricultural automation and modernization. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0025] Figure 1 is a flowchart of the method described in an embodiment of the present invention
[0026] Figure 2 is a processing target graph in an embodiment of the present invention;
[0027] Figure 3 It is a segmented network diagram in the method described in the embodiment of the present invention;
[0028] Figure 4 is a side and cross-sectional annotated view of Chinese cabbage according to the method of an embodiment of the present invention;
[0029] Figure 5 It is a data diagram of the shortened stem of Chinese cabbage section in the method of the embodiment of the present invention;
[0030] Figure 6 It is a diagram of an HSV color threshold adjustment tool for vegetable leaf and stem segmentation in the method described in an embodiment of the present invention;
[0031] Figure 7 is a physical structure diagram of the system described in the embodiment of the present invention;
[0032] Figure 8 are different color space diagrams in the system according to the embodiment of the present invention;
[0033] Fig. 9 is a functional diagram of photo collection in the system according to an embodiment of the present invention;
[0034] Fig.10 is a diagram of cabbage traits in the system of the embodiment of the present invention;
[0035] Among them: 1. Chinese cabbage area 1; 2. Chinese cabbage area 2; 3. Control; 4. Leaf area; 5. Shortened stem area. DETAILED DESCRIPTION
[0036] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0037] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0038] Overall, such as Figure 1 As shown, the embodiment of the present invention discloses a method for quantitative analysis of Chinese cabbage, comprising the following steps:
[0039] The depth segmentation algorithm is used to locate the side and cross-sectional contours of the Chinese cabbage respectively;
[0040] Calculate the head information using the side profile of Chinese cabbage;
[0041] Based on the components of Chinese cabbage in the profile, the segmentation algorithm is used to locate the shortened stem of Chinese cabbage, and the adaptive color scale analysis method is used to locate the heart area of Chinese cabbage.
[0042] Calculate and output the quantitative analysis indicators of Chinese cabbage.
[0043] The Chinese cabbage expert intelligent system developed based on this method can assist agricultural professionals in completing various complex comparative experiments, fully liberate manpower, and lay a solid foundation for agricultural automation and modernization.
[0044] like Figure 2 As shown, the quantitative indicators of this method mainly include: the reference object, Chinese cabbage area 1 (side), Chinese cabbage area 2 (cross-section) and the shortened stem area of the Chinese cabbage above it, the Chinese cabbage stalk area, and the Chinese cabbage leaf area.
[0045] According to the process, four target positioning methods are introduced, namely, side and cross-section segmentation of Chinese cabbage, reference positioning for cabbage size conversion, target segmentation of shortened stem of Chinese cabbage, and analysis of Chinese cabbage leaf area, as well as other measures taken to ensure the accuracy of target positioning.
[0046] Chinese cabbage cut sideways and in sections
[0047] Building a binary classification deep segmentation network Figure 3 , respectively marking the side and cross-section areas of the Chinese cabbage as binary targets (the labeling effect is as follows Figure 4 Then, the segmentation model is trained to accurately segment the side and cross-sectional target contours of the Chinese cabbage.
[0048] Chinese cabbage size conversion reference positioning
[0049] In order to get the true size of the Chinese cabbage, it is necessary to locate a reference object of known size. cabbage Size is the pixel size of Chinese cabbage. accordTo refer to the actual size of an object, Pixel accord The specific size of the Chinese cabbage is cabbage It can be calculated using the following formula.
[0050]
[0051] In order to achieve accurate positioning of reference objects, positioning solutions are designed for simple targets and complex targets respectively.
[0052] Simple Targeting:
[0053] Simple targets refer to targets with regular shapes in the Chinese cabbage image, such as coins, rulers, and packaging bags. They are implemented using Hough detection, which is also divided into target detection for straight edges and target detection for circular arc edges.
[0054] Complex target positioning:
[0055] Complex objects refer to irregularly shaped objects in Chinese cabbage images (e.g. Figure 2 The positioning of the human hand is done by the same segmentation method as the side and cross-section segmentation of the Chinese cabbage.
[0056] Chinese cabbage shortened stem target segmentation
[0057] The segmentation of the shortened stem target is based on the cabbage cross-section image located in the cabbage side and cross-section segmentation. The positioning adopts the same segmentation method as the cabbage side and cross-section segmentation. The annotation data of the shortened stem of the cabbage cross-section is as follows: Figure 5 shown.
[0058] Regional analysis of Chinese cabbage leaves
[0059] Based on the segmentation of plant leaves in HSV color space, we developed Figure 6 The HSV color segmentation threshold adjustment tool for cabbage leaves and stalks is shown. By using statistical analysis methods to classify and analyze a large amount of cabbage image data by color, the stalk positioning parameters can be finally obtained, and the cabbage leaf area can be calculated based on this.
[0060] Other methods
[0061] Through the common sense summary of Chinese cabbage data and statistical analysis of image features, the following conclusions can be drawn:
[0062] 1) The length-to-width ratio of the cabbage side view is generally in the range of 2 to 3;
[0063] 2) The placement of the cross-section of the Chinese cabbage should be consistent with the side view of the Chinese cabbage;
[0064] 3) The length-to-width ratio of the Chinese cabbage cross-section is less than 3;
[0065] 4) The location of the shortened stem of Chinese cabbage is at the bottom of the cross section of the Chinese cabbage;
[0066] 5) The Chinese cabbage stalks are distributed at the lower end of the Chinese cabbage cross section;
[0067] 6) The heart area of the Chinese cabbage is located at the center of the Chinese cabbage cross section and extends upward;
[0068] 7) The ratio of Chinese cabbage heart to cabbage stalk is generally in the range of 0.5 to 2.
[0069] Based on the above conclusions, corrections can be made based on the positioning of different targets. For example, using conclusions 1), 2), and 4), the misidentification of the shortened stems at the leaf ends of Chinese cabbage can be eliminated.
[0070] Correspondingly, the present invention also discloses a Chinese cabbage quantitative analysis system based on deep learning, comprising:
[0071] A Chinese cabbage side and cross-sectional contour calculation module, used to locate the Chinese cabbage side and cross-sectional contours respectively using a depth segmentation algorithm;
[0072] A leaf head information calculation module, used to calculate the leaf head information using the side profile of the Chinese cabbage;
[0073] The cabbage heart area positioning module is used to locate the shortened stem of Chinese cabbage based on the cabbage components in the profile using a segmentation algorithm and locate the cabbage heart area using an adaptive color scale analysis method;
[0074] The quantitative analysis index calculation and output module is used to calculate and output the quantitative analysis index of Chinese cabbage.
[0075] System physical architecture
[0076] The system physical architecture consists of the main server, database server and algorithm server, such as Figure 7 As shown; the main server deploys Nginx components and Chinese cabbage quantitative analysis system; the database server deploys MySQL Server and RedisServer; the algorithm server deploys intelligent trait recognition components.
[0077] In response to the key points and difficulties of the system, we customized a Chinese cabbage target positioning algorithm based on a deep segmentation algorithm, a reference object positioning algorithm, a shortened stem area positioning algorithm based on morphological analysis, and a leaf area positioning algorithm based on multiple color spaces.
[0078] Chinese cabbage regional target positioning:
[0079] The target in the image data is the Chinese cabbage area, including the side and cross-section, with irregular edge contours and a certain blending characteristic with the background. Therefore, in order to accurately locate the Chinese cabbage target, this project uses a target segmentation algorithm based on deep learning, conducts classification research at the pixel level, and completes the refined positioning of the Chinese cabbage target.
[0080] By performing connected region analysis on the segmented target area, we finally get the following: side view of the Chinese cabbage area and cross-section view of the Chinese cabbage area. Figure 2 Taking the Chinese cabbage area in the figure as an example, the Chinese cabbage area on the left is a side view, and the Chinese cabbage area on the right is a cross-sectional view.
[0081] Reference object positioning:
[0082] The significance of the reference object is to provide a reference value of the actual coordinate system, which is used to calculate the conversion unit between the image pixel value and the actual scale. In the actual production process, a target with a single shape and a large difference in color from the target is generally selected as a reference object for rapid positioning and accurate conversion.
[0083] by Figure 2 For example, the hand has constant size parameters in the actual coordinate system. Therefore, in the absence of a fixed reference object, the conversion parameters can be calculated based on the size and pixel value of the hand.
[0084] Shortened stem area positioning:
[0085] The shortened stem area is only located in the cross-section photo of Chinese cabbage and has typical edge morphological characteristics. This project intends to use morphological analysis methods to accurately locate the shortened stem area.
[0086] by Figure 2 Taking the Chinese cabbage area in the figure as an example, the shortened stem area is in the Chinese cabbage area on the right.
[0087] Leaf area positioning:
[0088] Traditional leaf region analysis is based on empirical value analysis, using statistical methods to locate the average pixel value in a single RGB color space, and then completing leaf region location. The above method does not consider the impact of light at different time periods, and lacks universality and robustness for cabbages at different growth stages.
[0089] This system uses analogy of RGB, YUV, HSV and other color spaces, combined with the above statistical analysis results, and uses the conventional ratio of the cabbage leaf area to the cabbage stem area for regional correction, and finally calculates the cabbage leaf area. Figure 8 It is a diagram of different color spaces in the system of the embodiment of the present invention.
[0090] Different color spaces:
[0091] by Figure 2 Taking the Chinese cabbage leaf area as an example, two sections are used to count the leaf area and the head area, and finally the soft leaf rate index of the Chinese cabbage is obtained.
[0092] The core functions of the system mainly include two parts: one is picture management, and the other is trait management. The picture collection in picture management is the collection of original pictures of cabbage, and pictures are collected according to the varieties of cabbage. The shape of cabbage in trait management shows the width, height, color, soft leaf rate and shortened stem of different varieties of cabbage.
[0093] Image Management
[0094] The photo collection in the picture management can collect photos of cabbage; fill in the conditions to query the photo information according to the actual needs; and identify the characteristics of specific cabbage photos. Fig. 9 is a photo collection diagram of the system.
[0095] Trait Management
[0096] In the trait management, you can query the shape of the specific cabbage variety according to the query conditions; you can click to enlarge the original picture, width and height picture, and shortened stem picture of the cabbage for easy observation and research. Fig.10 It is the cabbage trait diagram of the system.
Claims
1. A method for quantitative analysis of Chinese cabbage, characterized in that The steps include: The side and cross-sectional contours of Chinese cabbage were located using a deep segmentation algorithm; Calculate the head information using the side profile of Chinese cabbage; Based on the components of Chinese cabbage in the profile, the segmentation algorithm is used to locate the shortened stem of Chinese cabbage, and the adaptive color scale analysis method is used to locate the heart area of Chinese cabbage. Calculate and output the quantitative analysis indicators of Chinese cabbage.
2. A Chinese cabbage quantitative analysis method as claimed in claim 1, characterized in that: The method of using a depth segmentation algorithm to respectively locate the side and cross-sectional contours of Chinese cabbage specifically comprises the following steps: A binary classification deep segmentation network was constructed to mark the side and cross-section areas of the Chinese cabbage as binary classification targets respectively. Then the segmentation model was trained to accurately segment the side and cross-section target contours of the Chinese cabbage.
3. The Chinese cabbage quantitative analysis method according to claim 1, characterized in that: To obtain the true size of the Chinese cabbage, it is necessary to locate a reference object of known size; Known variable Pixel cabbage Size is the pixel size of Chinese cabbage. accord To refer to the actual size of an object, Pixel accord The specific size of the Chinese cabbage is cabbage Calculated using the following formula: In order to achieve accurate positioning of reference objects, positioning solutions are designed for simple targets and complex targets respectively.
4. A Chinese cabbage quantitative analysis method as claimed in claim 3, characterized in that: The simple target refers to a regular-shaped target in the Chinese cabbage image, which is implemented using Hough detection, which includes target detection for straight line edges and target detection for circular arc edges.
5. A Chinese cabbage quantitative analysis method as claimed in claim 3, characterized in that: Complex targets refer to irregular shaped targets in Chinese cabbage images, which are located using a deep segmentation network.
6. The method for quantitative analysis of Chinese cabbage according to claim 1, characterized in that: The use of adaptive color scale analysis method to locate the Chinese cabbage area specifically includes: Based on the segmentation of HSV color space in plant leaves, a HSV color segmentation threshold adjustment tool for cabbage leaves and stalks was developed. A large amount of cabbage image data was classified and analyzed by color through statistical analysis methods, and finally the stalk positioning parameters were obtained, which were used to calculate the cabbage leaf area.
7. The method for quantitative analysis of Chinese cabbage according to claim 1, characterized in that: The output quantitative analysis indicators of Chinese cabbage include: soft leaf rate, shortened stem information and leaf head information.
8. The method for quantitative analysis of Chinese cabbage according to claim 1, characterized in that: The length-to-width ratio of the side view of Chinese cabbage is in the range of 2 to 3.
9. The method for quantitative analysis of Chinese cabbage according to claim 1, characterized in that: The length-to-width ratio of the Chinese cabbage cross-section is less than 3.
10. A Chinese cabbage quantitative analysis system based on deep learning, characterized in that: include: A Chinese cabbage side and cross-sectional contour calculation module, used to locate the Chinese cabbage side and cross-sectional contours respectively using a depth segmentation algorithm; A leaf head information calculation module, used to calculate the leaf head information using the side profile of the Chinese cabbage; The cabbage heart area positioning module is used to locate the shortened stem of Chinese cabbage based on the cabbage components in the profile using a segmentation algorithm and locate the cabbage heart area using an adaptive color scale analysis method; The quantitative analysis index calculation and output module is used to calculate and output the quantitative analysis index of Chinese cabbage.
Citation Information
Patent Citations
Test paper layout segmentation method based on digital image, electronic equipment and storage medium
CN112541922A
Vegetable digital breeding method
CN114240253A
Glove defect detection method and device and electronic equipment
CN116740047A
Shrimp length measuring method and system based on machine vision
CN117934583A
Cited By
Global distribution knowledge-guided cabbage leaf ball section type region division method and device and medium
CN119559438A
