Tea wall breaking rate detection system and detection method
By designing a tea wall break rate detection system and automatically identifying and calculating the tea wall break rate using image processing technology, the problems of low detection efficiency and low accuracy in the existing technology are solved, and efficient and accurate tea wall break rate detection is achieved.
Patent Information
- Application Number
- CN202210173878.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-24
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2042-02-24
AI Technical Summary
The lack of automated tea wall breaking rate detection methods in the prior art leads to low detection efficiency and low accuracy.
A tea wall break rate detection system is designed, including an image acquisition device, a processor and an LED light plate. Through steps such as image acquisition, grayscale processing, binary processing, contour extraction and wall break rate calculation, the automatic identification and calculation of tea wall break rate is realized.
The efficiency and accuracy of tea wall breaking rate detection are improved, and the accuracy of the detection results reaches more than 95%, which has high accuracy and robustness.
Smart Images

Figure CN114549568B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of tea processing, and in particular to a tea wall breaking rate detection system and a detection method. Background Art
[0002] Rolling is a step in the processing of green tea. During the production and processing of green tea, the tea leaves are continuously squeezed by processing machinery to quickly rupture the cell walls of the tea leaves, allowing the substances in the cells to flow out through the cell walls, increasing the flavor of the tea when brewed and also shaping the appearance of the tea leaves.
[0003] At present, there are three indicators to judge the quality of tea processing: tea stripping rate, tea wall breaking rate and tea broken rate. The national standard requires that the tea wall breaking rate should be between 50% and 60%.
[0004] Disadvantages of using tea leaves’ stripping rate and tea-breaking rate to judge tea quality:
[0005] The tea strip ratio mainly reflects the appearance of tea leaves and is a common method used by tea growers to judge the processing quality. During the operation, tea growers select a certain weight of rolled leaf samples, manually select the tea strips, and calculate the weight ratio of the tea strips. However, judging the processing quality of tea leaves simply by appearance is too one-sided. The broken tea ratio can be measured by screening, which is relatively simple to operate, but can only reflect the completeness of the tea leaves. It is an optimization indicator in the processing process, not a limiting indicator.
[0006] Disadvantages of traditional methods for detecting wall breaking rate:
[0007] The wall-breaking rate is the most prominent indicator of tea flavor and reflects the processing quality. At present, the manual measurement of the wall-breaking rate mainly uses the nine-square grid method, which requires workers to use a nine-square grid plate to count the area of dyed leaves. The operation process is complicated and difficult for workers to operate. This method will show a large difference in the measurement results of the damaged area after the operator's visual fatigue, and tea farmers cannot use it skillfully.
[0008] In the patent for research on tea yield, patent CN 2021106507274 discloses a method for detecting tea yield. By mechanically learning pictures of tea leaves of different shapes and different yields, a knowledge base of tea yield detection model is formed. The pictures of the tested tea leaves are compared with the knowledge base to obtain the yield. However, the national standard for detecting the yield (GB / T14456.1-2017) obtains the yield by the final weighing method. The method of estimating the weight of tea leaves through machine learning is too ideal and not accurate enough.
[0009] At present, there is little research on the design of detecting the wall-breaking rate of tea leaves by modern technology abroad, and the application of computer image processing technology is mainly reflected in the detection of crop growth status, pests and diseases, etc. There is no public method for automatically detecting the wall-breaking rate of tea leaves in the prior art. Summary of the invention
[0010] The purpose of the present invention is to solve one of the above-mentioned technical problems and to provide an intelligent detection method and detection system for tea wall breaking rate, so as to improve the detection efficiency of tea wall breaking rate.
[0011] To achieve the above object, the technical solution adopted by the present invention is:
[0012] A tea wall breaking rate detection system, comprising:
[0013] Image acquisition device: used to acquire images of tea leaves after rolling to obtain initial images;
[0014] Processor, including:
[0015] Grayscale processing unit: used to perform grayscale processing on the initial image;
[0016] Binarization processing unit: can perform binarization processing on the image processed by the grayscale processing unit, and obtain the image of the dyed area of the tea leaves by setting the first threshold value; and obtain the image of the outer contour of the tea leaves by setting the second threshold value;
[0017] Contour extraction unit: used to extract the area of the outer contour of the tea leaf, and to extract the area of the dyed area of the tea leaf;
[0018] The wall breaking rate calculation unit is used to calculate the wall breaking rate Ri according to the area Sb of the outer contour area and the area Sa of the dyeing area; the wall breaking rate calculation unit calculates the wall breaking rate Ri according to the following method:
[0019]
[0020] In some embodiments of the present invention, the tea leaf wall breaking rate detection system further comprises:
[0021] Connected domain calculation unit: used to remove the stained area whose area is smaller than the comparison threshold according to the set comparison threshold;
[0022] The wall-breaking rate calculation unit calculates the wall-breaking rate of tea leaves according to the area of the removed color region.
[0023] In some embodiments of the present invention, the contour extraction unit extracts the outer contour area of the tea leaves and the stained area of the tea leaves according to the pixel points.
[0024] In some embodiments of the present invention, it further includes: an LED light board for carrying tea leaves, and the image acquisition device is located above the LED light board to acquire images of the tea leaves.
[0025] In some embodiments of the present invention, it further comprises: an image display communicating with the processor to obtain images of tea leaves at each processing stage in real time.
[0026] In some embodiments of the present invention, the detection system further comprises:
[0027] Base: The LED light panel is arranged on the base;
[0028] Lifting bracket: set on the base;
[0029] The image acquisition device is installed on a lifting bracket and can move toward or away from the LED light panel.
[0030] In some embodiments of the present invention, a method for detecting the wall-breaking rate of tea leaves is further provided, comprising the following steps:
[0031] Rolling the tea leaves;
[0032] Dyeing the rolled tea leaves;
[0033] Collect the initial image of the tea leaves after dyeing;
[0034] The initial image is subjected to grayscale processing and binarization processing to obtain the image of the dyed area of the tea leaves and the image of the outer contour of the tea leaves;
[0035] Calculate the area of the outer contour of the tea leaf and the area of the dyed area of the tea leaf;
[0036] The wall breaking rate Ri is calculated based on the area Sb of the outer contour area and the area Sa of the dyed area:
[0037]
[0038] In some embodiments of the present invention, a comparison threshold is set, the stained area of the tea leaves is processed, and the stained area with an area smaller than the comparison threshold is eliminated; the area of the eliminated area is used as the area of the stained area, and the wall breaking rate is calculated.
[0039] In some embodiments of the present invention, the comparison threshold is set to a circumference of the stained area that is greater than 50 pixels.
[0040] In some embodiments of the present invention, the first threshold is set to 48-80 pixels, and the second threshold is set to 135-150 pixels.
[0041] The tea wall breaking rate detection system and detection method provided by the present invention have the following beneficial effects:
[0042] 1. It realizes the automatic identification and calculation of the damaged area of tea cells, which can reduce the detection time of tea cell breakage rate and improve the detection efficiency.
[0043] 2. Through intelligent calculation and analysis, the accuracy of tea wall breaking rate detection reaches more than 95%, the effect is stable, with high accuracy and robustness. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0045] Figure 1 It is a logical structure diagram of the tea wall breaking rate detection system of the present invention.
[0046] Figure 2 It is a structural diagram of the tea wall breaking rate detection system of the present invention.
[0047] Figure 3 This is a picture of tea leaves after grayscale processing.
[0048] Figure 4a This is the dyeing effect of tea leaves after binarization processing.
[0049] Figure 4b This is the outline of the tea leaf after binarization processing.
[0050] Figure 5a This is the effect picture of tea leaf dyeing.
[0051] Figure 5b Extraction of the dyed contour of tea leaves.
[0052] Figure 6a This is the outline of the tea leaf after connected domain processing.
[0053] Figure 6b This is the contour effect of tea leaf dyeing after connected domain processing.
[0054] Figure 7 This is the detection flow chart of the tea wall breaking rate detection system.
[0055] In the above figures:
[0056] 1- Base;
[0057] 2-Lifting bracket;
[0058] 3- Camera bracket;
[0059] 4- Camera;
[0060] 5-Tea leaves to be tested;
[0061] 6-LED light panel. DETAILED DESCRIPTION
[0062] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0063] It should be noted that when an element is referred to as being "disposed on" or "connected to" another element, it may be directly on the other element or indirectly on the other element. When an element is referred to as being "connected to" another element, it may be directly connected to the other element or indirectly connected to the other element. The terms "first" and "second" are used for descriptive purposes only and are not used to imply relative importance.
[0064] The invention discloses a tea wall breaking rate detection system, which can be used for detecting the tea wall breaking rate.
[0065] First, the hardware structure of the wall breaking rate detection system is introduced, including:
[0066] Base 1;
[0067] LED light board 6: used to carry the tea leaves to be tested, and can be arranged on the base 1. The LED light board 6 is used to fill in the light for the tea leaves to obtain a better picture shooting effect;
[0068] Lifting bracket 2: arranged on the base 1, arranged vertically and retractable;
[0069] Camera bracket 3: installed on the top of the lifting bracket 2, and can move towards or away from the LED light panel 6 as the lifting bracket 2 is extended or retracted;
[0070] Image acquisition device: A camera 4 is used, which is installed on the camera bracket 3, with its shooting end facing the LED light board 6 and can move towards or away from the LED light board 6; in this embodiment, a Jetson Nano dedicated camera IMX219 module is used, which has an 8-megapixel 77° viewing angle camera, which can collect clearer blade image information. The narrow-angle camera will reduce the amount of information collected and reduce the burden of information processing.
[0071] Power supply module: used to supply power to the power consumption unit of the detection equipment.
[0072] The image acquisition device is used to acquire images of the tea leaves after rolling to obtain an initial image;
[0073] The calculation of the wall-breaking rate is realized through the processor. Specifically, the processor used is the Jetson nano module. Jetson nano, as the main control, has the same performance as a traditional PC, has the advantages of high cost performance and good scalability, can be equipped with Windows and Linux operating systems, and can be directly connected to the monitor through the HDMI interface for image display.
[0074] The processor specifically includes the following functional units:
[0075] Grayscale processing unit: used to perform grayscale processing on the initial image;
[0076] Binarization processing unit: can perform binarization processing on the image processed by the grayscale processing unit, and obtain the image of the dyed area of the tea leaves by setting the first threshold value; and obtain the image of the outer contour of the tea leaves by setting the second threshold value;
[0077] Contour extraction unit: used to extract the area of the outer contour of the tea leaf, and to extract the area of the dyed area of the tea leaf;
[0078] The wall breaking rate calculation unit is used to calculate the wall breaking rate Ri according to the area Sb of the outer contour area and the area Sa of the dyeing area; the wall breaking rate calculation unit calculates the wall breaking rate Ri according to the following method:
[0079]
[0080] The tea wall breaking rate detection system according to claim 1, further comprising:
[0081] Connected domain calculation unit: used to remove the stained area whose area is smaller than the comparison threshold according to the set comparison threshold;
[0082] The wall breaking rate calculation unit calculates the wall breaking rate of tea leaves according to the area of the removed color region.
[0083] In some embodiments of the present invention, the contour extraction unit extracts the outer contour area of the tea leaves and the stained area of the tea leaves according to the pixel points.
[0084] In some embodiments of the present invention, the invention further comprises: an image display communicating with the processor to obtain images of tea leaves at each processing stage in real time. The image display serves as a human-computer interaction terminal.
[0085] In the second embodiment of the present invention, a method for detecting the wall-breaking rate of tea leaves is further provided, the process is as follows: Figure 7 As shown, the following steps are included:
[0086] S1: Select a sample and roll the tea leaves; in this embodiment, Rizhao green tea is selected and quickly washed with clean water after rolling;
[0087] S2: dyeing the rolled tea leaves;
[0088] Specifically, the leaves are soaked in a 10% potassium dichromate solution for 5 minutes, and the broken wall parts of the leaves after soaking will be dyed. After being rinsed with clean water, the leaves are extracted and laid flat; after the dyeing treatment, the broken wall parts of the tea leaves will be colored;
[0089] S3: Collect the initial image of the tea leaves after dyeing;
[0090] Specifically, when the image acquisition device is used to capture the color image of the leaf, the camera is perpendicular to the leaf, the leaf is as close to the fill light plate as possible (to reduce the shadow caused by the edge of the leaf being lifted), and the image must include the complete leaf area;
[0091] S4: grayscale processing and binarization processing are performed on the initial image to obtain a tea leaf dyeing area image and a tea leaf outer contour image;
[0092] Specifically, the purpose of grayscale processing is to extract the region of interest of the image. The region of interest is a focus of image analysis. Because the image scale collected by the camera is large, and the actual tea leaves only occupy a small area of the collected image, in order to reduce interference and reduce the amount of data processing, a rectangular area is artificially set in the program. This area is just enough to put down a piece of tea leaves, and only the image in the rectangle is processed in the next step. The grayscale method is: use the OpenCV function library to process the image, use the Rect rectangle class to extract the region of interest for research, and convert the color RGB image into a grayscale image through the cvtColor() function. The effect after processing is as follows Figure 3 shown.
[0093] The purpose of binarization is to obtain the image of the tea shape and the stained area. The threshold segmentation method is adopted. This method is based on the difference in pixel values between the foreground and background in the image. By setting a suitable threshold, the segmentation of the target and the background is achieved, and useful information in the image is extracted. Common methods include global threshold segmentation and adaptive threshold segmentation. Through experimental comparison, the optimal segmentation threshold is between 48 and 80 and 135 and 150. This patent takes the first threshold as 60 and the second threshold as 140 as the segmentation threshold. When extracting the tea staining area, the image is set to black in the area where the image pixels are lower than the first threshold of 60, and the image is set to white in the area where the image pixels are higher than the first threshold of 60; when extracting the tea contour area, the image is set to black in the area where the image pixels are lower than the second threshold of 140, and the image is set to white in the area where the image pixels are higher than the second threshold of 140; OpenCV's global threshold segmentation function Threshold() is used to complete the image binarization. When the extraction threshold is set to 60, the extracted image is the color area image, and when the extraction threshold is set to 140, the extracted image is the contour image. The effect is as follows: Figure 4a and Figure 4b shown.
[0094] S5: Calculate the area of the outer contour region of the tea leaf and the area of the dyed region of the tea leaf;
[0095] Specifically, according to Figure 4a and Figure 4b , perform edge detection, extract the outer contour of the leaf and the outer contour of the dyed part. Use the findContours function method provided by OpenCV to find the contour in the image, and use the drawContours method to draw the contour. It is convenient to check whether the contour is correct, the effect is as follows Figure 5a and Figure 5b shown.
[0096] The wall breaking rate Ri is calculated based on the area Sb of the outer contour area and the area Sa of the dyed area:
[0097]
[0098] In some embodiments of the present invention, a comparison threshold is set, the dyed area of the tea leaves is processed, and the dyed area with an area smaller than the comparison threshold is eliminated; the area of the eliminated area is used as the area of the dyed area, and the wall breaking rate is calculated. Figure 6a and Figure 6b shown.
[0099] Specifically, the purpose of elimination is to eliminate detection interference by calculating the connected domain. Figure 5a and Figure 5bAs shown in the figure, when extracting the outline of the dyed part of the tea or the overall outer contour of the tea, there are always many small closed contours. These contours are caused by the breakage of the tea during rolling and the light spots during image acquisition. These contours will eventually affect the test results and produce error interference. In order to offset the inaccuracy of the interference on the experimental conclusion, the design uses the method of identifying the maximum connected domain to remove the small contours. The arcLength function method provided by OpenCV is used to find the small contours in the image. Through actual comparison, the contour perimeter is set to be greater than 50 pixels, which has a better effect; the drawContours method is used to draw the contour to facilitate the verification of whether the contour is correct.
[0100] In the aforementioned implementation, during the process of calculating the dyeing area, the outer contour of the tea leaves and the contour of the dyeing part have been identified, and the contour area in the image, namely the outer contour area Sa of the tea leaves and the contour area Sb of the dyeing part, can be directly obtained by using the contourArea function.
[0101] The damaged area of the leaves after rolling can be divided into 5 levels, 0 (unrolled), 1 (1% to 20% cell damaged area), 2 (21% to 40% cell damaged area), 3 (41% to 60% cell damaged area) and 4 (61% to 100% cell damaged area). In order to verify the effect of this method, a manual experiment method will be used to verify the accuracy of the method provided by the present invention. The verification effect shows that the wall-breaking rate detection method provided by the present invention accurately calculates the rolling wall-breaking rate of tea leaves.
[0102] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A tea leaf wall breaking rate detection system, characterized in that: include: Image acquisition device: used to acquire images of tea leaves after rolling and dyeing to obtain initial images; Processor, including: Grayscale processing unit: used to perform grayscale processing on the initial image; Binarization processing unit: can perform binarization processing on the image processed by the grayscale processing unit, and obtain the image of the dyed area of the tea leaves by setting the first threshold value; and obtain the image of the outer contour of the tea leaves by setting the second threshold value; Contour extraction unit: used to extract the area of the outer contour of the tea leaf, and to extract the area of the dyed area of the tea leaf; The wall breaking rate calculation unit is used to calculate the wall breaking rate Ri according to the area Sb of the outer contour area and the area Sa of the dyeing area; the wall breaking rate calculation unit calculates the wall breaking rate Ri according to the following method:
2. The tea leaf wall breaking rate detection system according to claim 1, characterized in that: Further including: Connected domain calculation unit: used to remove the stained area whose area is smaller than the comparison threshold according to the set comparison threshold; The wall-breaking rate calculation unit calculates the wall-breaking rate of tea leaves according to the area of the removed color region.
3. The tea leaf wall breaking rate detection system according to claim 1, characterized in that: The contour extraction unit extracts the outer contour area of the tea leaves and the dyed area of the tea leaves according to the pixel points.
4. The tea leaf wall breaking rate detection system according to claim 1, characterized in that: Further including: The LED light board is used to carry tea leaves, and the image acquisition device is located above the LED light board to acquire images of the tea leaves.
5. The tea leaf wall breaking rate detection system according to claim 4, characterized in that: Further including: Base: The LED light panel is arranged on the base; Lifting bracket: set on the base; The image acquisition device is installed on a lifting bracket and can move toward or away from the LED light panel.
6. The tea leaf wall breaking rate detection system according to claim 1, characterized in that: Further including: An image display communicates with the processor to obtain images of tea leaves at various processing stages in real time.
7. The method for detecting the tea leaf wall breaking rate according to claim 1, characterized in that: The first threshold is set to 48 to 80 pixels, and the second threshold is set to 135 to 150 pixels.
8. A method for detecting tea leaf wall breaking rate, characterized in that: The following steps are involved: Rolling the tea leaves; Dyeing the rolled tea leaves; Collect the initial image of the tea leaves after dyeing; The initial image is gray-scaled and binarized to obtain the image of the dyed area of the tea leaves, and The outer contour image of tea leaves; setting a first threshold and a second threshold, when extracting tea staining areas, the image is set to black in areas where the image pixels are lower than the first threshold, and the image is set to white in areas where the image pixels are higher than the first threshold; when extracting tea contour areas, the image is set to black in areas where the image pixels are lower than the second threshold, and the image is set to white in areas where the image pixels are higher than the second threshold; Calculate the area of the outer contour of the tea leaf and the area of the dyed area of the tea leaf; The wall breaking rate Ri is calculated based on the area Sb of the outer contour area and the area Sa of the dyed area:
9. The method for detecting tea leaf wall breaking rate according to claim 8, characterized in that: A comparison threshold is set, the dyed area of the tea leaves is processed, and the dyed area with an area smaller than the comparison threshold is eliminated; the area of the eliminated area is taken as the area of the dyed area, and the wall breaking rate is calculated.
10. The method for detecting tea leaf wall breaking rate according to claim 9, characterized in that: The comparison threshold is set to a stained area contour perimeter greater than 50 pixels.
Citation Information
Patent Citations
Method for identifying tea leaves based on colors and shapes
CN102521564A
Tea leaf grade identification method based on image recognition technology
CN104914105A