A method and system for identifying tea quality

By acquiring tea leaf inspection images and analyzing individual areas to determine integrity, and specifically addressing obstructions and impurities, the system solves the problem of low accuracy caused by obstructions and damage in tea quality identification systems, achieving efficient identification of tea quality and precise removal of impurities.

CN122430352APending Publication Date: 2026-07-21HANGZHOU FANGLONG TEA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANGZHOU FANGLONG TEA CO LTD
Filing Date
2026-04-07
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing tea quality identification systems have low accuracy when obscured, damaged, or contaminated, leading to inaccurate tea quality identification.

Method used

By acquiring images of tea leaves, analyzing individual tea leaf areas and determining their integrity, the quality of intact tea leaves can be directly identified. For incomplete tea leaves, the area and type of obstruction can be further determined, and targeted actions such as outputting damage signals, flattening the tea leaves, or removing impurities can be performed.

Benefits of technology

It improves the accuracy of tea quality identification, solves the problem of inaccurate quality identification caused by obstruction, damage and impurities, and achieves precise screening of small impurities and safe removal of obstructions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122430352A_ABST
    Figure CN122430352A_ABST
Patent Text Reader

Abstract

The application relates to a tea quality identification method and system, and relates to the field of tea processing quality monitoring technology, which comprises the following steps: acquiring a tea detection image on a detection platform; obtaining a single tea leaf area; performing integrity analysis on the single tea leaf area to determine an integrity result; when the integrity result is a preset complete result, directly identifying tea quality according to the tea detection image; when the integrity result is a preset incomplete result, determining a shielding object area according to the single tea leaf area in the tea detection image; performing analysis on the shielding object area according to tea characteristics and a preset background color characteristic to determine a shielding type; when the shielding type is a preset gap type, outputting a tea damage signal; when the shielding type is a preset tea type, adopting a preset flattening operation; and when the shielding type is neither the gap type nor the tea type, adopting a preset impurity removal operation. The application has the effect of improving the accuracy of tea quality identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of tea processing quality monitoring technology, and in particular to methods and systems for tea screening and quality testing. Background Technology

[0002] As a globally important economic crop and beverage, tea's quality directly determines its market value and consumer drinking experience. Tea quality assessment involves multiple dimensions, with physical characteristics serving as a key basis for rapid sorting and preliminary grading. In traditional production, quality identification primarily relies on manual sensory evaluation. This method is not only inefficient and labor-intensive but also susceptible to the influence of subjective factors, fatigue levels, and ambient lighting, leading to inconsistent sorting standards. With the development of the tea industry towards large-scale and standardized operations, utilizing modern technologies to achieve objective, rapid, and accurate identification and sorting of tea quality has become an urgent need to improve the automation level of tea processing, ensure product quality stability, and optimize resource allocation.

[0003] Currently, the most common methods used in the industry for machine-based tea quality identification are primarily based on machine vision technology and photoelectric color sorting principles. These systems typically utilize conveyor belts to allow tea leaves to fall freely in a single layer or spread out in a flat surface. High-resolution industrial cameras capture images of the tea leaves, and image processing algorithms extract features such as color, texture, and shape. These images are then used to control actuators to remove substandard tea leaves. Some advanced equipment also incorporates near-infrared spectroscopy or multispectral imaging technology to obtain richer information about the tea's internal components. These automated sorting devices have, to some extent, replaced manual labor, improving production efficiency and sorting consistency, and have become standard equipment in modern tea processing plants.

[0004] Regarding the aforementioned technologies, when tea leaves on the conveyor belt are obstructed by objects that block the camera's view, or when there is unavoidable stacking, sticking, or mutual obstruction, the tea leaves on the lower layer may be completely blocked by the upper-layer obstruction or the tea leaves themselves, causing the visual system to misjudge and reducing the recognition accuracy. There is still room for improvement. Summary of the Invention

[0005] To improve the accuracy of tea quality identification, this invention provides a method and system for identifying tea quality.

[0006] In a first aspect, the present invention provides a method for identifying tea quality, employing the following technical solution: A method for identifying tea quality includes: Step 1: In response to the preset recognition signal, acquire the tea detection image on the detection platform; Step 2: Analyze the tea detection image based on the preset tea characteristics to obtain the individual tea leaf region; Step 3: Perform integrity analysis on individual tea leaf areas to determine the integrity results; Step 4: When the integrity result is the preset integrity result, directly identify the tea quality based on the tea detection image; Step 5: When the integrity result is the preset incomplete result, determine the occlusion area in the tea detection image based on the single tea leaf area; Step 6: Analyze the area of ​​the obscured object based on the characteristics of the tea leaves and the preset background color to determine the type of obscuration; Step 7: When the type of obstruction is a preset type of notch, output a tea leaf damage signal; Step 8: When the type of tea to be covered is a preset type, perform the preset flattening operation; Step 9: When the type of obstruction is not a gap type or a tea type, perform the preset impurity removal operation.

[0007] By adopting the above technical solution, the tea detection image is obtained in response to the recognition signal. The tea leaf area is extracted through tea feature analysis and the integrity is judged. The quality of complete tea leaves is directly identified. For incomplete tea leaves, the area and type of obstruction are further determined, and targeted measures such as outputting damage signals, flattening tea leaves, or removing impurities are performed. This solves the problem of inaccurate quality identification caused by obstruction, damage, and impurities in tea detection, and improves the accuracy of tea quality identification.

[0008] Optionally, when the type of obstruction is not a gap type or a tea type, the preset impurity removal operation methods include: Step 90: Control the suction device below the detection platform to continuously suction air from the tea leaves on the detection platform; Step 91: Calculate the area of ​​the occlusion based on the occlusion area in the tea leaf detection image; Step 92: If the area of ​​the obstruction is smaller than the preset drainage area, perform the preset vibration operation; Step 93: If the area of ​​the obstruction is larger than the preset allowable area, control the robotic arm to grab and remove the obstruction corresponding to the obstruction area and obtain the first removed image after grabbing and removing it. Step 94: Analyze the first removed image based on the characteristics of the tea leaves to obtain the unoccluded tea leaf area after occlusion removal, and repeat step 3; Step 95: If the integrity result is still incomplete, repeat steps 90 to 93 until the area of ​​the obstruction remains unchanged, then output a preset signal that it cannot be removed.

[0009] By adopting the above technical solution, the air suction device is first controlled to fix the tea leaves, and then the area of ​​the obstruction is calculated. Depending on the size of the area, vibration operation (small area impurities) or robotic arm grasping and removal (large area impurities) is adopted respectively. After grasping, the image analysis is used to verify and the integrity of the tea leaves is re-detected. If it is still not complete, the operation is repeated until the area of ​​the obstruction remains unchanged and a signal that it cannot be removed is output. This achieves the effect of targeted removal of different impurities and improves the accuracy of tea impurity removal.

[0010] Optionally, if the area of ​​the obstruction is smaller than the preset allowable leakage area, the preset vibration operation method includes: Step 920: Control the detection platform to vibrate at a preset small-amplitude high-frequency frequency so that the obstruction is sucked to the waste area by the suction device; Step 921: Obtain the vibration detection image corresponding to the occluded area; Step 922: Analyze the vibration detection image based on the characteristics of tea leaves to obtain the vibration area of ​​a single piece; Step 923: Perform integrity analysis on the vibrating single-piece region to determine the integrity results; Step 924: If the integrity result is still incomplete, continue to control the detection platform to vibrate at a small amplitude high frequency and accumulate the vibration time; Step 925: When the vibration duration reaches the preset duration threshold and the integrity result is still incomplete, output the signal that cannot be removed; Step 926: When the vibration duration reaches the preset duration threshold and the integrity result is complete, stop the vibration operation.

[0011] By adopting the above technical solution, the detection platform is controlled to vibrate at a preset small amplitude high frequency. In conjunction with the air suction device, small obstructions are adsorbed to the waste area. After obtaining the vibration detection image and analyzing the vibration single area, the integrity is checked. If it is still incomplete, the vibration continues and the duration is accumulated. When the duration reaches the threshold, the signal that it cannot be removed or the vibration is stopped is output according to the integrity result. This solves the problems of incomplete removal of small impurities and ineffective control of vibration operation, and achieves the effect of precise screening of small impurities.

