Raw tea grade screening method, medium and equipment

By collecting multi-source information of raw tea and performing illumination compensation, geometric correction and multi-source information registration, combined with a cascade decision model, the problem of integrating multi-dimensional features of raw tea was solved, efficient and accurate grading and intelligent sorting of raw tea were achieved, and the stability of tea quality and market value were improved.

CN120765950AActive Publication Date: 2025-10-10WUYISHAN YEJIAYAN TEA CO LTD +1

Patent Information

Application Number
CN202511267015.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-05
Publication Date
2025-10-10
Estimated Expiration
2045-09-05

AI Technical Summary

Technical Problem

Existing technologies make it difficult to achieve efficient integration and accurate evaluation of the multi-dimensional characteristics of raw tea, resulting in insufficient accuracy in automated sorting during tea processing, affecting the market value and quality stability of tea.

Method used

A multi-source information fusion method is adopted to collect visible light images, near-infrared spectral information and three-dimensional morphological information of raw tea, and then illumination compensation, geometric correction and multi-source information alignment are performed. The grade is determined by combining the cascade decision model, realizing multi-dimensional feature analysis and intelligent grading of raw tea.

Benefits of technology

It improves the accuracy and efficiency of raw tea sorting, realizes multi-dimensional precise characterization and intelligent grading of raw tea quality, and enhances the stability and consistency of tea market value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120765950A_ABST
    Figure CN120765950A_ABST
Patent Text Reader

Abstract

The invention discloses a primary tea grade screening method, a medium and equipment. The method comprises the following steps: acquiring original primary tea information containing a first visible light image, first near infrared spectrum information and first three-dimensional form information according to a preset sampling frequency; performing illumination compensation, geometric correction and multi-source registration processing on the original raw tea information to obtain standard raw tea information; extracting static quality parameters such as strip crimpness from the registered second visible light image, analyzing and acquiring physical and chemical quality parameters from the second near infrared spectrum information, and extracting structural features such as strip compactness from the second three-dimensional form information; finally, grade judgment is conducted through the cascade decision model, and the sorting device is controlled to execute corresponding sorting actions. Fusion analysis and intelligent grading of multi-dimensional features of the raw tea are achieved, and the sorting precision and efficiency are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of tea processing, and in particular to a raw tea grade screening method, medium and equipment. Background Art

[0002] Raw tea grading is a key step in tea processing, directly affecting the market value and quality stability of tea. Traditional grading relies primarily on manual experience, screening by observing characteristics such as tea shape, color, and stem content. This is inefficient and inconsistent. In recent years, automated detection technologies such as machine vision and spectral analysis have been gradually applied to tea sorting. However, due to the complex shape and variable composition of raw tea, existing technologies still struggle to achieve efficient integration and precise evaluation of multi-dimensional features, resulting in insufficient automated sorting accuracy and restricting the standardization and intelligent development of tea processing. Summary of the Invention

[0003] In view of this, the purpose of the present invention is to propose a raw tea grade screening method, medium and equipment to solve the problem of difficulty in accurately integrating multi-dimensional features to achieve efficient grading.

[0004] In order to achieve the above technical objectives, in a first aspect, the present application provides a method for screening raw tea grades, comprising: Collecting raw tea information according to a preset sampling frequency, the raw tea information including a first visible light image, a first near-infrared spectrum information, and a first three-dimensional morphological information; Preprocessing the original raw tea information to obtain standard raw tea information, the preprocessing including illumination compensation, geometric correction and multi-source information registration, the standard raw tea information including the registered second visible light image, second near-infrared spectrum information and second three-dimensional morphological information; Performing multi-scale feature segmentation on the second visible light image to extract static quality parameters, including strip curling, stem content, and yellow flake distribution characteristics, and performing characteristic band analysis on the second near-infrared spectral information to obtain physical and chemical quality parameters; Perform spatial distribution analysis on the second three-dimensional morphological information to extract the cable structure characteristics, including cable compactness and surface texture characteristics; Based on static quality parameters, physical and chemical quality parameters and strip structure characteristics, grade determination is performed through a cascade decision model, which is configured as a primary screening module based on an improved visual Transformer and a comprehensive scoring module based on a random forest. According to the grade determination results, the sorting device is controlled to execute a combination of sorting actions that match each grade.

[0005] In some embodiments, performing multi-scale feature segmentation on the second visible light image to extract static quality parameters includes: The second visible light image is input into the stripe segmentation network. The stripe segmentation network adopts the U-Net architecture integrated with the edge perception mechanism. By embedding learnable morphological convolution kernels in the encoder-decoder skip connection, it outputs the stripe region segmentation result. The cable area segmentation results are input into the 3D reconstruction module, and the 3D point cloud data of the cable surface is obtained through structured light projection measurement technology. The curvature field distribution characteristics are calculated based on the differential geometry method, and the curl quantification parameters are output; The second visible light image and the segmentation results of the stripe region are input into the tea stem detection module. A multi-branch feature pyramid network is used to extract gradient features at the original resolution, 1 / 2 downsampling, and 1 / 4 downsampling scales. The multi-scale detection results are fused using a non-maximum suppression algorithm to output a tea stem distribution heat map. The second visible light image is input into the yellow film recognition module. Through HSV color space conversion combined with adaptive brightness compensation, a deep separable convolutional network is used to extract multispectral texture features and output a yellow film probability distribution map. Based on the quantitative parameters of curling, the heat map of tea stem distribution and the probability distribution map of yellow leaves, static quality parameters including tea rope morphology characteristics, stem content rate and yellow leaf distribution characteristics are generated.

[0006] In some embodiments, performing characteristic band analysis on the second near-infrared spectrum information to obtain physical and chemical quality parameters includes: The second near-infrared spectrum information is screened within a preset wavelength range using a continuous projection algorithm to obtain a characteristic wavelength combination, wherein the preset wavelength range includes a first preset wavelength band reflecting the moisture content of the tea leaves and a second preset wavelength band reflecting the tea polyphenol content, and the characteristic wavelength combination includes the preset wavelength spectrum information; Input the preset wavelength spectrum information into a one-dimensional convolutional neural network based on the attention mechanism, establish a nonlinear mapping relationship between the spectral characteristics and the physical and chemical parameters, and output prediction information, including the predicted value of moisture content and tea polyphenol content; The predicted information is weighted and integrated according to the preset tea quality standards to generate comprehensive physical and chemical quality parameters.

[0007] In some embodiments, performing spatial distribution analysis on the second three-dimensional morphological information to extract the strip structure features includes: Inputting the second three-dimensional morphological information into a surface reconstruction algorithm model of region growing to obtain a three-dimensional model of the cable surface, wherein the surface reconstruction algorithm model is configured to perform neighborhood point aggregation under a normal vector consistency constraint; The surface concave-convex features of the three-dimensional cable surface model are calculated through principal curvature analysis, and the cable compactness parameters are output. The cable compactness parameters include Gaussian curvature distribution information and average curvature value; The three-dimensional model of the cable surface is projected from multiple perspectives, and the texture characteristics of the projection image are analyzed using the gray-level co-occurrence matrix to output the surface texture uniformity parameters. The cable structure characteristics are generated based on the cable compactness parameters and surface texture uniformity parameters.

[0008] In some embodiments, grade determination based on static quality parameters, physical and chemical quality parameters, and strip structure characteristics using a cascade decision model includes: Static quality parameters, physical and chemical quality parameters and strip structure characteristics are tensor-joined through the feature fusion layer to generate a multi-dimensional feature matrix; Input the multidimensional feature matrix into the primary screening module for screening to obtain preliminary screening results, including: The stripe morphology constraint term is introduced into the query-key attention weight calculation to obtain the morphological gradient feature. The stripe morphology constraint term is implemented by the dot product operation of the stripe midline curvature and the attention weight. The morphological gradient features are fused with the Transformer deep features to obtain enhanced stripe features; Screening the reinforcement strip features according to a preset quality threshold, outputting a preliminary screening result, and recording the reinforcement strip features in the preliminary screening result as primary screening features; Input the primary screening features into the comprehensive scoring module to obtain the grade probability distribution, including: Dynamically adjust the weight distribution of primary screening features through the Gini coefficient, and configure no less than a preset number of decision trees for bagging ensemble prediction to obtain the original prediction probability; The Platt scaling method is used to calibrate the distribution of the original prediction probability and output the level probability distribution; The level probability distribution is divided according to the preset level division threshold to generate the final level determination result.

