Feature extraction and analysis method and system for human body tongue image
By acquiring image frame sequences during tongue diagnosis, statistically analyzing the frequency of edge point changes and the rate of curvature change, and utilizing graph neural networks and isolated forest models, a tongue image task label mapping structure set is generated. This solves the problems of strong subjectivity and inconsistent standards in tongue diagnosis, and achieves standardized path reconstruction and accurate matching of the tongue surface region, thereby improving the accuracy and consistency of diagnosis.
Patent Information
- Application Number
- CN202511446255.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-11
- Publication Date
- 2026-01-30
AI Technical Summary
Existing tongue diagnosis methods rely heavily on physicians' subjective judgment and lack objective quantitative standards, resulting in inconsistent diagnostic results. They are also unable to maintain stability and high accuracy in complex environments, and cannot effectively identify subtle changes on the tongue surface, thus affecting clinical diagnostic outcomes.
By acquiring continuous frame sequences in images, statistically analyzing the frequency of edge point changes and the rate of curvature change, using graph neural networks to compare contour differences, and combining isolated forest models to detect color anomalies, a tongue image task label mapping structure set is generated to achieve standardized path reconstruction and accurate matching of the tongue surface region.
It achieves standardized path reconstruction of the tongue surface area, improves the accuracy of analysis and the consistency of diagnostic results, overcomes the subjectivity and instability of traditional tongue diagnosis, and enhances the objectivity and intelligence of tongue diagnosis.
Smart Images