[0012] Optionally, methods for controlling the robotic arm to grasp and remove obstructions corresponding to the obstruction area include: Step 930: Divide the tea leaf detection image into four surrounding regions based on the occlusion area and according to the preset surrounding region range; Step 931: Identify the tea leaf detection images corresponding to the area surrounding the occluded object according to the characteristics of the tea leaves to obtain the identification results; Step 932: If all the identification results contain tea leaf features, control the robotic arm to directly grab and remove the occluded objects corresponding to the occluded areas; Step 933: If any recognition result does not have the tea leaf feature, define the recognition result without the tea leaf feature as a result without tea leaves, and define the area around the occluded object corresponding to the result without tea leaves as a region without tea leaves. Step 934: Control the robotic arm to move the obstruction from the obstruction area to the tea-free area.

[0013] By adopting the above technical solution, four surrounding areas are divided with the area of ​​the obstruction as the center and the characteristics of tea leaves are identified. Depending on whether there are tea leaves in the surrounding areas, the obstruction is directly grasped or moved to the area without tea leaves. This solves the problem that the robotic arm is prone to damaging the surrounding tea leaves when grasping the obstruction and that the grasping operation lacks specificity, and effectively protects the integrity of the surrounding tea leaves.

[0014] Optionally, it also includes a processing method if all identification results contain tea-like characteristics, the method including: Step 9320: Calculate the proportion of tea leaves in each tea leaf area around the occluded object according to the tea leaf characteristics of the tea leaf detection image corresponding to the area around the occluded object; Step 9321: Based on the proportion of tea leaves in the area surrounding each obstruction, select the area surrounding the obstruction with the smallest proportion of tea leaves, define the area surrounding the obstruction with the smallest proportion of tea leaves as the low proportion area, and define the area surrounding the obstruction outside the low proportion area as the high proportion area. Step 9322: Control the blowing device to blow the tea leaves from the low-percentage area to the high-percentage area, and then control the robotic arm to move the obstruction from the obstruction area to the low-percentage area.

[0015] By adopting the above technical solution, the proportion of tea leaves in each area around the obstruction is calculated to screen out the low proportion area with the lowest tea leaf coverage. The tea leaves in the low proportion area are then blown to the high proportion area using a blowing device. The robotic arm is then controlled to move the obstruction toward the low proportion area. This method solves the problem that when the obstruction is covered by tea leaves, the robotic arm may damage the tea leaves, making it difficult to remove the obstruction safely. This protects the integrity of the surrounding tea leaves.

[0016] Optionally, it also includes a processing method when the integrity result is a preset integrity result, the method including: Step 40: Analyze the tea leaf detection image based on the characteristics of the tea leaves and the background color to obtain the foreign object region; Step 41: Based on the foreign object area, divide the tea leaf detection image into four foreign object surrounding areas according to the preset surrounding area range and execute steps 9320 to 9322; Step 42: Based on the tea leaf detection image and the foreign object region, find the local tea leaf image corresponding to the foreign object region; Step 43: Analyze the local tea leaf image based on the characteristics of the tea leaves to obtain local single-piece regions and then execute steps 3 to 9.

[0017] By adopting the above technical solution, the method of removing the foreign object area by eliminating the tea leaf characteristics and background color characteristics, dividing the area around the foreign object and performing tea leaf blowing and robotic arm prying operations to remove the foreign object, and then extracting local tea leaf images for analysis to obtain local single-piece areas and re-performing the whole process detection, solves the problem of missing quality identification due to foreign objects obstructing the surface of the whole tea leaf, and achieves the effect of accurate removal of foreign objects.

[0018] Optionally, methods for acquiring tea detection images on the detection platform include: Step 10: In response to a preset flipping signal, acquire an image of the tea leaves on the detection platform; Step 11: Based on the characteristics of tea leaves, perform image recognition on the tea leaf image to obtain the edge point and center point of each tea leaf. Define the direction from the center point to the edge point of each tea leaf as the blowing direction of a single leaf. Step 12: Count the frequency of the blowing direction of each individual tea leaf, and define the blowing direction of the individual tea leaf with the highest frequency as the overall blowing direction; Step 13: Control the blowing device to blow the tea leaves on the testing platform along the overall blowing direction and at the preset oblique blowing angle. At the same time, control the suction device below the testing platform to adsorb the tea leaves on the testing platform at the preset low suction level and accumulate the turning time. Step 14: When the flipping time reaches the preset maximum flipping time, control the blowing device to stop blowing, and at the same time control the suction device to stop suctioning, and trigger the preset recognition signal to obtain the tea detection image on the detection platform.

[0019] By adopting the above technical solution, the method of acquiring tea images in response to the flipping signal, identifying the edge and center points of individual tea leaves to determine the blowing direction of a single leaf, obtaining the overall blowing direction by counting the frequency, controlling the blowing device to blow at an oblique angle along this direction, and combining this with low-power suction to adsorb tea leaves and accumulate the flipping time, stopping the operation when the maximum time is reached and triggering the identification signal to acquire the detection image, solves the problem of incomplete detection image information and inaccurate quality identification caused by tea leaf stacking and uneven flipping, and improves the accuracy and comprehensiveness of detection.

[0020] Optionally, methods for obtaining the edge points and center points of each tea leaf by performing image recognition on the tea leaf image based on tea leaf characteristics include: Step 110: Perform image processing on the tea leaf image based on the characteristics of the tea leaves to obtain all independent tea leaf regions in the tea leaf image; Step 111: Calculate the tea area of ​​all tea regions based on the tea region; Step 112: If the area of ​​the tea leaves is greater than the preset area threshold, then perform the flattening operation and repeat steps 110 to 111 until the area of ​​the tea leaves is less than the preset area threshold. Step 113: If the area of ​​the tea leaves is smaller than the preset area threshold, perform image recognition on the tea leaf image based on the characteristics of the tea leaves to obtain the edge points and center points of each tea leaf.

[0021] By adopting the above technical solution, image processing is performed on tea leaf images to obtain independent tea leaf regions and calculate their areas. When the area is greater than a threshold, overlapping tea leaves are separated by a flattening operation and the area is recalculated until the area meets the requirements. Then, the edge points and center points of the tea leaves are extracted. This method solves the problem that excessive overlap and stacking of tea leaves makes it impossible to accurately identify the features of individual tea leaves and achieves accurate identification of the morphological features of individual tea leaves.

[0022] Optionally, it also includes a processing method if the tea leaf area is still larger than a preset area threshold, the method including: Step 1120: Control the suction device to adsorb and fix the tea leaves on the detection platform according to the preset single leaf adsorption block, and at the same time control the blowing device to blow the tea leaves on the detection platform according to the preset horizontal blowing direction to achieve the flat laying of the tea leaves. Step 1121: Obtain a flat image of the tea leaves on the detection platform; Step 1122: Perform image processing on the tea leaf paving image based on the characteristics of the tea leaves to obtain all independent tea leaf paving areas and their corresponding tea leaf paving areas; Step 1123: When the tea leaf area is greater than the area threshold, repeat steps 1120 to 1122 until the tea leaf area is less than the area threshold. Step 1124: When the flat area of ​​the tea leaves is less than the area threshold, perform image recognition on the tea leaf image based on the characteristics of the tea leaves to obtain the edge points and center points of each tea leaf.

[0023] By adopting the above technical solution, the air suction device is controlled to fix the tea leaves with a single leaf adsorption block, and the air blowing device is used to lay the tea leaves flat along the horizontal air blowing direction. The flat image is obtained and the flat area of ​​the tea leaves is calculated. When the area is greater than the threshold, the flat operation is repeated until the target is reached. Finally, the edge points and center points of the tea leaves are extracted. This method solves the problem of difficulty in recognizing single tea leaf features caused by excessive stacking of tea leaves, and realizes the effective flat laying of tea leaves and accurate extraction of single tea leaf features.

[0024] Secondly, the present invention provides a system for identifying tea quality, employing the following technical solution: A system for identifying tea quality includes: The acquisition module is used to acquire images of tea leaves, vibration detection images, tea leaves, and flat-lay tea leaves. A memory for storing a program for identifying tea quality as described above; The processor loads and executes programs from memory.

[0025] By adopting the above technical solution, the tea detection image is obtained in response to the recognition signal. The tea leaf area is extracted through tea feature analysis and the integrity is judged. The quality of complete tea leaves is directly identified. For incomplete tea leaves, the area and type of obstruction are further determined, and targeted measures such as outputting damage signals, flattening tea leaves, or removing impurities are performed. This solves the problem of inaccurate quality identification caused by obstruction, damage, and impurities in tea detection, and improves the accuracy of tea quality identification.