[0009] In some embodiments, illumination compensation includes the following steps: Performing global illumination correction on the first visible light image using a brightness equalization algorithm, and outputting a first preliminary corrected image; Inputting the first preliminary corrected image into a local illumination compensation model, where the local illumination compensation model is configured to be constructed based on Retinex theory to obtain a reflection component and an illumination component; The reflected component is enhanced in detail through adaptive gamma correction, and a second preliminary corrected image with uniform illumination is output; Geometric correction includes the following steps: detecting stripe edge feature points in the second preliminary corrected image; Calculate the lens distortion parameters and the projection transformation matrix to perform geometric correction and obtain a third preliminary corrected image; Multi-source information registration includes the following steps: Spatially aligning the third preliminary corrected image with the second three-dimensional morphological information and outputting a registered second visible light image, including: Extracting a SIFT feature point set from the third preliminary corrected image, and matching the SIFT feature point set with the three-dimensional feature points in the second three-dimensional morphological information to obtain a matching result; The optimal spatial transformation parameters are calculated based on the matching results and registration is performed.

[0010] In some embodiments, pre-processing further comprises: Performing sliding window processing on the first near-infrared spectrum information, fitting the spectrum curve using a quadratic polynomial in each window, calculating the smoothed spectrum intensity value using the fitting polynomial coefficients, and outputting the first preprocessed spectrum information; Calculating the average absorbance of the first preprocessed spectral information at all wavelength points, calculating the standard deviation of the absorbance at each wavelength point, performing a standardization transformation, and outputting the second preprocessed spectral information; Perform principal component analysis on the second preprocessed spectral information to obtain second near-infrared spectral information.

[0011] In some embodiments, pre-processing further comprises: The first 3D morphological information is filtered through a point cloud denoising algorithm, including: Converting the first three-dimensional morphological information into a first point cloud model, and calculating neighborhood spatial distribution characteristics of each point in the first point cloud model; Remove outliers based on the neighborhood spatial distribution characteristics to obtain a preliminary denoised point cloud; The preliminary denoised point cloud is subjected to data simplification using a voxel grid downsampling algorithm, including: Establishing a three-dimensional voxel space division structure, the three-dimensional voxel space division structure includes a plurality of voxel units; Retain representative point cloud data in each voxel unit and output the downsampled point cloud; The downsampled point cloud is corrected through a surface optimization algorithm, including: Analyze the local surface geometric features of the downsampled point cloud, correct abnormal points that do not conform to the preset topological rules, and output the second three-dimensional morphological information.

[0012] In a second aspect, the present invention further provides a computer-readable storage medium storing computer program instructions, which implement the method described in the first aspect when executed by a processor.

[0013] In a third aspect, the present invention further provides an electronic device comprising a memory and a processor, wherein the memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method described in the first aspect.

[0014] Different from the existing technology, the above technical solution has the following beneficial effects: the present invention provides a method, medium and equipment for screening the grade of raw tea, the method comprising: collecting original raw tea information including a first visible light image, a first near-infrared spectrum information and a first three-dimensional morphological information at a preset sampling frequency; performing illumination compensation, geometric correction and multi-source registration processing on the original raw tea information to obtain standard raw tea information; extracting static quality parameters such as strip curling from the second visible light image after registration, obtaining physical and chemical quality parameters from the second near-infrared spectrum information analysis, and extracting structural features such as strip compactness from the second three-dimensional morphological information; finally, performing grade determination through a cascade decision model, and controlling the sorting device to perform the corresponding sorting action. The above technical solution realizes the fusion analysis and intelligent grading of the multi-dimensional characteristics of raw tea, effectively improving the sorting accuracy and efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0016] Figure 1 is a method step diagram of steps S101 to S106 of the method described in the specific embodiment; Figure 2 is a method step diagram of steps S201 to S205 of the method described in the specific embodiment; Figure 3 It is a structural diagram of the electronic device described in the specific implementation method.

[0017] The reference numerals in the above drawings are described as follows: 1. Electronic equipment; 11. Memory; 12. Processor. DETAILED DESCRIPTION

[0018] The application will be described in further detail below with reference to the drawings and embodiments. It is particularly pointed out that the following embodiments are only used to illustrate the application, but do not limit the scope of the application. Similarly, the following embodiments are only part of the embodiments of the application, not all embodiments, and all other embodiments obtained by those of ordinary skill in the art without creative labor are within the scope of the application.

[0019] Please refer to Figure 1 The embodiment provides a method for screening the grade of rough tea, comprising: S101, collecting original rough tea information according to a preset sampling frequency, wherein the original rough tea information comprises a first visible light image, first near-infrared spectrum information and first three-dimensional morphological information; S102, preprocessing the original rough tea information to obtain standard rough tea information, wherein the preprocessing comprises light compensation, geometric correction and multi-source information registration, and the standard rough tea information comprises a second visible light image, second near-infrared spectrum information and second three-dimensional morphological information after registration; S103, performing multi-scale feature segmentation on the second visible light image to extract static quality parameters, wherein the static quality parameters comprise strip and thread curling degree, stem inclusion rate and yellow leaf distribution characteristics, and performing feature band analysis on the second near-infrared spectrum information to obtain physicochemical quality parameters; S104, performing spatial distribution analysis on the second three-dimensional morphological information to extract strip structure characteristics, wherein the strip structure characteristics comprise strip tightness and surface texture characteristics; S105, based on the static quality parameters, physicochemical quality parameters and strip structure characteristics, performing grade determination through a cascaded decision model, wherein the cascaded decision model is configured as a primary screening module based on an improved visual Transformer and a comprehensive scoring module based on a random forest; S106, according to the grade determination result, controlling a sorting device to perform a combination of sorting actions matched with each grade.

[0020] In step S101, the collected original rough tea information is the basic data source for implementing grade screening, wherein the first visible light image can be collected by an industrial camera under a standard light source environment, and is used to record the appearance morphological characteristics of the rough tea; the first near-infrared spectrum information can be obtained by a spectrometer, and reflects the molecular vibration characteristics of the internal chemical components of the rough tea; and the first three-dimensional morphological information can be collected by a structured light scanning system, and represents the spatial distribution characteristics of the strips. Preferably, these information are ensured to be spatiotemporally consistent through a synchronous triggering device, thereby providing multi-dimensional data support for subsequent analysis.

[0021] In step S102, the preprocessing process converts the raw data into a standard analysis format. Illumination compensation is preferably performed by decomposing the illumination and reflection components using the Retinex algorithm to eliminate chromatic aberration caused by uneven illumination. Geometric correction calculates distortion parameters by detecting feature points along the edges of the strips to ensure image dimensional accuracy. Multi-source information registration preferably utilizes the SIFT feature point matching method to achieve spatial alignment between the two-dimensional image and the three-dimensional point cloud. The second visible light image, second near-infrared spectral information, and second three-dimensional morphological information obtained through preprocessing have a unified coordinate system and a standard format.

[0022] In step S103, preferably, the multi-scale feature segmentation adopts the U-Net architecture fused with the edge perception mechanism, and the strip area is accurately segmented by embedding a learnable morphological convolution kernel in the encoder-decoder jump connection. Preferably, the strip curling is obtained by calculating the curvature field distribution of the three-dimensional point cloud; the stem content is detected by fusing the gradient features extracted by the multi-branch feature pyramid network at different scales; the yellow film distribution adopts the deep separable convolution network to analyze the multi-spectral texture features of the HSV color space. Preferably, after the physical and chemical quality parameters are screened by the continuous projection algorithm for the characteristic wavelength, a one-dimensional convolutional neural network based on the attention mechanism is used to establish the mapping relationship between the spectrum and the quality parameters.

[0023] In step S104, spatial distribution analysis preferably employs a region growing surface reconstruction algorithm to construct a three-dimensional model of the tea strand surface under normal vector consistency constraints. Preferably, tea strand compactness is determined by calculating Gaussian curvature distribution through principal curvature analysis; surface texture features are analyzed for uniformity using a gray-level co-occurrence matrix after multi-view projection. These structural features, along with static quality parameters, constitute a comprehensive quality evaluation system for raw tea.

