Quantitative evaluation method for curl degree of tea leaf
By using Python programming and OpenCV algorithms, and employing edge detection and skeleton detection technologies, a digital quantitative evaluation of tea curl degree was achieved. This solved the problems of subjectivity and inaccuracy in tea curl degree evaluation and established an objective standard for tea curl degree grading.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG FORESTRY UNIVERSITY
- Filing Date
- 2022-09-29
- Publication Date
- 2026-05-08
AI Technical Summary
Existing methods for evaluating the curl of tea leaves rely on manual sensory evaluation, lack unified standards, and are highly subjective, making it difficult to achieve digitalization and accurate evaluation.
Using Python programming and edge detection and skeleton detection algorithms from the OpenCV library, tea images were captured in a shadowless photography studio. The curvature index of the tea leaves was calculated, and an objective evaluation standard was established for grading.
This method enables digital and quantitative evaluation of tea leaf curl, improving the objectivity and accuracy of the evaluation and providing a digital reference for tea processing.
Smart Images

Figure CN115655144B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of tea quality control technology, specifically to a quantitative evaluation method for the curvature grade of tea. Background Technology
[0002] Tea leaf curl is an important evaluation indicator of the appearance of curled tea leaves. Curl largely reflects the quality of fresh tea leaves and the level of processing. For example, the premium grade "Biluochun" requires the tea leaves to be curled into a spiral shape, while the premium grade "Mengding Ganlu" requires the tea leaves to be fine, delicate and evenly curled.
[0003] Existing evaluation methods have technical shortcomings, including:
[0004] 1. It mainly relies on human sensory evaluation, requires professional personnel, and lacks unified evaluation standards and methods.
[0005] 2. The evaluation comments are highly subjective, imprecise, and not intuitive enough, and do not achieve digital evaluation of curl.
[0006] Therefore, establishing a digital and objective evaluation system for the curling degree of tea leaves can quickly determine the degree of curling, which improves efficiency, saves resources, helps improve tea quality, and provides a reference for the digital grading of tea leaves. Summary of the Invention
[0007] The purpose of this invention is to provide a digital evaluation method for the curl degree of tea leaves, which can quickly complete the digital evaluation of the curl degree of tea leaves. It can not only measure the curl degree index of dry tea leaves, but also monitor the curl degree index of tea products in real time during tea processing, providing a reference for realizing digital processing and solving the problems mentioned in the background art.
[0008] To achieve the above objectives, the present invention provides the following technical solution:
[0009] A method for quantitatively evaluating the curvature grade of tea leaves includes the following steps:
[0010] S1. Establish an objective evaluation method for the curl degree grade of the tested tea sample, and obtain the objective evaluation standard for the curl degree of the tested tea sample;
[0011] S2. Collect approximately 50 tea leaves at a time, ensuring that the tea leaves do not overlap. Then, use a camera in a shadowless photography studio to take vertical photos and obtain clear images of the tea leaves from the front without shadows.
[0012] S3. Using Python programming, employ edge detection and skeleton detection algorithms from the OpenCV library to identify all target tea leaves, and create a method for measuring the curl of the tea leaves. Based on this method, measure the curl of 50 tea leaves (quantized in pixels). The formula for calculating the curl of the tea leaves is as follows:
[0013]
[0014] In the formula:
[0015] CI stands for curl degree; This represents the total number of pixels in the skeleton of a tea leaf.
[0016] This represents the total number of endpoints of the tea leaf skeleton.
[0017] SFD is the skeleton diameter length.
[0018] S4. Using the objective evaluation standard for the curl of the tea samples established in the previous stage, each tea leaf is graded as "curled like a snail, curled, still curled, or bent".
[0019] S5. Obtain the proportion of tea leaves that are curled like snails, curled, slightly curled, or bent in the tea sample, as well as the average degree of curl.
[0020] Furthermore, the specific steps of the objective evaluation method for creating the curl grade of the measured tea sample in step S1 are as follows:
[0021] (1) Collect a physical standard sample of a certain type of tea, extract a certain amount of sample as required, and calculate the curvature of the tea according to the method of this patent.
[0022] (2) Determine whether the sample data follows a normal distribution;
[0023] a. If the sample data follows a normal distribution, according to the principles of probability theory and mathematical statistics, the sample data is divided into several levels as required. The obtained grading thresholds are combined with the previously constructed large database of tea curl degree (big data sampling, expert evaluation) to derive the evaluation standard for this type of tea curl degree.
[0024] b. If the sample data does not follow a normal distribution, the sample data is first transformed into a normal distribution or approximately a normal distribution using a certain method. The grading threshold is obtained using the above method. Then, the data is inversely transformed to obtain the actual grading threshold of the sample. Combined with the previously constructed large database of tea curl degree (big data sampling, expert evaluation), the evaluation standard for this type of tea curl degree is derived.
[0025] Furthermore, the range of levels for the normal distribution includes:
[0026] If the array x approximately follows a normal distribution x ~ N(μ,σ) 2 If the values are within a normal distribution, then this set of values is generally considered to be normally distributed.
[0027] Those exceeding μ+σ are rated A;
[0028] Those distributed between μ and μ+σ are rated as Grade B;
[0029] μ-σ to μ was rated C;
[0030] The grades from μ-σ to μ-2σ are rated as D.
[0031] The rating below μ-2σ is E.
[0032] Furthermore, after the physical standard sample data is transformed by a certain method, the sample data is normally distributed and the whole is divided into three levels, namely [0,μ-σ], [μ-σ,μ+σ], and [μ+σ,+∞], with proportions of 15.87%, 68.26%, and 15.87%, respectively. The grading threshold is obtained. Then, the data is inversely transformed to obtain the actual grading threshold of the sample. The grading threshold range of "Lishui Fragrant Tea" is: [0, 1.83], [1.83, 3.32], and [3.32,+∞].
[0033] Furthermore, in the curvature (CI) formula, the method for identifying the skeleton endpoints employs an eight-neighbor discrimination algorithm. This involves traversing all pixels of the skeleton image row-by-row, starting from the first pixel at the top left corner of the image, and determining whether each pixel is a skeleton endpoint. If it is a skeleton endpoint (let's call this skeleton endpoint P), then it further determines whether this skeleton endpoint satisfies the following condition: the sum of the number of pixels at points A and B equals 1 (e.g., ...). Figure 4 As shown, dark squares represent skeleton points and light squares represent non-skeleton points. If a non-skeleton point is not a skeleton point, it is counted as the number of skeleton endpoints, incremented by 0.5. The above steps are repeated until all pixels are identified.
[0034] Furthermore, the skeletal diameter refers to the straight-line distance between the two farthest points in the skeletal framework. The skeletal diameter represents the orientation of the tea leaf's skeletal structure. If a skeletal point aligns with the orientation of the skeletal diameter, it indicates that the tea leaf is straight; conversely, if a skeletal point does not align with the orientation of the skeletal diameter, it indicates that the tea leaf is curved.
[0035] Furthermore, the skeleton is the central axis of the object. Obtaining the skeleton is equivalent to highlighting the main structure and shape information of the object and removing redundant information. Based on this information, feature points on the image can be detected. Feature points on the image include endpoints, intersections, and inflection points.
[0036] The technical effects and advantages of this invention are as follows:
[0037] 1. This invention proposes a formula for calculating the curvature index. Using Python programming and algorithms such as edge detection and skeleton detection from the OpenCV library, the curvature index is obtained, realizing the quantification of curvature and achieving quantitative evaluation.
[0038] 2. This invention, by collecting physical standard samples of a certain type of tea and using statistical principles, establishes the grading threshold range of the curl index, establishes an objective evaluation method, and realizes the objective evaluation of the curl of tea leaves. It can be used for the evaluation of the curl of tea leaves such as black tea and green tea. Attached Figure Description
[0039] Figure 1 This is a flowchart of the digital evaluation method for tea curl degree according to the present invention;
[0040] Figure 2 This is a comparison image of the original and extracted skeleton diagrams of the tea skeleton extraction method of the present invention.
[0041] Figure 3 This is a diagram of the tea leaf skeleton of the present invention;
[0042] Figure 4 This is an example diagram of the eight-neighbor discrimination algorithm for skeleton endpoint recognition method of the present invention.
[0043] Figure 5 This is a comparison example of the curl index of the present invention, whether or not the curl index uses the formula curl index (CI) algorithm. Figure 1 ;
[0044] Figure 6 This is a comparison example of the curl index of the present invention, whether or not the curl index uses the formula curl index (CI) algorithm. Figure 2 ;
[0045] Figure 7 This is a schematic diagram comparing the mean curl degree of the present invention with and without using the formula curl degree (CI) algorithm;
[0046] Figure 8 This is a graph showing the curl index of a physical standard sample of the tea variety "Pingshui Rizhu Tea" of this invention;
[0047] Figure 9 A schematic diagram illustrating the grading of the physical standard sample of the tea variety "Pingshui Rizhu Tea" of this invention;
[0048] Figure 10 This is a graph showing the curl index of the actual standard sample of the tea variety "Lishui Fragrant Tea" of this invention;
[0049] Figure 11 The graph shows the curvature index (square root conversion) of the actual standard sample of the tea variety "Lishui Fragrant Tea" of this invention.
[0050] Figure 12 This is a schematic diagram illustrating the grading of the physical standard sample of the tea variety "Lishui Fragrant Tea" of the present invention.
[0051] Figure 13 This is a diagram showing the proportion of curled, semi-curled, and bent tea leaves in the "Lishui Fragrant Tea" tea sample of the present invention.
[0052] Figure 14 This is a diagram showing the proportion of rolled, curled, and bent tea leaves in the tea sample of the "Pingshui Rizhu Tea" variety of this invention. Detailed Implementation
[0053] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to represent selected embodiments of the invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0054] like Figure 1 As shown, the present invention provides a method for quantitatively evaluating the curl grade of tea leaves, comprising the following steps:
[0055] S1. Establish an objective evaluation method for the curl degree grade of the tested tea sample, and obtain the objective evaluation standard for the curl degree of the tested tea sample;
[0056] S2. Collect approximately 50 tea leaves at a time, ensuring that the tea leaves do not overlap. Then, use a camera in a shadowless photography studio to take vertical photos and obtain clear images of the tea leaves from the front without shadows.
[0057] S3. Using Python programming, employing edge detection and skeleton detection algorithms from the OpenCV library to identify all target tea leaves, and creating a method for measuring the curl of the tea leaves. Based on this method, the curl of the tea leaves (quantified in pixels) is measured. The formula for calculating the curl of the tea leaves is as follows:
[0058]
[0059] In the formula:
[0060] CI stands for curl degree; This represents the total number of pixels in the skeleton of a tea leaf.
[0061] This represents the total number of endpoints of the tea leaf skeleton.
[0062] SFD is the skeleton diameter length;
[0063] S4. Using the objective evaluation standard for the curl of the tea samples established in the previous stage, each tea leaf is graded as "curled like a snail, curled, still curled, or bent".
[0064] S5. Obtain the proportion of tea leaves that are curled like snails, curled, slightly curled, or bent in the tea sample, as well as the average degree of curl.
[0065] If the above curl index formula only includes the sum of the pixels of the skeleton and does not consider the skeleton endpoints referred to in this patent, then the curl index of tea leaves cannot accurately reflect the degree of curl of the tea leaves, and it is also impossible to classify each batch of tea leaves more reasonably.
[0066] Example 1
[0067] like Figure 13 The method for quantifying the curl of "Lishui Fragrant Tea" tea samples and evaluating their objective grades, as shown, includes the following steps:
[0068] S1. Create an objective evaluation method for the curl degree grade of "Lishui Fragrant Tea" tea samples, and obtain the objective evaluation standard for the curl degree of "Lishui Fragrant Tea" tea samples;
[0069] S2. Collect 54 tea leaves at once, ensuring that the tea leaves do not overlap, and take vertical photos using a camera in a shadowless photography studio to obtain a clear image of the tea leaves without shadows.
[0070] S3. Using Python programming, edge detection and skeleton detection algorithms from the OpenCV library are used to identify all target tea leaves, and the curl of 54 tea leaves (quantified in pixels) is measured according to the tea curl measurement method created in this patent.
[0071] S4. Using the objective evaluation standard for the curling degree of the "Lishui Fragrant Tea" tea sample established in the early stage, each tea leaf is graded as "curled, slightly curled, or bent".
[0072] S5. Obtain the proportion of curled, semi-curled, and bent tea leaves in the tea sample, as well as the average degree of curl.
[0073] The skeleton can be understood as the central axis of an object. For example, the skeleton of a rectangle is its central axis along its length; the skeleton of a square is its center point; the skeleton of a circle is its center; the skeleton of a straight line is itself; and the skeleton of an isolated point is also itself. Obtaining the skeleton is equivalent to highlighting the main structural and shape information of the object while removing redundant information. Based on this information, feature points on the image can be detected, such as endpoints, intersections, and inflection points. Skeleton extraction is achieved through image thinning. Thinning involves peeling away layers of the image, removing some points while maintaining the original shape, until the skeleton of the image is obtained, as shown in the attached image. Figure 2 As shown.
[0074] The skeletal diameter refers to the straight-line distance between the two farthest points in the skeletal structure. The skeletal diameter represents the orientation of the tea leaf's skeletal structure. If a skeletal point aligns with the orientation of the skeletal diameter, it indicates the tea leaf is straight; conversely, if a skeletal point does not align with the orientation of the skeletal diameter, it indicates the tea leaf is curved. (See attached image.) Figure 3 As shown in the figure, the solid line represents the diameter of the skeleton.
[0075] The objective evaluation method for the curl grade of "Lishui Fragrant Tea" includes the following steps:
[0076] ① 1275 samples were drawn from the physical standard samples of "Lishui Fragrant Tea" (divided into five grades from grade one to grade five), and the curvature of the tea leaves was calculated according to the method of this patent.
[0077] ② Determine whether the sample data follows a normal distribution. The results show that the total number of physical standard samples of "Lishui Fragrant Tea" does not follow a normal distribution, with a mean μ = 2.58 and a standard deviation σ = 0.76. Figure 10 As shown;
[0078] ③ The sample data of the physical standard sample of "Lishui Fragrant Tea", after square root transformation, shows a normal distribution, such as... Figure 11 As shown;
[0079] ④ Based on the results of S3, the physical standard samples of "Lishui Fragrant Tea" are divided into three levels: [0, μ-σ], [μ-σ, μ+σ], and [μ+σ, +∞], with proportions of 15.87%, 68.26%, and 15.87%, respectively. The grading thresholds are obtained, and then the data are inversely transformed to obtain the actual grading thresholds for the samples. The grading threshold ranges for "Lishui Fragrant Tea" are: [0, 1.83], [1.83, 3.32], and [3.32, +∞]. Figure 12 As shown;
[0080] ④ Based on the grading thresholds obtained using the above method, and combined with the previously constructed large database of tea curl degree (data sampling, expert evaluation), the evaluation criteria for the curl degree of "Lishui Fragrant Tea" were derived, as shown in Table 1:
[0081]
[0082] Table 1: Evaluation criteria for the curl of "Lishui Fragrant Tea".
[0083] Example 2
[0084] like Figure 14 The method for quantifying the curl of "Pingshui Rizhu Tea" tea samples and evaluating their objective grades includes the following steps:
[0085] S1. Create an objective evaluation method for the curl degree grade of "Pingshui Rizhu Tea" tea samples, and obtain the objective evaluation standard for the curl degree of "Pingshui Rizhu Tea" tea samples.
[0086] S2. Collect 50 tea leaves at once, ensuring that the tea leaves do not overlap, and take vertical photos using a camera in a shadowless photography studio to obtain a clear image of the tea leaves without shadows.
[0087] S3. Using Python programming, edge detection and skeleton detection algorithms from the OpenCV library are used to identify all target tea leaves, and the curl of 50 tea leaves (quantified in pixels) is measured according to the tea curl measurement method created in this patent.
[0088] S4. Using the objective evaluation standard of curl degree of the "Pingshui Rizhu Tea" tea sample established in the early stage, each tea leaf is graded as "curled like a snail, curled, or bent".
[0089] S5. Obtain the proportion of tea leaves that are curled like snails, curled, or bent in the tea sample, as well as the average degree of curl.
[0090] The objective evaluation method for the curl grade of "Pingshui Rizhu Tea" includes the following steps:
[0091] ① 926 samples were drawn from the physical standard samples of "Pingshui Rizhu Tea" (divided into three grades: Gongxi, Ruoye and Chijin), and the curvature of the tea leaves was calculated according to the method of this patent.
[0092] ② Determine whether the sample data follows a normal distribution. The calculated results show that the total number of physical standard samples of "Pingshui Rizhu Tea" follows a normal distribution, with a mean μ = 2.83 and a standard deviation σ = 0.85. Figure 8 As shown;
[0093] ③ Based on the aforementioned principles of probability theory and mathematical statistics, the sample data can be divided into five levels. This patent, however, adjusts the grading standard appropriately based on the overall curling of the physical standard samples of "Pingshui Rizhu Tea," dividing the overall physical standard samples of "Pingshui Rizhu Tea" into three levels: [0, μ-σ], [μ-σ, μ+σ], and [μ+σ, +∞], with proportions of 15.87%, 68.26%, and 15.87%, respectively. The grading threshold ranges for "Pingshui Rizhu Tea" are: [0, 1.98], [1.98, 3.67], and [3.67, +∞]. Figure 9 As shown;
[0094] ④ Based on the grading thresholds obtained using the above method, and combined with the previously constructed large database of tea curl degree (data sampling, expert evaluation), the evaluation criteria for the curl degree of "Pingshui Rizhu Tea" were derived, as shown in Table 2:
[0095]
[0096] Table 2: Evaluation criteria for the curl of "Pingshui Rizhu Tea".
[0097] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
[0098] It should be noted that, in this document, the terms “comprising,” “including,” or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
Claims
1. A method for quantitatively evaluating the curl grade of tea leaves, characterized in that: Includes the following steps: S1. Establish an objective evaluation method for the curl degree grade of the tested tea sample, and obtain the objective evaluation standard for the curl degree of the tested tea sample; S2. Collect 50 tea leaves at once, ensuring that the tea leaves do not overlap, and take vertical photos using a camera in a shadowless photography studio to obtain a clear image of the tea leaves without shadows. S3. Using Python programming, employ edge detection and skeleton detection algorithms from the OpenCV library to identify all target tea leaves, and create a method for measuring the curvature of the tea leaves. The curvature of the tea leaves is measured using this method, and the calculation formula for the curvature measurement method is as follows: ; In the formula: CI stands for curl degree; This represents the total number of pixels in the skeleton of a tea leaf. This represents the total number of endpoints of the tea leaf skeleton. SFD is the skeleton diameter length; S4. Using the objective evaluation criteria for curl obtained in S1, each tea leaf is graded as "curled like a snail, curled, still curled, or bent". S5. Obtain the proportion of tea leaves that are curled like snails, curled, slightly curled, and bent in the tea sample, as well as the average value of the degree of curl. In the curvature formula, the method for identifying the skeleton endpoints adopts an eight-neighbor discrimination algorithm. That is, starting from the first pixel in the upper left corner of the image, all pixels of the skeleton image are traversed row by row and column by column, and each pixel is determined to be a skeleton endpoint. If it is a skeleton endpoint, let this skeleton endpoint be P, and the reference pixels in the neighborhood are points A and B. Then, it is further determined whether this skeleton endpoint satisfies the following conditions: the total number of pixels of points A and B = 1, dark squares represent skeleton points, and light squares represent non-skeleton points. If so, it is counted as the number of skeleton endpoints, and counted with a value of 0.
5. The above steps are repeated until all pixels are identified. The skeletal diameter refers to the straight-line distance between the two farthest points in the skeletal framework; the skeletal diameter represents the orientation of the skeletal framework of a tea leaf; if a skeletal point is aligned with the orientation of the skeletal diameter, it indicates that the tea leaf is straight, while if a skeletal point is not aligned with the orientation of the skeletal diameter, it indicates that the tea leaf is curved.
2. The method for quantitatively evaluating the curl grade of tea leaves according to claim 1, characterized in that: The skeleton is the central axis of the object. Obtaining the skeleton is equivalent to highlighting the main structure and shape information of the object and removing redundant information. Based on this information, feature points on the image can be detected. Feature points on the image include endpoints, intersections, and inflection points.
Citation Information
Patent Citations
Method for identifying tea leaves based on colors and shapes
CN102521564A
Tea leaf recognition method, recommendation method, tea leaf recognition device, equipment and medium
CN111753852A