[0026] In summary, the present invention has at least one of the following beneficial technical effects: This solves the problem of inaccurate quality identification in tea testing caused by obstruction, damage, and interference from impurities, and improves the accuracy of tea quality identification. It solves the problems of incomplete removal of small impurities and ineffective control of vibration operation, and achieves the effect of precise screening of small impurities; This invention solves the problem that when the surrounding area of ​​an obstruction is covered by tea leaves, the robotic arm may damage the tea leaves, making it difficult to remove the obstruction safely, thus protecting the integrity of the surrounding tea leaves. Attached Figure Description

[0027] Figure 1 This is a flowchart of a method for identifying tea quality in an embodiment of this application. Detailed Implementation

[0028] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments.

[0029] This invention discloses a method for identifying tea quality. (Refer to...) Figure 1 One method for identifying tea quality includes: Step 1: In response to the preset recognition signal, acquire the tea detection image on the detection platform.

[0030] The identification signal refers to the instruction signal that triggers the start of the tea quality identification process. The identification signal is preset by those skilled in the art and is generated through manual triggering (such as buttons or touch commands), timed triggering by the equipment, and triggering by external sensors (such as a sensor indicating that the tea feeding is complete).

[0031] The testing platform is a specialized support structure used to hold the tea leaves to be tested. It is made of breathable mesh material and has a continuous, uniform breathable structure. In conjunction with the suction device below, the platform creates a negative pressure airflow through the mesh, achieving adsorption and fixation of the tea leaves. Simultaneously, the color characteristics of the testing platform differ significantly from those of the tea leaves, assisting the image recognition system in distinguishing between tea-covered areas and non-tea-covered areas (obstacles, background, etc.). The testing platform is constructed using a pre-selected breathable mesh material by those skilled in the art. Industrial color matching processes are used to color-process the breathable mesh, ensuring its base color clearly distinguishes it from the tea leaves. The completed breathable mesh testing platform is installed directly below the image acquisition area of ​​the image acquisition device, ensuring that the negative pressure adsorption range of the suction device covers the entire effective testing area of ​​the platform.

[0032] Tea inspection images refer to digital images containing both tea leaves and the inspection platform. These images are captured in real-time by image acquisition devices (industrial cameras, webcams, etc.) deployed above or to the side of the inspection platform in response to a recognition signal.

[0033] Step 2: Analyze the tea detection image based on the preset tea characteristics to obtain the single tea leaf region.

[0034] Tea characteristics refer to a set of features representing attributes such as shape, texture, color, outline, and size of tea leaves, which can be used to distinguish tea-growing areas from non-tea-growing areas. Tea characteristics are obtained by experts in the art through the calibration of image features of standard tea samples collected in advance (such as edge contour features, color gamut features, texture features, and area threshold features).

[0035] A single tea leaf region refers to the pixel region corresponding to a single, leaf-shaped tea leaf that is segmented and identified in a tea leaf detection image after tea leaf feature analysis. It is the basic unit of image analysis. The single tea leaf region is obtained as follows: The tea leaf detection image is preprocessed, and the background and foreground regions are segmented based on tea leaf features and the background color features of the detection platform. The foreground region consists of pixel regions containing non-platform background objects such as tea leaves, occlusions, and impurities. Connectivity analysis, tea leaf feature matching, and adhesion segmentation algorithms are then performed on the foreground region to separate independent pixel regions that conform to the morphological characteristics of a single tea leaf, i.e., the single tea leaf region.

[0036] Step 3: Perform integrity analysis on individual tea leaf areas to determine the integrity results.

[0037] Integrity results refer to the output of integrity analysis, which are divided into complete results (the single tea leaf area is a complete tea leaf) and incomplete results (the single tea leaf area has problems such as occlusion, damage, and defects). Integrity results are obtained by comparing and calculating core morphological parameters such as contour integrity, area matching degree, and texture or color uniformity of the extracted single tea leaf area. Contour integrity is calculated by measuring the variance of the distance from the contour points of the single tea leaf area to the center of the fitted ellipse or circle of the standard tea leaf template (or the convex hull of the area). Area matching degree is calculated by comparing the area of ​​the area with a preset standard single tea leaf area range (e.g., 50 square millimeters to 150 square millimeters), or by calculating the ratio of the area of ​​the area to the area estimated by the minimum bounding rectangle. Texture or color uniformity is calculated by measuring the variance of the color space within the area, or the statistical value of the texture features. Each parameter is numerically compared with the critical parameters for complete tea leaf morphology obtained by pre-calibrating tea leaf samples. When all core morphological parameters meet the integrity threshold criteria, the result is considered complete; if any core morphological parameter does not meet the integrity threshold, the result is considered incomplete.

[0038] Step 4: When the integrity result is the preset integrity result, directly identify the tea quality based on the tea detection image.

[0039] A complete result refers to a single tea leaf area that conforms to the morphological characteristics of a complete tea leaf, without obvious occlusion, damage, or defects. A complete result is determined by comparing the image features with those of a calibrated complete tea leaf sample, such as an outline integrity greater than or equal to 95% and the absence of obvious missing areas.

[0040] When the integrity result is the preset integrity result, it means that the tea leaves are in good shape and have no structural defects. At this time, the quality of the tea leaves can be identified and judged directly based on the tea leaf inspection image and the image recognition algorithm.

[0041] Step 5: When the integrity result is the preset incomplete result, determine the occlusion area in the tea detection image based on the single tea leaf area.

[0042] Incomplete results refer to situations where a single tea leaf area is obscured, damaged, or incomplete, failing to conform to the morphological characteristics of a complete tea leaf. Incomplete results are mutually exclusive with complete results, such as when the outline integrity is less than 95% or when there are non-tea leaf obscured areas.

[0043] Occlusion regions refer to pixel areas in a tea leaf detection image that cover a single tea leaf area and do not belong to the characteristics of tea leaves. They are interference areas that cause the tea leaf to be incomplete. Occlusion regions are identified by image analysis based on the single tea leaf area and the characteristics of tea leaves, and the areas in the image that do not match the characteristics of tea leaves and cover the tea leaf area are called occlusion regions.

[0044] When the integrity result is the preset incomplete result, it indicates that there is occlusion or damage in the tea area. In this case, it is necessary to determine the specific area of ​​the occlusion based on the tea detection image.

[0045] Step 6: Analyze the area of ​​the obscured object based on the characteristics of the tea leaves and the preset background color to determine the type of obscuration.

[0046] Background color features refer to the base color of the detection platform, the color of the background environment, and other background features that are not tea leaves or obstructions. Background color features are preset by those skilled in the art.

[0047] Occlusion type refers to the result of classifying the types of occlusion objects within an occlusion area. The occlusion type is determined by combining tea leaf characteristics and background color characteristics, performing image recognition and feature matching on the occlusion area, and comparing it with a pre-defined occlusion object type database.

[0048] The occlusion object category library stores the mapping relationship between occlusion object features and occlusion object classifications. Occlusion object features include color features, contour features, and texture features, while occlusion object classifications include gap types, tea leaf types, and impurity types. The occlusion object category library was established by those skilled in the art by collecting sample images containing tea leaf gaps, overlapping tea leaves, and various impurities, extracting the visual features of various target areas, and associating them with corresponding classification labels.

[0049] Step 7: When the type of obstruction is the preset type of gap, output a tea leaf damage signal.

[0050] The type of gap refers to the obstruction that causes damage to a single tea leaf (essentially, the damaged area of ​​the tea leaf itself). The type of gap is determined by pre-labeling the image features of damaged tea samples, such as the shape, location, and area of ​​the damaged area matching the characteristics of tea leaf damage.

[0051] A tea leaf breakage signal is a signal used to indicate that a single tea leaf is damaged. The tea leaf breakage signal is preset by those skilled in the art and can be implemented through audible and visual alarms, device marking, or other methods.

[0052] When the type of obstruction is a preset type of notch, it indicates that the single tea leaf has structural defects such as self-damage, missing corners, or breakage, and the system outputs a tea leaf damage signal.

[0053] Step 8: When the type of tea to be covered is a preset type, perform the preset flattening operation.

[0054] The tea type refers to an obscuring object that is another tea leaf (not the current single tea leaf, thus constituting overlapping obscuring). The tea type is preset by a person skilled in the art. By identifying areas where the obscuring object's characteristics match those of tea leaves but do not belong to the current single tea leaf area, it is determined to be tea type obscuring.