[0024] In step S105, the cascade decision model splices multidimensional parameters into a unified matrix through a feature fusion layer. Preferably, the primary screening module introduces a stripe morphology constraint term into the visual Transformer to strengthen the attention weight of the morphological features; the comprehensive scoring module dynamically adjusts the weight distribution of the random forest through the Gini coefficient, and uses Platt scaling to calibrate the probability distribution, and finally outputs the grade judgment result.

[0025] In step S106, the sorting action combination is dynamically configured according to the grade determination result, and the physical separation of raw tea of ​​different grades is achieved by controlling the air flow valve, mechanical sorting arm and other actuators.

[0026] This embodiment transforms traditional sensory evaluation into a quantifiable intelligent sorting process through multi-source information fusion and cascade decision-making. For example, when the strip firmness and yellow flake distribution characteristics are both below the threshold, the system will automatically determine the batch as substandard and trigger the corresponding sorting procedure.

[0027] This embodiment converts the first visible light image, the first near-infrared spectrum information and the first three-dimensional morphological information into standard raw tea information through multi-source information collection and fusion processing, thereby realizing multi-dimensional and accurate characterization of the raw tea quality; the strip curling degree, stem content and yellow leaf distribution characteristics extracted by multi-scale feature segmentation are used to form a complementary verification with the physical and chemical quality parameters obtained by characteristic band analysis, and the spatial distribution analysis results such as strip firmness and surface texture characteristics are combined to make the grade judgment of the cascade decision model take into account the correlation between the appearance and the intrinsic quality, while avoiding the limitations of a single evaluation indicator; by improving the primary screening module of the visual Transformer and the cascade decision of the comprehensive scoring module based on random forest, the generation of the sorting action combination not only retains the experience dimension of traditional tea evaluation, but also realizes the advantages of intelligent and precise sorting, effectively improving the accuracy of raw tea grade screening and sorting efficiency.

[0028] See also Figure 2 In some embodiments, performing multi-scale feature segmentation on the second visible light image and extracting static quality parameters includes: S201. Input the second visible light image into the strip segmentation network. The strip segmentation network adopts a U-Net architecture integrated with an edge-aware mechanism. By embedding a learnable morphological convolution kernel in the encoder-decoder skip connection, the network outputs the strip region segmentation result, including: The standardized second visible light image is input into the encoder module of the improved U-Net architecture, and a standard-sized square convolution kernel is used for feature extraction. Embedding learnable morphological convolution kernels in each upsampling stage of the decoder module; Output the strip area segmentation result; S202: Input the cable region segmentation result into the 3D reconstruction module, obtain the 3D point cloud data of the cable surface through structured light projection measurement technology, calculate the curvature field distribution characteristics based on the differential geometry method, and output the curl quantification parameters, including: According to the stripe region segmentation results, the region of interest is located in the 3D reconstruction system, a four-step phase-shifted sinusoidal fringe pattern is projected, and the deformed fringe image is acquired. The absolute phase image of the cable surface is reconstructed through the phase unwrapping algorithm and converted into three-dimensional point cloud data based on the system calibration parameters; After reconstructing the Poisson surface of the 3D point cloud data, the Gaussian curvature and mean curvature at each vertex are calculated to generate a curvature field distribution map; The standard deviation and kurtosis coefficient of the curvature value in the curvature field distribution graph are statistically analyzed, and the curl quantification parameters are output after normalization. S203: The second visible light image and the stripe region segmentation results are input into the tea stem detection module. A multi-branch feature pyramid network is used to extract gradient features at the original resolution, 1 / 2 downsampling, and 1 / 4 downsampling scales. The multi-scale detection results are fused using a non-maximum suppression algorithm to output a tea stem distribution heat map, including: Using the strip region segmentation result as a mask, ROI extraction is performed on the second visible light image; In the original resolution branch, the Sobel operator is used to extract horizontal and vertical gradient features, the 1 / 2 downsampling branch calculates the HOG features, and the 1 / 4 downsampling branch extracts the LBP texture features; Multi-scale features are integrated through the three-level feature fusion layer of the feature pyramid network, and a 3×3 convolution kernel is used to generate a preliminary detection response map; The non-maximum suppression algorithm is applied to eliminate overlapping detection frames, and the final output is a tea stem distribution heat map that is spatially aligned with the input image. The pixel value represents the probability of the presence of tea stems at that location. S204: Input the second visible light image into the yellow film recognition module, perform HSV color space conversion combined with adaptive brightness compensation, use a deep separable convolutional network to extract multispectral texture features, and output a yellow film probability distribution map, including: Convert the second visible light image into the HSV color space and perform adaptive brightness compensation on the V channel based on histogram matching; Construct a deep separable convolutional network to extract color-texture joint features; At the end of the network, a spatial pyramid pooling layer is used to integrate multi-scale context information, and the Softmax function is used to output the probability that each pixel belongs to the pornographic category. Perform morphological post-processing on the probability map to eliminate the noise area and generate the final yellow film probability distribution map; S205: Generate static quality parameters including tea morphological characteristics, tea stem content rate, and yellow leaf distribution characteristics based on the curl quantification parameter, tea stem distribution heat map, and yellow leaf probability distribution map, including: The tea stem distribution heat map was binarized by setting a probability threshold, and the percentage of tea stem pixels was calculated as the stem content rate parameter. Counting the area ratio of connected regions whose probability values ​​are greater than a preset probability threshold in the pornographic film probability distribution map to generate pornographic film distribution density features; The curl quantification parameter, the stem content parameter and the yellow piece distribution density feature are linearly combined according to the preset weight ratio; Output standardized static quality parameters. The larger the value of the static quality parameter, the better the appearance quality.

[0029] In step S201, the second visible light image is fed into a modified U-Net architecture. This architecture, building on the traditional encoder-decoder structure, embeds learnable morphological convolution kernels at skip connections, effectively enhancing the ability to extract stripe edge features. The encoder module uses standard-sized square convolution kernels for multi-level feature extraction, while the decoder gradually restores spatial details through upsampling and feature fusion, ultimately outputting accurate stripe region segmentation results.

[0030] In step S202, the strip region segmentation results are used to guide the three-dimensional reconstruction process. Preferably, a specific pattern is projected onto the surface of the tea leaves using a structured light projection system. After collecting the deformed stripe image, a phase unwrapping algorithm is used to reconstruct high-precision three-dimensional point cloud data. Based on the theory of differential geometry, the curvature field of the reconstructed surface is calculated. By statistically analyzing the standard deviation and kurtosis characteristics of the curvature distribution, it is finally converted into a numerical parameter that can quantify the curling degree of the tea strips, namely the curl quantification parameter. The curl quantification parameter objectively reflects the tightness and morphological characteristics of the tea strips.

[0031] In step S203, tea stem detection is performed using a multi-scale feature fusion strategy, combining the second visible light image and the results of the strip region segmentation. Gradient features (Sobel), histogram of oriented gradients (HOG), and local binary pattern (LBP) features are extracted at three different resolution scales. Cross-scale feature fusion is achieved through a feature pyramid network. The resulting distribution heatmap, generated after non-maximum suppression, visually displays the spatial distribution of tea stems, providing a data foundation for subsequent stem content calculation.

[0032] In step S204, for pornographic film identification, the second visible light image is first enhanced in the HSV color space, and adaptive brightness compensation is used to eliminate illumination interference. A depthwise separable convolutional network combines pointwise and spatial convolutions to efficiently extract multispectral texture features. A spatial pyramid pooling layer at the end of the network integrates contextual information from different receptive fields, ultimately outputting a probability distribution map that accurately reflects the likelihood that each pixel belongs to the pornographic film category.

[0033] In step S205, the curl quantification parameters, the tea stem distribution heat map, and the yellow flake probability distribution map are integrated and linearly fused using pre-set weighting ratios. The stem content directly reflects the impurity content, the yellow flake distribution characteristics indicate color uniformity, and the tea leaf morphology reflects the appearance quality. The resulting static quality parameters are then standardized to form an intuitive score ranging from 0 to 100, providing an objective and quantitative basis for evaluating tea appearance quality.

