Tea variety identification method and system based on machine vision

By employing multispectral acquisition, adaptive illumination calibration, image preprocessing, and multi-scale feature extraction methods, combined with intelligent sorting decision-making, the problem of unstable identification of tea varieties in complex environments was solved, achieving efficient and accurate tea variety identification and sorting.

CN120635597BActive Publication Date: 2025-10-21江西省经济作物研究所

Patent Information

Application Number
CN202511109869.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-08
Publication Date
2025-10-21
Estimated Expiration
2045-08-08

AI Technical Summary

Technical Problem

Existing machine vision-based tea variety identification systems are prone to light spot interference, edge breakage, and poor recognition stability in scenarios such as uneven lighting, angle changes, or overlapping leaves. Furthermore, they lack efficient feature fusion and judgment mechanisms, resulting in inaccurate identification results and affecting the consistency of tea sorting and packaging as well as the effectiveness of the traceability system.

Method used

Employing a multispectral acquisition module, an adaptive illumination calibration module, an image preprocessing module, a multi-scale feature extraction module, and an intelligent sorting decision module, the system acquires visible light and near-infrared images, adjusts the intensity and distribution of the light source in real time, performs image denoising, white balance and distortion correction, extracts multi-level visual features, and uses a lightweight neural network for recognition and sorting control.

Benefits of technology

It improves the accuracy and stability of tea variety identification, significantly enhances sorting efficiency, achieves the ability to identify subtle differences in similar varieties, and possesses dynamic error correction capabilities, ensuring the high efficiency and consistency of tea sorting and packaging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120635597B_ABST
    Figure CN120635597B_ABST
Patent Text Reader

Abstract

The application discloses a tea variety identification method and system based on machine vision, relates to the technical field of variety identification, and has the advantages that in the system operation, the surface and part of the internal structure information of tea are captured through a multi-band image acquisition device, original image data are acquired, the exposure characteristics in the real-time detection of environmental illumination and collected images are detected, the light source intensity and distribution are automatically adjusted, the camera parameters are calibrated, the complete contour and the foreground image area of tea are extracted, and are fused into a unified mixed feature vector, so that the core data expression of variety identification is provided, the multi-dimensional features of the tea image are identified and judged through a lightweight neural network model, the specific variety category and the confidence are output, the corresponding sorting control instruction is generated, the system decision control is carried out on the sorting device, including a mechanical arm and a pneumatic sorter, the tea is put into the corresponding packaging channel, and the track state is fed back, so that the closed-loop control is formed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of variety identification, and in particular to a method and system for tea variety identification based on machine vision. Background Art

[0002] As one of my country's traditionally advantageous agricultural industries, tea quality evaluation and classification management are crucial in modern production and processing. As tea processing continues to evolve towards mechanization and scale, rapid identification of different tea varieties has become a critical prerequisite for standardized sorting and precise packaging. Traditional tea variety identification methods rely primarily on manual sensory judgment and grading, which suffers from low efficiency, strong subjectivity, and high error rates, failing to meet the dual requirements of modern tea companies for identification accuracy and operational efficiency.

[0003] However, the existing machine vision-based tea variety recognition system still faces several key technical bottlenecks in practical applications. On the one hand, traditional systems mostly use a single-light source, single-channel visible light image acquisition method, which lacks the ability to fully express the deep structure and multi-spectral texture of the leaves, resulting in some varieties having similar image dimensions and blurred classification boundaries. On the other hand, in scenarios such as uneven lighting, angle changes or overlapping leaves, the system is prone to problems such as light spot interference, edge breakage, and poor recognition stability. In addition, some systems have failed to form an efficient feature fusion and judgment mechanism, and their collaborative perception capabilities for texture, shape and vein features are insufficient, resulting in incomplete feature extraction and poor generalization of classification models. At the same time, the recognition results fail to form an effective closed loop with the execution actions, and lack a stable decision-making sorting strategy and real-time feedback mechanism, which limits its usability and promotion in high-speed sorting lines and industrial packaging scenarios.

[0004] The above-mentioned technical problems are mainly caused by the technical structural defects of the recognition system in multiple links such as image acquisition, lighting control, feature extraction and result decision-making, such as weak perceptual coupling, uncontrollable parameter fluctuations, and lack of feedback mechanism. For example, when tea leaves overlap, reflect or are blocked by edges, it is difficult for the system to extract complete contour information during the image preprocessing stage, and the edge consistency factor is significantly reduced, which leads to feature expression offset and classification confidence decline. When the lighting environment changes drastically or the sample quality fluctuates greatly, the system lacks the ability to adjust in real time, resulting in uneven image brightness distribution and increased image noise, which causes key texture or vein features to be misjudged or weakened. In addition, when the recognition result has low confidence or the erroneous output cannot be effectively identified and intercepted by the system, it may lead to misclassification or omission of tea, destroying packaging consistency and grading standards. In serious cases, it will affect the effectiveness of the product traceability system and even damage the brand image and market reputation of tea. Summary of the Invention

[0005] In view of the shortcomings of the existing technology, the present invention provides a tea variety identification method and system based on machine vision, which solves the problems mentioned in the background technology.

[0006] To achieve the above objectives, the present invention is implemented through the following technical solutions: a tea variety identification system based on machine vision, including a multi-spectral acquisition module, an adaptive illumination calibration module, an image preprocessing module, a multi-scale feature extraction module, an intelligent sorting decision module and a packaging drive module;

[0007] The multispectral acquisition module is used to capture the surface and partial internal structure information of tea leaves through a multi-band image acquisition device of visible light and near-infrared to obtain raw image data;

[0008] The adaptive illumination calibration module is used to automatically adjust the light intensity and distribution and calibrate camera parameters by detecting the ambient light and exposure characteristics in the captured image in real time;

[0009] The image preprocessing module is used to perform denoising, white balance, distortion correction, and background removal on the captured images, extracting the complete outline of the tea leaves and the foreground image area, and providing standardized input for feature extraction;