[0055] The leveling operation refers to the process of separating and spreading out overlapping tea leaves. The leveling operation involves: when the obstruction is tea leaves, a robotic arm is controlled to spread out the tea leaves that are obstructed due to excessive overlap. The robotic arm can be a desktop-sized small four-axis or six-axis robotic arm, with replaceable flexible grippers and paddles at its end. The grippers are used to grasp larger objects, and the paddles are used to move tea leaves or small objects. An image acquisition device is used to acquire images of the stacked tea leaf area, extracting the contour and position information of each tea leaf. Based on the leaf contour, stacking level, and geometric feature analysis, the gripping points and spreading points are determined. Path laying: The gripping point is selected at the geometric center of the upper layer of tea leaves or the base of the petiole to ensure that the clamping force is evenly distributed in the middle of the leaf and avoid damage. The laying path is planned as follows: starting from the gripping point, the paddle moves slowly along the leaf extension direction, and the lower layer of tea leaves is separated in an orderly manner through layered paddle movements. The robotic arm adopts a force-position hybrid control strategy, approaching the tea leaves at a low speed before contact and providing real-time feedback on the clamping force and contact position after contact. For example, the clamping force is controlled within the range of 0.5N to 2N, and a resistance control algorithm is used to achieve flexible contact and prevent tea leaf breakage. The leveling operation is a hardware operation procedure pre-set by those skilled in the art.

[0056] When the type of tea being covered is a preset type, it indicates that the object being detected is normal tea. At this time, the robotic arm is controlled to flatten the tea.

[0057] Step 9: When the type of obstruction is not a gap type or a tea type, perform the preset impurity removal operation.

[0058] The impurity removal operation refers to the removal of obstructions that are not tea leaves or notches. The impurity removal operation involves: when the obstruction is neither a notch nor a tea leaf, acquiring an image of the tea leaf area using an image acquisition device, identifying the location and shape of the impurity to determine its precise coordinates; and controlling a robotic arm to plan a path from the current position to the impurity's coordinates to remove the impurity. The impurity removal operation is a pre-set hardware operation procedure by those skilled in the art.

[0059] When the type of obstruction is not a gap type or a tea type, it indicates that there are impurities or foreign objects other than tea in the obstructed area, and the impurity removal operation needs to be triggered to remove the obstruction.

[0060] When the type of obstruction is not a gap type or a tea type, the preset impurity removal methods include: Step 90: Control the suction device below the detection platform to continuously suction air from the tea leaves on the detection platform.

[0061] The suction device is a negative pressure fan capable of providing uniform negative pressure adsorption. Its air volume must be sufficient to ensure that the tea leaves adhere stably to the surface of the testing platform during the suction process, preventing displacement or stacking. When selecting a specific model, those skilled in the art can choose a miniature negative pressure fan with an air volume of not less than 3.5 m³ / min and a static pressure of not less than 500 Pa, based on the size of the testing platform, the diameter of the air vent mesh, and the weight of the tea leaves.

[0062] Step 91: Calculate the area of ​​the occlusion based on the occlusion area in the tea leaf detection image.

[0063] The occlusion area refers to the total pixel area of ​​the occlusion region, calculated in pixels. The occlusion area is calculated by binarizing the image, counting the pixels in the occlusion region, and then using the conversion relationship between the pixel dimensions defined in the image and the actual physical dimensions to obtain the actual area of ​​the occlusion.

[0064] Step 92: If the area of ​​the obstruction is smaller than the preset area that can be leaked, perform the preset vibration operation.

[0065] The allowable leakage area refers to the maximum area threshold that allows impurities to fall naturally through the vents and other structures of the testing platform. The allowable leakage area is determined by those skilled in the art using standard impurity samples (e.g., 0.5 mm to 3 mm) to test the critical area of ​​the vents, and the threshold can be set to 10 mm² to 20 mm².

[0066] Vibration operation refers to using a driving vibration device to generate periodic vibrations on the detection platform, utilizing physical vibration to cause obstructions to fall due to gravity or inertia, suitable for removing small obstructions. Vibration operation uses a miniature electromagnetic vibrator fixed below the detection platform. By adjusting the vibration frequency and amplitude (e.g., vibration parameters of 50Hz to 100Hz frequency and 0.5mm to 1mm amplitude), it is adapted to the low-intensity vibration required for tea detection, preventing tea leaves from scattering.

[0067] If the area of ​​the obstruction is smaller than the preset allowable drainage area, it means that the obstruction can fall naturally through the leakage structure of the detection platform, triggering the preset vibration operation to help it fall and be cleaned up.

[0068] Step 93: If the area of ​​the obstruction is larger than the preset allowable area, control the robotic arm to grab and remove the obstruction corresponding to the obstruction area and obtain the first removed image.

[0069] The first removed image refers to the image of the inspection platform captured in real time after the robotic arm completes the grasping and removal of the obstruction. The first removed image is obtained by an image acquisition device (such as an industrial camera) fixed directly above the inspection platform, triggered by the robotic arm's grasping action.

[0070] If the area of ​​the obstruction is larger than the preset allowable leakage area, it means that the size of the obstruction is too large to be naturally leaked through the leakage structure of the detection platform, nor can it be removed by simple operations such as vibration. At this time, the robotic arm is controlled to accurately position itself in the area where the obstruction is located, grab and remove the obstruction. After the removal operation is completed, the first removal image is captured and obtained. The first removal image is used to verify the effect of the robotic arm grabbing the obstruction.

[0071] Step 94: Analyze the first removed image based on the characteristics of the tea leaves to obtain the unobstructed tea leaf area after occlusion removal, and repeat step 3.

[0072] The unobstructed tea leaf region refers to the pixel region corresponding to a single tea leaf that is segmented and identified after the robotic arm has grasped and removed the occluded object and performed tea leaf feature analysis on the first removed image. The unobstructed tea leaf region is obtained as follows: After the robotic arm completes the occlusion removal operation and obtains the first removed image, an instance segmentation algorithm is used to extract, segment, and match the image based on preset tea leaf features. The independent pixel regions that conform to the morphological characteristics of a single tea leaf are then identified as the unobstructed tea leaf region.

[0073] Re-execution of step 3 refers to performing an integrity analysis on the unobstructed tea leaf area to obtain the integrity results corresponding to the unobstructed tea leaf area.

[0074] Step 95: If the integrity result is still incomplete, repeat steps 90 to 93 until the area of ​​the obstruction remains unchanged, then output a preset signal that it cannot be removed.

[0075] The "Cannot be removed" signal is an output prompt signal when the area of ​​an obstruction remains unchanged after multiple operations, indicating that the obstruction cannot be removed by the current operations. The "Cannot be removed" signal is pre-set by those skilled in the art and output through industrial control terminals, audible and visual alarms, and upper-level computer prompt boxes. Signal types include visual signals (flashing red indicator light), audible signals (buzzer alarm), and text signals (system interface prompt "Obstruction cannot be removed"). If the change rate of the obstruction area is less than 5% after three consecutive impurity removal operations, it is considered to remain unchanged.

[0076] If the integrity result is still incomplete, it means that after the previous operations such as air intake and vibration, there are still obstructions that have not been removed (such as impurities that have not been cleaned or foreign objects that have not been completely removed), and these obstructions are still affecting the accuracy of tea detection. At this time, steps 90 to 93 (continuous air intake, calculation of the obstruction area and selection of processing method based on the area) need to be repeated until the obstruction area is detected to no longer change (i.e., the obstruction cannot be removed after multiple processing). Then, an unremovable signal is output, indicating that the obstruction cannot be removed by the existing method or is an identification error, and staff need to be prompted to handle it.

[0077] If the area of ​​the obstruction is smaller than the preset allowable leakage area, the preset vibration operation method includes: Step 920: Control the detection platform to vibrate at a preset small-amplitude high-frequency frequency so that the obstruction is sucked to the waste area by the suction device.