[0034] The embodiment realizes multi-level accurate extraction of the appearance features of the tea leaves by fusing an edge perception mechanism U-Net architecture to perform strip segmentation on the second visible light image; the learnable morphological convolution kernel is used to enhance the strip edge feature extraction capability, so that the strip region segmentation result not only retains the complete morphological features, but also significantly improves the recognition accuracy of the edge details; the curvature field distribution features are calculated from the three-dimensional point cloud data by combining the structured light projection measurement technology and the differential geometry method, so that the curl quantization parameter can objectively reflect the tightness and morphological features of the strip; the multi-branch feature pyramid network is used to synchronously extract gradient features and texture features in multiple scale spaces, and the non-maximum suppression algorithm is used, so that the tea stem distribution heat map not only maintains high detection sensitivity, but also effectively reduces the false detection rate; the HSV color space analysis method based on the depth separable convolution network is used, and the adaptive brightness compensation processing is performed, so that the yellow leaf probability distribution map not only accurately identifies the color and luster abnormal area, but also eliminates the influence of the light condition; finally, the standardized static quality parameters are generated by weighted fusion of the multi-feature parameters, so that the evaluation result not only comprehensively covers the key quality elements such as the strip morphology, the stem rate and the yellow leaf distribution, but also realizes the objective consistency of the quantitative scoring, effectively fuses the advantages of the traditional tea evaluation experience and the modern computer vision technology, and significantly improves the accuracy and reliability of the appearance quality evaluation of the tea leaves.

[0035] In some embodiments, the feature band analysis of the second near-infrared spectral information to obtain physicochemical quality parameters comprises: The second near-infrared spectral information is filtered in a preset wavelength range using a continuous projection algorithm to obtain a characteristic wavelength combination, the preset wavelength range includes a first preset wavelength band reflecting the water content of the tea leaves and a second preset wavelength band reflecting the tea polyphenol content, and the characteristic wavelength combination includes preset wavelength spectral information; The preset wavelength spectral information is input into a one-dimensional convolutional neural network based on an attention mechanism to establish a nonlinear mapping relationship between the spectral features and the physicochemical parameters, and output prediction information, the prediction information includes a water content prediction value and a tea polyphenol content prediction value; The prediction information is weighted and fused according to a preset tea quality standard to generate a comprehensive physicochemical quality parameter.

[0036] In the present embodiment, the second near-infrared spectral information is filtered in a preset wavelength range using a continuous projection algorithm to obtain a characteristic wavelength combination, including: The second near-infrared spectral information is preprocessed, including: Savitzky-Golay convolution smoothing algorithm is used to eliminate spectral noise; Perform standard normal variable transformation (SNV) correction to eliminate scattering effects; Perform multivariate scatter correction (MSC) processing to compensate for optical path differences; Apply the continuous projection algorithm in the first preset band to screen the characteristic wavelengths of moisture, including: Initialize the projection vector to the first column vector of the original spectrum matrix; The projection weight of each wavelength variable is iteratively calculated through the Gram-Schmidt orthogonalization process; The wavelength points whose projection weight is greater than the preset threshold are retained to form the moisture characteristic wavelength subset; Repeating the continuous projection algorithm in the second preset wavelength band to screen the characteristic wavelengths of tea polyphenols includes: Reinitialize the projection vector to the spectral intensity value corresponding to the starting wavelength of the current band; Calculate the projection residual of each wavelength variable on the orthogonal complement space; Select the wavelength combination that minimizes the sum of squares of the prediction residuals to form a tea polyphenol characteristic wavelength subset; The moisture characteristic wavelength subset and the tea polyphenol characteristic wavelength subset are combined to generate the final characteristic wavelength combination, including: Remove duplicate wavelength points in the two subsets; Verify the collinearity problem of characteristic wavelength combination; Outputs a characteristic wavelength combination matrix containing the preset wavelength spectrum information.

[0037] The preset wavelength spectrum information is input into a one-dimensional convolutional neural network based on the attention mechanism, a nonlinear mapping relationship between spectral features and physical and chemical parameters is established, and prediction information is output, including: The input spectral information matrix is ​​sequentially subjected to three layers of one-dimensional convolution operations. The first layer uses a 5×1 convolution kernel to extract wide-band features, and the second and third layers use 3×1 convolution kernels to refine local features. After each layer of convolution, the ReLU activation function and batch normalization are performed, and finally the channel feature vector is obtained by global average pooling. The SE attention mechanism is embedded in the channel feature vector, and the spatial dimension is compressed by global average pooling to generate channel statistics. The nonlinear relationship between channels is learned through two fully connected layers and the weight coefficient of each channel is output. The weight coefficient is multiplied by the original feature vector channel by channel to achieve feature recalibration. The attention-weighted feature vectors are input into two parallel fully connected network branches. The first branch maps the moisture content features through three fully connected layers and uses the Sigmoid function to constrain the output to the range of 0-1. The second branch uses the same network structure to predict the tea polyphenol content. The mean square error is used as the loss function, and the model parameters are dynamically adjusted through the Adam optimizer. During the training process, the changes in the validation set loss are monitored and the early stopping mechanism is used to prevent overfitting. Finally, the denormalized moisture content prediction values ​​and tea polyphenols content prediction values ​​are output.

[0038] In this embodiment, the second near-infrared spectral information is tea spectral data collected in real time by an online detection device, containing characteristic absorption peaks reflecting the internal components of the tea leaves. The characteristic wavelength combination is a key spectral variable selected from a preset wavelength range. This includes a first wavelength subset reflecting moisture characteristics and a second wavelength subset reflecting tea polyphenol characteristics. Together, these two components constitute the preset wavelength spectral information. The predicted moisture content and tea polyphenol content are standardized parameters output by the neural network model, representing the moisture content and phenolic abundance of the tea leaves, respectively.

[0039] Preferably, when using the continuous projection algorithm for characteristic wavelength screening, the initialization parameter is set to the first column vector of the spectral matrix. The wavelength projection weights are iteratively calculated through Gram-Schmidt orthogonalization, and wavelength points with weights greater than 0.85 are retained to form the characteristic subset. For the characteristic band of water, the absorption peak in the range of 1380-1450nm is preferred; for the characteristic band of tea polyphenols, the characteristic spectral lines in the range of 1600-1700nm are analyzed in particular.

[0040] The one-dimensional convolutional neural network based on the attention mechanism consists of a feature extraction module and two prediction branches. The feature extraction module uses a three-layer convolutional structure. The first layer uses a 5×1 convolution kernel to extract wide-band features, and the next two layers use 3×1 convolution kernels to refine local features. The output of each layer is activated by ReLU and batch normalized. The SE attention module generates channel statistics through global average pooling and achieves feature recalibration by learning channel weights through a fully connected layer. The moisture prediction branch and the tea polyphenol prediction branch share the attention-weighted feature vector and output standardized prediction values ​​through a three-layer fully connected network.

[0041] The implementation principle of this embodiment is to establish a precise mapping relationship between spectral characteristics and physical and chemical parameters. Specifically, when the absorption intensity of the first preset band increases, the Sigmoid output value of the moisture prediction branch increases accordingly; when the characteristics of the second preset band change, the tea polyphenols prediction branch can automatically adjust the weight distribution of the fully connected layer. Through the dynamic learning of the Adam optimizer, the model can continuously optimize the convolution kernel parameters and attention weights to reduce prediction errors. The resulting prediction information can be directly used in the weighted fusion module of the quality evaluation system to achieve online detection of the physical and chemical quality of tea.

[0042] In some embodiments, performing spatial distribution analysis on the second three-dimensional morphological information to extract the strip structure features includes: Inputting the second three-dimensional morphological information into a surface reconstruction algorithm model of region growing to obtain a three-dimensional model of the cable surface, wherein the surface reconstruction algorithm model is configured to perform neighborhood point aggregation under a normal vector consistency constraint; The surface concave-convex features of the three-dimensional cable surface model are calculated through principal curvature analysis, and the cable compactness parameters are output. The cable compactness parameters include Gaussian curvature distribution information and average curvature value; The three-dimensional model of the cable surface is projected from multiple perspectives, and the texture characteristics of the projection image are analyzed using the gray-level co-occurrence matrix to output the surface texture uniformity parameters. The cable structure characteristics are generated based on the cable compactness parameters and surface texture uniformity parameters.