[0010] The multi-scale feature extraction module is used to extract multi-level visual features including global shape, local texture, and vein structure, and fuse them into a unified hybrid feature vector to provide the core data expression for variety identification;

[0011] The intelligent sorting decision module is used to identify and judge the multi-dimensional features of tea images through a lightweight neural network model, output the specific variety category and confidence level, and generate corresponding sorting control instructions;

[0012] The packaging drive module is used to control the sorting device according to system decisions, including a robotic arm and a pneumatic sorter, to place the tea leaves into the corresponding packaging channel and provide feedback on the track status to form a closed-loop control.

[0013] Preferably, the multispectral acquisition module includes an image sensor control unit, a light source array control unit and a synchronous frame acquisition unit;

[0014] The image sensor control unit is used to drive at least one group of visible light sensors and one group of near-infrared sensors, set the frame rate, shutter time, exposure parameters and gain factor respectively, generate multi-channel image sampling control instructions through a time synchronization mechanism, and realize parallel acquisition of multispectral image frames;

[0015] The light source array control unit is used to include a set of controllable ring-shaped LED arrays and a brightness feedback drive circuit. It can dynamically control the luminous intensity and timing of each sub-area light source based on preset lighting sequence parameters or feedback adjustment strategies. Its lighting control process combines the brightness distribution of the center and edge of the imaging area to perform brightness balance, and improves imaging uniformity by generating a structured lighting sequence;

[0016] The synchronous frame acquisition unit is used to receive synchronization signals from the ISC and LAC to achieve exposure and frame acquisition time locking of the multi-band imaging channels, and realize image alignment at the nanosecond level to prevent image misalignment or fusion distortion caused by spectral delay or shutter difference.

[0017] Preferably, the adaptive illumination calibration module includes an image brightness evaluation unit, a partition dynamic dimming unit and a geometric illumination joint calibration unit;

[0018] The image brightness evaluation unit is used to calculate the global brightness distribution based on the collected IFS image and derive the image illumination balance index LEI, which is calculated as follows:

[0019] ;

[0020] Among them, l i,j Indicates the brightness of the pixel, Represents the mean brightness of the image. This indicator is used to characterize the uniformity of illumination in the image space to support downstream modules in adjusting illumination strategies and image enhancement standards.

[0021] The zoned dynamic dimming unit is used to determine the current lighting state based on the LEI value from the IBE and, in combination with image grayscale histogram feedback, implements adaptive brightness compensation for each block of the light source array through a multi-segment closed-loop adjustment algorithm based on brightness median drift. This unit supports iterative optimization of light distribution at different angles through PWM or constant current control to converge the LEI to the system-set threshold.

[0022] The geometric illumination joint calibration unit is used to fuse the image calibration plate detection results with the illumination error matrix, and output the geometric calibration parameter set GPM and the illumination balance correction parameter set LEM, which ultimately constitute the geometric illumination joint calibration configuration GCP for reference by the image distortion correction and white balance modules to ensure the spatial accuracy and brightness consistency of subsequent image processing results.

[0023] Preferably, the image preprocessing module includes a white balance and denoising unit, a geometric correction unit, a background removal unit and a leaf mask generation unit;

[0024] The white balance and denoising unit is used to perform white balance normalization on the IFS image based on the brightness and channel gain parameters in the GCP, and perform spatial domain denoising on the image through bilateral filtering combined with the non-local means algorithm to enhance the image detail retention capability and improve the subsequent texture recognition accuracy;

[0025] The geometric correction unit is used to restore the IFS image to the real geometric space based on the perspective matrix and distortion parameters contained in the GCP, applying the radial-tangential distortion correction model and inverse perspective transformation, so as to achieve the consistency standardization of the leaf scale and position and ensure the accurate extraction of subsequent morphological parameters;

[0026] The background elimination unit is used to combine the color clustering algorithm with the foreground prediction model to identify and eliminate the background information of the non-target area, and output the foreground image area FGI as the basis for generating the leaf image mask;

[0027] The leaf mask generation unit is used to extract the complete outline of the leaf based on FGI, construct a binary mask image, and calculate the edge consistency factor CCF. The following is its expression:

[0028] ;

[0029] in represents the kth edge point, 、 They represent the x / y direction gradients respectively, and CCF is used to quantify the smoothness and completeness of the leaf edge.

[0030] Preferably, the multi-scale feature extraction module includes a global contour feature unit, a texture analysis feature unit, a leaf vein structure unit and a feature fusion unit;

[0031] The global contour feature unit is used to extract the geometric structural parameters of the leaf contour, including the centroid position, aspect ratio, Hu invariant moment and contour convexity, and to construct the global shape feature vector Fgs, which serves as one of the basic features for variety identification.

[0032] The texture analysis feature unit is used to extract local texture features in the multi-scale region of the foreground image. It uses the local binary pattern (LBP) histogram entropy and the gray-level co-occurrence matrix (GLCM) energy and contrast to form a texture feature vector Ftx, which is used to capture the surface particles and color differences of different tea varieties.

[0033] The leaf vein map structure unit is used to extract the vein structure of the enhanced leaf vein area, construct the leaf vein topology map, and quantify the vein complexity through the number of vein nodes, bifurcation density and direction consistency per unit area.

[0034] Preferably, the feature fusion unit is used to perform multi-channel splicing and fusion of feature vectors from GSH, TEX and VGF, and calculate the texture-vein structure difference TPD, the expression of which is as follows:

[0035] ;

[0036] in, represents the LBP entropy value of the z-th region, Indicates the density of leaf vein structure. A larger TPD value indicates that the leaf has stronger internal distinguishing details.

[0037] Preferably, the intelligent sorting decision module includes a feature inference engine unit, a stability judgment unit and a dynamic sorting instruction generation unit;

[0038] The feature inference engine unit is used to receive the fused feature package HFP and perform variety classification prediction through a lightweight convolutional network inference model. It combines image quality and structural stability indicators to calculate the multi-source feature collaborative evaluation index VIR:

[0039] ;

[0040] Among them, α and β are regulatory factors, and VIR is used as a multi-source feature collaborative evaluation index to achieve highly robust variety classification output;

[0041] The dynamic sorting instruction generation unit is used to generate sorting instructions with track number, execution sequence and priority according to the final identified variety, VIR level and real-time packaging track status, and write them into the system control bus.

[0042] Preferably, the stability judgment unit is used to judge the stability of VIR and the confidence of the neural network output category. By comparing the multi-source feature collaborative evaluation index VIR with the preset threshold A and the preset threshold X, the system divides the recognition results into three quality level intervals. Each level corresponds to a different response strategy and improvement method, forming a closed-loop feedback recognition evaluation and improvement mechanism;

[0043] Level 1 evaluation: VIR ≥ A. The system's output multi-source collaborative evaluation index has reached a high confidence threshold. The image quality, feature stability, and vein diversity parameters are good. The leaf contour is complete, the illumination is uniform, and the feature fusion is clear. The current sample is written to the "high-quality sample buffer" for reference during subsequent model training.

[0044] Secondary level assessment: X ≤ VIR < A indicates that the recognition credibility of the current sample is qualified, but there are slight fluctuations in certain dimensional parameters. The fluctuations include edge fractures, local overexposure, or weak feature fusion. There are blurred overlapping areas in the texture or vein expression distribution. The recognition process is not interrupted, but the critical sample is written into the temporary buffer. Read the current image brightness distribution matrix LEM, adjust the i,j section in the light source array, perform a 15% gray gain iteration, increase the edge consistency factor CCF above the warning line, and improve the contour utilization rate by 5 - 10%;

[0045] Tertiary level assessment: VIR < X indicates that there are multiple source indicators that do not meet the standards in the current image, such as uneven image illumination, edge fragmentation, and abnormal texture distribution. Mark this sample as the "to be manually rejudged" category, immediately interrupt the sorting operation, recall the current sample, trigger image resampling, adjust the exposure time + the light source angle for 10° oblique supplementary light, start dynamic frame fusion, and adapt to the dark background + the case of tea leaf edge fracture.

[0046] Preferably, the packaging drive module includes an action instruction resolution unit, an execution feedback detection unit, and a track margin monitoring unit;

[0047] The action instruction resolution unit is used to parse the sorting instruction and control the execution mechanism, including the slide rail, the paddle, and the robotic arm, to complete the sorting action along the specified path, match the packaging channel, and achieve the physical classification operation;

[0048] The execution feedback detection unit is used to detect the action completion status through a position sensor, a weighing sensor, or a photoelectric pair emission device, generate an action execution mark, and feedback it to the intelligent sorting decision module for status synchronization;

[0049] The track margin monitoring unit is used to count the remaining placement space of each track, avoid packaging overflow, and issue a track current limiting instruction to the intelligent sorting decision module.

[0050] The tea variety recognition method based on machine vision includes the following steps:

[0051] Step 1: Capture the surface and partial internal structure information of the tea leaves through a multi-band image acquisition device of visible light and near-infrared, and obtain the original image data;

[0052] Step 2: Automatically adjust the light source intensity and distribution, and calibrate the camera parameters by real-time detecting the ambient light and the exposure characteristics in the acquired image;

[0053] Step 3: Denoise, white balance, correct distortion, and remove the background from the acquired image, extract the complete contour and foreground image area of the tea leaves, and provide a standardized input for feature extraction;

[0054] Step 4: Extract multi-level visual features including global shape, local texture, and leaf vein structure, and fuse them into a unified hybrid feature vector to provide the core data expression for variety identification;

[0055] Step 5: Use a lightweight neural network model to identify and judge the multi-dimensional features of the tea image, output the specific variety category and confidence level, and generate corresponding sorting control instructions;

[0056] Step 6: Based on the system decision, the sorting device, including the robotic arm and pneumatic sorter, is controlled to place the tea leaves into the corresponding packaging channel and feedback is given on the track status to form a closed-loop control.

[0057] The present invention provides a method and system for identifying tea varieties based on machine vision, which has the following beneficial effects:

[0058] (1) When the system is running, the surface and part of the internal structure information of the tea leaves are captured through a multi-band image acquisition device of visible light and near-infrared to obtain the original image data. By real-time detection of the ambient light and the exposure characteristics in the collected image, the intensity and distribution of the light source are automatically adjusted, and the camera parameters are calibrated. The collected image is denoised, white balanced, distortion corrected and background removed, and the complete outline of the tea leaves and the foreground image area are extracted to provide standardized input for feature extraction. Multi-level visual features including global shape, local texture and vein structure are extracted and fused into a unified mixed feature vector to provide the core data expression for variety identification. The multi-dimensional features of the tea leaves image are identified and judged through a lightweight neural network model, and the specific variety category and confidence are output, and the corresponding sorting control instructions are generated. According to the system decision, the sorting device, including the robotic arm and the pneumatic sorter, is controlled to put the tea leaves into the corresponding packaging channel and feedback the track status to form a closed-loop control.

[0059] (2) The machine vision-based tea variety identification system provided by the present invention is built around six modules: multispectral image acquisition, adaptive illumination calibration, image preprocessing, multi-scale feature extraction, and intelligent sorting decision-making and packaging drive. It constructs a complete closed-loop process of image perception, feature expression, variety determination, and execution. By fusing visible light and near-infrared band images, the system achieves simultaneous acquisition of the surface and internal structure of tea leaves, improving the structural recognition of the samples. Through illumination self-calibration and image correction mechanisms, the consistency and comparability of imaging are guaranteed. By collaboratively extracting three-dimensional features of contour, texture, and veins and constructing a multi-source feature package, the system significantly enhances the ability to identify subtle differences between similar varieties.