[0078] Small amplitude high frequency refers to the combination of vibration frequency and vibration amplitude parameters of the vibration device when the detection platform performs vibration operation. "Small amplitude" corresponds to the vibration amplitude parameter of the vibration device, indicating the displacement range of the vibration to prevent the tea leaves from shifting, piling up, or breaking due to vibration. "High frequency" corresponds to the vibration frequency parameter of the vibration device, indicating the number of vibrations per unit time. The inertia of high-frequency vibration is used to detach small obstructions from the tea leaf surface and allow them to be adsorbed by the suction device. The small amplitude high frequency is determined by those skilled in the art through vibration parameter calibration experiments using multiple types of tea leaves and impurity samples, combined with the breathable mesh structure of the detection platform. The vibration frequency and amplitude parameters are selected based on the criteria of no shifting, piling up, or breaking of the tea leaves and effective removal of obstructions. After being input into the corresponding device, the parameters are further refined according to the thickness, weight, and other characteristics of the tea leaves to ultimately determine the optimal parameter combination suitable for the detection scenario, such as a frequency of 50Hz to 100Hz and an amplitude of 0.5mm to 1mm.

[0079] In this step, the vibration operation uses the same device as in step 92. The coordination of vibration and suction can be divided into three stages: First, before vibration starts, the suction device operates at a low suction level for 0.5 to 1 second, gently pressing the tea leaves against the surface of the detection platform. Second, the vibration device is activated at a small, high-frequency vibration (50Hz to 100Hz, amplitude 0.5mm to 1mm), while the suction power of the suction device is switched to a lower holding suction level. This suction power is only enough to prevent the tea leaves from bouncing due to vibration, but not enough to suck them into the waste area. This stage lasts for 1 to 2 seconds. Third, after vibration stops, the suction device returns to a low suction level or a slightly higher collecting suction level for 0.5 to 1 second, sucking any small obstructions that have detached into the waste area. These three stages constitute one impurity removal cycle, which can be performed continuously for 2 to 3 cycles.

[0080] The waste collection area is a dedicated area for collecting small obstructions (impurities) that have been adsorbed by the suction device after vibration operation. The waste collection area is constructed by those skilled in the art, with a waste collection box and waste channel structure below the testing platform that matches the negative pressure adsorption range of the suction device. This structure is connected to the ventilation net of the testing platform, allowing small obstructions adsorbed by the suction device to fall into the waste collection area through the ventilation net.

[0081] Step 921: Obtain the vibration detection image corresponding to the occluded area.

[0082] Vibration detection images refer to digital images captured during the vibration operation of a testing platform, including the state of the tea leaves, the testing platform, and any obstructions after vibration. Vibration detection images are obtained by triggering image acquisition devices (industrial cameras, webcams, etc.) deployed above the testing platform to capture real-time images of the obstructed area after the platform initiates vibration operation according to preset parameters.

[0083] Step 922: Analyze the vibration detection image based on the characteristics of tea leaves to obtain the vibration single-piece region.

[0084] A vibrating single-piece region refers to the pixel region corresponding to a single leaf-shaped tea leaf that is segmented and identified in the vibration detection image after tea leaf feature analysis. The method for obtaining the vibrating single-piece region is the same as that for obtaining the single-leaf tea leaf region in step 2. The vibration detection image is preprocessed (background and foreground segmentation, connected component analysis, and adhesion segmentation, etc.) to separate the independent pixel regions that conform to the morphological characteristics of a single tea leaf, which are the vibrating single-piece regions.

[0085] Step 923: Perform integrity analysis on the vibrating single-piece area to determine the integrity results.

[0086] In this step, the definition and acquisition method of the integrity result refer to the definition and acquisition method of the integrity result in step 3. The integrity result is determined by calculating the core morphological parameters such as the contour integrity and area matching degree of the vibrating single piece region, and comparing each parameter with the critical parameters of the complete tea morphology obtained in advance through tea sample calibration. When all core morphological parameters meet the judgment condition of the integrity threshold, it is judged as a complete result; if any core morphological parameter does not meet the integrity threshold, it is judged as an incomplete result.

[0087] Step 924: If the integrity result is still incomplete, continue to control the detection platform to vibrate at a small amplitude high frequency and accumulate the vibration time.

[0088] Vibration duration refers to the cumulative time during which the detection platform performs vibration operations. When the integrity result is still incomplete and the detection platform continues to vibrate, the timing function is automatically started to accumulate the running time of the vibration operation in real time; when the vibration operation is paused or stopped, the timing stops synchronously, and the final accumulated time is the vibration duration.

[0089] If the integrity result is still incomplete, it means that after a round of small-amplitude high-frequency vibration operation, the obstruction has not been removed, and there are still problems such as obstruction and damage in the single tea leaf area that affect the quality judgment. At this time, it is necessary to continue to control the detection platform to perform vibration operation at the preset small-amplitude high-frequency frequency and accumulate the vibration time simultaneously.

[0090] Step 925: When the vibration duration reaches the preset duration threshold and the integrity result is still incomplete, the signal that cannot be removed is output.

[0091] The duration threshold refers to the maximum permissible duration for the detection platform to perform vibration operations. The duration threshold is determined by those skilled in the art through multiple experiments, taking into account parameters such as tea characteristics, type of obstruction, and the air permeability structure of the detection platform, to determine a duration threshold suitable for tea detection scenarios, for example, 10 to 15 seconds.

[0092] When the vibration duration reaches the preset duration threshold and the integrity result is still incomplete, it indicates that after the preset duration of small-amplitude high-frequency vibration operation, the small obstruction cannot be removed, the integrity problem of the tea leaves has not been solved, and the vibration operation has failed. At this time, it is necessary to output a signal that the obstruction cannot be removed and stop the vibration, indicating to the staff that the obstruction cannot be handled by the existing vibration method and manual intervention is required.

[0093] Step 926: When the vibration duration reaches the preset duration threshold and the integrity result is complete, stop the vibration operation.

[0094] When the vibration duration reaches the preset duration threshold and the integrity result is complete, it indicates that after the preset duration of small-amplitude high-frequency vibration operation, the small obstruction has been effectively removed, the single tea leaf area has been restored to a complete state, and the vibration operation has achieved the expected effect. At this time, the vibration operation needs to be stopped, the current vibration processing flow needs to be ended, and the subsequent tea quality identification process needs to be continued.

[0095] The methods for controlling the robotic arm to grasp and remove obstructions corresponding to the obstruction area include: Step 930: Divide the tea leaf detection image into four surrounding areas based on the occlusion area and according to the preset surrounding area range.

[0096] The surrounding area refers to a fixed-size region extending outwards from the occluded area, used to define the boundary of the area around the occluded object where tea feature recognition is required. The surrounding area is a rectangular region formed by extending the minimum bounding rectangle of the occluded object area upwards, downwards, leftwards, and rightwards by 1.5 to 2 times the width and height of that rectangle. This range is preset by those skilled in the art based on parameters such as the size of the detection platform, the size of the tea leaves, and the image acquisition accuracy, serving as the standard for defining the surrounding area of ​​the occluded object.

[0097] The occlusion perimeter region refers to one of four independent regions (usually in the top, bottom, left, and right directions) centered on the occlusion area in the tea leaf detection image, defined according to a preset perimeter region range. Based on the occlusion area in the tea leaf detection image, the preset perimeter region range parameters are used to extend the corresponding range in each of the four directions (up, down, left, and right) from the geometric center of the occlusion area, thus dividing the image into four independent pixel regions. These four regions do not overlap and completely cover the key detection range surrounding the occlusion.

[0098] Step 931: Identify the tea leaf detection images corresponding to the area around the occluded object according to the characteristics of the tea leaves to obtain the identification results.

[0099] The recognition result refers to the determination result used to indicate whether tea-like features exist in the region, and is divided into two types: "tea-like features present" and "tea-like features absent". The recognition result is obtained by extracting image features such as color, outline, texture and shape of the area around the occluded object, and matching them with preset tea-like features. If the match is successful, it is "tea-like features present", and if it fails, it is "tea-like features absent". Finally, a corresponding result is generated for each region and summarized.

[0100] Step 932: If the identification results all contain tea leaf features, control the robotic arm to directly grab and remove the obstruction corresponding to the obstruction area.

[0101] If all the identification results show tea leaf characteristics, it means that the four areas around the occluded object are covered with tea leaves, and there are no empty areas without tea leaves. In this case, the occluded object can be directly captured.

[0102] Step 933: If any recognition result does not have the tea leaf feature, define the recognition result without the tea leaf feature as a tea leaf-free result, and define the area around the occluded object corresponding to the tea leaf-free result as a tea leaf-free area.

[0103] A tea-free area refers to the region around an obstruction that is identified as having no tea leaves, meaning that no tea leaves cover this area. The tea-free area is defined by selecting the surrounding area corresponding to the tea-free result from the identification results around the obstruction; if multiple tea-free results exist, the area closest to the obstruction and with the most space can be prioritized as the target tea-free area.