[0043] In this embodiment, the second three-dimensional morphological information is input into a surface reconstruction algorithm model of region growing to obtain a three-dimensional model of the cable surface, including: Preprocessing the second three-dimensional morphological information includes: Statistical outlier filtering is used to remove noise points; Use voxel grid filtering to downsample point clouds; Calculate the point cloud normal vector and construct a KD-Tree to accelerate neighborhood search; Neighborhood point aggregation is performed under the normal vector consistency constraint, including: Initialize the seed point to the point with the minimum curvature; Set the normal vector angle threshold to no more than 15 degrees; Set the maximum growth step length to 1 mm; Output a topologically consistent 3D cable surface model.

[0044] The three-dimensional model of the cable surface is analyzed through principal curvature to calculate the surface concave and convex features, and the cable compactness parameters are output, including: The local surface is fitted using the moving least squares method; Calculate the principal curvature of each triangle; Calculate Gaussian curvature and mean curvature based on principal curvatures; Statistics of Gaussian curvature distribution and mean curvature; Outputs the cable compactness parameters including Gaussian curvature distribution information and mean curvature value.

[0045] The three-dimensional model of the cable surface is projected from multiple perspectives, and the texture features of the projection image are analyzed using the gray-level co-occurrence matrix, including: Six orthogonal viewing angles are set along the main axis of the cable; Generate parallel projection grayscale images of each viewing angle; Calculate the gray-level co-occurrence matrix of each image; Extract four texture features: contrast, energy, homogeneity and entropy; Calculate the mean value of texture features at each viewing angle; Outputs surface texture uniformity parameters.

[0046] Based on the cable compactness parameters and surface texture uniformity parameters, the cable structure characteristics are generated, including: Normalize the Gaussian curvature distribution information; Weighted fusion of the mean curvature value and the mean value of texture features; Output the structural feature vector that represents the morphological integrity of the cable.

[0047] In this embodiment, the second three-dimensional morphological information is point cloud data of tea leaves acquired through three-dimensional scanning, which contains coordinate information and normal vector information reflecting surface geometric features. The three-dimensional surface model of the tea leaves is a surface model reconstructed using a region growing algorithm. It includes curvature parameters reflecting surface compactness and projection features reflecting texture uniformity, which together constitute the tea leaf structural characteristics. The tea leaf compactness parameter and surface texture uniformity parameter are standardized parameters output through multi-stage analysis, respectively characterizing the tea leaf's physical compactness and texture distribution characteristics.

[0048] Preferably, when using a region growing surface reconstruction algorithm for 3D modeling, the initialization parameters are set to the point with the minimum curvature. Neighborhood aggregation is performed using normal vector consistency constraints, with the normal vector angle threshold set to no more than 15 degrees and the maximum growth step size limited to 1mm to ensure the topological consistency of the reconstructed model. For curvature analysis, the moving least squares method is preferably used to fit the local surface and calculate the Gaussian curvature and mean curvature of the triangular facets. For texture analysis, six orthogonal viewpoints are set along the main axis of the cable, and four features (contrast, energy, homogeneity, and entropy) are extracted using the gray-level co-occurrence matrix.

[0049] The process of generating cable structural features involves three modules: 3D reconstruction, curvature analysis, and texture analysis. The 3D reconstruction module preprocesses the point cloud using statistical outlier filtering and voxel grid filtering, and constructs a KD-Tree to accelerate neighborhood search. The curvature analysis module calculates the principal curvatures to output the Gaussian curvature distribution and the mean curvature. The texture analysis module calculates the mean texture feature of the gray-level co-occurrence matrix based on multi-view projection images. Finally, the compactness parameter and texture uniformity parameter are normalized and weighted to generate a structural feature vector representing the integrity of the cable morphology.

[0050] The implementation principle of this embodiment is to establish a precise mapping relationship between three-dimensional morphological features and tea strip quality. When the Gaussian curvature distribution exhibits high discreteness, the tea strip compactness parameter is correspondingly reduced; when the contrast and energy values ​​of the texture features fluctuate greatly, the surface texture uniformity parameter is automatically adjusted. Through the dual control of normal vector constraints and curvature optimization, the algorithm can effectively suppress noise interference and reduce reconstruction errors. The resulting structural features can be directly used in the morphological analysis module of the tea quality evaluation system to achieve automated detection of tea strip physical properties.

[0051] In some embodiments, the grade determination based on the static quality parameters, the physicochemical quality parameters and the cord structure features by the cascade decision model comprises: tensor splicing the static quality parameters, the physicochemical quality parameters and the cord structure features through a feature fusion layer to generate a multi-dimensional feature matrix; inputting the multi-dimensional feature matrix into a primary screening module for screening to obtain a preliminary screening result, comprising: introducing a cord morphology constraint term in the query-key value attention weight calculation to obtain a morphological gradient feature, the cord morphology constraint term being realized by a dot product operation of the cord centerline curvature and the attention weight; fusing the morphological gradient feature and the Transformer deep feature to obtain a reinforced cord feature; screening the reinforced cord feature according to a preset quality threshold to output the preliminary screening result, and recording the reinforced cord feature in the preliminary screening result as a primary screening feature; inputting the primary screening feature into a comprehensive scoring module to obtain a grade probability distribution, comprising: dynamically adjusting the weight distribution of the primary screening feature by a Gini coefficient, and configuring no less than a preset number of decision trees for bagging integrated prediction to obtain an original prediction probability; distributively calibrating the original prediction probability by a Platt scaling method to output the grade probability distribution; dividing the grade probability distribution according to a preset grade division threshold to generate a final grade determination result.

[0052] In the present embodiment, the primary screening module is configured based on a network architecture of an improved visual Transformer, comprising: a multi-head attention calculation layer, introducing a cord morphology constraint term in the query-key value attention weight calculation, the constraint term being realized by a dot product operation of the cord centerline curvature and the attention weight; a feature enhancement layer, fusing the morphological gradient feature and the Transformer deep feature at a channel level; a screening decision layer, outputting a preliminary screening result based on a preset hard quality threshold; inputting the feature matrix passing the preliminary screening result into a comprehensive scoring module, the comprehensive scoring module being configured based on an integrated learning architecture of a random forest, comprising: a feature importance weighting layer, dynamically adjusting the weight distribution of each input feature by a Gini coefficient; a multi-tree parallel prediction layer, configuring no less than 50 decision trees for bagging integrated prediction; a probability calibration layer, distributively calibrating the original prediction probability by a Platt scaling method to output the grade probability distribution; The grade probability distribution is passed through a decision rule conversion module to generate a final grade determination result according to a preset grade division threshold.

[0053] In this example, static quality parameters, physical and chemical quality parameters, and tea texture characteristics are tensor-concatenated through a feature fusion layer to generate a multidimensional feature matrix containing multi-source feature information. This multidimensional feature matrix integrates key indicators reflecting the appearance, composition, and morphology of tea leaves, providing a unified feature representation for subsequent grade determination.

[0054] The primary screening features are a subset of strip features that have been enhanced by the attention mechanism, obtained through morphological constraint screening, and used for subsequent grade determination. Preferably, the primary screening module is processed using an improved visual Transformer architecture, the core of which is the introduction of strip morphological constraints in the query-key-value attention calculation. The strip morphological constraints are implemented through the dot product operation of the strip midline curvature and the attention weight, so that the model takes into account the physical morphological characteristics of the strip when calculating feature relevance. The morphological gradient features and the Transformer deep features are fused at the channel level through the feature enhancement layer to form enhanced strip features. The screening decision layer screens the enhanced features based on the preset quality threshold and outputs the preliminary screening results.

[0055] The comprehensive scoring module uses a random forest ensemble architecture to achieve final grade determination. The feature importance weighting layer dynamically adjusts the weights of each input feature using the Gini coefficient to ensure that key features dominate the decision-making process. The multi-tree parallel prediction layer uses a preset number of decision trees for bagging ensemble prediction, generating raw prediction probabilities through a majority voting mechanism. The probability calibration layer uses the Platt scaling method to calibrate the raw probabilities to ensure that the output probabilities align with the true grade distribution.