[0060] (3) Compared with existing tea variety identification technologies, this system has achieved key improvements in multiple aspects. First, the use of multispectral images and a dynamic brightness feedback mechanism overcomes the recognition attenuation problem of traditional single-channel imaging under conditions of changing lighting or leaf reflection. Second, the system establishes a grading and judgment mechanism based on the multi-source feature collaborative evaluation index (VIR), combining real-time recognition confidence and sample quality evaluation results to implement dynamic fault tolerance and precision control for the recognition process. Third, the system has the ability to block erroneous recognition, resample images, and correct classifications, avoiding the problems of misclassification and missed detection caused by traditional solutions that still enforce sorting when recognition is unstable.

[0061] (4) This system achieves significant improvements in tea type recognition accuracy, feature recognition stability, sorting action matching, and packaging efficiency. The recognition accuracy can be maintained above 95% under standard tea sample conditions, and the recognition-execution delay is compressed to the millisecond level. The overall average sorting efficiency of the system is improved by approximately 40%. This invention not only effectively compensates for the shortcomings of existing machine vision recognition systems in terms of illumination adaptability, structural expression, and dynamic error correction capabilities, but also provides tea processing companies with a more intelligent, efficient, and stable sorting and packaging solution, which has broad promotion value and industrial application prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 This is a block diagram of the tea variety identification system based on machine vision of the present invention;

[0063] Figure 2 Schematic diagram of the steps of the tea variety identification method based on machine vision of the present invention;

[0064] Figure 3 This is a line graph showing changes in recognition accuracy at each stage of the tea variety recognition system of the present invention. DETAILED DESCRIPTION

[0065] The following will provide a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0066] Example 1

[0067] The present invention provides a tea variety identification system based on machine vision, please refer to Figure 1 , including multi-spectral acquisition module, adaptive illumination calibration module, image preprocessing module, multi-scale feature extraction module, intelligent sorting decision module and packaging drive module;

[0068] The multispectral acquisition module is used to capture the surface and partial internal structure information of tea leaves through a multi-band image acquisition device of visible light and near-infrared to obtain raw image data;

[0069] The adaptive illumination calibration module is used to automatically adjust the light intensity and distribution and calibrate camera parameters by detecting the ambient light and exposure characteristics in the captured image in real time;

[0070] The image preprocessing module is used to perform denoising, white balance, distortion correction, and background removal on the captured images, extracting the complete outline of the tea leaves and the foreground image area, and providing standardized input for feature extraction;

[0071] The multi-scale feature extraction module is used to extract multi-level visual features including global shape, local texture, and vein structure, and fuse them into a unified hybrid feature vector to provide the core data expression for variety identification;

[0072] The intelligent sorting decision module is used to identify and judge the multi-dimensional features of tea images through a lightweight neural network model, output the specific variety category and confidence level, and generate corresponding sorting control instructions;

[0073] The packaging drive module is used to control the sorting device according to system decisions, including a robotic arm and a pneumatic sorter, to place the tea leaves into the corresponding packaging channel and provide feedback on the track status to form a closed-loop control.

[0074] In this embodiment, a multi-band image acquisition device using visible light and near-infrared is used to capture information about the surface and partial internal structure of tea leaves, obtaining raw image data. By real-time detection of ambient lighting and exposure characteristics in the captured image, the intensity and distribution of the light source are automatically adjusted, and camera parameters are calibrated. De-noising, white balancing, distortion correction, and background removal are performed on the captured image to extract the complete outline of the tea leaves and the foreground image area, providing standardized input for feature extraction. Multi-level visual features including global shape, local texture, and vein structure are extracted and fused into a unified hybrid feature vector, providing the core data expression for variety identification. A lightweight neural network model is used to identify and judge the multi-dimensional features of the tea image, output the specific variety category and confidence level, and generate corresponding sorting control instructions. Based on the system decision, the sorting device, including a robotic arm and a pneumatic sorter, is controlled to deliver the tea leaves to the corresponding packaging channel, and the track status is fed back to form a closed-loop control.

[0075] Example 2

[0076] This embodiment is explained in Example 1, please refer to Figure 1 ,Specifically: the multispectral acquisition module includes an image sensor control unit, a light source array ,control unit and a synchronous frame acquisition unit;

[0077] The image sensor control unit is used to drive at least one group of visible light sensors and one group of near-infrared sensors, set the frame rate, shutter time, exposure parameters and gain factor respectively, generate multi-channel image sampling control instructions through a time synchronization mechanism, and realize parallel acquisition of multispectral image frames;

[0078] The light source array control unit is used to include a set of controllable ring-shaped LED arrays and a brightness feedback drive circuit. It can dynamically control the luminous intensity and timing of each sub-area light source based on preset lighting sequence parameters or feedback adjustment strategies. Its lighting control process combines the brightness distribution of the center and edge of the imaging area to perform brightness balance, and improves imaging uniformity by generating a structured lighting sequence;

[0079] The synchronous frame acquisition unit is used to receive synchronization signals from the ISC and LAC to achieve exposure and frame acquisition time locking of the multi-band imaging channels, and realize image alignment at the nanosecond level to prevent image misalignment or fusion distortion caused by spectral delay or shutter difference.

[0080] The adaptive illumination calibration module includes an image brightness evaluation unit, a partition dynamic dimming unit, and a geometric illumination joint calibration unit;

[0081] The image brightness evaluation unit is used to calculate the global brightness distribution based on the collected IFS image and derive the image illumination balance index LEI, which is calculated as follows:

[0082] ;

[0083] Among them, l i,j Indicates the brightness of the pixel, Represents the mean brightness of the image. This indicator is used to characterize the uniformity of illumination in the image space to support downstream modules in adjusting illumination strategies and image enhancement standards.

[0084] The zoned dynamic dimming unit is used to determine the current lighting state based on the LEI value from the IBE and, in combination with image grayscale histogram feedback, implements adaptive brightness compensation for each block of the light source array through a multi-segment closed-loop adjustment algorithm based on brightness median drift. This unit supports iterative optimization of light distribution at different angles through PWM or constant current control to converge the LEI to the system-set threshold.