[0104] If any identification result does not contain tea leaf features, it means that at least one of the four regions surrounding the occluder is not covered by tea leaves (no tea leaf features were detected in that region).

[0105] Step 934: Control the robotic arm to move the obstruction from the obstruction area to the tea-free area.

[0106] The robotic arm plans a moving path based on the relative position of the obstruction area and the tea-free area, moving the obstruction from the obstruction area toward the tea-free area, thus separating the obstruction without damaging the surrounding tea leaves.

[0107] This also includes a processing method if all identification results contain tea-like characteristics, the method comprising: Step 9320: Calculate the proportion of tea leaves in the tea leaf detection images corresponding to the areas surrounding the occluded objects according to the tea leaf characteristics.

[0108] The tea leaf percentage refers to the percentage of pixels representing tea leaf features within the area surrounding a single occluded object, out of the total number of pixels in that area. This percentage is calculated by segmenting the image of the tea leaf detection area around the occluded object, determining the total number of tea leaf feature pixels within the area and the total number of pixels in the area, and then multiplying the result by 100%.

[0109] Step 9321: Based on the proportion of tea leaves in the area surrounding each obstruction, select the area surrounding the obstruction with the smallest proportion of tea leaves, define the area surrounding the obstruction with the smallest proportion of tea leaves as the low proportion area, and define the area surrounding the obstruction outside the low proportion area as the high proportion area.

[0110] A low-percentage area refers to the area around the four obstructions where the percentage of tea leaves is the lowest, representing the area with the least tea leaf coverage. This low-percentage area is defined by calculating the percentage of tea leaves around each obstruction, comparing the percentage values ​​of each area, and then selecting the area with the lowest percentage.

[0111] The high-percentage area refers to the area surrounding the remaining obstructions, excluding the low-percentage area. In other words, the tea leaf percentage is higher than in the low-percentage area, indicating a higher degree of tea leaf coverage. The high-percentage area is defined by uniformly defining the areas surrounding the remaining three obstructions after identifying the low-percentage area.

[0112] Step 9322: Control the blowing device to blow the tea leaves from the low-percentage area to the high-percentage area, and then control the robotic arm to move the obstruction from the obstruction area to the low-percentage area.

[0113] The air blowing device refers to an airflow generating device installed beside the testing platform, including at least one adjustable nozzle, used to generate directional airflow to achieve tea leaf transfer, turning, and leveling. The air blowing device is composed of equipment such as a miniature air pump and directional air nozzle selected by those skilled in the art. The installation position and blowing angle can be preset according to the layout of the testing platform. By adjusting the airflow intensity, the tea leaves in low-percentage areas can be accurately blown from high-percentage areas, and the airflow intensity will not damage the tea leaves.

[0114] This also includes a processing method when the integrity result is a preset integrity result, the method comprising: Step 40: Analyze the tea detection image based on the characteristics of the tea leaves and the background color to obtain the foreign object area.

[0115] Foreign object region refers to the area in a tea detection image that may contain foreign objects after removing tea leaf features and background color features. The method for obtaining the foreign object region is as follows: First, the tea detection image is preprocessed to remove background color features; then, pixel regions matching tea leaf features are identified and extracted from the preprocessed image, and all pixels corresponding to these tea leaf feature regions are removed; after removal, the remaining pixel range in the image is the area that may contain foreign objects, and this area is called the foreign object region.

[0116] When the integrity result is the preset integrity result, it means that there are no obstructions based on the integrity of the whole tea leaf. However, there are foreign objects that are obstructing the whole tea leaf. These foreign objects cannot be distinguished by the integrity of the tea leaf. Therefore, the tea leaf features and the background color features of the detection platform are directly removed from the image to obtain the area where foreign objects may exist.

[0117] Step 41: Based on the foreign object area, divide the tea leaf detection image into four foreign object surrounding areas according to the preset surrounding area range and execute steps 9320 to 9322.

[0118] The foreign object perimeter area refers to the associated area used to assist in the movement and grasping of foreign objects. The foreign object perimeter area is defined by dividing the area surrounding the foreign object area according to a preset perimeter range.

[0119] After defining the area surrounding the foreign object, a low-percentage area and a high-percentage area are selected from the four areas surrounding the foreign object. The blowing device is controlled to move the tea leaves from the low-percentage area to the high-percentage area. Then, the robotic arm is controlled to move the obstruction in the direction from the foreign object area to the low-percentage area to move the foreign object from the foreign object area to the low-percentage area, thus completing the transfer of the foreign object.

[0120] Step 42: Based on the tea leaf detection image and the foreign object region, find the local tea leaf image corresponding to the foreign object region.

[0121] A local tea leaf image refers to an image segment extracted from a tea leaf detection image, specifically the area corresponding to the foreign object. Local tea leaf images are created by using image cropping techniques to extract a segment of the foreign object area and its surrounding area from the tea leaf detection image. The foreign object in the original foreign object area has been removed; the current local tea leaf image is the tea leaf image that was previously obscured by the foreign object.

[0122] Step 43: Analyze the local tea leaf image based on the characteristics of the tea leaves to obtain local single-piece regions and then execute steps 3 to 9.

[0123] A local single-piece region refers to the pixel region corresponding to a single leaf-shaped tea leaf that is segmented and identified in a local tea leaf image after tea leaf feature analysis. It is the basic unit of image analysis. The method for obtaining local single-piece regions is the same as that for obtaining single-leaf tea leaf regions in step 2. The local tea leaf image is preprocessed (background and foreground segmentation, connected component analysis, and adhesion segmentation, etc.) to separate independent pixel regions that conform to the morphological characteristics of a single tea leaf, which are the local single-piece regions.

[0124] Integrity analysis is performed on local single-piece areas to determine the integrity result. The integrity of the single tea leaf occluded below after the foreign object is removed is judged. If the result is complete, the tea quality identification is performed directly. If the result is incomplete, the occluding object area is determined in the local tea leaf image based on the local single-piece area, the occlusion type in the occlusion area is analyzed, and the workflow corresponding to the occlusion type is implemented.

[0125] The methods for obtaining tea detection images on the detection platform include: Step 10: In response to the preset flipping signal, acquire the image of the tea leaves on the detection platform.

[0126] The flipping signal refers to the instruction signal that triggers the tea flipping process. It is preset by those skilled in the art and can be generated by manual triggering (button, touch command), timed triggering by the equipment, and triggering by the tea stacking detection sensor.

[0127] A tea leaf image refers to a digital image containing both the tea leaves and the inspection platform. The tea leaf image is captured in real-time by image acquisition devices (industrial cameras, webcams, etc.) deployed above or to the side of the inspection platform in response to a flipping signal.

[0128] Step 11: Based on the characteristics of tea leaves, perform image recognition on the tea leaf image to obtain the edge point and center point of each tea leaf. Define the direction from the center point to the edge point of each tea leaf as the blowing direction of a single leaf.

[0129] Tea leaf edge points refer to the set of key pixels representing the contour boundary of a single tea leaf in a tea leaf image. Tea leaf edge points are determined by processing the tea leaf image using image edge detection algorithms (such as the Canny operator and the Sobel operator) to extract and label the contour edge pixels of each tea leaf.

[0130] The center point of a tea leaf refers to the pixel point at the geometric center of a single tea leaf in a tea leaf image. The center point of a tea leaf is determined by analyzing the pixel region of a single tea leaf using geometric center calculation algorithms (such as centroid calculation and circumscribed rectangle center calculation).

[0131] The blowing direction of a single tea leaf refers to the pixel direction from the center point of the tea leaf to its edge points. The blowing direction of a single tea leaf is calculated by extracting the pixel coordinates of the edge points and the center point of each tea leaf, and then calculating the vector direction between these two points.

[0132] Step 12: Count the frequency of the blowing direction of each individual tea leaf, and define the blowing direction of the individual tea leaf with the highest frequency as the overall blowing direction.

[0133] Directional frequency refers to the statistical value of the number of times the same direction appears among all the blowing directions of individual tea leaves. Directional frequency is obtained by iterating through all the blowing directions of individual tea leaves on the detection platform and counting the number of times each direction appears.

[0134] The overall blowing direction refers to the blowing direction of the single tea leaf with the highest frequency among all individual tea leaves. The overall blowing direction is determined by statistically analyzing the blowing frequency of individual tea leaves and selecting the blowing direction of the single tea leaf with the highest frequency value.