[0056] This example introduces a tea morphology constraint, allowing the model to consider the tea's physical morphology during the feature extraction phase. A dynamic weighting mechanism based on the Gini coefficient ensures that different quality characteristics are appropriately weighted. Furthermore, Platt probability calibration improves the reliability of grade determination. The resulting grade probability distribution is converted to a specific grade determination using a preset threshold, providing a decision-making basis for automated tea grading.

[0057] In some embodiments, illumination compensation includes the following steps: Performing global illumination correction on the first visible light image using a brightness equalization algorithm, and outputting a first preliminary corrected image; Inputting the first preliminary corrected image into a local illumination compensation model, where the local illumination compensation model is configured to be constructed based on Retinex theory to obtain a reflection component and an illumination component; The reflected component is enhanced in detail through adaptive gamma correction, and a second preliminary corrected image with uniform illumination is output; Geometric correction includes the following steps: detecting stripe edge feature points in the second preliminary corrected image; Calculate the lens distortion parameters and the projection transformation matrix to perform geometric correction and obtain a third preliminary corrected image; Multi-source information registration includes the following steps: Spatially aligning the third preliminary corrected image with the second three-dimensional morphological information and outputting a registered second visible light image, including: Extracting a SIFT feature point set from the third preliminary corrected image, and matching the SIFT feature point set with the three-dimensional feature points in the second three-dimensional morphological information to obtain a matching result; The optimal spatial transformation parameters are calculated based on the matching results and registration is performed.

[0058] In this embodiment, the first visible light image is subjected to global illumination correction using a brightness equalization algorithm, including: Calculating a histogram distribution of a brightness component of the first visible light image, and establishing a reference histogram model under standard lighting conditions; Mapping the brightness component histogram distribution to a reference histogram model through a histogram normalization algorithm to obtain a first preliminary correction image; The first preliminary corrected image is input into a local illumination compensation model. The local illumination compensation model is configured to be constructed based on Retinex theory to obtain a reflection component and an illumination component, including: Gaussian pyramid decomposition is used to obtain illumination components of different scales; Separate the reflection component and the illumination component in scale space; Adaptively smooth the illumination component to obtain the reflection component and the corrected illumination component; The reflection component is enhanced in detail through adaptive gamma correction, and a second preliminary corrected image with uniform illumination is output, including: Calculate the contrast index of the local area and dynamically adjust the gamma value according to the contrast index; Nonlinear enhancement of low-contrast areas; Outputs a uniformly illuminated visible light image.

[0059] In this embodiment, illumination compensation processing employs a multi-level correction strategy to optimize image quality. First, a brightness equalization algorithm is applied to the first visible light image for global illumination correction. This process establishes a reference histogram model under standard illumination conditions and uses a histogram normalization algorithm to map the original image's brightness component distribution to the reference model space, generating a first preliminary corrected image with standard illumination characteristics. Subsequently, a local illumination compensation model constructed based on Retinex theory performs deep processing on the image. Gaussian pyramid decomposition is used to separate the reflection component and illumination component in a multi-scale space. Adaptive smoothing filtering is then applied to the illumination component, ultimately yielding a reflection component reflecting the essential characteristics of the object and a corrected illumination component. To enhance detail, adaptive gamma correction is applied to the separated reflection component. This process dynamically adjusts the gamma parameter by analyzing the local contrast index, applies nonlinear enhancement to low-contrast areas, and outputs a second preliminary corrected image with uniform illumination.

[0060] Geometric correction compensates for physical distortions in the imaging system. The process first detects the tea leaf's edge feature points in the second preliminary correction image as reference markers. By calculating lens distortion parameters and the projection transformation matrix, geometric distortions such as barrel and pincushion distortions are mathematically modeled and compensated for, generating a geometrically accurate third preliminary correction image. This stage specifically preserves the tea leaf's curvature and relative position, ensuring that subsequent processing accurately reflects the tea leaf's physical form.

[0061] Multi-source information registration achieves spatial alignment between visible light images and 3D morphological data. During processing, the SIFT feature point set of the third preliminary corrected image is extracted and matched with the 3D feature points in the second 3D morphological data. The optimal transformation parameters, including the rotation matrix and translation vector, are calculated based on the spatial distribution of the feature points. The registration process uses an iterative closest point algorithm to optimize the accuracy of the spatial transformation. The final output is a second visible light image with strictly aligned spatial positions, establishing a precise spatial reference for subsequent multimodal feature fusion.

[0062] This embodiment uses a three-stage correction processing chain to systematically solve key problems such as uneven illumination, geometric distortion, and multi-source data misalignment during the imaging process, providing a reliable image data foundation for quality analysis.

[0063] This embodiment uses multi-level illumination compensation and geometric correction processing to convert the original visible light image into a second visible light image with uniform illumination and accurate geometric shape, solving the problem of feature distortion caused by uneven illumination and lens distortion during tea imaging. It uses a local illumination compensation model based on Retinex theory to separate the reflection component and the illumination component, and combines adaptive gamma correction to enhance the details of low-contrast areas, so that the image can significantly improve the local contrast while retaining the essential characteristics of the strips, providing a high-fidelity visual data foundation for subsequent morphological analysis and quality judgment. It achieves spatial alignment of the visible light image and three-dimensional morphological information through multi-source information registration, so that the two-dimensional texture features of the strips can be accurately matched with the three-dimensional geometric features, ensuring the spatial consistency of multimodal feature fusion and avoiding the problem of feature misalignment caused by registration errors. The illumination-geometry-space three-level correction chain constructed in this embodiment provides a stable and reliable image preprocessing solution for the automatic tea sorting system, effectively improving the accuracy and robustness of the subsequent quality analysis module.

[0064] In some embodiments, pre-processing further comprises: Performing sliding window processing on the first near-infrared spectrum information, fitting the spectrum curve using a quadratic polynomial in each window, calculating the smoothed spectrum intensity value using the fitting polynomial coefficients, and outputting the first preprocessed spectrum information; Calculating the average absorbance of the first preprocessed spectral information at all wavelength points, calculating the standard deviation of the absorbance at each wavelength point, performing a standardization transformation, and outputting the second preprocessed spectral information; Perform principal component analysis on the second preprocessed spectral information to obtain second near-infrared spectral information.

[0065] In this embodiment, the near-infrared spectrum preprocessing adopts a three-level optimization strategy to achieve noise reduction and feature enhancement of spectral data. First, a sliding window process is performed on the original first near-infrared spectrum information. An approximate mathematical model of the spectral curve is established in the local window through a quadratic polynomial fitting algorithm. The smooth spectrum is reconstructed using the fitting polynomial coefficients to effectively suppress high-frequency noise interference and output the first preprocessed spectrum information with improved signal-to-noise ratio. Subsequently, the spectral data is standardized based on statistical methods. A benchmark reference is established by calculating the average absorbance over the entire wavelength range. The standard deviation is normalized based on the discrete degree of the absorbance at each wavelength point to eliminate the systematic errors introduced by instrument fluctuations and measurement environment differences, and generate second preprocessed spectrum information with a unified dimensional standard.

[0066] During the feature extraction phase, principal component analysis (PCA) is used to reduce the dimensionality of the standardized spectra. By calculating the covariance characteristics of the spectral matrix, key principal component vectors reflecting the differences in tea's intrinsic composition are identified. This high-dimensional spectral data is then projected into a low-dimensional feature space. This approach effectively extracts characteristic band combinations related to the tea's physical and chemical quality while preserving the original spectral information, outputting a second near-infrared spectrum with clear physical meaning.

[0067] This embodiment uses sliding window smoothing and polynomial fitting algorithms to suppress noise in the original near-infrared spectrum, effectively eliminating high-frequency random interference in the spectrum acquisition process and significantly improving the signal-to-noise ratio of the first pre-processed spectral information. Using a statistically based standardization transformation method, the second pre-processed spectral information has a unified dimension standard by calculating the full-wavelength average absorbance and standard deviation normalization, which not only overcomes the systematic deviation between different measurement batches but also retains the essential spectral characteristics of the tea samples. Principal component analysis is used to extract features and reduce the dimensionality of high-dimensional spectral data, converting the second near-infrared spectral information into a low-dimensional feature vector reflecting the key physical and chemical properties of tea. This not only solves the problem of spectral data dimensional redundancy but also highlights the characteristic bands related to quality evaluation. The "smoothing-standardization-dimensionality reduction" three-level spectral pre-processing system constructed in this embodiment provides high-precision, low-noise feature input for the subsequent inversion of tea physical and chemical parameters, effectively ensuring the accuracy and stability of the quality analysis model.