[0085] The geometric illumination joint calibration unit is used to fuse the image calibration plate detection results with the illumination error matrix, and output the geometric calibration parameter set GPM and the illumination balance correction parameter set LEM, which ultimately constitute the geometric illumination joint calibration configuration GCP for reference by the image distortion correction and white balance modules to ensure the spatial accuracy and brightness consistency of subsequent image processing results.

[0086] In this embodiment, the synergistic effect of the multispectral acquisition module and adaptive illumination calibration module described in this invention enables highly synchronized imaging of tea samples in the visible and near-infrared bands. Dynamically controlling multiple light sources and implementing a brightness feedback adjustment mechanism creates a spatially balanced structured illumination environment. This structure overcomes the inadequate representation of texture features in traditional recognition systems due to the limitations of single-band imaging, enhancing the ability to perceive leaf detail and internal vein variations. Furthermore, the Light Equality Index (LEI) quantification metric constructed by the image brightness evaluation unit, combined with a zoned dimming algorithm and a geometric illumination joint calibration mechanism, achieves dual correction for spatial distortion and brightness deviation in the captured images, effectively enhancing the input standardization of subsequent image preprocessing and feature extraction modules. Compared to existing technologies that suffer from uneven illumination, edge distortion, and image alignment errors, this invention significantly improves the consistency and accuracy of the system's captured images, enhances the system's robustness and model stability in complex environments, and provides a reliable image perception foundation for high-precision variety identification.

[0087] Example 3

[0088] This embodiment is explained in Example 1, please refer to Figure 1 ,Specifically: the image preprocessing module includes a white balance and denoising unit, a geometric ,correction unit, a background removal unit, and a leaf mask generation unit;

[0089] The white balance and denoising unit is used to perform white balance normalization on the IFS image based on the brightness and channel gain parameters in the GCP, and perform spatial domain denoising on the image through bilateral filtering combined with the non-local means algorithm to enhance the image detail retention capability and improve the subsequent texture recognition accuracy;

[0090] The geometric correction unit is used to restore the IFS image to the real geometric space based on the perspective matrix and distortion parameters contained in the GCP, applying the radial-tangential distortion correction model and inverse perspective transformation, so as to achieve the consistency standardization of the leaf scale and position and ensure the accurate extraction of subsequent morphological parameters;

[0091] The background elimination unit is used to combine the color clustering algorithm with the foreground prediction model to identify and eliminate the background information of the non-target area, and output the foreground image area FGI as the basis for generating the leaf image mask;

[0092] The leaf mask generation unit is used to extract the complete outline of the leaf based on FGI, construct a binary mask image, and calculate the edge consistency factor CCF. The following is its expression:

[0093] ;

[0094] in represents the kth edge point, 、 They represent the x / y direction gradients respectively, and CCF is used to quantify the smoothness and completeness of the leaf edge.

[0095] The multi-scale feature extraction module includes a global contour feature unit, a texture analysis feature unit, a leaf vein structure unit, and a feature fusion unit;

[0096] The global contour feature unit is used to extract the geometric structural parameters of the leaf contour, including the centroid position, aspect ratio, Hu invariant moment and contour convexity, and to construct the global shape feature vector Fgs, which serves as one of the basic features for variety identification.

[0097] The texture analysis feature unit is used to extract local texture features in the multi-scale region of the foreground image. It uses the local binary pattern (LBP) histogram entropy and the gray-level co-occurrence matrix (GLCM) energy and contrast to form a texture feature vector Ftx, which is used to capture the surface particles and color differences of different tea varieties.

[0098] The leaf vein map structure unit is used to extract the vein structure of the enhanced leaf vein area, construct the leaf vein topology map, and quantify the vein complexity through the number of vein nodes, bifurcation density and direction consistency per unit area.

[0099] The feature fusion unit is used to perform multi-channel splicing and fusion of feature vectors from GSH, TEX and VGF, and calculate the texture-vein structure difference TPD. The following is its expression:

[0100] ;

[0101] in, represents the LBP entropy value of the z-th region, Indicates the density of leaf vein structure. A larger TPD value indicates that the leaf has stronger internal distinguishing details.

[0102] The intelligent sorting decision module includes a feature inference engine unit, a stability judgment unit, and a dynamic sorting instruction generation unit;

[0103] The feature inference engine unit is used to receive the fused feature package HFP and perform variety classification prediction through a lightweight convolutional network inference model. It combines image quality and structural stability indicators to calculate the multi-source feature collaborative evaluation index VIR:

[0104] ;

[0105] Among them, α and β are regulatory factors, and VIR is used as a multi-source feature collaborative evaluation index to achieve highly robust variety classification output;

[0106] The dynamic sorting instruction generation unit is used to generate sorting instructions with track number, execution sequence and priority according to the final identified variety, VIR level and real-time packaging track status, and write them into the system control bus.

[0107] In this embodiment, the integrated operation mechanism of the image preprocessing module, multi-scale feature extraction module, and intelligent sorting decision module constructed in this invention achieves a highly coupled process from raw image processing to recognition decision-making, achieving image standardization, refined feature expression, and stable judgment control. Specifically, the image preprocessing module, through GCP-guided white balance normalization, spatial denoising, and distortion correction, ensures that the input image has a uniform brightness structure and spatial scale, significantly reducing recognition errors caused by illumination disturbances, camera distortion, or image blur. Furthermore, through background removal and leaf mask generation, the foreground prominence and contour integrity of the target area are effectively improved, ensuring that subsequent feature extraction is based on credible image input. At the feature extraction level, the multi-scale feature extraction module constructs multi-level feature expression vectors based on contour structure, texture distribution, and vein morphology, significantly improving the system's ability to distinguish samples of similar appearances but with subtle differences in details. In particular, the feature fusion unit calculates the texture-vein structure difference (TPD) metric, enabling the system to better perceive details and represent depth when identifying samples with high similarity. At the decision-making level, the multi-source feature collaborative evaluation index (VIR) constructed by combining image quality and structural integrity further quantifies the overall recognition stability, realizing hierarchical judgment of sample credibility and dynamic execution decision-making. Compared with the existing technology that only relies on single-channel texture classification or static rule judgment mechanism, the present invention achieves significant optimization in image quality assessment, robust feature expression and closed-loop control of action decision-making through the linkage and collaboration of three modules. The system not only improves the classification confidence and recognition accuracy, but also has the automatic recognition and dynamic fault tolerance capabilities of edge samples and abnormal samples. It can continuously output high-quality recognition results in complex environments or large-scale tea sorting tasks, significantly improving the industrial stability and operating efficiency of the sorting system.