Figure CN121437384A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of tongue image diagnosis, in particular to a human tongue image feature extraction and analysis method and system. BACKGROUND
[0002] Tongue diagnosis is an important part of the medical diagnosis system in the technical field, mainly through observation and judgment of the color, shape, thickness and texture of the tongue and tongue fur, to reflect the function of viscera, blood status and pathological changes, the goal is to convert the traditional tongue diagnosis process which relies on the subjective experience of doctors into an objective, quantitative and repeatable diagnosis mode, and to build an analysis system that can automatically identify tongue features by combining modern computer vision, medical image processing and artificial intelligence methods, to support clinical auxiliary diagnosis and health assessment.
[0003] A human tongue image feature extraction and analysis method refers to a method of automatically extracting and classifying features of collected human tongue images through computer vision and deep learning models, aiming to solve the technical problems of strong subjectivity, inconsistent standards and lack of quantitative indicators in traditional tongue diagnosis, and to establish a tongue diagnosis system that remains stable and has high precision in complex shooting environments, so as to realize accurate identification of key diagnostic information such as tongue color, tongue shape, tongue fur color and tongue fur texture, provide reliable technical support for the objectification, standardization and intelligentization of tongue diagnosis, and improve the consistency and clinical application value of diagnosis.
[0004] The tongue image diagnosis method of the prior art highly depends on the subjective judgment of doctors, and in the diagnosis process, although the characteristics of tongue color, tongue shape and tongue fur are observed to infer the health status of viscera, due to the lack of objective quantitative standards, the diagnosis results of different doctors differ greatly, lack of consistency and repeatability, and the extraction and morphological analysis of the tongue surface boundary in the existing method mainly rely on visual observation and experience accumulation, making it difficult to unify the diagnosis standard and easily affected by external conditions such as light and shooting angle, resulting in increased error, the traditional technology cannot effectively process the color difference and morphological change of tongue fur in complex background, cannot automatically identify the tiny changes on the tongue surface, leading to some pathological information being difficult to be discovered and accurately judged in time, the thickness and color of tongue fur are easily affected by shooting conditions, leading to images taken at different times and by different devices cannot be effectively compared under the same standard, further affecting the effect of clinical diagnosis, the existing technology has significant shortcomings in the objectivity, accuracy, repeatability and intelligentization of tongue diagnosis, and cannot meet the growing clinical application demand. SUMMARY
[0005] The purpose of the present application is to solve the shortcomings in the prior art, and to provide a human tongue image feature extraction and analysis method and system.
[0006] In order to achieve the above object, the present application adopts the following technical scheme: A feature extraction and analysis method of human tongue image, comprising the following steps: S1: By collecting the continuous frame sequence in the image, scanning the horizontal and vertical direction pixel difference of the edge point and comparing the edge channel response intensity, counting the adjacent frame boundary point fracture frequency and increasing the curvature change rate of the contour, extracting the area gradient mutation position, and establishing the tongue surface main region boundary set; S2: Based on the tongue surface main region boundary set, the boundary point sequence is obtained, the center of gravity point connecting line direction is extracted, and the boundary closed path direction is normalized, the relative position offset of the connecting point between the boundary segments is judged, the combined reconstruction tongue area distribution quadrant is calibrated, and the tongue surface region structure path sequence is generated; S3: Based on the tongue surface region structure path sequence, the sequence path segment is divided, the angle difference of adjacent path segments is analyzed, and the tongue margin structure symmetric segment is identified, the profile difference of similar segments is compared by using the graph neural network, the path segment with higher profile matching degree is screened out, the tongue margin turning frequency is counted, and the boundary path main structure reference set is obtained; S4: Based on the boundary path main structure reference set, the corresponding image position index is extracted, the high value aggregation distribution of the image brightness channel is found, the coincidence degree of the main structure with the coverage area of the bright area is measured, the stability of the included angle between the extension direction and the main path is calculated, and the tongue coating aggregation region mapping index group is obtained; S5: Based on the tongue coating aggregation region mapping index group, the corresponding region image block is obtained, the color principal component vector difference of the tongue surface block is screened, the color principal component abnormal value is detected by using the isolated forest model, the task class label structure correlation degree value is compared, and the tongue image task label mapping structure set is generated.
[0007] As a further scheme of the present application, the tongue surface main region boundary set includes the pixel difference of the horizontal and vertical directions of the edge point, the difference of the edge channel response intensity and the fracture frequency of the adjacent frame boundary point, the tongue surface region structure path sequence includes the boundary point sequence, the center of gravity point connecting line direction and the relative position offset of the connecting point of the boundary segment, the boundary path main structure reference set includes the angle difference set of the path segment, the path segment with the profile matching degree exceeding the threshold value and the path turning frequency, the tongue coating aggregation region mapping index group includes the image position index, the high value aggregation distribution of the brightness channel, the stability of the included angle between the extension direction and the main path, and the tongue image task label mapping structure set includes the color principal component difference value, the color principal component abnormal value screening result and the task class label structure correlation degree value.
[0008] As a further scheme of the present application, the specific steps for establishing the tongue surface main region boundary set are: Based on the continuous frame sequence in the collected image, the red, green and blue channel pixel difference at the same coordinates between frames is counted, and the horizontal and vertical direction edge intensity difference section is extracted, the edge response intensity fluctuation range is identified, and the edge change initial distribution group is obtained; Based on the edge change initial distribution set, the fracture frequency of the edge points of the same region across frames is counted, the curvature growth range of adjacent contour segments in the change section is screened, the area variation coordinates are matched, and the tongue surface main region boundary set is established.
[0009] As a further scheme of the present application, the specific steps for generating the tongue surface region structure path sequence are: Based on the tongue surface main region boundary set, the boundary point sequence is obtained, the coordinates of each boundary point are extracted, and the spatial distance difference between points is analyzed to calculate the center of gravity point connection direction, which is normalized to generate the boundary direction normalized sequence; Based on the boundary direction normalized sequence, the relative position offset of the connecting point of adjacent boundary segments is calculated, the error of the connecting point is judged and corrected, the connecting position of adjacent boundary segments is adjusted according to the error, and the tongue surface region structure path sequence is generated.
[0010] As a further scheme of the present application, the specific steps for obtaining the boundary path main structure reference set are: Based on the tongue surface region structure path sequence, the sequence path segment is divided, the angle difference of adjacent path segments is calculated, the direction offset of each segment is determined, the path with a change range exceeding a threshold value is screened out, the difference of the angle between paths is calculated and recorded, and the path segment angle difference set is generated; Based on the path segment angle difference set, the graph neural network is used to compare the contours of adjacent path segments, the similarity index is calculated, the path segment with a contour matching degree exceeding a threshold value is extracted, the symmetry is identified, the path difference is recorded, and the contour similarity analysis result is generated. Based on the contour similarity analysis result, the turning frequency of each path segment is calculated, the frequency of the path segment with a high turning frequency is counted, the position information of the comprehensive path is sorted, and the boundary path main structure reference set is obtained.
[0011] As a further scheme of the present application, the execution process of the graph neural network is as follows: first, the features of each path segment are represented as nodes of a graph, the nodes are connected through edges, the weight of the edge represents the similarity of adjacent path segments, the features of each node are propagated, the features of each node are weighted and fused with the features of neighbor nodes, the features of the nodes are updated, the network performs multiple graph convolution operations to integrate the information from adjacent nodes into the features of each node, the contours of adjacent path segments are compared according to the similarity index between nodes, the path segment with a contour matching degree exceeding a threshold value is identified, the symmetry is identified through the updated node features, and the contour similarity analysis result is generated.
[0012] As a further scheme of the present application, the specific steps for obtaining the tongue fur aggregate region mapping index set are: Based on the boundary path main structure reference set, the pixel index of the corresponding image position is extracted, the numerical range of the luminance channel in the image is scanned, and the distribution of the high luminance value area is calculated, the coverage area of the bright area and the coincidence proportion of the boundary path are counted, and the bright area and main structure coincidence analysis result is obtained; Based on the bright area and main structure coincidence analysis result, the included angle between the extension direction of the bright area and the main path direction is measured, and the included angle stability is evaluated, the extension direction is adjusted to keep consistent with the main path, and the tongue fur aggregation area mapping index group is obtained.
[0013] As a further scheme of the present application, the specific steps for generating the tongue image task label mapping structure set are: Based on the tongue fur aggregation area mapping index group, the corresponding image block is obtained and the color principal component is extracted, the color channel value difference is calculated and compared, the isolated forest model is used to detect abnormal values, the color block with significant changes is screened out, and the color principal component difference value set is generated; Based on the color principal component difference value set, the shape contour is analyzed and the concave part proportion of each image block is calculated, the matching degree of the proportion and the tongue fur aggregation area is evaluated, and the shape contour and fur aggregation area matching degree result is obtained. Based on the shape contour and fur aggregation area matching degree result, the values of each task class label are compared, the structural correlation degree between the evaluation labels is obtained, and the tongue image task label mapping structure set is obtained.
[0014] As a further scheme of the present application, the execution process of the isolated forest is that, first, the principal component of each image block color channel is extracted and the difference value is calculated, multiple decision trees are established in the data space, the data is recursively split, the color block different from most samples in the data is identified, the isolation degree of each sample is calculated, according to the labels of abnormal and normal, the color block with significant changes is screened out, and the color principal component difference value set is generated.
[0015] A human tongue image feature extraction and analysis system, which is used to execute the human tongue image feature extraction and analysis method described above, the system comprises: A data acquisition module: acquires images through a continuous frame sequence, calculates the pixel difference value of the edge point horizontal and vertical directions, compares the edge channel response intensity, counts the fracture frequency of adjacent frame boundary points, extracts the area gradient mutation position, and establishes a tongue surface main area boundary set; A boundary processing module: based on the tongue surface main area boundary set, the boundary point sequence is extracted, the center of gravity point connecting line direction is calculated, the relative position offset of the boundary segment connecting point is judged and corrected, the tongue area distribution quadrant is calibrated and reconstructed, and the tongue surface area structure path sequence is generated. Structural path extraction module: Based on the structural path sequence of the tongue region, it divides the path into segments, analyzes the angle difference between adjacent path segments and identifies symmetrical segments of the tongue edge structure, uses a graph neural network to compare the contour differences of similar segments, counts the turning frequency and generates a reference set of the main structure of the boundary path; Region mapping module: Based on the boundary path main structure reference set, extract image position index, calculate the overlap between the bright area coverage area and the main structure, measure the stability of the angle between the extension direction and the main path, and generate tongue coating aggregation region mapping index group; Task label mapping module: Based on the tongue coating aggregation region mapping index group, filter the difference of the principal component vector of tongue surface color, use the isolated forest model to detect outliers of the principal component of color, compare the structural correlation degree values of task class labels, and generate a tongue image task label mapping structure set.
[0016] Compared with the prior art, the advantages and positive effects of the present invention are as follows: 1. In this invention, by statistically analyzing the frequency of edge point changes and the rate of curvature change, the boundary set of the main region of the tongue surface is effectively extracted, avoiding the limitations of strong subjectivity in traditional tongue diagnosis, thereby realizing standardized path reconstruction of the tongue surface region, significantly reducing errors and improving the accuracy of analysis; 2. In this invention, a graph neural network is introduced to compare the contour differences of similar segments, thereby enhancing the extraction of structural features and the judgment of details, improving the adaptability to different tongue structures during the analysis process, and optimizing the mapping accuracy of the tongue surface structure. 3. In this invention, outliers in the principal components of color are detected by an isolated forest model, which enables efficient screening and accurate matching of tongue image task labels. This effectively overcomes the influence of large and subtle color differences during tongue diagnosis, ensuring the consistency and reliability of diagnostic results and overcoming the subjectivity and instability of traditional tongue diagnosis methods. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the workflow of the present invention; Figure 2 This is a system flowchart of the present invention. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0019] Example 1 Please see Figure 1 This invention provides a technical solution: a method for feature extraction and analysis of human tongue images, comprising the following steps: S1: By acquiring a continuous frame sequence in the image, scanning the pixel difference in the horizontal and vertical directions of the edge points and comparing the edge channel response intensity, counting the breakage frequency of the boundary points of adjacent frames and incrementally judging the rate of change of the contour curvature, extracting the location of abrupt changes in the area gradient, and establishing the boundary set of the main region of the tongue surface. S2: Based on the boundary set of the main region of the tongue, obtain the boundary point sequence, extract the direction of the centroid connection line and normalize the direction of the boundary closure path, determine the relative position offset of the connection point between the boundary segments, calibrate and reconstruct the tongue region distribution quadrant, and generate the tongue region structure path sequence. S3: Based on the path sequence of the tongue surface region structure, divide the sequence path segments, analyze the angle difference between adjacent path segments and identify symmetrical segments of the tongue edge structure, use graph neural network to compare the contour difference of similar segments, filter out path segments with high contour matching degree, count the tongue edge turning frequency, and obtain the reference set of the main structure of the boundary path. S4: Based on the boundary path main structure reference set, extract the corresponding image position index, find the high value aggregation distribution of the image brightness channel, measure the degree of overlap between the bright area coverage area and the main structure, calculate the stability of the angle between the extension direction and the main path, and obtain the tongue coating aggregation area mapping index group. S5: Based on the tongue coating aggregation region mapping index group, obtain the corresponding region image blocks, filter the color principal component vector difference of the tongue surface block, use the isolated forest model to detect the outlier values of the color principal component, compare the correlation values of the task class label structure, and generate the tongue image task label mapping structure set.
[0020] The main boundary set of the tongue surface includes the pixel difference in the horizontal and vertical directions of the edge points, the difference in the response intensity of the edge channels, and the frequency of boundary point breakage in adjacent frames. The tongue surface region structure path sequence includes the boundary point sequence, the direction of the centroid connection line, and the relative position offset of the boundary segment connection points. The main structure reference set of the boundary path includes the set of path segment angle differences, path segments with contour matching degree exceeding the threshold, and the path turning frequency. The tongue coating aggregation region mapping index group includes the image position index, the high value aggregation distribution of the brightness channel, and the stability of the angle between the extension direction and the main path. The tongue image task label mapping structure set includes the color principal component difference value, the color principal component outlier screening result, and the task class label structure correlation value.
[0021] The specific steps for establishing the boundary set of the principal region of the tongue are as follows: Based on the continuous frame sequence in the acquired image, the pixel difference of the red, green and blue channels at the same coordinates between frames is counted, and the edge intensity difference segments in the horizontal and vertical directions are extracted to identify the fluctuation range of edge response intensity and obtain the initial distribution group of edge changes. Based on the initial distribution group of edge changes, the frequency of edge point breakage in the same region across frames is statistically analyzed, the curvature growth rate of adjacent contour segments in the change section is screened, the area variation coordinates are matched, and the boundary set of the main region of the tongue surface is established. Based on the continuous frame sequence in the acquired image, the horizontal gradient extraction parameters are set to dx = 1, dy = 0, and the kernel size is 3. The vertical gradient extraction parameters are set to dx = 0, dy = 1, and the kernel size is 3. The pixels of the red, green, and blue channels are subtracted point by point at the same coordinates and the absolute value is taken to obtain the gradient difference matrix in the horizontal and vertical directions. The threshold of the difference matrix is set to 128. The part exceeding the threshold is marked as the edge point region. The contour search step is used to extract the edge point sequence, and the starting and ending coordinates of the bounding rectangle are marked in the sequence. The fluctuation range of the edge response intensity is scanned, and the difference interval between the maximum and minimum values is counted and recorded in the edge intensity histogram statistics table to generate the initial distribution group of edge changes. Based on the initial distribution group of edge changes, during the execution process, a low threshold of 100 and a high threshold of 200 are set. The edge points of the input distribution group are detected frame by frame and a binary image is generated. The number of edge point breaks across frames in the same region is counted. The breakage frequency threshold is set to 3 times. The change regions with breakage frequencies exceeding the threshold are filtered out. The change regions are divided into adjacent contour segments and the curvature difference is calculated. The curvature increment threshold is set to 0.5. The contour segments exceeding the threshold are marked. The coordinate point corresponding to the maximum curvature difference is recorded and used as the area variation coordinate. The area differences recorded in different frames are compared. The boundary points that meet the conditions are combined into a unified set to generate the tongue surface main region boundary set.
[0022] The specific steps for generating the tongue surface region structure path sequence are as follows: Based on the boundary set of the main region of the tongue, the boundary point sequence is obtained, the coordinates of each boundary point are extracted, and the spatial distance difference between the points is analyzed to calculate the direction of the centroid line. After standardizing the direction of the centroid line, the direction is normalized to generate a standardized sequence of boundary directions. Based on the standardized sequence of boundary directions, the relative position offset of the connection points of adjacent boundary segments is calculated, the error of the connection points is judged and corrected, the connection position of adjacent boundary segments is adjusted according to the error, and the structural path sequence of the tongue region is generated. Based on the boundary set of the main region of the tongue, the boundary points are clustered and numbered. The number of clusters is set to 4, and the number of iterations is set to 300. The initial centroid is initialized by extracting the boundary point coordinates. The horizontal and vertical coordinates of each point in the boundary point sequence generated after clustering are extracted and recorded in a two-dimensional array. The spatial distance between points is calculated and stored in a matrix. Each boundary point is traversed and a spatial distance difference matrix is generated. The direction of the line connecting the centroid points is calculated. The weight is set as the reciprocal of the distance from each point to the centroid. The direction results are standardized. The standardized direction sequence is normalized into a unit vector sequence to generate a standardized boundary direction sequence. Based on the standardized sequence of boundary directions, the coordinates of adjacent boundary segments are compared. The number of iterations is set to 200, and the convergence threshold is 1e-5. The relative position offset of the connection points of each pair of adjacent boundary segments is calculated, the offset is matrixed and stored in a specified array, and points with error offsets exceeding the set threshold of 0.5 are marked. The connection point error is corrected, the maximum number of iterations is set to 50, and the distance threshold is set to 1.0. The adjusted connection points are reconnected to the boundary segments and the reconnected positions are calculated and recorded in order in the matrix. Finally, a continuous boundary segment path is synthesized and output, generating a tongue-shaped region structure path sequence.
[0023] The specific steps to obtain the boundary path master structure reference set are as follows: Based on the tongue-surface region structural path sequence, the sequence path segments are divided, the angle difference between adjacent path segments is calculated, the directional offset of each segment is determined, the path with the change amplitude exceeding the threshold is filtered out, the angle difference between paths is calculated and recorded, and a set of path segment angle difference values is generated. Based on the set of path segment angle differences, a graph neural network is used to compare the contours of adjacent path segments, calculate similarity indices, extract path segments with contour matching degrees exceeding a threshold, identify symmetry, record path differences, and generate contour similarity analysis results. Based on the contour similarity analysis results, the turning frequency of each path segment is calculated, and the frequency of path segments with high turning frequency is counted. The location information of the comprehensive path is sorted to obtain the reference set of the main structure of the boundary path. Based on the path sequence of the tongue region structure, each path is divided into sub-segments of equal length. Each segment contains 20 boundary points. The angle difference between adjacent path segments is calculated. The parameter is set as the difference vector of the coordinates of each boundary point. The angle unit is degrees. The result is rounded to one decimal place. The angle difference of each path segment is calculated sequentially and recorded in the angle difference table. Path segments with an angle offset greater than a set threshold of 15 degrees are filtered and marked, generating a set of path segment angle differences. Based on the set of path segment angle differences, a graph neural network is used to compare the contours of adjacent path segments. Each path segment is defined as a node, and the node feature vector contains the coordinates of the boundary point sequence and the angle difference. The edge weight is the initial value of the similarity between adjacent nodes. The number of graph convolutional layers is set to 3, the activation function is ReLU, the number of iterations is 200, and the learning rate is set to 0.01. The node features are propagated and weighted and fused. The similarity index is calculated and recorded in the matrix. Path segments with a contour matching degree exceeding the threshold of 0.8 are screened and classified. The path segment sequence is subjected to symmetry detection, symmetrical path pairs are marked and the difference data is recorded to generate contour similarity analysis results. Based on the contour similarity analysis results, the number of turns in each path segment is calculated. An angle change greater than 20 degrees is defined as one turn. The path sequence is traversed and statistically analyzed to obtain a turning frequency matrix. Path segments with a turning frequency exceeding a set threshold of 5 times are marked and their frequencies are accumulated. The path segments are arranged from high to low turning frequency. A location index table is generated by combining the corresponding location information. The comprehensive path is stored in the order of location index to obtain the reference set of the main structure of the boundary path.
[0024] The execution process of a graph neural network is as follows: First, the features of each path segment are represented as nodes in the graph. Nodes are connected by edges, and the weight of the edges represents the similarity between adjacent path segments. Information is propagated through the features of each node. The features of each node are weighted and fused with the features of its neighbors to update the node features. The network performs multiple graph convolution operations so that the features of each node can integrate information from its neighbors. The contours of adjacent path segments are compared based on the similarity index between nodes, and path segments with contour matching degree exceeding a threshold are identified. Symmetry is identified through the updated node features, and contour similarity analysis results are generated. Graph neural networks, according to the formula:
[0025] in: Indicates the first The node at the th The feature vector of the layer, Indicates the first The neighboring node is at the _th ... The feature vector of the layer, Represents a node The set of neighboring nodes, Represents a node With nodes The square root of the product of degrees. Let represent the weight matrix of the layer. This represents a non-linear activation function, set to ReLU in the method. Represents the similarity weight of the edges. This represents the path segment turning frequency correction factor. Contour symmetry correction factor Represents the regularization smoothing coefficient. Indicates the index of the target node currently being calculated. Indicates the index of the neighboring node. Indicates the layer index of the neural network; Execution process: First, each path segment in the tongue-shaped region structure path sequence is defined as a node, and adjacent edges are established according to spatial connection relationships to form a neighbor set. For each node index Traverse the neighbor node index Extract the first eigenvectors of the layer compute nodes With nodes The degree and the square root are obtained Then, the ratio of the normalized path segment angle difference to the included angle difference is used to obtain the edge similarity weight. The correction factor is obtained by counting the number of turns in a path segment and dividing by the total number of path segments. The correction coefficient is then calculated using the ratio of the length difference between the path segment and the mirrored path segment. Set the regularization smoothing coefficient The value is 0.01, which is the value of the neighbor feature vector. sequentially with the weight matrix After multiplication, weighted aggregation is performed, and finally a nonlinear activation function is used. Perform the transformation to obtain the first... The node at the th Layer feature representation .
[0026] The specific steps for obtaining the mapping index group of tongue coating aggregation regions are as follows: Based on the boundary path main structure reference set, the pixel index of the corresponding image position is extracted, the value range of the brightness channel in the image is scanned, and the distribution of the area with high brightness value is calculated. The coverage area of the bright area and the overlap ratio of the boundary path are statistically analyzed to obtain the result of the overlap analysis between the bright area and the main structure. Based on the analysis results of the overlap between the bright area and the main structure, the angle between the extension direction of the bright area and the main path direction is measured and the stability of the angle is evaluated. The extension direction is adjusted to keep it consistent with the main path, and the mapping index group of the tongue coating aggregation area is obtained. Based on the boundary path main structure reference set, the brightness channel of the image is processed. The preset gray level is 256, and the brightness value range is 0 to 255. The index of each pixel point is extracted and the position number is recorded. Each pixel is traversed in index order and the brightness value is calculated. Pixels with brightness values greater than 180 are divided into bright areas and stored in the bright array. The distribution of the bright array is statistically analyzed, and continuous brightness regions are identified. The adjacency mode is set to eight neighborhoods. The area value of each region is calculated and stored in the area statistics table. The area of the bright area is compared with the number of overlapping pixels of the boundary path point set. The overlap ratio threshold is set to 0.6. The results exceeding the threshold are recorded and stored, and the bright area and main structure overlap analysis results are generated. Based on the analysis results of the overlap between the bright area and the main structure, the extension direction of the bright area is calculated. The horizontal and vertical coordinates of the pixels within the bright area are input as a data matrix. The covariance matrix dimension is set to 2×2. The eigenvalues of the matrix are decomposed, and the eigenvector corresponding to the largest eigenvalue is taken as the extension direction vector. The angle between the extension direction and the main path direction is calculated. The angle threshold is set to 30 degrees. Angles less than the threshold are recorded as stable angles. Angles greater than the threshold are adjusted by rotating the vector matrix and recalculating the angle. The corrected extension direction result is output and merged with the path set to obtain the tongue coating aggregation area mapping index group.
[0027] The specific steps for generating the tongue image task label mapping structure set are as follows: Based on the tongue coating aggregation region mapping index group, the corresponding image blocks are obtained and the principal color components are extracted. After calculating the color channel value differences, they are compared. An isolated forest model is used to detect outliers, and color blocks with significant changes are selected to generate a set of principal color component difference values. Based on the set of color principal component differences, the morphological contours are analyzed and the proportion of the concave part of each image block is calculated. The matching degree between the proportion and the tongue coating aggregation area is evaluated, and the matching degree between the morphological contours and the coating aggregation area is obtained. Based on the matching results of morphological contour and moss accumulation region, the numerical values of each task category label are compared to obtain the structural correlation between evaluation labels and obtain the tongue image task label mapping structure set. Based on the tongue coating aggregation region mapping index group, the corresponding image blocks are obtained and the color principal components are extracted. The pixel values of the red, green and blue channels of each image block are established as a three-dimensional data matrix. The covariance matrix dimension is set to 3×3. The eigenvalues of the matrix are decomposed, and the eigenvectors corresponding to the first two largest eigenvalues are retained as principal component vectors. The difference between the principal component vector and the mean vector of each image block is calculated, the Euclidean distance of the channel difference is quantified, and the difference value is recorded in the difference matrix. An isolated forest model is used to detect outliers. The number of base learner trees is set to 100, the subsample ratio is 0.25, the maximum sample size is 256, and the random number seed is set to 42. The input difference matrix is split point by point and the isolation depth is calculated. The color block indexes that are judged to be outliers are extracted and stored, and a set of color principal component difference values is generated. Based on the set of color principal component differences, the boundary points of each image patch are extracted. If the number of boundary points is less than 50, they are padded to 50. The contour curve is approximated by polygons. The approximation accuracy is set to 0.02 times the contour perimeter. The area of the concave part of the polygon is extracted and the area ratio is calculated. The ratio value is recorded in the ratio matrix. The values in the ratio matrix are compared with the area distribution of the tongue coating aggregation area. The matching threshold is set to 0.7. Image patches with a ratio greater than the threshold are selected and their indices are recorded to obtain the matching degree result between the morphological contour and the tongue coating aggregation area. Based on the matching results of morphological contour and moss accumulation region, the numerical values of each task category label are compared. The numerical values of the task category label are used as input vectors, and Euclidean distance is used as the similarity measure. The clustering method is set as the average chain method. The input numerical matrix is aggregated level by level, the merging distance of each aggregation is recorded and a dendrogram is generated. The structure between the labels is compared item by item, the correlation degree is calculated and output in matrix form, and the tongue image task label mapping structure set is obtained.
[0028] The execution process of Isolation Forest is as follows: First, extract the principal components of the color channels of each image patch and calculate the difference value. Then, build multiple decision trees in the data space, recursively split the data, identify the color patches in the data that are different from most samples, calculate the isolation degree of each sample, and filter out the color patches with significant changes according to the labels as abnormal and normal, and generate a set of color principal component difference values. An isolated forest, according to the formula:
[0029] in: Indicates sample With a sample set size of Abnormal scores at that time The color principal component vector representing a single image patch. This indicates the total number of input samples. Indicates sample Average path depth Indicates the total number of samples is The normalization constant at time is defined as , This represents the path depth weighting coefficient. This represents the color shift correction factor. This represents the color distribution offset function. This indicates the hue perturbation compensation term. Indicates the outlier penalty threshold. This represents the smoothing term, with a value of 0.01, to avoid the denominator being zero; Execution process: First, the input image patch is sampled, and the principal component vector of the image patch is set as the sample. The total quantity is recorded as By constructing an isolated forest model, the feature dimension space is recursively divided, and statistical samples are analyzed. Average depth of leaf nodes in isolated trees At the same time, using the total number of samples Calculate the normalization constant Next, set the path depth weighting coefficient. ,right The contribution level is adjusted, and then a baseline is fitted to the color distribution of the entire image, and the samples are... The sum of squared deviations from the baseline is defined as the color distribution offset function. And multiply by the color shift correction factor. By comparing the principal components of the colors of an image patch with those of its neighboring patches, the hue perturbation compensation term is obtained by statistically analyzing the average phase difference. Then set an outlier penalty threshold. As a correction offset, a normalization constant will be added to the denominator. With smoothing terms The summation forms a stable term. Substituting all the above parameters into the formula, the anomaly score is calculated. .
[0030] Please see Figure 2 A feature extraction and analysis system for human tongue images, the system comprising: Data acquisition module: Acquires images through continuous frame sequences, calculates the pixel difference in the horizontal and vertical directions of edge points, compares the response intensity of edge channels, counts the breakage frequency of boundary points in adjacent frames, extracts the locations of abrupt changes in area gradient, and establishes a set of boundaries for the main region of the tongue surface. Boundary processing module: Based on the boundary set of the main region of the tongue, extract the boundary point sequence, calculate the direction of the centroid connection line, determine and correct the relative position offset of the boundary segment connection point, calibrate and reconstruct the tongue region distribution quadrant, and generate the tongue region structure path sequence. Structural path extraction module: Based on the structural path sequence of the tongue region, it divides the path into segments, analyzes the angle difference between adjacent path segments and identifies symmetrical segments of the tongue edge structure, uses a graph neural network to compare the contour differences of similar segments, counts the turning frequency and generates a reference set of the main structure of the boundary path; Region mapping module: Based on the boundary path main structure reference set, extract image location index, calculate the overlap between the bright area coverage area and the main structure, measure the stability of the angle between the extension direction and the main path, and generate tongue coating aggregation region mapping index group; Task label mapping module: Based on the tongue coating aggregation region mapping index group, it filters the difference of the principal component vector of tongue surface color, uses the isolated forest model to detect outliers of the principal component of color, compares the structural correlation degree values of task class labels, and generates a tongue image task label mapping structure set.
[0031] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1. A method for feature extraction and analysis of human tongue image, characterized in that, The method comprises the following steps: S1: by collecting a sequence of continuous frames in an image, scanning the horizontal and vertical pixel difference of edge points and comparing the edge channel response intensity, counting the adjacent frame boundary point break frequency and increasing the judgment of the change rate of contour curvature, extracting the area gradient mutation position, and establishing the tongue surface main region boundary set; S2: based on the tongue surface main region boundary set, the boundary point sequence is obtained, the center of gravity point connecting direction is extracted, and the boundary closed path direction is normalized, the relative position offset of the connecting points between the boundary segments is judged, the combined reconstruction tongue area distribution quadrant is calibrated, and the tongue surface area structure path sequence is generated; S3: based on the tongue surface area structure path sequence, the sequence path segment is divided, the angle difference of adjacent path segments is analyzed, and the symmetrical segment of the tongue margin structure is identified, the profile difference of similar segments is compared using a graph neural network, the path segment with high profile matching degree is screened out, the tongue margin turning frequency is counted, and the boundary path main structure reference set is obtained; S4: based on the boundary path main structure reference set, the corresponding image position index is extracted, the high value aggregation distribution of the image brightness channel is found, the coincidence degree of the main structure with the brightness area coverage is measured, the stability of the included angle between the extension direction and the main path is calculated, and the tongue fur aggregate area mapping index group is obtained; S5: based on the tongue fur aggregate area mapping index group, the corresponding region image block is obtained, the color principal component vector difference of the tongue surface block is screened, the color principal component abnormal value is detected using an isolated forest model, the task class label structure correlation degree value is compared, and the tongue image task label mapping structure set is generated.
2. The method of feature extraction and analysis of human tongue image according to claim 1, wherein, The tongue surface main region boundary set includes the horizontal and vertical pixel difference of edge points, the edge channel response intensity difference and the adjacent frame boundary point break frequency, the tongue surface area structure path sequence includes the boundary point sequence, the center of gravity point connecting direction and the relative position offset of the connecting points of the boundary segments, the boundary path main structure reference set includes the angle difference set of the path segments, the path segments with profile matching degree exceeding the threshold value and the path turning frequency, the tongue fur aggregate area mapping index group includes the image position index, the brightness channel high value aggregation distribution and the stability of the included angle between the extension direction and the main path, and the tongue image task label mapping structure set includes the color principal component difference value, the color principal component abnormal value screening result and the task class label structure correlation degree value.
3. The method of feature extraction and analysis of human tongue image according to claim 1, wherein, The specific steps for establishing the tongue surface main region boundary set are: Based on the sequence of continuous frames in the collected image, the red, green and blue channel pixel difference at the same coordinates between frames is counted, and the horizontal and vertical edge intensity difference section is extracted, the edge response intensity fluctuation range is identified, and the initial edge change distribution group is obtained; Based on the initial edge change distribution group, the break frequency of the edge points in the same region across frames is counted, the curvature growth amplitude of adjacent contour segments in the change section is screened, the area variation coordinates are matched, and the tongue surface main region boundary set is established.
4. The method of feature extraction and analysis of human tongue image according to claim 1, wherein, The specific steps for generating the tongue surface area structure path sequence are: Based on the tongue surface main region boundary set, the boundary point sequence is obtained, the coordinates of each boundary point are extracted, and the spatial distance difference between the points is analyzed, the center of gravity point connecting direction is calculated, the center of gravity point connecting direction is standardized and direction normalized, and the boundary direction standardized sequence is generated; Based on the boundary direction normalized sequence, the relative position offset of the connecting point of adjacent boundary segments is calculated, the error of the connecting point is judged and corrected, the connecting position of adjacent boundary segments is adjusted according to the error, and a tongue surface region structure path sequence is generated.
5. The method of feature extraction and analysis of human tongue image according to claim 1, wherein, The specific steps for obtaining the boundary path main structure reference set are: Based on the tongue surface region structure path sequence, the sequence path segments are divided, the angle difference of adjacent path segments is calculated, the direction offset of each segment is determined, the path segments with a change amplitude exceeding a threshold value are screened out, the difference in the angle between the path segments is calculated and recorded, and a path segment angle difference set is generated; Based on the path segment angle difference set, the outlines of adjacent path segments are compared using a graph neural network, a similarity index is calculated, path segments with a contour matching degree exceeding a threshold value are extracted, symmetry is identified, path difference values are recorded, and a contour similarity analysis result is generated; Based on the contour similarity analysis result, the turning frequency of each path segment is calculated, the frequency of path segments with a high turning frequency is counted, the position information of the comprehensive path is sorted, and a boundary path main structure reference set is obtained.
6. The method of feature extraction and analysis of human tongue image according to claim 1, wherein, The graph neural network execution process is as follows: first, the features of each path segment are represented as nodes of a graph, the nodes are connected by edges, the weight of the edge represents the similarity of adjacent path segments, the features of each node are propagated, the features of each node are weighted and fused with the features of neighbor nodes, the features of each node are updated, the network performs multiple graph convolution operations to integrate information from adjacent nodes into the features of each node, the outlines of adjacent path segments are compared according to the similarity index between nodes, path segments with a contour matching degree exceeding a threshold value are identified, symmetry is identified using the updated node features, and a contour similarity analysis result is generated.
7. The method of feature extraction and analysis of human tongue image according to claim 1, wherein, The specific steps for obtaining the tongue fur aggregate region mapping index set are: Based on the boundary path main structure reference set, the pixel index of the corresponding image position is extracted, the value range of the brightness channel in the image is scanned, and the distribution of the high brightness value region is calculated, the coverage area of the bright area and the overlap ratio of the boundary path are counted, and a bright area and main structure overlap analysis result is obtained; Based on the bright area and main structure overlap analysis result, the included angle between the extension direction of the bright area and the direction of the main path is measured, and the stability of the included angle is evaluated, the extension direction is adjusted to keep it consistent with the main path, and a tongue fur aggregate region mapping index set is obtained.
8. The method of feature extraction and analysis of human tongue image according to claim 1, wherein, The specific steps for generating the tongue image task label mapping structure set are: Based on the tongue fur aggregate region mapping index set, the corresponding image block is obtained and the color principal component is extracted, the color channel value difference is calculated and compared, the isolated forest model is used to detect outliers, color blocks with significant changes are screened out, and a color principal component difference value set is generated; Based on the color principal component difference value set, the shape contour is analyzed and the proportion of the concave part of each image block is calculated, the matching degree of the proportion and the tongue fur aggregate region is evaluated, and a shape contour and fur aggregate region matching degree result is obtained; Based on the shape contour and fur aggregate region matching degree result, the numerical values of each task class label are compared, the structural correlation degree between the evaluation labels is obtained, and a tongue image task label mapping structure set is obtained.
9. The method of feature extraction and analysis of human tongue image according to claim 1, wherein, The execution process of the isolation forest is as follows: first, the principal components of the color channels of each image block are extracted, and the difference values are calculated, a plurality of decision trees are established in the data space, the data is recursively split, the color blocks different from most samples in the data are identified, the isolation degree of each sample is calculated, and according to the labels of abnormal and normal, the color blocks with significant changes are screened out, and a set of color principal component difference values are generated.
10. A feature extraction and analysis system for human tongue image, characterized in that, The feature extraction and analysis method of the human tongue image according to any one of claims 1-9, the system comprises: A data acquisition module: acquires images through a continuous frame sequence, calculates the pixel difference values in the horizontal and vertical directions of the edge points, compares the edge channel response intensities, counts the fracture frequencies of the adjacent frame boundary points, extracts the area gradient mutation positions, and establishes a tongue surface main region boundary set; A boundary processing module: based on the tongue surface main region boundary set, extracts the boundary point sequence, calculates the direction of the center of gravity point connecting line, judges and corrects the relative position offset of the boundary segment connecting point, calibrates and reconstructs the tongue area distribution quadrant, and generates a tongue surface region structure path sequence; A structure path extraction module: based on the tongue surface region structure path sequence, divides the path segments, analyzes the angle difference values of adjacent path segments and identifies the tongue edge structure symmetry segments, compares the contour difference values of similar segments by using a graph neural network, counts the turning frequency and generates a boundary path main structure reference set; A region mapping module: based on the boundary path main structure reference set, extracts the image position index, calculates the coincidence degree of the bright area coverage area and the main structure, measures the stability of the included angle between the extension direction and the main path, and generates a tongue fur aggregate region mapping index group; A task label mapping module: based on the tongue fur aggregate region mapping index group, screens the color principal component vector difference values of the tongue surface block, detects the abnormal values of the color principal components by using an isolation forest model, compares the structure correlation degree values of the task class labels, and generates a tongue image task label mapping structure set.