[0068] In some embodiments, pre-processing further comprises: The first 3D morphological information is filtered through a point cloud denoising algorithm, including: Converting the first three-dimensional morphological information into a first point cloud model, and calculating neighborhood spatial distribution characteristics of each point in the first point cloud model; Remove outliers based on the neighborhood spatial distribution characteristics to obtain a preliminary denoised point cloud; The preliminary denoised point cloud is subjected to data simplification using a voxel grid downsampling algorithm, including: Establishing a three-dimensional voxel space division structure, the three-dimensional voxel space division structure includes a plurality of voxel units; Retain representative point cloud data in each voxel unit and output the downsampled point cloud; The downsampled point cloud is corrected through a surface optimization algorithm, including: Analyze the local surface geometric features of the downsampled point cloud, correct abnormal points that do not conform to the preset topological rules, and output the second three-dimensional morphological information.

[0069] In this embodiment, a three-stage optimization processing chain is constructed for 3D morphological information processing. First, point cloud denoising is performed on the original first 3D morphological information. This involves converting the 3D data into a first point cloud model, calculating the neighborhood spatial distribution characteristics of each sampling point (including parameters such as neighborhood density and normal vector consistency), and then identifying and removing outliers that do not conform to the distribution pattern based on these spatial distribution characteristics, generating a preliminary denoised point cloud that retains the original geometric characteristics.

[0070] Voxel grid downsampling technology is used in the data simplification stage: a three-dimensional voxel space division structure covering the point cloud space is established, and the most geometrically representative point cloud data is retained in each voxel unit through the barycentric coordinate algorithm. While reducing the amount of data, the integrity of key morphological features is ensured, and a high-fidelity downsampled point cloud is output.

[0071] The surface optimization phase utilizes a surface reconstruction algorithm based on Moving Least Squares (MLS). This algorithm analyzes the local curvature characteristics and normal vector continuity of the sampled point cloud, performs smooth interpolation on areas with geometric abrupt changes, corrects topological anomalies caused by sampling errors, and ultimately outputs a second 3D morphological representation with complete surface characteristics. This processing chain systematically addresses common issues with noise, data redundancy, and surface damage in 3D scan data.

[0072] This embodiment uses a point cloud denoising algorithm to filter noise from the first three-dimensional morphological information, effectively identifies and removes outliers based on the neighborhood spatial distribution characteristics, and significantly improves the geometric fidelity of the three-dimensional point cloud data; uses a voxel grid downsampling algorithm to simplify the data of the preliminary denoised point cloud, and through the three-dimensional voxel space division structure and representative point cloud retention mechanism, it achieves efficient compression of the data volume while ensuring the integrity of key morphological features; uses an MLS-based surface optimization algorithm to perform geometric correction on the downsampled point cloud, and accurately corrects topological anomalies caused by sampling errors through local curvature feature analysis and normal vector continuity detection. The preprocessing method constructed in this embodiment not only solves the common noise interference problem of original three-dimensional scanning data, but also optimizes data storage and processing efficiency, while ensuring the geometric accuracy and topological integrity of the output point cloud model, providing a high-precision three-dimensional data foundation for subsequent tea morphological feature extraction and quality analysis.

[0073] In a second aspect, this embodiment further provides a computer-readable storage medium storing computer program instructions, which implement the method described in the first aspect when executed by a processor.

[0074] The computer program involved in this embodiment can be stored in a computer device readable storage medium, which includes but is not limited to a disk, a magnetic tape, a magnetic card, a floppy disk, a flash memory, an optical disc, an optical card, a read-only memory (ROM), a random access memory (RAM), an erasable programmable ROM (EPROM) and an electrically erasable programmable ROM (EEPROM), etc., and also includes other biological, physical or chemical structures that can achieve similar or equivalent functions to the storage media listed above, such as DNA, RNA, proteins and other units with information storage capabilities. In a specific embodiment, the storage medium involved can be one of the above-mentioned media types or a combination of the above-mentioned media types. In different embodiments, the computer program involved in the embodiment can be stored in a single medium in a centralized manner or in a distributed manner in multiple media. The memory containing the computer device readable storage medium can be a non-volatile memory or a random access memory. These computer device readable storage media can be built into the device or can be connected to the device involved in the embodiment as an external device or part of an external device. In some embodiments, a memory having a computer-readable storage medium is deployed locally; in other embodiments, a solution of deploying the memory away from the processor may also be adopted, such as a network-attached memory accessed via an RF circuit or an external port and a communication network, wherein the communication network may be the Internet, one or more intranets, a local area network (LAN), a wide area network (WLAN), a storage area network (SAN), etc., or a suitable combination thereof, as long as the computer device can access the memory. In addition, the computer program involved in the embodiment can be stored in plaintext / ciphertext form, or can be designed as training data, which can be integrated and reorganized through model training and implicitly stored in the parameter state of a deep neural network or other machine learning model.

[0075] See also Figure 3 In a third aspect, this embodiment further provides an electronic device 1, comprising a memory 11 and a processor 12, wherein the memory 11 is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor 12 to implement the method described in the first aspect.