[0108] Example 4

[0109] This embodiment is explained in Example 1, please refer to Figure 1 Specifically: the stability judgment unit is used to judge the stability of VIR and the confidence of the neural network output category. By comparing the multi-source feature collaborative evaluation index VIR with the preset threshold A and the preset threshold X, the system divides the recognition results into three quality level intervals. Each level corresponds to a different response strategy and improvement method, forming a closed-loop feedback recognition evaluation and improvement mechanism;

[0110] First-level grade assessment: VIR ≥ A. The multi-source collaborative evaluation index output by the system has reached a relatively high confidence threshold. The parameter performance of image quality, feature stability, and vein difference is good. The leaf contour is complete, the illumination is uniform, and the feature fusion is clear. The current sample is written into the "high-quality sample buffer" for reference during subsequent model retraining;

[0111] Second-level grade assessment: X ≤ VIR < A, indicating that the recognition credibility of the current sample is qualified, but there are slight fluctuations in the parameters of a certain dimension. The fluctuations include edge fracture, local overexposure, or weak feature fusion. There are fuzzy overlapping areas in the texture or vein expression distribution. The recognition process is not interrupted, but the sample is written into the critical sample temporary buffer. The current image luminance distribution matrix LEM is read, the i,j section in the light source array is adjusted, and 15% gray gain iteration is performed to increase the edge consistency factor CCF above the warning line, increasing the contour utilization rate by 5 - 10%;

[0112] Third-level grade assessment: VIR < X, indicating that there are unqualified multi-source indicators in the current image, such as uneven image illumination, broken edges, and abnormal texture distribution. The sample is marked as the "to be manually rejudged" category, the sorting operation is immediately interrupted, the current sample is called back, image re-acquisition is triggered, the exposure time + light source angle is adjusted for 10° oblique supplementary lighting, and dynamic frame fusion is started to adapt to the dark background + tea leaf edge fracture situation.

[0113] The packaging drive module includes an action instruction resolution unit, an execution feedback detection unit, and a track margin monitoring unit;

[0114] The action instruction resolution unit is used to analyze the sorting instruction and control the execution mechanism, including the slide rail, the paddle, and the robotic arm, to complete the sorting action along the specified path, match the packaging channel, and achieve physical classification operations;

[0115] The execution feedback detection unit is used to detect the action completion status through a position sensor, a weighing sensor, or a photoelectric pair emission device, generate an action execution mark, and feedback it to the intelligent sorting decision module for status synchronization;

[0116] The track margin monitoring unit is used to count the remaining placement space of each track, avoid packaging overflow, and issue a track current limiting instruction to the intelligent sorting decision module.

[0117] In this embodiment, the present invention integrates a stability assessment unit into the intelligent sorting decision module and combines it with the precise execution and feedback mechanism of the packaging driver module to construct a closed-loop quality assessment and dynamic execution system for the entire tea variety identification process. The stability assessment unit combines the multi-source feature collaborative evaluation index (VIR) with the variety confidence output by the neural network. It then sets multiple thresholds (A, X) to form a three-level quality zoning mechanism, enabling identification results to not only have classification capabilities but also quality stratification and risk response capabilities. This mechanism automatically implements compensatory image acquisition optimization (such as exposure correction, light source fill, and image fusion) when identification confidence is low, enabling dynamic adjustment and quality repair of edge samples, significantly reducing the overall system's false recognition and misclassification rates. Furthermore, the packaging driver module is highly interconnected with the identification results. Through three units: action command resolution, execution feedback detection, and track margin monitoring, it effectively ensures the consistency and effectiveness of identification results and packaging execution. The system can not only complete the precise scheduling of actuators such as slide rails and robotic arms in real time, but also perform closed-loop verification of the delivery completion status based on sensor feedback, avoiding identification-execution misalignment caused by execution failure or track full load. In addition, through the dynamic monitoring of track margin and the current limiting instruction issuance mechanism, the system has the ability to automatically arrange tasks to ensure the scheduling continuity of sorting tasks during peak periods and the safety and stability of equipment operation. The present invention further realizes the closed-loop optimization of the identification-judgment-execution system on the basis of ensuring classification accuracy through the linkage design of identification stability level evaluation and packaging action feedback control. Compared with the independent and stateless response mechanism of identification and execution in the prior art, the system of the present invention improves the abnormal sample processing capability, the sorting action coordination efficiency and the robustness of the entire line operation, and provides a more intelligent and reliable solution for high-precision, large-flow, multi-category tea automated sorting and packaging scenarios.

[0118] Example 5

[0119] For tea variety recognition method based on machine vision, please refer to Figure 2 , specifically: including the following steps:

[0120] Step 1: Use a multi-band image acquisition device with visible light and near-infrared to capture the surface and partial internal structure information of the tea leaves and obtain raw image data;

[0121] Step 2: Automatically adjust the light intensity and distribution and calibrate the camera parameters by real-time detection of ambient light and exposure characteristics in the captured image.

[0122] Step 3: De-noise, white balance, distortion correction, and background removal are performed on the captured image to extract the complete outline of the tea leaves and the foreground image area, providing standardized input for feature extraction;