[0135] Step 13: Control the blowing device to blow air onto the tea leaves on the testing platform along the overall blowing direction and at a preset oblique blowing angle. At the same time, control the suction device below the testing platform to adsorb the tea leaves on the testing platform at a preset low suction level and accumulate the turning time.

[0136] The oblique blowing angle refers to the angle between the airflow from the blowing device and the horizontal plane of the testing platform. The oblique blowing angle is determined by those skilled in the art through multiple experiments and calibrations, taking into account parameters such as the type of tea, leaf thickness, and material of the testing platform. A fixed angle value is preset, for example, the oblique blowing angle is 30° to 60°.

[0137] Low suction power refers to the negative pressure adsorption intensity level set by the suction device to facilitate the turning of tea leaves. The suction strength is lower than the normal adsorption and fixation level for tea leaves. The low suction power is determined by those skilled in the art through multiple rounds of gradient calibration experiments: suitable tea varieties are selected, and blowing and turning tests are conducted on a testing platform at different negative pressure suction levels. The suction parameters that meet the requirement of "tea leaves can be blown and turned without large-area displacement or stacking" are screened out, and finally calibrated as the preset low suction power.

[0138] The turning time refers to the cumulative time taken to turn the tea leaves over. The turning time is calculated by automatically starting a timer when the blowing and suction devices begin the turning operation, accumulating the running time in real time.

[0139] Step 14: When the flipping time reaches the preset maximum flipping time, control the blowing device to stop blowing, and at the same time control the suction device to stop suctioning, and trigger the preset recognition signal to obtain the tea detection image on the detection platform.

[0140] The maximum flipping time refers to the maximum allowed time threshold for the tea flipping operation. The maximum flipping time is determined by those skilled in the art through multiple experiments, taking into account factors such as tea characteristics, air blowing device parameters, and detection platform structure, to determine the maximum time value suitable for tea detection scenarios.

[0141] When the tea-flipping time reaches the preset maximum flipping time, it means that the tea-flipping operation has been performed for the maximum allowed time. At this time, the flipping process must be terminated, the blowing and suction stopped, and the recognition signal triggered to obtain the tea detection image for subsequent tea occlusion investigation.

[0142] Among them, the methods for obtaining the edge points and center points of each tea leaf by performing image recognition on tea leaf images based on tea leaf characteristics include: Step 110: Perform image processing on the tea image based on the characteristics of the tea leaves to obtain all independent tea leaf regions in the tea image.

[0143] The tea leaf region refers to the independent pixel region corresponding to a single tea leaf after image processing based on tea leaf features in a tea leaf image. The method for obtaining the tea leaf region is the same as that for obtaining the single tea leaf region in step 2. The tea leaf image is preprocessed (background and foreground segmentation, connected component analysis, and adhesion segmentation, etc.) to separate the independent pixel regions that conform to the morphological features of a single tea leaf, which are the tea leaf regions.

[0144] Step 111: Calculate the tea area of ​​all tea regions based on the tea region.

[0145] The tea leaf area refers to the total pixel area of ​​a single, independent tea leaf region, calculated in pixels. The tea leaf area is calculated by counting the pixels in each individual tea leaf region and combining this with the conversion relationship between the pixel dimensions defined in the image and the actual physical dimensions.

[0146] Step 112: If the area of ​​the tea leaves is greater than the preset area threshold, then perform the flattening operation and repeat steps 110 to 111 until the area of ​​the tea leaves is less than the preset area threshold.

[0147] The area threshold is a critical value used to determine whether a tea-growing area needs to be leveled. The area threshold is preset by someone skilled in the art and can be set to 20 square millimeters to 50 square millimeters.

[0148] If the area of ​​the tea leaves is greater than the preset area threshold, it indicates that the tea leaves on the detection platform have excessive overlap and stacking, causing the area of ​​a single tea leaf to be merged, making it impossible to accurately identify the morphological characteristics of a single leaf. At this time, a flattening operation is performed, and the overlapping tea leaves are spread out and separated by a robotic arm. After the flattening operation is completed, steps 110 to 111 are executed again to obtain independent tea leaf areas and calculate the tea leaf area again until the tea leaf area is less than the preset area threshold.

[0149] Step 113: If the area of ​​the tea leaves is smaller than the preset area threshold, perform image recognition on the tea leaf image based on the characteristics of the tea leaves to obtain the edge points and center points of each tea leaf.

[0150] If the area of ​​the tea leaves is smaller than the preset area threshold, it means that there is no excessive overlap or stacking of the tea leaf areas on the detection platform. All tea leaf areas are independent pixel areas that conform to the morphological characteristics of a single tea leaf, and the edge points and center points of the tea leaves are directly extracted.

[0151] This includes a method for handling situations where the tea leaf area is still larger than a preset area threshold. This method includes: Step 1120: Control the suction device to adsorb and fix the tea leaves on the detection platform according to the preset single-leaf adsorption block, and at the same time control the blowing device to blow the tea leaves on the detection platform according to the preset horizontal blowing direction to achieve the flat laying of the tea leaves.

[0152] The single-leaf adsorption setting refers to the negative pressure adsorption intensity setting that can precisely adsorb and fix a single tea leaf. The single-leaf adsorption setting is calibrated by those skilled in the art through testing on multiple types of tea samples, selecting negative pressure parameters that can achieve stable adsorption of a single tea leaf without displacement or damage, and setting them as the preset single-leaf adsorption setting.

[0153] The lateral airflow direction refers to the directional direction of the airflow output by the airflow device along the horizontal plane of the testing platform. The lateral airflow direction is pre-set by those skilled in the art based on the layout of the testing platform and the morphological characteristics of the tea leaves.

[0154] Flattening process refers to the hardware operation process that uses the combined action of single-leaf adsorption of the suction device and horizontal blowing of the blowing device to separate and flatten the overlapping and stacked tea leaves on the testing platform.

[0155] Step 1121: Obtain a flat image of tea leaves on the detection platform.

[0156] A tea leaf flat-lay image refers to a digital image captured in real time by an image acquisition device after the tea leaf flat-laying process has been performed, which includes the tea leaves that have completed the flat-laying operation and the detection platform.

[0157] Step 1122: Perform image processing on the tea leaf paving image based on the characteristics of the tea leaves to obtain all independent tea leaf paving areas and their corresponding tea leaf paving areas.

[0158] The tea leaf flat-lay area refers to the independent pixel region corresponding to a single tea leaf in a flat-lay image, after image processing based on tea leaf features. The method for obtaining the tea leaf flat-lay area is the same as that for obtaining the single tea leaf region in step 2. The tea leaf flat-lay image is preprocessed (background and foreground segmentation, connected component analysis, and adhesion segmentation, etc.) to separate the independent pixel regions that conform to the morphological characteristics of a single tea leaf; these are the tea leaf flat-lay areas.

[0159] The tea leaf area refers to the total pixel area of ​​a single tea leaf area, calculated in pixels. The tea leaf area is calculated by counting pixels in each tea leaf area and combining this with the conversion between the pixel dimensions defined in the image and the actual physical dimensions.

[0160] Step 1123: When the tea leaf area is greater than the area threshold, repeat steps 1120 to 1122 until the tea leaf area is less than the area threshold.

[0161] When the tea leaf area is greater than the area threshold, it indicates that the tea leaves on the detection platform still have excessive overlap and stacking after the flattening process is completed. The suction device is controlled to adsorb the tea leaves with a single leaf adsorption block, and the blowing device is controlled to blow in a horizontal direction. After the flattening process is completed, the tea leaf flattening image is re-acquired, and the flattening image is processed to obtain the tea leaf flattening area and the corresponding tea leaf flattening area. This process is repeated until the tea leaf flattening area is less than the preset area threshold.

[0162] Step 1124: When the flat area of ​​the tea leaves is less than the area threshold, perform image recognition on the tea leaf image based on the characteristics of the tea leaves to obtain the edge points and center points of each tea leaf.

[0163] When the area of ​​the tea leaves laid out is less than the area threshold, it means that the tea leaves on the detection platform have effectively solved the problems of overlapping and stacking after single-leaf adsorption fixation and horizontal air blowing flat laying, and the edge points and center points of the tea leaves can be directly extracted.

[0164] Based on the same inventive concept, embodiments of the present invention provide a system for identifying tea quality.