[0076] The processor described in this embodiment can be implemented by hardware, firmware, software or a combination thereof, and can use a circuit, a single or multiple application-specific integrated circuits (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a central processing unit (CPU), a controller, a microcontroller, or at least one of a microprocessor. It also includes other physical, biological or chemical structures that can achieve similar or equivalent functions to the processors listed above, such as biological neurons, quantum computing units, DNA computing units, etc., so that the processor can execute some or all of the steps in the computer program or method involved in each embodiment of the present application, or any combination of the steps mentioned therein.

[0077] Different from the existing technology, the above technical solution has the following beneficial effects: through multi-source information collection and fusion processing, visible light images, near-infrared spectral information and three-dimensional morphological information are converted into standard raw tea information, realizing the multi-dimensional and accurate characterization of the raw tea quality. The curling degree, stem content and yellow leaf distribution characteristics of the strips extracted by multi-scale feature segmentation are used to form a complementary verification with the physical and chemical quality parameters obtained by characteristic band analysis. Combined with the spatial distribution analysis results such as strip firmness and surface texture characteristics, the grade judgment of the cascade decision model not only takes into account the correlation between the appearance and the intrinsic quality, but also avoids the limitations of a single evaluation indicator. By improving the cascade decision of the primary screening module of the visual Transformer and the comprehensive scoring module based on random forest, the generation of the sorting action combination not only retains the experience dimension of traditional tea evaluation, but also realizes the advantages of intelligent and precise sorting.

[0078] The above technical solution establishes a complete data processing chain, ensuring image data quality through multi-stage illumination compensation and geometric correction; optimizing spectral data using sliding window smoothing and principal component analysis; and enhancing the accuracy of 3D morphological information through point cloud denoising, voxel downsampling, and surface optimization. These preprocessing steps provide a reliable data foundation for subsequent feature extraction. The fusion analysis of multimodal features and the innovative design of a cascade decision model have effectively improved the accuracy, stability, and efficiency of raw tea grade screening.

[0079] The above descriptions are only some embodiments of the present invention and do not limit the scope of protection of the present invention. Any equivalent device or equivalent process transformation made by using the contents of the description and drawings of the present invention, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for screening raw tea grades, characterized in that: include: Collecting raw tea information according to a preset sampling frequency, wherein the raw tea information includes a first visible light image, a first near-infrared spectrum information, and a first three-dimensional morphological information; Preprocessing the original raw tea information to obtain standard raw tea information, wherein the preprocessing includes illumination compensation, geometric correction, and multi-source information registration, and the standard raw tea information includes the registered second visible light image, second near-infrared spectrum information, and second three-dimensional morphological information; performing multi-scale feature segmentation on the second visible light image to extract static quality parameters, including strip curling, stem content, and yellow flake distribution characteristics, and performing characteristic band analysis on the second near-infrared spectral information to obtain physical and chemical quality parameters; performing spatial distribution analysis on the second three-dimensional morphological information to extract cable structural features, wherein the cable structural features include cable compactness and surface texture features; Based on the static quality parameters, physical and chemical quality parameters and strip structure characteristics, grade determination is performed through a cascade decision model, wherein the cascade decision model is configured as a primary screening module based on an improved visual Transformer and a comprehensive scoring module based on a random forest; According to the grade determination results, the sorting device is controlled to execute a combination of sorting actions that match each grade.

2. The method for screening raw tea grades according to claim 1, characterized in that: Performing multi-scale feature segmentation on the second visible light image to extract static quality parameters includes: Inputting the second visible light image into a stripe segmentation network, wherein the stripe segmentation network adopts a U-Net architecture integrated with an edge-aware mechanism, embeds a learnable morphological convolution kernel in an encoder-decoder skip connection, and outputs a stripe region segmentation result; The cable area segmentation result is input into the 3D reconstruction module, the 3D point cloud data of the cable surface is obtained by structured light projection measurement technology, the curvature field distribution characteristics are calculated based on the differential geometry method, and the curl quantification parameters are output; The second visible light image and the segmentation result of the stripe region are input into the tea stem detection module. A multi-branch feature pyramid network is used to extract gradient features at the original resolution, 1 / 2 downsampling, and 1 / 4 downsampling scales, and the multi-scale detection results are fused using a non-maximum suppression algorithm to output a tea stem distribution heat map. Input the second visible light image into the yellow film recognition module, perform HSV color space conversion combined with adaptive brightness compensation, use a deep separable convolutional network to extract multispectral texture features, and output a yellow film probability distribution map; According to the curling quantitative parameters, tea stem distribution heat map and yellow leaf probability distribution map, static quality parameters including tea rope morphological characteristics, tea stem content rate and yellow leaf distribution characteristics are generated.

3. The method for screening raw tea grades according to claim 1, characterized in that: Performing characteristic band analysis on the second near-infrared spectrum information to obtain physical and chemical quality parameters includes: The second near-infrared spectrum information is screened within a preset wavelength range using a continuous projection algorithm to obtain a characteristic wavelength combination, wherein the preset wavelength range includes a first preset wavelength band reflecting the moisture content of tea leaves and a second preset wavelength band reflecting the tea polyphenol content, and the characteristic wavelength combination includes preset wavelength spectrum information; Inputting the preset wavelength spectrum information into a one-dimensional convolutional neural network based on an attention mechanism, establishing a nonlinear mapping relationship between spectral features and physical and chemical parameters, and outputting prediction information, wherein the prediction information includes a moisture content prediction value and a tea polyphenol content prediction value; The predicted information is weighted and integrated according to the preset tea quality standards to generate comprehensive physical and chemical quality parameters.

4. The method for screening raw tea grades according to claim 1, characterized in that: Performing spatial distribution analysis on the second three-dimensional morphological information to extract cable structure features includes: Inputting the second three-dimensional morphological information into a region growing surface reconstruction algorithm model to obtain a three-dimensional model of the cable surface, wherein the surface reconstruction algorithm model is configured to perform neighborhood point aggregation under a normal vector consistency constraint; Calculating surface concave-convex features of the three-dimensional cable surface model through principal curvature analysis, and outputting cable compactness parameters, wherein the cable compactness parameters include Gaussian curvature distribution information and average curvature value; The three-dimensional model of the cable surface is projected from multiple perspectives, and the texture features of the projection image are analyzed using a gray-level co-occurrence matrix to output a surface texture uniformity parameter; The strip structural characteristics are generated according to the strip tightness parameter and the surface texture uniformity parameter.

5. The method for screening raw tea grades according to claim 1, characterized in that: Based on the static quality parameters, physical and chemical quality parameters and strip structure characteristics, grade determination is performed through a cascade decision model including: The static quality parameters, physical and chemical quality parameters and strip structure characteristics are tensor-joined through a feature fusion layer to generate a multi-dimensional feature matrix; The multidimensional feature matrix is ​​input into the primary screening module for screening to obtain preliminary screening results, including: Introducing a stripe morphology constraint term into the query-key attention weight calculation to obtain morphological gradient features. The stripe morphology constraint term is implemented by the dot product operation of the stripe midline curvature and the attention weight. The morphological gradient features are fused with the Transformer deep features to obtain enhanced stripe features; Screening the reinforcement strip features according to a preset quality threshold, outputting a preliminary screening result, and recording the reinforcement strip features in the preliminary screening result as primary screening features; The primary screening features are input into the comprehensive scoring module to obtain the grade probability distribution, including: Dynamically adjust the weight distribution of the primary screening features through the Gini coefficient, and configure no less than a preset number of decision trees to perform bagging ensemble prediction to obtain the original prediction probability; The Platt scaling method is used to calibrate the distribution of the original prediction probability and output the level probability distribution; The level probability distribution is divided according to a preset level division threshold to generate a final level determination result.

6. The method for screening raw tea grades according to claim 1, characterized in that: The illumination compensation comprises the following steps: Performing global illumination correction on the first visible light image using a brightness equalization algorithm, and outputting a first preliminary corrected image; Inputting the first preliminary corrected image into a local illumination compensation model, wherein the local illumination compensation model is configured to be constructed based on Retinex theory to obtain a reflection component and an illumination component; Performing detail enhancement on the reflection component through adaptive gamma correction, and outputting a second preliminary corrected image with uniform illumination; The geometric correction comprises the following steps: Detecting strip edge feature points in the second preliminary corrected image; Calculate the lens distortion parameters and the projection transformation matrix to perform geometric correction and obtain a third preliminary corrected image; The multi-source information registration comprises the following steps: Spatially aligning the third preliminary corrected image with the second three-dimensional morphological information and outputting a registered second visible light image, comprising: Extracting a SIFT feature point set from the third preliminary corrected image, and matching the SIFT feature point set with the three-dimensional feature points in the second three-dimensional morphological information to obtain a matching result; Optimal spatial transformation parameters are calculated based on the matching results and registration is performed.

7. The method for screening raw tea grades according to claim 1, characterized in that: The pre-processing further comprises: Performing sliding window processing on the first near-infrared spectrum information, fitting a spectrum curve using a quadratic polynomial in each window, calculating a smoothed spectrum intensity value using the fitting polynomial coefficients, and outputting first preprocessed spectrum information; Calculating the average absorbance of the first preprocessed spectral information at all wavelength points, calculating the standard deviation of the absorbance at each wavelength point, performing a standardization transformation, and outputting second preprocessed spectral information; Perform principal component analysis on the second preprocessed spectral information to obtain the second near-infrared spectral information.

8. The method for screening raw tea grades according to claim 1, characterized in that: The pre-processing further comprises: The first three-dimensional morphological information is subjected to noise filtering by a point cloud denoising algorithm, including: Converting the first three-dimensional morphological information into a first point cloud model, and calculating neighborhood spatial distribution characteristics of each point in the first point cloud model; Remove outliers according to the neighborhood spatial distribution characteristics to obtain a preliminary denoised point cloud; The preliminary denoised point cloud is subjected to data simplification using a voxel grid downsampling algorithm, including: Establishing a three-dimensional voxel space division structure, wherein the three-dimensional voxel space division structure includes a plurality of voxel units; Retain representative point cloud data in each voxel unit and output the downsampled point cloud; Correcting the downsampled point cloud using a surface optimization algorithm includes: Analyze the local surface geometric features of the downsampled point cloud, correct abnormal points that do not conform to the preset topological rules, and output the second three-dimensional morphological information.

9. A computer-readable storage medium storing computer program instructions, characterized in that: The computer program instructions implement the method according to any one of claims 1 to 8 when executed by a processor.

10. An electronic device comprising a memory and a processor, characterized in that: The memory is configured to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Tea quality grade detection method and system based on NIRS and CV

    CN117054372A

  • Tea leaf impurity content detection method, device, equipment and medium

    CN118674969A

  • Tea leaf processing auxiliary method and system based on intelligent decision

    CN120198028A

  • Method and device for mapping three-dimensional (3D) point cloud model based on deep learning

    US12175691B1

Cited By

  • Intelligent polygonatum sibiricum grading system based on multi-mode visual spectrum

    CN121198624A

  • Green tea freshness quality evaluation method based on near infrared spectrum and component association

    CN121453714A

  • Automatic material selection method and system based on tea processing technology

    CN121861655A