[0123] Step 4: Extract multi-level visual features including global shape, local texture, and leaf vein structure, and fuse them into a unified hybrid feature vector to provide the core data expression for variety identification;

[0124] Step 5: Use a lightweight neural network model to identify and judge the multi-dimensional features of the tea image, output the specific variety category and confidence level, and generate corresponding sorting control instructions;

[0125] Step 6: Based on the system decision, the sorting device, including the robotic arm and pneumatic sorter, is controlled to place the tea leaves into the corresponding packaging channel and feedback is given on the track status to form a closed-loop control.

[0126] In this embodiment, the present invention implements an end-to-end automated process for tea variety identification, from raw sample perception to identification decision execution, by constructing a six-step process: image acquisition, illumination adjustment, image preprocessing, feature extraction, and intelligent recognition and execution control. In steps 1 through 3, multi-band image acquisition and an adaptive illumination calibration mechanism ensure high fidelity and consistency in the captured images, providing stable visual input for subsequent analysis. Image preprocessing, combined with distortion correction, white balancing, and background removal, effectively mitigates environmental interference and structural misidentification, significantly enhancing the preservation of tea leaf contours, edges, and internal texture information. In steps 4 and 5, the system utilizes a multi-level visual feature fusion mechanism, combined with a lightweight neural network model for discriminative reasoning. This allows for precise capture of the distinctive features of different tea varieties in morphology, texture, and venation structure, improving recognition accuracy and model generalization. Furthermore, by outputting confidence scores and a multi-source feature synergy index (VIR), the credibility of the recognition results is quantified, forming a foundation for stability assessment. Finally, in the sixth step, the system automatically drives the sorting device based on the recognition results, and forms a closed-loop control instruction based on the status of the packaging track, effectively avoiding execution conflicts and delivery errors, and improving the system's response efficiency and operational stability. Compared with existing technical paths that rely on manual visual classification or single image rule judgment, this method has higher image structure perception, stronger feature expression capabilities, and more complete task closed-loop execution capabilities. The overall method process establishes a dynamic linkage mechanism between high-precision image understanding and intelligent classification decision-making, achieving seamless connection from identification to sorting of tea samples, significantly improving sorting accuracy, operating efficiency, and industrial deployment stability, and has good general promotion value and industrial adaptability.

[0127] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

Claims

1. A machine vision-based tea variety recognition system, characterized by: It includes multi-spectral acquisition module, adaptive illumination calibration module, image preprocessing module, multi-scale feature extraction module, intelligent sorting decision module and packaging drive module; The multispectral acquisition module is used to capture the surface and partial internal structure information of tea leaves through a multi-band image acquisition device of visible light and near-infrared to obtain raw image data; The adaptive illumination calibration module is used to automatically adjust the light intensity and distribution and calibrate camera parameters by detecting the ambient light and exposure characteristics in the captured image in real time; The image preprocessing module is used to perform denoising, white balance, distortion correction, and background removal on the captured images, extracting the complete outline of the tea leaves and the foreground image area, and providing standardized input for feature extraction; The multi-scale feature extraction module is used to extract multi-level visual features including global shape, local texture, and vein structure, and fuse them into a unified hybrid feature vector to provide the core data expression for variety identification; The multi-scale feature extraction module includes a global contour feature unit, a texture analysis feature unit, a leaf vein structure unit, and a feature fusion unit; The global contour feature unit is used to extract the geometric structural parameters of the leaf contour, including the centroid position, aspect ratio, Hu invariant moment and contour convexity, and to construct the global shape feature vector Fgs, which serves as one of the basic features for variety identification. The texture analysis feature unit is used to extract local texture features in the multi-scale region of the foreground image. It uses the local binary pattern (LBP) histogram entropy and the gray-level co-occurrence matrix (GLCM) energy and contrast to form a texture feature vector Ftx, which is used to capture the surface particles and color differences of different tea varieties. The leaf vein map structure unit is used to extract the vein structure of the enhanced leaf vein area, construct the leaf vein topology map, and quantify the vein complexity by the number of vein nodes per unit area, bifurcation density and direction consistency; The feature fusion unit is used to perform multi-channel splicing and fusion of feature vectors from GSH, TEX and VGF, and calculate the texture-vein structure difference TPD. The following is its expression: ; in, represents the LBP entropy value of the z-th region, Indicates the density of leaf vein structure. A larger TPD value indicates that the leaf has stronger internal distinguishing details. The intelligent sorting decision module is used to identify and judge the multi-dimensional features of tea images through a lightweight neural network model, output the specific variety category and confidence level, and generate corresponding sorting control instructions; The packaging drive module is used to control the sorting device according to system decisions, including a robotic arm and a pneumatic sorter, to place the tea leaves into the corresponding packaging channel and provide feedback on the track status to form a closed-loop control.

2. The machine vision-based tea variety identification system according to claim 1, characterized in that: The multispectral acquisition module includes an image sensor control unit, a light source array control unit, and a synchronous frame acquisition unit; The image sensor control unit is used to drive at least one group of visible light sensors and one group of near-infrared sensors, set the frame rate, shutter time, exposure parameters and gain factor respectively, generate multi-channel image sampling control instructions through a time synchronization mechanism, and realize parallel acquisition of multispectral image frames; The light source array control unit is used to include a set of controllable ring-shaped LED arrays and a brightness feedback drive circuit. It can dynamically control the luminous intensity and timing of each sub-area light source based on preset lighting sequence parameters or feedback adjustment strategies. Its lighting control process combines the brightness distribution of the center and edge of the imaging area to perform brightness balance, and improves imaging uniformity by generating a structured lighting sequence; The synchronous frame acquisition unit is used to receive synchronization signals from the ISC and LAC to achieve exposure and frame acquisition time locking of the multi-band imaging channels, and realize image alignment at the nanosecond level to prevent image misalignment or fusion distortion caused by spectral delay or shutter difference.