[0165] A system for identifying tea quality includes: The acquisition module is used to acquire images of tea leaves, vibration detection images, tea leaves, and flat-lay tea leaves. The memory stores a computer program that can be loaded by a processor and executed to identify the quality of tea. The processor loads and executes programs from memory.

[0166] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device, and unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0167] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.

Claims

1. A method for identifying tea quality, characterized in that, include: Step 1: In response to the preset recognition signal, acquire the tea detection image on the detection platform; Step 2: Analyze the tea detection image based on the preset tea characteristics to obtain the individual tea leaf region; Step 3: Perform integrity analysis on individual tea leaf areas to determine the integrity results; Step 4: When the integrity result is the preset integrity result, directly identify the tea quality based on the tea detection image; Step 5: When the integrity result is the preset incomplete result, determine the occlusion area in the tea detection image based on the single tea leaf area; Step 6: Analyze the area of ​​the obscured object based on the characteristics of the tea leaves and the preset background color to determine the type of obscuration; Step 7: When the type of obstruction is a preset type of notch, output a tea leaf damage signal; Step 8: When the type of tea to be covered is a preset type, perform the preset flattening operation; Step 9: When the type of obstruction is not a gap type or a tea type, perform the preset impurity removal operation.

2. The method for identifying tea quality according to claim 1, characterized in that, When the type of obstruction is not a gap type or a tea type, the preset impurity removal methods include: Step 90: Control the suction device below the detection platform to continuously suction air from the tea leaves on the detection platform; Step 91: Calculate the area of ​​the occlusion based on the occlusion area in the tea leaf detection image; Step 92: If the area of ​​the obstruction is smaller than the preset drainage area, perform the preset vibration operation; Step 93: If the area of ​​the obstruction is larger than the preset allowable area, control the robotic arm to grab and remove the obstruction corresponding to the obstruction area and obtain the first removed image after grabbing and removing it. Step 94: Analyze the first removed image based on the characteristics of the tea leaves to obtain the unoccluded tea leaf area after occlusion removal, and repeat step 3; Step 95: If the integrity result is still incomplete, repeat steps 90 to 93 until the area of ​​the obstruction remains unchanged, then output a preset signal that it cannot be removed.

3. The method for identifying tea quality according to claim 2, characterized in that, If the area of ​​the obstruction is smaller than the preset allowable leakage area, the preset vibration operation method includes: Step 920: Control the detection platform to vibrate at a preset small-amplitude high-frequency frequency so that the obstruction is sucked to the waste area by the suction device; Step 921: Obtain the vibration detection image corresponding to the occluded area; Step 922: Analyze the vibration detection image based on the characteristics of tea leaves to obtain the vibration area of ​​a single piece; Step 923: Perform integrity analysis on the vibrating single-piece region to determine the integrity results; Step 924: If the integrity result is still incomplete, continue to control the detection platform to vibrate at a small amplitude high frequency and accumulate the vibration time; Step 925: When the vibration duration reaches the preset duration threshold and the integrity result is still incomplete, output the signal that cannot be removed; Step 926: When the vibration duration reaches the preset duration threshold and the integrity result is complete, stop the vibration operation.

4. The method for identifying tea quality according to claim 2, characterized in that, Methods for controlling a robotic arm to grasp and remove obstructions corresponding to an obstructed area include: Step 930: Divide the tea leaf detection image into four surrounding regions based on the occlusion area and according to the preset surrounding region range; Step 931: Identify the tea leaf detection images corresponding to the area surrounding the occluded object according to the characteristics of the tea leaves to obtain the identification results; Step 932: If all the identification results contain tea leaf features, control the robotic arm to directly grab and remove the occluded objects corresponding to the occluded areas; Step 933: If any recognition result does not have the tea leaf feature, define the recognition result without the tea leaf feature as a result without tea leaves, and define the area around the occluded object corresponding to the result without tea leaves as a region without tea leaves. Step 934: Control the robotic arm to move the obstruction from the obstruction area to the tea-free area.

5. The method for identifying tea quality according to claim 4, characterized in that, It also includes a processing method if all identification results contain tea-like characteristics, the method including: Step 9320: Calculate the proportion of tea leaves in each area around the occluded object according to the tea leaf characteristics of the tea leaf detection image corresponding to the area around the occluded object; Step 9321: Based on the proportion of tea leaves in the area surrounding each obstruction, select the area surrounding the obstruction with the smallest proportion of tea leaves, define the area surrounding the obstruction with the smallest proportion of tea leaves as the low proportion area, and define the area surrounding the obstruction outside the low proportion area as the high proportion area. Step 9322: Control the blowing device to blow the tea leaves from the low-percentage area to the high-percentage area, and then control the robotic arm to move the obstruction from the obstruction area to the low-percentage area.

6. The method for identifying tea quality according to claim 5, characterized in that, It also includes a handling method when the integrity result is a preset integrity result, the method including: Step 40: Analyze the tea leaf detection image based on the characteristics of the tea leaves and the background color to obtain the foreign object region; Step 41: Based on the foreign object area, divide the tea leaf detection image into four foreign object surrounding areas according to the preset surrounding area range and execute steps 9320 to 9322; Step 42: Based on the tea leaf detection image and the foreign object region, find the local tea leaf image corresponding to the foreign object region; Step 43: Analyze the local tea leaf image based on the characteristics of the tea leaves to obtain local single-piece regions and then execute steps 3 to 9.

7. The method for identifying tea quality according to claim 1, characterized in that, Methods for obtaining tea detection images on the detection platform include: Step 10: In response to a preset flipping signal, acquire an image of the tea leaves on the detection platform; Step 11: Based on the characteristics of tea leaves, perform image recognition on the tea leaf image to obtain the edge point and center point of each tea leaf. Define the direction from the center point to the edge point of each tea leaf as the blowing direction of a single leaf. Step 12: Count the frequency of the blowing direction of each individual tea leaf, and define the blowing direction of the individual tea leaf with the highest frequency as the overall blowing direction; Step 13: Control the blowing device to blow the tea leaves on the testing platform along the overall blowing direction and at the preset oblique blowing angle. At the same time, control the suction device below the testing platform to adsorb the tea leaves on the testing platform at the preset low suction level and accumulate the turning time. Step 14: When the flipping time reaches the preset maximum flipping time, control the blowing device to stop blowing, and at the same time control the suction device to stop suctioning, and trigger the preset recognition signal to obtain the tea detection image on the detection platform.

8. The method for identifying tea quality according to claim 7, characterized in that, Methods for obtaining the edge points and center points of each tea leaf by image recognition based on tea leaf characteristics include: Step 110: Perform image processing on the tea leaf image based on the characteristics of the tea leaves to obtain all independent tea leaf regions in the tea leaf image; Step 111: Calculate the tea area of ​​all tea regions based on the tea region; Step 112: If the area of ​​the tea leaves is greater than the preset area threshold, then perform the flattening operation and repeat steps 110 to 111 until the area of ​​the tea leaves is less than the preset area threshold. Step 113: If the area of ​​the tea leaves is smaller than the preset area threshold, perform image recognition on the tea leaf image based on the characteristics of the tea leaves to obtain the edge points and center points of each tea leaf.

9. The method for identifying tea quality according to claim 8, characterized in that, It also includes a handling method if the tea leaf area is still larger than a preset area threshold, the method comprising: Step 1120: Control the suction device to adsorb and fix the tea leaves on the detection platform according to the preset single leaf adsorption block, and at the same time control the blowing device to blow the tea leaves on the detection platform according to the preset horizontal blowing direction to achieve the flat laying of the tea leaves. Step 1121: Obtain a flat image of the tea leaves on the detection platform; Step 1122: Perform image processing on the tea leaf paving image based on the characteristics of the tea leaves to obtain all independent tea leaf paving areas and their corresponding tea leaf paving areas; Step 1123: When the tea leaf area is greater than the area threshold, repeat steps 1120 to 1122 until the tea leaf area is less than the area threshold. Step 1124: When the flat area of ​​the tea leaves is less than the area threshold, perform image recognition on the tea leaf image based on the characteristics of the tea leaves to obtain the edge points and center points of each tea leaf.

10. A system for identifying tea quality, characterized in that, include: The acquisition module is used to acquire images of tea leaves, vibration detection images, tea leaves, and flat-lay tea leaves. A memory for storing a program for identifying tea quality as described in any one of claims 1 to 9; The processor loads and executes programs from memory.