3. The machine vision-based tea variety identification system according to claim 1, characterized in that: The adaptive illumination calibration module includes an image brightness evaluation unit, a partition dynamic dimming unit, and a geometric illumination joint calibration unit; The image brightness evaluation unit is used to calculate the global brightness distribution based on the collected IFS image and derive the image illumination balance index LEI, which is calculated as follows: ; Among them, l i,j Indicates the brightness of the pixel, Represents the mean brightness of the image. This indicator is used to characterize the uniformity of illumination in the image space to support downstream modules in adjusting illumination strategies and image enhancement standards. The zoned dynamic dimming unit is used to determine the current lighting state based on the LEI value from the IBE and, in combination with image grayscale histogram feedback, implements adaptive brightness compensation for each block of the light source array through a multi-segment closed-loop adjustment algorithm based on brightness median drift. This unit supports iterative optimization of light distribution at different angles through PWM or constant current control to converge the LEI to the system-set threshold. The geometric illumination joint calibration unit is used to fuse the image calibration plate detection results with the illumination error matrix, and output the geometric calibration parameter set GPM and the illumination balance correction parameter set LEM, which ultimately constitute the geometric illumination joint calibration configuration GCP for reference by the image distortion correction and white balance modules to ensure the spatial accuracy and brightness consistency of subsequent image processing results.

4. The machine vision-based tea variety identification system according to claim 1, characterized in that: The image preprocessing module includes a white balance and denoising unit, a geometric correction unit, a background removal unit, and a leaf mask generation unit; The white balance and denoising unit is used to perform white balance normalization on the IFS image based on the brightness and channel gain parameters in the GCP, and perform spatial domain denoising on the image through bilateral filtering combined with the non-local means algorithm to enhance the image detail retention capability and improve the subsequent texture recognition accuracy; The geometric correction unit is used to restore the IFS image to the real geometric space based on the perspective matrix and distortion parameters contained in the GCP, applying the radial-tangential distortion correction model and inverse perspective transformation, so as to achieve the consistency standardization of the leaf scale and position and ensure the accurate extraction of subsequent morphological parameters; The background elimination unit is used to combine the color clustering algorithm with the foreground prediction model to identify and eliminate the background information of the non-target area, and output the foreground image area FGI as the basis for generating the leaf image mask; The leaf mask generation unit is used to extract the complete outline of the leaf based on FGI, construct a binary mask image, and calculate the edge consistency factor CCF. The following is its expression: ; in represents the kth edge point, 、 They represent the x / y direction gradients respectively, and CCF is used to quantify the smoothness and completeness of the leaf edge.

5. The machine vision-based tea variety identification system according to claim 1, characterized in that: The intelligent sorting decision module includes a feature inference engine unit, a stability judgment unit, and a dynamic sorting instruction generation unit; The feature inference engine unit is used to receive the fused feature package HFP, perform variety classification prediction through a lightweight convolutional network inference model, and calculate the multi-source feature collaborative evaluation index VIR by combining image quality and structural stability indicators: ; where α and β are regulation factors, and VIR, as the multi-source feature collaborative evaluation index, realizes high-robustness variety classification output; The dynamic sorting instruction generation unit is used to generate sorting instructions with track numbers, execution timings, and priorities according to the final recognized variety, VIR level, and real-time packaging track status, and write them into the system control bus.

6. The machine vision-based tea variety identification system according to claim 5, characterized in that: The stability judgment unit is used to judge the stability of VIR and the confidence level of the neural network output category. By comparing the multi-source feature collaborative evaluation index VIR with the preset threshold A and the preset threshold X, the system divides the recognition result into three quality level intervals, and each level corresponds to different response strategies and improvement methods, constituting a closed-loop feedback recognition evaluation and improvement mechanism; First-level grade evaluation: VIR≥A. The multi-source collaborative evaluation index output by the system has reached a relatively high confidence threshold. The parameter performance of image quality, feature stability, and vein difference is good. The leaf contour is complete, the illumination is uniform, and the feature fusion is clear. Write the current sample into the "high-quality sample buffer" for reference during subsequent model retraining; Second-level grade evaluation: X≤VIR<A, indicating that the recognition credibility of the current sample is qualified, but the parameters of a certain dimension fluctuate slightly. The fluctuations include edge fracture, local overexposure, or weak feature fusion, and there are fuzzy overlapping areas in the texture or vein expression distribution. Do not interrupt the recognition process but write it into the critical sample temporary buffer area. Read the current image brightness distribution matrix LEM, adjust the i,j section in the light source array, perform 15% gray gain iteration, and increase the edge consistency factor CCF above the warning line to increase the contour utilization rate by ​ 7. The machine vision-based tea variety identification system according to claim 1, characterized in that: ​ ​ ​ ​ 8. A method for identifying tea varieties based on machine vision, applied to the tea variety identification system based on machine vision according to any one of claims 1 to 7, characterized in that: ​ ​ Step 2: Automatically adjust the light intensity and distribution and calibrate the camera parameters by real-time detection of ambient light and exposure characteristics in the captured image. Step 3: De-noise, white balance, distortion correction, and background removal are performed on the captured image to extract the complete outline of the tea leaves and the foreground image area, providing standardized input for feature extraction; Step 4: Extract multi-level visual features including global shape, local texture, and leaf vein structure, and fuse them into a unified hybrid feature vector to provide the core data expression for variety identification; Step 5: Use a lightweight neural network model to identify and judge the multi-dimensional features of the tea image, output the specific variety category and confidence level, and generate corresponding sorting control instructions; Step 6: Based on the system decision, the sorting device, including the robotic arm and pneumatic sorter, is controlled to place the tea leaves into the corresponding packaging channel and feedback is given on the track status to form a closed-loop control.

Citation Information

Patent Citations

  • Plant vein custom identification printing method and system based on image identification

    CN119576253A

  • Tea visual identification method, device and system

    CN120388362A

Cited By

  • Tea color automatic evaluation method and system based on machine vision

    CN121207890A

  • Method and system for automatic evaluation of tea color based on machine vision

    CN121207890B