CN1162798C - Analysis method of tongue color, fur color and tongue thickness in traditional Chinese medicine based on multi-class support vector machine - Google Patents

Analysis method of tongue color, fur color and tongue thickness in traditional Chinese medicine based on multi-class support vector machine Download PDF

Info

Publication number
CN1162798C
CN1162798C CNB021037957A CN02103795A CN1162798C CN 1162798 C CN1162798 C CN 1162798C CN B021037957 A CNB021037957 A CN B021037957A CN 02103795 A CN02103795 A CN 02103795A CN 1162798 C CN1162798 C CN 1162798C
Authority
CN
China
Prior art keywords
tongue
pixel
coating
fur
type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CNB021037957A
Other languages
Chinese (zh)
Other versions
CN1367454A (en
Inventor
沈兰荪
卫保国
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing University of Technology
Original Assignee
Beijing University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing University of Technology filed Critical Beijing University of Technology
Priority to CNB021037957A priority Critical patent/CN1162798C/en
Publication of CN1367454A publication Critical patent/CN1367454A/en
Application granted granted Critical
Publication of CN1162798C publication Critical patent/CN1162798C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)
  • Image Analysis (AREA)
  • Measuring And Recording Apparatus For Diagnosis (AREA)

Abstract

一种基于多类支持向量机的中医舌色、苔色、舌苔厚度分析方法,应用于计算机医学图像处理领域。该方法是由数码相机进行图象采集,并通过USB接口将图象输入到计算机处理器中,在处理器中将舌体区域从舌图象中分割出来,特征在于该方法还依次包括下述步骤:在进行分级聚类分析生成聚类树并调整的基础上,采用基于聚类树的支持向量机(CTSVM)方法进行舌体区域像素识别,并把舌体区像素识别的类别数设为15种;将舌面分为五个区域,统计各区中数量最多的像素类别,及各种类型的象素数;进行舌色描述;进行舌苔色描述;进行舌苔厚定量分析和描述;最后采用文字和伪彩色图显示分析结果。该方法快速、准确达到实用,符合中医专家的诊察原则。

A TCM tongue color, fur color, and tongue thickness analysis method based on multi-class support vector machines is applied in the field of computer medical image processing. The method is to carry out image acquisition by a digital camera, and input the image into a computer processor through a USB interface, and segment the tongue body area from the tongue image in the processor, and it is characterized in that the method also includes the following in sequence Steps: On the basis of performing hierarchical clustering analysis to generate and adjust the clustering tree, the clustering tree-based support vector machine (CTSVM) method is used to identify the pixels of the tongue area, and the number of categories for tongue area pixel identification is set to 15 types; divide the tongue surface into five areas, count the pixel categories with the largest number in each area, and the number of pixels of each type; describe the tongue color; describe the color of the tongue coating; conduct quantitative analysis and description of the thickness of the tongue coating; finally use Text and pseudo-color plots show analysis results. The method is fast, accurate and practical, and conforms to the diagnostic principles of Chinese medicine experts.

Description

基于多类支持向量机的中医舌色、苔色、舌苔厚度分析方法Analysis method of tongue color, fur color and tongue thickness in traditional Chinese medicine based on multi-class support vector machine

技术领域technical field

本发明涉及计算机医学图像处理领域,设计了一种基于多类支持向量机的中医舌图像分析系统,对舌体图象进行舌色、苔色、舌苔厚度的定量分析及定性描述,辅助中医诊断。The present invention relates to the field of computer medical image processing, and designs a TCM tongue image analysis system based on multi-class support vector machines, which performs quantitative analysis and qualitative description of tongue color, fur color, tongue coating thickness, and assists TCM diagnosis .

背景技术Background technique

舌诊是中医四诊中望诊的重要内容。舌诊是靠医生对舌体进行观察,从而作出判断。这种方法带有很强的主观性、模糊性,诊察结果与医生的经验密切相关。目前人们争取对舌象特征进行客观定量的分析,克服传统目视观察的主观性,提高舌诊的可靠性,具有很大的优势。Tongue examination is an important part of inspection in the four examinations of traditional Chinese medicine. Tongue diagnosis is to rely on the doctor to observe the tongue, so as to make a judgment. This method is highly subjective and ambiguous, and the diagnosis results are closely related to the doctor's experience. At present, people strive to conduct objective and quantitative analysis of tongue image features, overcome the subjectivity of traditional visual observation, and improve the reliability of tongue diagnosis, which has great advantages.

采用计算机图象处理技术进行舌象特征分析,能够比较全面地反映舌象的情况,符合中医舌诊的习惯,便于舌诊资料的收集与保存,具有较好的实用价值。它是在一定的光照条件下,采集受试者的彩色舌图象,数字化后输入计算机,利用图象分析技术,对舌象特征进行自动分析,并将结果储存在计算机中。Using computer image processing technology to analyze the characteristics of the tongue image can reflect the situation of the tongue image more comprehensively, conforms to the habit of tongue diagnosis in traditional Chinese medicine, facilitates the collection and preservation of tongue diagnosis data, and has good practical value. It collects the color tongue image of the subject under certain lighting conditions, digitizes it and inputs it into the computer, uses image analysis technology to automatically analyze the characteristics of the tongue image, and stores the result in the computer.

已有的图像处理技术用于舌象分析时,大多只是采用舌图象颜色值简单统计分析。经过分析我们发现,舌色、苔色与厚度的分布具有局部性,在舌面上的不同区域往往表现出不同的特征,中医舌诊时先观察局部,再进行总体描述。描述时主要强调具有辩证意义的特征。When existing image processing techniques are used for tongue image analysis, most of them only use simple statistical analysis of tongue image color values. After analysis, we found that the distribution of tongue color, fur color, and thickness is localized, and different areas on the tongue surface often show different characteristics. In TCM tongue diagnosis, the local area is first observed, and then the overall description is made. The description mainly emphasizes the features with dialectical significance.

在图象处理或分析领域,由于图象拍摄的条件不同,处理或分析方法中的参数可能会根据实际情况调整。调整的方法是,从相同条件拍摄的图象中,取出一幅或几幅,通过实验确定参数的具体值。本方法中的各个参数基本都按照此方法确定。In the field of image processing or analysis, due to the different conditions of image capture, the parameters in the processing or analysis method may be adjusted according to the actual situation. The method of adjustment is to take one or several images from the images taken under the same conditions, and determine the specific values of the parameters through experiments. Each parameter in this method is basically determined according to this method.

已有的模式识别技术中的支持向量机(SVM)方法是目前解决小样本识别问题比较有效的方法,基本思想可用图3的两维情况说明。图3中,实心点和空心点代表两类样本,H为分类线,H1、H2分别为过各类中离分类线最近的样本且平行于分类线的直线,它们之间的距离叫做分类间隔(margin)。所谓最优分类线就是要求分类线不但能将两类正确分开(训练错误率为0),而且使分类间隔最大。The support vector machine (SVM) method in the existing pattern recognition technology is a relatively effective method to solve the problem of small sample recognition. The basic idea can be illustrated by the two-dimensional situation in Figure 3. In Figure 3, solid points and hollow points represent two types of samples, H is the classification line, H 1 and H 2 are the straight lines parallel to the classification line that pass through the samples closest to the classification line in each category, and the distance between them is called Classification interval (margin). The so-called optimal classification line requires that the classification line can not only separate the two classes correctly (the training error rate is 0), but also maximize the classification interval.

从图3中可以看出,(b)中的分类间隔大,其分类错误的可能性较(a)中小,位于最优分类线上的样本称为支持向量,以上是线性可分情况的例子。对于非线性情况,通过非线性变换转换到高维的特征空间(Feature Space),在高维空间中构造线性判别函数来实现原空间中的非线性判别函数。It can be seen from Figure 3 that the classification interval in (b) is large, and the possibility of misclassification is smaller than that in (a), and the samples located on the optimal classification line are called support vectors. The above is an example of linear separability . For the nonlinear case, it is converted to a high-dimensional feature space (Feature Space) through nonlinear transformation, and a linear discriminant function is constructed in the high-dimensional space to realize the nonlinear discriminant function in the original space.

舌象样本包括采集的数字化舌图象及舌诊专家给出的临床舌诊结论。样本数量越多,临床判断越可靠,则在此基础上建立的模型越符合实际,对新的舌象进行特征分析的准确度也就越高。Tongue image samples include collected digital tongue images and clinical tongue diagnosis conclusions given by tongue diagnosis experts. The larger the number of samples, the more reliable the clinical judgment, the more realistic the model established on this basis, and the higher the accuracy of feature analysis for new tongue images.

然而,有些类型的舌象是非常少见的(如灰黑苔、淡白舌、青紫舌等)。因此各类样本的分布不均匀,数量有限,如采用一般的模式识别方法,势必影响舌象特征自动分析的准确性和可靠性。因此采用支持向量机(SVM)模式识别方法进行像素识别,以提高分类的准确度,减小分类错误率。However, some types of tongue appearance are very rare (such as gray and black coating, pale tongue, cyanotic tongue, etc.). Therefore, the distribution of various samples is uneven and the number is limited. If the general pattern recognition method is used, it will inevitably affect the accuracy and reliability of the automatic analysis of tongue image features. Therefore, the support vector machine (SVM) pattern recognition method is used for pixel recognition to improve the classification accuracy and reduce the classification error rate.

经典的SVM一般针对两类识别问题,而舌体区域象素识别是一个多类问题。当用于多类模式识别时,通常将原问题分解为多个两类识别问题。现有的方法包括1-a-a(one-against-all)和1-a-1(one-against-one)等。其中1-a-a由k个两类SVM(f1,…,fk)组成,fj是将第j类样本的类别标号定为+1,而将其它所有样本的类别标号定为-1,1-a-1则将每一类样本与其它各类分别构成两类识别问题,共构成 个两类SVM。应用时,样本经过所有的两类SVM,得到

Figure C0210379500072
个识别结果,其中最占优势的类别属性为最终识别结果。这两种方法的缺点是训练后得到的支持向量数较多,影响应用时的识别速度。The classic SVM is generally aimed at two types of recognition problems, while tongue region pixel recognition is a multi-type problem. When used in multi-class pattern recognition, the original problem is usually decomposed into multiple two-class recognition problems. Existing methods include 1-aa (one-against-all) and 1-a-1 (one-against-one). Among them, 1-aa is composed of k two-class SVMs (f 1 ,...,f k ), f j sets the category label of the j-th sample as +1, and sets the category labels of all other samples as -1, In 1-a-1, each type of sample and other types constitute two types of recognition problems, and a total of A two-class SVM. When applied, the samples go through all two types of SVMs, and get
Figure C0210379500072
recognition results, and the most dominant category attribute is the final recognition result. The disadvantage of these two methods is that the number of support vectors obtained after training is large, which affects the recognition speed in application.

发明内容Contents of the invention

为了解决前述问题,可自动、准确、快速分析舌体图象的舌色、苔色、舌苔厚度等特征,本发明设计了一种新的多类方法——基于聚类树的支持向量机(CTSVM)方法。这种方法采用先进行舌体区域的象素识别(局部分析),再进行总体描述的“两步法”分析步骤。像素识别时,结合了支持向量机能够有效完成小样本识别问题,以及聚类树采用分级方法将多类问题转化为两类问题的特点,因而快速、准确达到实用。总体描述依据主要像素类别进行,符合中医专家的诊察原则。同时引入了苔厚指数,使得舌苔厚度定量化。采用这种方法能够用计算机获得舌图象中舌色、苔色、舌态厚度的定性描述和定量分析。本发明的技术思路特征在于:In order to solve the foregoing problems, the features such as tongue color, fur color, and thickness of tongue fur can be analyzed automatically, accurately, and quickly. The present invention designs a new multi-category method—support vector machine based on clustering tree ( CTSVM) method. This method adopts the "two-step method" analysis step of first performing the pixel recognition of the tongue area (local analysis), and then performing the overall description. In the pixel recognition, combined with the support vector machine can effectively complete the small sample recognition problem, and the clustering tree adopts the classification method to convert multi-class problems into two-class problems, so it is fast and accurate to achieve practicality. The overall description is based on the main pixel categories, which is in line with the diagnostic principles of Chinese medicine experts. At the same time, the coating thickness index is introduced to quantify the thickness of tongue coating. Using this method, the qualitative description and quantitative analysis of tongue color, coating color and tongue thickness can be obtained by computer. Technical idea of the present invention is characterized in that:

1、将图象处理方法用于舌象特征分析时,不同于一般的方法,而是采用了先进行舌体区域的象素识别(局部分析),再进行总体描述的“两步法”分析步骤。由于中医舌诊时先观察局部,再进行总体描述。因而该方法与中医的诊断习惯相吻合,能够有效识别舌象特征。1. When the image processing method is used to analyze the characteristics of the tongue image, it is different from the general method, but adopts the "two-step method" analysis of the tongue body area pixel recognition (local analysis) first, and then the overall description step. Because in TCM tongue diagnosis, the local part is observed first, and then the overall description is made. Therefore, this method is consistent with the diagnostic habits of traditional Chinese medicine, and can effectively identify the characteristics of the tongue image.

2、我们采用了先进行舌体区域的象素识别(局部分析),再进行总体描述的分析步骤。也即对舌质、舌苔的特征进行局部分析。将舌体上的像素根据颜色属性,采用多类支持向量机划分为不同的类别。我们把舌体区像素识别的类别数设为15种,包括舌质淡、舌质淡红、舌质红、舌质暗红、舌质绛红、舌质暗紫、薄白苔、白苔、白厚苔、薄黄苔、黄苔、黄厚苔、灰苔、褐苔、黑苔等。其中,前六种是舌质类型,后九种是舌苔类型。像素识别时,一般先需要给出已知类别的像素,称为样本。如果样本相对很少,这样的识别问题称为小样本问题。2. We have adopted the analysis steps of performing the pixel recognition (local analysis) of the tongue body area first, and then carrying out the overall description. That is, local analysis is performed on the characteristics of the tongue quality and tongue coating. The pixels on the tongue are divided into different categories according to the color attribute, using a multi-class support vector machine. We set the number of categories for pixel recognition in the tongue body area to 15, including pale tongue, light red tongue, red tongue, dark red tongue, crimson tongue, dark purple tongue, thin white fur, white fur, and white thick fur , Thin yellow fur, yellow fur, yellow thick fur, gray fur, brown fur, black fur, etc. Among them, the first six are tongue types, and the last nine are tongue coating types. For pixel recognition, it is generally necessary to give pixels of known categories first, which are called samples. If the samples are relatively small, such recognition problems are called small-shot problems.

针对像素识别这个多类、小样本的分类问题,采用了一种新的基于聚类树的多类支持向量机(CTSVM)方法。CTSVM的主要思想是先对训练样本集的各类中心进行分级聚类分析,生成称为聚类树的多级分类器,再据此构成(k-1)个两类SVM。利用它可以把一个复杂的多类别分类问题转化为若干个简单的分类问题来解决。聚类树的每个非叶子节点代表一个支持向量分类器。聚类树的结构可以根据人工经验确定,也可以采用分级聚类方法得到。所谓聚类,就是根据“物以类聚,人以群分”的原则,把相似性大的样本聚集为一个类型。该方法能够有效的将多类识别问题转化为个数较少、因而识别速度较快的两类分类问题,并且可以克服舌象分析中样本较少对识别率的影响,从而能够较为准确的进行像素识别,并通过分级聚类并结合中医专家经验的方法得到聚类树,参见图4。Aiming at the multi-class and small-sample classification problem of pixel recognition, a new clustering tree-based multi-class support vector machine (CTSVM) method is adopted. The main idea of CTSVM is to first perform hierarchical clustering analysis on various centers of the training sample set, generate a multi-level classifier called a clustering tree, and then form (k-1) two-class SVMs accordingly. It can be used to convert a complex multi-category classification problem into several simple classification problems to solve. Each non-leaf node of the clustering tree represents a support vector classifier. The structure of the clustering tree can be determined according to manual experience, and can also be obtained by using hierarchical clustering methods. The so-called clustering is to gather samples with large similarities into one type according to the principle of "like attracts like, and people are divided into groups". This method can effectively transform the multi-class recognition problem into a two-class classification problem with fewer numbers and faster recognition speed, and can overcome the influence of fewer samples on the recognition rate in tongue image analysis, so that it can be more accurate. Pixel recognition, and a clustering tree is obtained by hierarchical clustering combined with the experience of TCM experts, see Figure 4.

聚类树的形式根据训练样本集的分布情况和最近距离准则自适应确定。将这种聚类树与两类模式识别SVM结合,就构成了CTSVM。在CTSVM中,每个非叶子节点(根节点和中间节点)都是一个两类支持向量机。The form of the clustering tree is adaptively determined according to the distribution of the training sample set and the nearest distance criterion. Combining this clustering tree with two types of pattern recognition SVMs constitutes a CTSVM. In CTSVM, each non-leaf node (root node and intermediate node) is a two-class SVM.

我们根据上述方法,结合中医专家的诊察经验确定的聚类树如图4所示。图中,H~M舌质类型,N~V是舌苔类型。图中,X称为根节点,A~G称为非叶子节点。与一个节点相连的上层节点称为父节点,相应的,该节点称为其父节点的子节点。图3中,A有两个子节点C和D,C有三个子节点H、I、J,像素识别时首先划分距离最大的两大类,再逐级进行较细的划分。即由根节点出发,用与该节点相应的分类器进行分类,将它归属与某一子节点,直至到达某个叶节点,即得到该像素的最终识别结果。在本发明中,与每一个非叶子节点相对应的分类器都采用支持向量机。如果一个非叶子节点有两个子节点,则直接采用两类支持向量机即可;如果一个非叶子节点有三个子节点,在该节点就有三个两类支持向量机完成共同像素识别任务,每个两类支持向量机将其中一个子节点代表的类与其他两个子节点代表的类分开。According to the above method, we combined the diagnosis experience of Chinese medicine experts to determine the clustering tree shown in Figure 4. In the figure, H~M are tongue types, and N~V are tongue coating types. In the figure, X is called the root node, and A~G are called non-leaf nodes. The upper layer node connected to a node is called the parent node, and correspondingly, the node is called the child node of its parent node. In Figure 3, A has two sub-nodes C and D, and C has three sub-nodes H, I, and J. When identifying pixels, first divide the two categories with the largest distance, and then carry out finer divisions step by step. That is, start from the root node, use the classifier corresponding to the node to classify, and attribute it to a certain child node until it reaches a certain leaf node, that is, the final recognition result of the pixel is obtained. In the present invention, the classifier corresponding to each non-leaf node adopts a support vector machine. If a non-leaf node has two child nodes, two types of support vector machines can be used directly; A class SVM separates the classes represented by one of the child nodes from the classes represented by the other two.

3、将舌面分为五个区域,统计各区中数量最多的像素类别,对该区舌色、苔色的描述主要根据该类别,结合中医专家的经验进行。这符合中医舌诊描述时主要强调具有辩证意义的特征的原则。3. Divide the tongue surface into five areas, and count the most numerous pixel categories in each area. The description of the tongue color and fur color in this area is mainly based on this category, combined with the experience of TCM experts. This is in line with the principle of emphasizing dialectical features when describing tongue diagnosis in TCM.

4、舌苔厚度分类时,将舌体区域的每一个象素分为“无苔”、“薄苔”、“中厚苔”、“厚苔”4种类型。先逐象素舌苔厚度分类,其依据是“舌苔的厚薄以见底、不见底为标准”。再进行舌苔厚度定量化,在逐象素识别的基础上,引入苔厚指数,对整幅舌图象的舌苔厚度进行定量化描述。4. When classifying the thickness of the tongue coating, each pixel of the tongue body area is divided into four types: "no coating", "thin coating", "medium thick coating" and "thick coating". First, the thickness of the tongue coating is classified pixel by pixel, based on the fact that "the thickness of the tongue coating is based on the standard of bottoming out and not bottoming out". Then quantify the thickness of the tongue coating. On the basis of pixel-by-pixel recognition, the coating thickness index is introduced to quantitatively describe the thickness of the tongue coating in the entire tongue image.

5、为了使分析结果易于理解和临床应用,采用文字和伪彩色图显示分析结果。将象素识别结果表示成舌色、苔色分布伪彩色图。将逐象素的厚度分类结果表示成舌苔厚度伪彩色分布图。采用文字对舌色、苔色舌苔厚度进行定性描述,并给出舌苔厚度指数值。5. In order to make the analysis results easy to understand and clinical application, text and pseudo-color graphics are used to display the analysis results. The pixel recognition results are expressed as tongue color and fur color distribution pseudo-color map. The pixel-by-pixel thickness classification results are expressed as a pseudo-color distribution map of tongue coating thickness. The tongue color and coating thickness were qualitatively described in words, and the tongue coating thickness index was given.

本发明的技术方案见图1、图2、图5、图6、图8、图9、图10,方法步骤为由数码相机进行图象采集,并通过USB接口将图象输入到计算机处理器中,在处理器中采用通用技术,将舌体区域从舌图象中分割出来,特征在于该方法还依次包括下述步骤:Technical scheme of the present invention sees Fig. 1, Fig. 2, Fig. 5, Fig. 6, Fig. 8, Fig. 9, Fig. 10, method step is to carry out image collection by digital camera, and image is input to computer processor by USB interface In the method, the general technique is adopted in the processor to segment the tongue body region from the tongue image, and it is characterized in that the method also includes the following steps in sequence:

1)在进行分级聚类分析生成聚类树并调整的基础上,采用基于聚类树的支持向量机(CTSVM)方法进行舌体区域像素识别;1) On the basis of hierarchical clustering analysis to generate and adjust the clustering tree, the clustering tree-based support vector machine (CTSVM) method is used to identify the pixels of the tongue area;

分级聚类分析生成聚类树的方法步骤见图5:The method steps of hierarchical cluster analysis to generate cluster tree are shown in Fig. 5:

(1)对于k类样本,计算得到k个类中心集合:( x1, x2,…, xk),(1) For k class samples, k class center sets are calculated: ( x 1 , x 2 ,…, x k ),

(2)第1级划分是每一个类中心各成一类,即k个叶节点,(2) The first level of division is that each class center is divided into one class, that is, k leaf nodes,

(3)求每两个类中心之间的距离Dij,i=1,…k,j=1,…k,i≠j,(3) Find the distance D ij between every two class centers, i=1,...k, j=1,...k, i≠j,

(4)将距离最近的两个中心合并,形成新的类中心,即中间节点,(4) Merge the two nearest centers to form a new class center, that is, the middle node,

(5)重复进行(3)-(4)步,直到第k-1级,所有的中心合并为1类,即根节点,(5) Repeat steps (3)-(4) until the k-1th level, all centers are merged into 1 category, namely the root node,

(6)根据需要,调整决策树的结构,使得树的深度尽可能少;舌体区域像素识别的方法和的步骤见图6:(6) According to the needs, adjust the structure of the decision tree so that the depth of the tree is as small as possible; the method and steps of tongue body area pixel recognition are shown in Figure 6:

(1)计算输入图象中每个像素3×3邻域内的三色色度值R、G、B的均值,作为像素是别的输入特征,(1) Calculate the mean value of the three-color chromaticity values R, G, and B in the 3×3 neighborhood of each pixel in the input image, as the pixel is another input feature,

(2)读取舌体中一个像素的R、G、B值,(2) Read the R, G, and B values of a pixel in the tongue,

(3)从根节点开始,根据该节点的SVM分类器,将该像素划分到某一分支,(3) Starting from the root node, according to the SVM classifier of the node, divide the pixel into a certain branch,

(4)如果分支节点不是叶节点,则重复进行(3)中的过程:根据该节点的SVM分类器,将该像素划分到某一分支,如果分支节点是叶节点,则该叶节点所代表的类即为所识别的像素的类别,各节点的分类器是两类支持向量机分类器,分类过程按照常规的方法实现,(4) If the branch node is not a leaf node, repeat the process in (3): divide the pixel into a certain branch according to the SVM classifier of the node, if the branch node is a leaf node, then the leaf node represents The class of is the category of the identified pixels, the classifier of each node is a two-class support vector machine classifier, and the classification process is implemented according to the conventional method.

(5)重复(2)-(4)的过程,直到舌体区域的全部像素分类完毕。(5) Repeat the process of (2)-(4) until all the pixels in the tongue body area are classified.

可以看出,像素识别时,首先划分距离最大的两大类,再逐级进行较细的划分,直至叶节点,就得到像素得类别属性。由于减少了两类判别的次数,同时兼顾样本的分布情况,本方法能够在加快识别速度的同时保证识别的准确率。It can be seen that when identifying pixels, first divide the two categories with the largest distance, and then carry out finer divisions step by step until the leaf nodes, and then the category attributes of the pixels are obtained. Due to reducing the number of two types of discrimination and taking into account the distribution of samples, this method can accelerate the recognition speed and ensure the accuracy of recognition.

2)统计各分区中各种类型的象素数;2) Count the number of pixels of various types in each partition;

3)进行舌色描述,见图8;3) To describe the tongue color, see Figure 8;

4)进行苔色描述,见图9;4) Carry out the moss color description, see Figure 9;

5)进行舌苔厚定量分析和描述,见图10;5) Carry out the quantitative analysis and description of tongue coating thickness, see Figure 10;

6)采用文字和伪彩色图显示分析结果。为了使分析结果易于理解和临床应用,采用文字和伪彩色图显示分析结果。将象素识别结果表示成舌色、苔色分布伪彩色图。将逐象素的厚度分类结果表示成舌苔厚度伪彩色分布图。采用文字对舌色、苔色舌苔厚度进行定性描述,并给出舌苔厚度指数值。图11是显示分析结果的一个例子。6) The analysis results are displayed in text and pseudo-color graphs. In order to make the analysis results easy to understand and clinical application, text and pseudo-color graphics are used to display the analysis results. The pixel recognition results are expressed as tongue color and fur color distribution pseudo-color map. The pixel-by-pixel thickness classification results are expressed as a pseudo-color distribution map of tongue coating thickness. The tongue color and coating thickness were qualitatively described in words, and the tongue coating thickness index was given. Figure 11 is an example showing the analysis results.

另外舌色、苔色、舌苔厚度的描述特征还在于,像素识别完成后,统计各分区中各种类型的象素数后,令Ni j代表i区中第j类象其中i=1,…,5分别表示舌根、舌中、舌尖、舌左侧、舌右侧等5个区域,j=1,…,15表示舌质淡、舌质淡红、舌质红、舌质暗红、舌质绛红、舌质暗紫、薄白苔、白苔、白厚苔、薄黄苔、黄苔、黄厚苔、灰苔、褐苔、黑苔等15种舌质和舌苔类型,并在此基础上,根据中医专家的舌诊习惯,进行舌色、苔色、舌苔厚度的描述。In addition, the description features of tongue color, fur color, and tongue thickness are that after the pixel recognition is completed, after counting the number of pixels of various types in each partition, let N i j represent the jth class image in the i area, where i=1, …, 5 represent the five areas of tongue root, tongue middle, tongue tip, tongue left, tongue right, etc. j=1, …, 15 represent pale tongue, light red tongue, red tongue, dark red tongue, There are 15 types of tongue texture and tongue coating, such as crimson tongue, dark purple tongue, thin white coating, white coating, white thick coating, thin yellow coating, yellow coating, yellow thick coating, gray coating, brown coating, and black coating. According to the tongue diagnosis habit, describe the tongue color, fur color, and thickness of tongue fur.

其中舌色的描述方法为根据舌侧区与舌尖区像素的舌质类型描述舌质的颜色。由于舌质主要分布在舌侧与舌尖,因而只在舌尖、舌左侧、舌右侧等3个区域考虑舌质类型。计算舌尖、舌左侧、舌右侧等3个区域中属于各舌质类型(即属于舌质淡、舌质淡红、舌质红、舌质暗红、舌质绛红、舌质暗紫等类型)的像素总数,像素数最多的舌质类型即为该舌图象的舌质特征。根据中医的经验,舌质是否局部有暗紫和舌尖是否为红舌很重要,因此对这两种情况单独处理。方法是:计算舌尖、舌左侧、舌右侧等3个区域属于“舌质暗紫”的像素数目与整个舌面像素总数之比,若这个比值大于某个预设的值,则认定“局部暗紫”;计算舌尖区属于“舌质红”的像素数目与整个舌面像素总数之比,若这个比值大于某个预设的值,则认定“舌质红”。具体过程为:The description method of the tongue color is to describe the color of the tongue according to the tongue type of the pixels in the tongue side area and the tongue tip area. Since the tongue quality is mainly distributed on the side and tip of the tongue, only the tongue tip, the left side of the tongue, and the right side of the tongue are considered to consider the type of tongue quality. Calculate the tongue tip, the left side of the tongue, and the right side of the tongue, which belong to each tongue type (that is, belong to the tongue type, which belongs to light tongue, light red tongue, red tongue, dark red tongue, crimson tongue, dark purple tongue) type), the tongue type with the largest number of pixels is the tongue feature of the tongue image. According to the experience of traditional Chinese medicine, it is very important whether the tongue is partially dark purple and whether the tip of the tongue is red, so these two conditions are treated separately. The method is: calculate the ratio of the number of pixels belonging to the "dark purple tongue" to the total number of pixels on the entire tongue in the three regions of the tongue tip, left side of the tongue, and right side of the tongue. If this ratio is greater than a certain preset value, it is considered " Partial dark purple"; Calculate the ratio of the number of pixels belonging to "tongue red" in the tongue tip area to the total number of pixels on the entire tongue surface. If this ratio is greater than a preset value, "tongue red" is considered. The specific process is:

1)计算舌面的总面积(象素的总数)A;1) Calculate the total area (the total number of pixels) A of the tongue surface;

2)分别计算舌侧与舌尖区6种舌质类型的总数2) Calculate the total number of the 6 tongue types in the tongue side and tongue tip area respectively

SUMSUM jj == NN 33 jj ++ NN 44 jj ++ NN 55 jj ,, jj == 11 ,, ·· ·&Center Dot; ·&Center Dot; ,, 66 ;;

3)令 SUM j max = max ( SUM j , j = 1 , · · · , 6 ) , 则jmax代表的舌质类型为该舌图象的舌质特征;3) order SUM j max = max ( SUM j , j = 1 , · · · , 6 ) , Then the tongue type represented by j max is the tongue feature of the tongue image;

4)计算暗紫舌质的面积比 R 6 = SUM 6 A , 若R6>θp且jmax≠6,则增加描述“局部暗紫”,其中θp为根据实验设定的阈值;4) Calculate the area ratio of the dark purple tongue R 6 = SUM 6 A , If R 6p and j max ≠6, add the description "local dark purple", where θ p is the threshold value set according to the experiment;

5)计算舌尖区“舌质红”的面积比 R 3 = N 3 3 A , 若R3>θr且jmax≠3,则增加描述“舌尖红”,其中θr为根据实验设定的阈值。5) Calculate the area ratio of "tongue red" at the tip of the tongue R 3 = N 3 3 A , If R 3r and j max ≠3, add the description "red tongue", where θ r is the threshold value set according to the experiment.

其中苔色的描述,由于舌侧很少有舌苔分布,因而对舌苔的描述分为舌根、舌中、舌尖3个区域。计算舌根、舌中、舌尖等3个区域中属于各舌苔类型(即属于薄白苔、白苔、白厚苔、薄黄苔、黄苔、黄厚苔、灰苔、褐苔、黑苔等类型)的像素总数,在三个区域中,分别判断像素数最多的舌苔类型的像素数与整个舌面像素总数之比是否小于某一阈值,如果小于,则认定该区少苔,否则该舌苔类型即为该区的舌苔特征。本发明中这三个阈值由试验获得。根据中医的经验,舌根、舌中区往往呈现多种舌苔,因此也对舌根、舌中区像素数次多的舌苔类型加以判断。方法是:计算舌根、舌中区像素数次多的舌苔类型的像素数目与像素数最多的舌苔类型的像素数目之比,若这个比值大于某个预设的值,则该区增加描述第二主要类型舌苔。具体方法如下:Among them, the description of the color of the tongue coating is divided into three areas: the root of the tongue, the middle of the tongue, and the tip of the tongue, because there is very little tongue coating on the side of the tongue. Calculate the total number of pixels belonging to each tongue coating type (thin white coating, white coating, white thick coating, thin yellow coating, yellow coating, yellow thick coating, gray coating, brown coating, black coating, etc.) in the three areas of tongue base, tongue center, and tongue tip. In each region, determine whether the ratio of the number of pixels of the tongue coating type with the largest number of pixels to the total number of pixels on the entire tongue surface is less than a certain threshold, if less, then it is determined that the area has little coating, otherwise the type of tongue coating is the tongue coating feature of the area . These three thresholds are obtained by experiments in the present invention. According to the experience of traditional Chinese medicine, the base of the tongue and the center of the tongue often present a variety of tongue coatings, so the type of tongue coating with more pixels in the base of the tongue and the center of the tongue is also judged. The method is: calculate the ratio of the number of pixels of the fur type with the largest number of pixels in the base of the tongue and the center of the tongue to the number of pixels of the fur type with the largest number of pixels. The main types of tongue coating. The specific method is as follows:

1)计算舌面的总面积(象素的总数)A,舌根、舌中、舌尖区的面积Ai,i=1,…,3;1) Calculate the total area (the total number of pixels) A of the tongue surface, the area A i of the tongue root, tongue center and tongue tip area, i=1,...,3;

2)对于舌根、舌中、舌尖区,分别计算 N i j max i = max ( N i j , j = 7 , · · · , 15 ) , 其中i=1,2,3,2) For the base of the tongue, the middle of the tongue, and the tip of the tongue, calculate separately N i j max i = max ( N i j , j = 7 , &Center Dot; &Center Dot; &Center Dot; , 15 ) , where i = 1, 2, 3,

则jmax i代表的舌苔类型为该区的舌苔特征;Then the type of tongue coating represented by j max i is the tongue coating feature of this area;

3)计算i=1,2,3区中jmax i舌苔象素所占的面积比例 R ( j max i , i ) = N i j max i A i ; 3) Calculate the area ratio of j max i tongue coating pixels in areas i=1, 2, and 3 R ( j max i , i ) = N i j max i A i ;

4)分别对舌根、舌中、舌尖区进行描述。对于舌根区i=1,若 R ( j max 1 , 1 ) < &theta; 1 4) Describe the tongue root, tongue middle and tongue tip respectively. For tongue base area i=1, if R ( j max 1 , 1 ) < &theta; 1 but

描述为“舌根少苔”;否则描述舌根为jmax 1类型的舌苔。对于舌中区i=2,若 R ( j max 2 , 2 ) < &theta; 2 , 则描述为“舌中少苔”;否则描述舌中为jmax 2类型的舌苔,对于舌尖区i=3,若 R ( j max 3 , 3 ) < &theta; 3 , 则描述为“舌尖少苔”;否则描述舌尖为jmax 3类型的舌苔。其中θ1、θ2、θ3为根据实验设定的阈值;Described as "little coating on the base of the tongue"; otherwise, describe the base of the tongue as j max 1 type of tongue coating. For the middle tongue region i=2, if R ( j max 2 , 2 ) < &theta; 2 , It is described as "little coating on the tongue"; otherwise, the tongue coating is described as j max 2 type. For the tongue tip area i=3, if R ( j max 3 , 3 ) < &theta; 3 , It is described as "little coating on the tip of the tongue"; otherwise, the tip of the tongue is described as j max 3 type of tongue coating. Among them, θ 1 , θ 2 , and θ 3 are thresholds set according to experiments;

5)对于舌根、舌中区,分别计算第二主要类型舌苔 j sec i , i = 1,2 , 并计算jsec i类型象素面积与jmax i类型的面积比 R ms i = N i j sec i N i j max i . R ms i > &theta; sec , 则第i区增加描述第二主要类型舌苔。其中θsec为根据实验设定的阈值。5) For the base of the tongue and the center of the tongue, calculate the second main type of tongue coating j sec i , i = 1,2 , And calculate the area ratio of j sec i type pixel area to j max i type R ms i = N i j sec i N i j max i . like R ms i > &theta; sec , Then the i-th area is added to describe the second main type of tongue coating. Where θ sec is the threshold set according to the experiment.

其中舌苔厚度的分析和描述分为两部分:(1)舌苔厚度分类。将舌体区域的每一个象素分为“无苔”、“薄苔”、“中厚苔”、“厚苔”4种类型。逐象素舌苔厚度分类的依据是“舌苔的厚薄以见底、不见底为标准”。(2)舌苔厚度定量化。在逐象素识别的基础上,对整幅舌图象的舌苔厚度进行定量化描述。其中,“见底不见底”以像素邻域内舌质像素的多少判定。如果像素邻域内舌质像素很多,则见底程度大。像素的舌苔类型也反映了舌苔的厚薄。属于薄白苔、薄黄苔反映该像素处为薄苔;属于白苔、黄苔、灰苔、褐苔表明该像素处为中厚苔;属于白厚苔、黄厚苔、黑苔表明该像素处为厚苔。具体步骤为:The analysis and description of the thickness of the tongue coating is divided into two parts: (1) The classification of the thickness of the tongue coating. Each pixel in the tongue body area is divided into four types: "no coating", "thin coating", "medium thick coating" and "thick coating". The basis of pixel-by-pixel tongue coating thickness classification is "the thickness of the tongue coating is based on the standard of not seeing the bottom". (2) Quantification of tongue coating thickness. On the basis of pixel-by-pixel recognition, the tongue coating thickness of the whole tongue image is quantitatively described. Among them, "seeing the bottom but not seeing the bottom" is judged by the number of tongue pixels in the pixel neighborhood. If there are many tongue pixels in the pixel neighborhood, the degree of bottoming out is large. The tongue coating type of the pixel also reflects the thickness of the tongue coating. Belonging to thin white fur and thin yellow fur indicates that the pixel is thin fur; belonging to white fur, yellow fur, gray fur, and brown fur indicates that the pixel is medium thick fur; belonging to white thick fur, yellow thick fur, and black fur indicates that the pixel is thick fur. The specific steps are:

1)读取舌体像素及其5×5邻域的类别号;1) Read the category number of the tongue body pixel and its 5×5 neighborhood;

2)设c1、c2为根据实验设定的阈值c1>c2,且。计算该像素5×5邻域内属于舌质类型的象素数Sbody,若Sbody>c1,则该点的舌苔厚度类型定为“无苔”;2) Let c 1 and c 2 be the threshold value c 1 >c 2 set according to the experiment, and. Calculate the number of pixels S body belonging to the tongue type in the 5×5 neighborhood of the pixel. If S body > c 1 , the tongue coating thickness type at this point is defined as "no coating";

3)若c1≥Sbody>c2,则该点的舌苔厚度类型定为“薄苔”,3) If c 1 ≥ S body > c 2 , then the type of tongue coating thickness at this point is defined as "thin coating",

4)若Sbody≤c2,则依据该点的舌质舌苔类型j确定厚度类型,若为舌质(j<7),则为“薄苔”,若j=7(薄白苔)、10(薄黄苔),则为“薄苔”,若j=8(白苔)、11(黄苔)、13(灰苔)、14(褐苔),则为“中厚苔”;若j=9(白厚苔)、12(黄厚苔)、15(黑苔),则为“厚苔”;4) If S body ≤ c 2 , then determine the type of thickness according to the type j of the tongue quality and coating at this point. If it is the tongue quality (j<7), it is "thin coating". Thin yellow fur), it is "thin fur", if j=8 (white fur), 11 (yellow fur), 13 (gray fur), 14 (brown fur), it is "medium thick fur"; if j=9 ( White thick fur), 12 (yellow thick fur), 15 (black fur), it is "thick fur";

5)重复(1)-(3)步,直到所有像素处理完毕;5) Repeat steps (1)-(3) until all pixels are processed;

6)根据象素识别的结果,计算整幅图象的苔厚指数T,作为舌苔厚度分析的定量化结果,计算方法为:6) According to the result of pixel recognition, calculate the coating thickness index T of the whole image, as the quantitative result of tongue coating thickness analysis, the calculation method is:

TT == &Sigma;&Sigma; kk (( ww jj kk )) AA

式中A表示舌体区的象素总数,

Figure C0210379500141
表示对舌体区域中所有象素求和,jk表示第k个象素的厚度类型,对应于“无苔”、“薄苔”、“中厚苔”、“厚苔”分别取0、1、2、3,wjk为权值,根据实验和中医专家的经验确定,苔厚指数能够描述舌苔的总体厚度。In the formula, A represents the total number of pixels in the tongue body area,
Figure C0210379500141
Indicates the summation of all pixels in the tongue body area, j k represents the thickness type of the kth pixel, corresponding to "no fur", "thin fur", "medium thick fur", and "thick fur" respectively take 0, 1, 2, 3, w jk are weights, determined according to experiments and experience of Chinese medicine experts, the coating thickness index can describe the overall thickness of the tongue coating.

由图11可以看出,本方法能够通过计算机获得的定量分析与定性描述结果,且结果与中医的目视诊察结果一致,有助于舌诊的客观化、标准化。It can be seen from Figure 11 that this method can obtain quantitative analysis and qualitative description results obtained by computer, and the results are consistent with the visual inspection results of traditional Chinese medicine, which is conducive to the objectification and standardization of tongue diagnosis.

附图说明Description of drawings

图1是中医舌象舌色、苔色、苔厚分析系统框图Figure 1 is a block diagram of the TCM tongue color, fur color, and fur thickness analysis system

1、数码相机,2、USB接口,3、计算机处理器,4、输出缓存,5、舌象分析,6、显示器,7、分析结果;1. Digital camera, 2. USB interface, 3. Computer processor, 4. Output cache, 5. Tongue image analysis, 6. Display, 7. Analysis result;

图2是中医舌象分析方法主程序流程图;Fig. 2 is a flow chart of the main program of the tongue image analysis method in traditional Chinese medicine;

图3支持向量机原理说明图Figure 3 Schematic illustration of support vector machine principle

(a)分类间隔较小的分类面,(b)具有最大分类间隔的最优分类面;(a) classification surface with small classification interval, (b) optimal classification surface with largest classification interval;

图4用于分级聚类分析生成的聚类树示意图Figure 4. Schematic diagram of clustering tree generated for hierarchical clustering analysis

H、舌质暗红,I、舌质淡红,J、舌质淡,K、舌质绛紫,L、舌质暗紫,M、舌质红,N、白苔,O、白厚苔,P、薄白苔,Q、黄苔,R、薄黄苔,S、黄厚苔,T、褐苔,U、灰苔,V、黑苔;H, dark red tongue, I, light red tongue, J, pale tongue, K, purple tongue, L, dark purple tongue, M, red tongue, N, white coating, O, white thick coating, P, Thin white coating, Q, yellow coating, R, thin yellow coating, S, yellow thick coating, T, brown coating, U, gray coating, V, black coating;

图5是图4聚类树的生成方法子程序流程图;Fig. 5 is the subroutine flowchart of the generating method of Fig. 4 clustering tree;

图6是舌体区域像素识别方法子程序流程图;Fig. 6 is a subroutine flow chart of the tongue region pixel recognition method;

图7是舌面分区示意图;Fig. 7 is a schematic diagram of tongue surface partition;

图8是舌色描述方法子程序流程图;Fig. 8 is a subroutine flowchart of tongue color description method;

图9是苔色描述方法子程序流程图;Fig. 9 is a subroutine flow chart of the moss color description method;

图10是舌苔厚度分析与描述方法子程序流程图;Fig. 10 is a subroutine flow chart of tongue coating thickness analysis and description method;

图11是舌图象的分析结果Figure 11 is the analysis result of the tongue image

(a)舌体图像,(b)舌色、苔色伪彩色图,(c)舌苔厚度伪彩色图,(d)文字描述的自动分析结果;(a) tongue body image, (b) pseudo-color map of tongue color and fur color, (c) pseudo-color map of tongue coating thickness, (d) automatic analysis results of text description;

图12是在计算机上运行的舌象分析的程序主流程图;Fig. 12 is the program main flow chart of the tongue image analysis that runs on the computer;

图13是在计算机上运行的舌体区域像素识别子程序流程图。Fig. 13 is a flow chart of the tongue region pixel recognition subroutine running on the computer.

具体实施方式Detailed ways

在图1的中医舌象分析系统框图中,数码相机和USB接口都是市售的,主要完成采集舌图象,将舌体及色标的光学信号转换为图象电信号输入到计算机,便于计算机处理、传输等操作;计算机处理主要是通过USB接口软件对舌图像进行读/写处理,处理后的舌图像输出到缓存器,便于显示。显示器是图象的输出设备,人眼可以通过显示器观看原始舌图象和分析结果。舌体分析是对计算机读入的舌图象进行舌色、苔色、苔厚的定量分析与定性描述,并输出分析结果。In the block diagram of the TCM tongue image analysis system in Fig. 1, both digital cameras and USB interfaces are commercially available, mainly to complete the collection of tongue images, and convert the optical signals of the tongue body and color code into image electrical signals and input them to the computer, which is convenient for the computer Processing, transmission and other operations; computer processing is mainly to read/write the tongue image through the USB interface software, and the processed tongue image is output to the buffer for easy display. The monitor is an image output device, through which the human eye can view the original tongue image and analysis results. Tongue body analysis is to carry out quantitative analysis and qualitative description of tongue color, fur color and fur thickness on the tongue image read by computer, and output the analysis results.

原始舌图象可以是通过数码相机实时采集到的图象,也可以是实现通过数码相机采集到保存在计算机硬盘里的图象。The original tongue image can be an image collected in real time by a digital camera, or it can be an image collected by a digital camera and stored in a computer hard disk.

采用支持向量机进行像素识别,涉及的关键问题包括输入特征空间的选择、学习集的构成、核函数的选取、惩罚因子的选取等。学习集指类别已知的样本的集合。Using support vector machine for pixel recognition, the key issues involved include selection of input feature space, composition of learning set, selection of kernel function, selection of penalty factor, etc. A learning set refers to a collection of samples whose categories are known.

本系统中,输入特征空间为RGB彩色空间,为避免噪声的影响,对每一个象素,取其3×3邻域的RGB均值作为特征矢量。在若干典型图象中选出一系列图象子块,由中医专家逐块确定类别后构成学习集。样本(图象子块)根据图象的具体情况而定,没有统一的大小。In this system, the input feature space is RGB color space. To avoid the influence of noise, for each pixel, the RGB mean value of its 3×3 neighborhood is taken as the feature vector. A series of image sub-blocks are selected from several typical images, and the learning set is formed after the categories are determined block by block by experts in traditional Chinese medicine. Samples (image sub-blocks) are determined according to the specific conditions of the image, and there is no uniform size.

本发明中SVM的惩罚因子C体现了对学习集的信任度。C越大,信任度越高,C越大,信任度越高。舌体象素识别的研究中,由于分类的类别数较多,且各类之间的可分性较差,需要通过实验选取一个合适的惩罚因子。本发明中,通过实验选取C=400。The penalty factor C of the SVM in the present invention reflects the degree of trust in the learning set. The larger C is, the higher the degree of trust is, and the larger C is, the higher the degree of trust is. In the research of tongue pixel recognition, due to the large number of categories and poor separability between categories, it is necessary to select an appropriate penalty factor through experiments. In the present invention, C=400 is selected through experiments.

不同的核函数对应学习机在输入空间中具有不同类型的非线性决策面。我们试验了常用的多项式、径向基函数(RBF)、神经网络等核函数形式。最终应用的核函数为RBF,其形式为:Different kernel functions correspond to learning machines with different types of nonlinear decision surfaces in the input space. We experimented with commonly used polynomial, radial basis function (RBF), neural network and other kernel function forms. The final applied kernel function is RBF, which has the form:

KK (( xx ,, ythe y )) == ee -- || || xx -- ythe y || || 22 22 &sigma;&sigma; 22

式中σ是一个重要的参数,决定着RBF核函数的具体形式,通过实验选取σ=50。In the formula, σ is an important parameter, which determines the specific form of the RBF kernel function, and σ=50 is selected through experiments.

本发明中为了使分析结果易于理解和临床应用,要进行舌质与舌苔的定性、定量描述。将舌面划分为舌根、舌中、舌尖、舌左侧、舌右侧等5个区域。划分方法是以舌尖至人字形界沟中点划分为5等分前1/5称舌尖,中2/5称舌中,后2/5称舌根。另以舌中线与舌边的中点划一线,线外部分称舌侧。如图7所示。统计各分区中各种类型的象素数,根据中医专家的舌诊习惯,进行基于多类支持向量机的中医舌色、苔色、舌苔厚度的计算机分析方法。In the present invention, in order to make the analysis results easy to understand and clinically applied, qualitative and quantitative descriptions of the tongue quality and tongue coating are performed. The tongue surface is divided into 5 regions: tongue root, tongue middle, tongue tip, tongue left side, and tongue right side. The method of division is to divide the tip of the tongue to the midpoint of the herringbone-shaped boundary groove into 5 equal parts. In addition, a line is drawn between the midline of the tongue and the midpoint of the edge of the tongue, and the part outside the line is called the side of the tongue. As shown in Figure 7. Count the number of pixels of various types in each partition, and according to the tongue diagnosis habits of TCM experts, carry out a computer analysis method based on multi-class support vector machine for TCM tongue color, fur color, and tongue thickness.

舌象分析主要通过软件来实现。在计算机中完成以下程序(主程序见图12):Tongue image analysis is mainly realized through software. Complete the following programs in the computer (the main program is shown in Figure 12):

1、读入舌体区域图象数据,读入CTSVM的支持向量及相应的系数,初始化参数θp、θr、θ1、θ2、θ3、θsec、c1、c2、w0、w1、w2、w3。其中θp、θr分别为舌色分析时判断“局部暗紫”和“舌尖红”的阈值,本发明中取θp=0.01,θr=0.06。θ1、θ2、θ3舌根、舌中、舌尖三区的阈值,本发明中取θ1=0.5、θ2=0.2、θ3=0.4。c1、c2为苔厚分析时判断舌苔的有无和舌苔类型时采用的阈值。本发明中取c1=20、c2=8。w0、w1、w2、w3为计算苔厚指数时的权系数,本发明中确定为w0=0、w1=0.2、w2=0.7、w3=1.3。1. Read in the image data of the tongue area, read in the support vectors and corresponding coefficients of CTSVM, and initialize the parameters θ p , θ r , θ 1 , θ 2 , θ 3 , θ sec , c 1 , c 2 , w 0 , w 1 , w 2 , w 3 . Among them, θ p and θ r are the thresholds for judging "partial dark purple" and "red tip of the tongue" respectively in tongue color analysis. In the present invention, θ p =0.01 and θ r =0.06. The threshold values of θ 1 , θ 2 , and θ 3 tongue base, tongue center, and tongue tip are taken as θ 1 =0.5, θ 2 =0.2, and θ 3 =0.4 in the present invention. c 1 and c 2 are the thresholds used for judging the presence or absence of tongue coating and the type of tongue coating in the coating thickness analysis. In the present invention, c 1 =20 and c 2 =8. w 0 , w 1 , w 2 , and w 3 are the weight coefficients when calculating the moss thickness index, which are determined as w 0 =0, w 1 =0.2, w 2 =0.7, and w 3 =1.3 in the present invention.

2、进入像素识别子程序,采用基于聚类树的支持向量机(CTSVM)方法进行舌体区域像素识别。在此设已经通过训练得到图4所示的聚类树。树中的每一个节点都是一个支持向量机分类器,支持向量及相应的系数已经通过训练获得。对一个像素,支持向量机的分类过程如下:2. Enter the subroutine of pixel identification, and adopt the clustering tree-based support vector machine (CTSVM) method to identify the pixels of the tongue area. Here it is assumed that the clustering tree shown in FIG. 4 has been obtained through training. Each node in the tree is a support vector machine classifier, and the support vectors and corresponding coefficients have been obtained through training. For a pixel, the classification process of the support vector machine is as follows:

1)计算该像素3×3邻域内的RGB均值x=(R,G,B);1) Calculate the RGB mean x=(R, G, B) in the 3×3 neighborhood of the pixel;

2)从根节点开始,计算该像素与该节点对应的每一个支持向量的核函数内积,并乘以相应的系数和标号,对所有这些乘积求和,然后求加上常数b之后的结果的符号。即求:2) Starting from the root node, calculate the kernel function inner product of the pixel and each support vector corresponding to the node, multiply the corresponding coefficients and labels, sum all these products, and then calculate the result after adding the constant b symbol. That is to say:

ff (( xx )) == signsign (( &Sigma;&Sigma; xx ii &Element;&Element; svsv &alpha;&alpha; ii ythe y ii KK (( xx ii ,, xx )) ++ bb ))

式中,xi是该分类器的支持向量,αi是与支持向量对应的系数,yi是支持向量样本的标号,b是常数,本发明中b取40,K(xi,x)是核函数内积,In the formula, x i is the support vector of the classifier, α i is the coefficient corresponding to the support vector, y i is the label of the support vector sample, b is a constant, and b is 40 in the present invention, K(x i , x) is the inner product of the kernel function,

KK (( xx ,, ythe y )) == ee -- || || xx -- ythe y || || 22 22 &sigma;&sigma; 22

式中‖.‖是向量的范数,σ取50。where ‖.‖ is the norm of the vector, and σ is 50.

Sign()是符号函数,如果自变量的值大于0,则函数值为1,小于0,则为-1。Sign() is a sign function. If the value of the argument is greater than 0, the function value is 1, and if it is less than 0, it is -1.

如果f(x)大于0,则将它归类到左边的分支,否则归类到右边的分支;If f(x) is greater than 0, it is classified into the left branch, otherwise it is classified into the right branch;

3)重复2)中的过程,直至到达某个分支节点。例如某个像素的识别过程为:X→A→D→K,则该像素被判别为“舌质绛红”;3) Repeat the process in 2) until reaching a certain branch node. For example, the recognition process of a certain pixel is: X→A→D→K, then the pixel is judged as "red tongue";

4)对每一个像素,执行2)、3),直到舌体区域中所有像素都判别完毕,每个像素都分配了一个类别号。4) For each pixel, perform 2) and 3) until all pixels in the tongue body area are identified, and each pixel is assigned a category number.

3、舌面分区。从左至右、从上到下扫描舌体区域,得到舌体区域的外接矩形。设矩形左右两个边在舌图象中的坐标为l、r,上下两个边在舌图象中的坐标为t、b,则根据前述舌面分区的原则(将舌面划分为舌根、舌中、舌尖、舌左侧、舌右侧等5个区域,划分方法是以舌尖至人字形界沟中点划分为5等分,前1/5称舌尖,中2/5称舌中,后2/5称舌根。另以舌中线与舌边的中点划一线,线外部分称舌侧。),得到以下的分区结果:设(x,y)表示舌图象中像素的纵、横坐标,则舌左侧:若 x < 3 l + r 4 , 且(x,y)在舌体区域,舌右侧:若 x &GreaterEqual; l + 3 r 4 , 且(x,y)在舌体区域,舌根区:若 3 l + r 4 &le; x < l + 34 4 , y < 3 t + 2 b 4 , 且(x,y)在舌体区域,舌中区:若 3 l + r 4 &le; x < l + 3 r 4 , 3 t + 2 b 4 &le; y < t + 4 b 4 舌尖区:若 3 l + r 4 &le; x < l + 3 r 4 , y &GreaterEqual; t + 4 b 4 , 且(x,y)在舌体区域。3. Tongue surface division. Scan the tongue area from left to right and from top to bottom to obtain the circumscribed rectangle of the tongue area. Suppose the coordinates of the left and right sides of the rectangle in the tongue image are l, r, and the coordinates of the upper and lower sides in the tongue image are t, b, then according to the aforementioned principles of tongue surface partitioning (the tongue surface is divided into tongue root, Tongue center, tongue tip, tongue left side, and tongue right side are divided into 5 equal parts from the tongue tip to the midpoint of the herringbone boundary groove. The front 1/5 is called the tongue tip, and the middle 2/5 is called the tongue center. The rear 2/5 is called the root of the tongue. In addition, draw a line with the midpoint of the tongue midline and the tongue edge, and the part outside the line is called the tongue side.), obtain the following partition results: Let (x, y) represent the vertical and vertical dimensions of the pixel in the tongue image Abscissa, the left side of the tongue: if x < 3 l + r 4 , And (x, y) is in the tongue body area, on the right side of the tongue: if x &Greater Equal; l + 3 r 4 , And (x, y) is in the tongue body area, tongue root area: if 3 l + r 4 &le; x < l + 34 4 , the y < 3 t + 2 b 4 , And (x, y) is in the tongue body area, the middle area of the tongue: if 3 l + r 4 &le; x < l + 3 r 4 , 3 t + 2 b 4 &le; the y < t + 4 b 4 Tongue tip area: if 3 l + r 4 &le; x < l + 3 r 4 , the y &Greater Equal; t + 4 b 4 , And (x, y) is in the tongue area.

4、统计各分区中各种类型的象素数Ni j4. Count the number of pixels N i j of various types in each partition.

5、舌色分析与描述。根据舌侧与舌尖的舌质类型描述舌质,具体方法为:5. Tongue color analysis and description. Describe the tongue quality according to the tongue quality on the side and tip of the tongue. The specific method is as follows:

1)计算舌面的总面积(象素的总数)A;1) Calculate the total area (the total number of pixels) A of the tongue surface;

2)分别计算舌侧与舌尖区6种舌质类型的总数:2) Calculate the total number of the 6 tongue types in the tongue side and tongue tip area respectively:

SUMSUM jj == NN 33 jj ++ NN 44 jj ++ NN 55 jj ,, jj == 11 ,, &CenterDot;&Center Dot; &CenterDot;&CenterDot; &CenterDot;&CenterDot; ,, 66 ;;

3)令 SUM j max = max ( SUM j , j = 1 , &CenterDot; &CenterDot; &CenterDot; , 6 ) , 则jmax代表的舌质类型为该舌图象的舌质特征,例如jmax=2时描述为“舌质淡红”;3) order SUM j max = max ( SUM j , j = 1 , &Center Dot; &Center Dot; &Center Dot; , 6 ) , Then the tongue type represented by j max is the tongue feature of the tongue image, for example, when j max = 2, it is described as "tongue light red";

4)计算暗紫舌质的面积比 R 6 = SUM 6 A , 若R6>0.01且jmax≠6,则增加描述“局部暗紫”;4) Calculate the area ratio of the dark purple tongue R 6 = SUM 6 A , If R 6 >0.01 and j max ≠6, add the description "local dark purple";

5)计算舌尖区“舌质红”的面积比 R 3 = N 3 3 A , 若R3>0.05且jmax≠3,则增加描述“舌尖红”。5) Calculate the area ratio of "tongue red" at the tip of the tongue R 3 = N 3 3 A , If R 3 >0.05 and j max ≠3, add the description "red tongue".

6、苔色分析与描述。对舌苔的描述分为舌根、舌中、舌尖3个区域,具体步骤如下:6. Analysis and description of moss color. The description of the tongue coating is divided into three areas: the root of the tongue, the middle of the tongue, and the tip of the tongue. The specific steps are as follows:

1)计算舌面的总面积(象素的总数)A,舌根、舌中、舌尖区的面积Ai,i=1,…,3;1) Calculate the total area (the total number of pixels) A of the tongue surface, the area A i of the tongue root, tongue center and tongue tip area, i=1,...,3;

2)对于舌根、舌中、舌尖区,分别计算 N i j max i = max ( N i j , j = 7 , &CenterDot; &CenterDot; &CenterDot; , 15 ) , 其中i=1,2,3,2) For the base of the tongue, the middle of the tongue, and the tip of the tongue, calculate separately N i j max i = max ( N i j , j = 7 , &Center Dot; &Center Dot; &Center Dot; , 15 ) , where i = 1, 2, 3,

则jmax i代表的舌苔类型为该区的舌苔特征;Then the type of tongue coating represented by j max i is the tongue coating feature of this area;

3)计算i=1,2,3区中jmax i舌苔象素所占的面积比例 R ( j max i , i ) = N i j max i A i ; 3) Calculate the area ratio of j max i tongue coating pixels in areas i=1, 2, and 3 R ( j max i , i ) = N i j max i A i ;

4)对于舌根区i=1,若 R ( j max i , i ) < 0.5 , 则描述为“舌根少苔”;对于舌中区i=2,4) For tongue root region i=1, if R ( j max i , i ) < 0.5 , It is then described as "little coating on the root of the tongue"; for the middle area of the tongue i=2,

R ( j max i , i ) < 0.4 , 则描述为“舌中少苔”;对于舌尖区i=3,若 R ( j max i , i ) < 0.2 , like R ( j max i , i ) < 0.4 , It is described as "little coating in the tongue"; for the tip of the tongue area i=3, if R ( j max i , i ) < 0.2 ,

则描述为“舌尖少苔”;It is described as "little coating on the tip of the tongue";

5)若 R ( j sec i , i ) &GreaterEqual; 0.5 , 则描述舌根为jmax i类型的舌苔。例如 j max 1 = 11 时,描述为“舌根黄苔”。若 R ( j max 2 , 2 ) &GreaterEqual; 0.4 , 则描述舌中为jmax 2类型的舌苔,例如 j max 2 = 8 时,描述为“舌中白苔”。若 R ( j max 3 , 3 ) &GreaterEqual; 0.2 , 则描述舌尖为jmax 3类型的舌苔,例如 j max 3 = 7 时,描述为“舌尖薄白苔”;5) If R ( j sec i , i ) &Greater Equal; 0.5 , Then describe the base of the tongue as j max i type of tongue coating. For example j max 1 = 11 It is described as "yellow coating on the root of the tongue". like R ( j max 2 , 2 ) &Greater Equal; 0.4 , Then describe the tongue coating of j max 2 type in the tongue, for example j max 2 = 8 Sometimes, it is described as "white coating in the tongue". like R ( j max 3 , 3 ) &Greater Equal; 0.2 , Then describe the tongue tip as j max 3 type of tongue coating, for example j max 3 = 7 , described as "thin white coating on the tip of the tongue";

6)对于舌根、舌中区,分别计算第二主要类型舌苔 j sec i , i = 1,2 , 并计算jsec i类型象素面积与jmax i类型的面积比 R ms i = N i j sec i N i j max i . R ms i > 0.3 , 则第i区增加描述第二主要类型舌苔。6) For the base of the tongue and the center of the tongue, calculate the second main type of tongue coating j sec i , i = 1,2 , And calculate the area ratio of j sec i type pixel area to j max i type R ms i = N i j sec i N i j max i . like R ms i > 0.3 , Then the i-th area is added to describe the second main type of tongue coating.

7、苔厚的定量分析与定性描述。具体步骤为:7. Quantitative analysis and qualitative description of fur thickness. The specific steps are:

1)读取舌体像素及其5×5邻域的类别号;1) Read the category number of the tongue body pixel and its 5×5 neighborhood;

2)设c1、c2为根据实验设定的阈值c1>c2,且。计算该像素5×5邻域内属于舌质类型的象素数Sbody,若Sbody>c1,则该点的舌苔厚度类型定为“无苔”;2) Let c 1 and c 2 be the threshold value c 1 >c 2 set according to the experiment, and. Calculate the number of pixels S body belonging to the tongue type in the 5×5 neighborhood of the pixel. If S body > c 1 , the tongue coating thickness type at this point is defined as "no coating";

3)若c1≥Sbody>c2,则该点的舌苔厚度类型定为“薄苔”;3) If c 1 ≥ S body > c 2 , the type of tongue coating thickness at this point is defined as "thin coating";

4)若Sbody≤c2,则依据该点的舌质舌苔类型j确定厚度类型。若为舌质(j<7),则为“薄苔”;若j=7(薄白苔)、10(薄黄苔),则为“薄苔”;若j=8(白苔)、11(黄苔)、13(灰苔)、14(褐苔),则为“中厚苔”;若j=9(白厚苔)、12(黄厚苔)、15(黑苔),则为“厚苔”;4) If S body ≤ c 2 , then determine the thickness type according to the type j of the tongue body and coating at this point. If it is tongue quality (j<7), it is "thin fur"; if j=7 (thin white fur), 10 (thin yellow fur), it is "thin fur"; if j=8 (white fur), 11 (yellow fur ), 13 (gray fur), 14 (brown fur), it is "medium thick fur"; if j=9 (white thick fur), 12 (yellow thick fur), 15 (black fur), it is "thick fur";

5)重复1)~4)步,直到所有像素处理完毕;5) Repeat steps 1) to 4) until all pixels are processed;

6)根据象素识别的结果,计算整幅图象的苔厚指数T,作为舌苔厚度分析的定量化结果。计算方法为:6) Calculate the coating thickness index T of the entire image according to the pixel recognition result, and use it as the quantitative result of tongue coating thickness analysis. The calculation method is:

TT == &Sigma;&Sigma; kk (( ww jj kk )) AA ..

式中A表示舌体区的象素总数, 表示对舌体区域中所有象素求和,jk表示第k个象素的厚度类型,对应于“无苔”、“薄苔”、“中厚苔”、“厚苔”分别取0、1、2、3,wjk为权值,根据实验和中医专家的经验确定。本发明中确定为w0=0、w1=0.2、w2=0.7、w3=1.3。苔厚指数能够描述舌苔的总体厚度。In the formula, A represents the total number of pixels in the tongue body area, Indicates the summation of all pixels in the tongue body area, j k represents the thickness type of the kth pixel, corresponding to "no fur", "thin fur", "medium thick fur", and "thick fur" respectively take 0, 1, 2, 3, w jk are weights, which are determined according to experiments and experience of Chinese medicine experts. In the present invention, w 0 =0, w 1 =0.2, w 2 =0.7, and w 3 =1.3 are determined. The coating thickness index can describe the overall thickness of the tongue coating.

8、分析结果的显示。为了使分析结果易于理解和临床应用,采用文字和伪彩色图显示分析结果。将象素识别结果表示成舌色、苔色分布伪彩色图。将逐象素的厚度分类结果表示成舌苔厚度伪彩色分布图。采用文字对舌色、苔色舌苔厚度进行定性描述,并给出舌苔厚度指数值。8. Display of analysis results. In order to make the analysis results easy to understand and clinical application, text and pseudo-color graphics are used to display the analysis results. The pixel recognition results are expressed as tongue color and fur color distribution pseudo-color map. The pixel-by-pixel thickness classification results are expressed as a pseudo-color distribution map of tongue coating thickness. Qualitative description of tongue color and fur color and thickness of tongue fur was given in words, and the index value of tongue thickness was given.

图11是显示分析结果的一个例子。Figure 11 is an example showing the analysis results.

Claims (2)

1, a kind of traditional Chinese medical science tongue color, coating colour, thickness of the tongue coating analytical approach based on multi-class support vector machine, be to carry out image acquisition by digital camera, and image is input in the computer processor by USB interface, in processor, adopt current techique, the tongue body zone is split from tongue image, the invention is characterized in that this method also comprises the steps: successively
1) on the basis of carrying out hierarchical clustering analysis generation clustering tree and adjusting, adopt support vector machine method to carry out the identification of tongue body area pixel based on clustering tree, below will abbreviate CTSVM as based on the support vector machine of clustering tree;
The method step that the hierarchical clustering analysis generates clustering tree is:
(1), calculates k class centralization: (x for k class sample 1, x 2..., x k),
(2) the 1st grades of divisions are that each class center respectively becomes a class, i.e. k leaf node,
(3) ask distance D between per two class centers Ij, i=1 ... k, j=1 ... k, i ≠ j,
(4) nearest two centers are merged, form new class center, i.e. intermediate node,
(5) repeat (3)-(4) step, up to the k-1 level, 1 class is merged at all centers, i.e. root node,
(6) as required, adjust the structure of clustering tree, make that the degree of depth of tree is the least possible, the clustering tree of generation combines with two quasi-modes identification support vector machine, has just constituted CTSVM;
The method of tongue body area pixel identification and step be:
(1) calculate three chroma color value R in each pixel 3 * 3 neighborhood, the average of G, B in the input imagery, as the input feature vector of pixel identification,
(2) read R, G, the B value of a pixel in the tongue body,
(3) from the root node of described clustering tree, the CTSVM sorter according to this node is divided into a certain branch with this pixel, and concrete grammar is:
Calculate the kernel function inner product of this pixel each support vector corresponding, and multiply by corresponding coefficient and label,, ask the symbol that adds constant b result afterwards then all these product summations with this node.Promptly ask:
f ( x ) = sign ( &Sigma; x i &Element; sv &alpha; i y i K ( x i , x ) + b )
In the formula, x iBe the support vector of this sorter, α iBe the coefficient corresponding with support vector, y iBe the label of support vector sample, b is a constant, and b gets 40 among the present invention, K (x i, x) be the kernel function inner product,
K ( x , y ) = e | | x - y | | 2 2 &sigma; 2
‖ x-y ‖ is the norm of vector x-y in the formula, and σ gets 50,
Sign () is-symbol function, if the value of independent variable greater than 0, then functional value is 1, less than 0, then is-1.
According to the value of f (x) and the classifying rules of this CTSVM, this pixel is divided into a certain branch then; (4) if branch node is not a leaf node, then repeat the process in (3): according to the CTSVM sorter of this node, this pixel is divided into a certain branch, if branch node is a leaf node, then the class of this leaf node representative is the classification of the pixel of being discerned, and the sorter of each node is two class support vector machines sorters, and assorting process realizes according to the method for routine, (5) process of repetition (2)-(4), the whole pixels classification up to the tongue body zone finish;
2) add up various types of number of picture elements in each subregion;
3) carrying out tongue color describes, color according to the tongue nature type specification tongue nature of tongue lateral areas and the tip of the tongue district pixel, calculate the sum of all pixels that belongs to each tongue nature type in 3 zones such as the tip of the tongue, tongue left side, tongue right side, the tongue nature type that pixel count is maximum is the tongue nature feature of this tongue image;
4) carrying out the tongue fur look describes, calculate in the root of the tongue, the tongue, belong to the sum of all pixels of each tongue fur type in 3 zones such as the tip of the tongue, in three zones, whether the pixel count of judging the tongue fur type that pixel count is maximum respectively and the ratio of whole lingual surface sum of all pixels determine the tongue fur feature in this district less than a certain threshold value;
5) carry out thickness of the tongue coating quantitative test and description, tongue color, tongue fur look type and quantity according to pixel and neighborhood interior pixel thereof, be divided into " no tongue ", " thin tongue ", " middle thick coating ", " thick coating " 4 types, thickness type and corresponding quantity according to whole tongue body zone interior pixel, calculate the thickness of the tongue coating index, describe thickness of the tongue coating according to the thickness index;
6) adopt literal and pseudocolour picture display analysis result.
2, the traditional Chinese medical science tongue color based on multi-class support vector machine according to claim 1, coating colour, thickness of the tongue coating analytical approach, the description of its tongue color, coating colour, thickness of the tongue coating is characterised in that, after pixel identification is finished, add up in each subregion behind various types of number of picture elements, make N i jRepresent j class pixel number in the i district, i=1 wherein, 5 represent in the root of the tongue, the tongue respectively, 5 zones such as the tip of the tongue, tongue left side, tongue right side, j=1,15 expression tongue natures are light, tongue nature is light red, tongue nature is red, dimly red tongue, tongue nature deep red red, tongue nature is dark violet, 15 kinds of tongue natures such as thin and whitish fur, white tongue, white thick coating, thin and yellowish fur, yellow tongue, yellow thick coating, grayish fur, brown tongue, black tongue and tongue fur type, on this basis, according to the lingual diagnosis custom of Traditional Chinese Medicine experts, carry out the description of tongue color, coating colour, thickness of the tongue coating;
The describing method of tongue color is the color according to the tongue nature type specification tongue nature of tongue lateral areas and the tip of the tongue district pixel, calculate the sum of all pixels that belongs to each tongue nature type in 3 zones such as the tip of the tongue, tongue left side, tongue right side, the tongue nature type that pixel count is maximum is the tongue nature feature of this tongue image, and detailed process is:
1) calculate the total area (sum of pixel) A,
2) calculate the sum of 6 kinds of tongue nature types of tongue side and the tip of the tongue district respectively
SUM j = N 3 j + N 4 j + N 5 j , j = 1 , &CenterDot; &CenterDot; &CenterDot; , 6 ,
3) order SUM j max = max ( SUM j , j = 1 , &CenterDot; &CenterDot; &CenterDot; , 6 ) , J then MaxThe tongue nature type of representative is the tongue nature feature of this tongue image,
4) the area ratio of the dark violet tongue nature of calculating R 6 = SUM 6 A , If R 6>θ pAnd j Max≠ 6, then increase and describe " local dark violet ", wherein θ pFor according to the experiment preset threshold,
5) the area ratio in calculating the tip of the tongue district " tongue nature is red " R 3 = N 3 3 A , If R 3>θ rAnd j Max≠ 3, then increase and describe " red tip of tongue ", wherein θ rFor according to the experiment preset threshold;
The describing method of coating colour is for calculating in the root of the tongue, the tongue, belonging to the sum of all pixels of each tongue fur type in 3 zones such as the tip of the tongue, in three zones, whether the pixel count of judging the tongue fur type that pixel count is maximum respectively and the ratio of whole lingual surface sum of all pixels be less than a certain threshold value, determine the tongue fur feature in this district, concrete grammar is as follows:
1) calculates the total area (sum of the pixel) A of lingual surface, in the root of the tongue, the tongue, the area A in the tip of the tongue district 1, i=1 ..., 3,
2) in the root of the tongue, the tongue, the tip of the tongue district, calculate respectively N i j max i = max ( N i j , j = 7 , &CenterDot; &CenterDot; &CenterDot; , 15 ) , I=1 wherein, 2,3,
J then Max iThe tongue fur type of representative is the tongue fur feature in this district,
3) calculate i=1, j in 2,3 districts Max iThe area ratio that the tongue fur pixel is shared R ( j max i , i ) = N i j max i A i ,
4) respectively in the root of the tongue, the tongue, the tip of the tongue district is described, for root of the tongue district i=1, if R ( j max 1 , 1 ) < &theta; 1 Then being described as " the few tongue of the root of the tongue ", is j otherwise describe the root of the tongue Max 1The tongue fur of type, for distinguishing i=2 in the tongue, if R ( j max 2 , 2 ) < &theta; 2 , Then being described as " few tongue in the tongue ", is j otherwise describe in the tongue Max 2The tongue fur of type, for the tip of the tongue district i=3, if R ( j max 3 , 3 ) < &theta; 3 , Then being described as " the few tongue of the tip of the tongue ", is j otherwise describe the tip of the tongue Max 3The tongue fur of type, wherein θ 1, θ 2, θ 3For according to the experiment preset threshold, 5) for distinguishing in the root of the tongue, the tongue, calculate the second main type tongue fur j respectively Sec i, i=1,2, and calculate j Sec iType pixels area and j Max iThe area ratio of type R ms i = N i j sec i N i j max i , If R ms i > &theta; sec , Then the i district increases description second main type tongue fur, the wherein θ SecFor according to the experiment preset threshold;
The analysis and the description of thickness of the tongue coating are divided into two parts: thickness of the tongue coating classification and thickness of the tongue coating quantification, concrete steps are: 1) read the classification number of tongue body pixel and 5 * 5 neighborhoods thereof, 2) establish c 1, c 2For according to experiment preset threshold, and c 1>c 2, calculate the number of picture elements S that belongs to the tongue nature type in these pixel 5 * 5 neighborhoods Body, if S Body>c 1, then the thickness of the tongue coating type of this point is decided to be " no tongue ", 3) if c 1〉=S Body>c 2, then the thickness of the tongue coating type of this point is decided to be " thin tongue ", 4) if S Body≤ c 2, then the tongue body and tongue coating type j according to this point determines the thickness type, if tongue nature is j<7, then be " thin tongue ", if j=7,10 then is " a thin tongue ", if j=8,11,13,14 then is " a middle thick coating ", if j=9,12,15, then be " thick coating " 5) repeat 1)~3) step, finish up to all processes pixel, 6) according to the result of pixel identification, calculate the thick index T of tongue of view picture image, as the quantification result that thickness of the tongue coating is analyzed, computing method are:
T = &Sigma; k ( w j k ) A
A represents the pixel sum in tongue body district in the formula, Expression is to all pixel summations in the tongue body zone, j kThe thickness type of representing k pixel gets 0,1,2,3 respectively corresponding to " no tongue ", " thin tongue ", " middle thick coating ", " thick coating ",
Figure C021037950005C5
Be weights, determine that according to the experience of experiment and Traditional Chinese Medicine experts the thick index of tongue can be described the general thickness of tongue fur.
CNB021037957A 2002-03-25 2002-03-25 Analysis method of tongue color, fur color and tongue thickness in traditional Chinese medicine based on multi-class support vector machine Expired - Fee Related CN1162798C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB021037957A CN1162798C (en) 2002-03-25 2002-03-25 Analysis method of tongue color, fur color and tongue thickness in traditional Chinese medicine based on multi-class support vector machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB021037957A CN1162798C (en) 2002-03-25 2002-03-25 Analysis method of tongue color, fur color and tongue thickness in traditional Chinese medicine based on multi-class support vector machine

Publications (2)

Publication Number Publication Date
CN1367454A CN1367454A (en) 2002-09-04
CN1162798C true CN1162798C (en) 2004-08-18

Family

ID=4739901

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB021037957A Expired - Fee Related CN1162798C (en) 2002-03-25 2002-03-25 Analysis method of tongue color, fur color and tongue thickness in traditional Chinese medicine based on multi-class support vector machine

Country Status (1)

Country Link
CN (1) CN1162798C (en)

Families Citing this family (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100506085B1 (en) * 2002-12-28 2005-08-05 삼성전자주식회사 Apparatus for processing tongue image and health care service apparatus using tongue image
CN1327376C (en) * 2004-04-08 2007-07-18 上海交通大学 Soft measuring meter moduling method based on supporting vector machine
CN100409804C (en) * 2006-01-19 2008-08-13 上海交通大学 Tongue Image Color Automatic Recognition Method
CN100405402C (en) * 2006-08-18 2008-07-23 清华大学 Segmentation and Extraction of Tongue Coating in Color Digital Photos of Tongue
CN100418469C (en) * 2006-10-11 2008-09-17 哈尔滨工业大学 Computer Analysis System of Diseases and Syndromes Based on Tongue Image Features
CN103705216B (en) * 2013-12-16 2015-05-20 北京工业大学 Tongue colour sensing and quantitative classification method combining equal interval scale with classificatory scale in traditional Chinese medicine
CN103745217B (en) * 2013-12-31 2017-02-15 北京工业大学 Automatic analysis method of tongue color and coating color in traditional Chinese medicine based on image retrieval
CN104586397B (en) * 2015-01-26 2017-01-18 北京工业大学 Traditional Chinese medicine tongue color classification perception quantification method combined by equal sense distance method and cluster analysis
CN105160346B (en) * 2015-07-06 2019-02-01 上海大学 A kind of greasy recognition methods of curdy fur on tongue based on texture and distribution characteristics
CN106980815A (en) * 2017-02-07 2017-07-25 王俊 Facial paralysis objective evaluation method under being supervised based on H B rank scores
CN107169502A (en) * 2017-03-22 2017-09-15 广东工业大学 A kind of option recognition methods based on decision tree
CN111340052A (en) * 2018-12-03 2020-06-26 深圳市前海安测信息技术有限公司 Tongue tip red detection device and method for tongue diagnosis in traditional Chinese medicine and computer storage medium
CN110210319A (en) * 2019-05-07 2019-09-06 平安科技(深圳)有限公司 Computer equipment, tongue body photo constitution identification device and storage medium
CN110363072B (en) * 2019-05-31 2023-06-09 正和智能网络科技(广州)有限公司 Tongue picture identification method, tongue picture identification device, computer equipment and computer readable storage medium
CN110189383B (en) * 2019-06-27 2021-07-02 合肥云诊信息科技有限公司 Traditional Chinese medicine tongue color and fur color quantitative analysis method based on machine learning
CN110929740A (en) * 2019-11-21 2020-03-27 中电健康云科技有限公司 LGBM model-based tongue quality and tongue coating separation method
CN110786834B (en) * 2019-12-09 2022-04-05 中电健康云科技有限公司 A predictive model of fatty liver based on tongue characteristics and BMI index
CN113298034B (en) * 2021-06-17 2025-06-03 武汉知医邦科技有限公司 A recognition method based on the mathematical model of tongue contour ring area division for tongue diagnosis
CN115661142B (en) * 2022-12-14 2023-03-28 广东工业大学 Tongue diagnosis image processing method, device and medium based on key point detection
CN115965607A (en) * 2022-12-31 2023-04-14 华东理工大学 An intelligent TCM tongue diagnosis auxiliary analysis system
CN115954101A (en) * 2023-03-14 2023-04-11 南京轶诺科技有限公司 Health degree management system and management method based on AI tongue diagnosis image processing
CN116777930B (en) * 2023-05-24 2024-01-09 深圳汇医必达医疗科技有限公司 Image segmentation method, device, equipment and medium applied to tongue image extraction

Also Published As

Publication number Publication date
CN1367454A (en) 2002-09-04

Similar Documents

Publication Publication Date Title
CN1162798C (en) Analysis method of tongue color, fur color and tongue thickness in traditional Chinese medicine based on multi-class support vector machine
CN107330889B (en) An automatic analysis method of tongue color and fur color in traditional Chinese medicine based on convolutional neural network
CN107977671B (en) Tongue picture classification method based on multitask convolutional neural network
WO2021139258A1 (en) Image recognition based cell recognition and counting method and apparatus, and computer device
US20170337415A1 (en) Learning Pixel Visual Context from Object Characteristics to Generate Rich Semantic Images
CN112580748B (en) Method for counting classified cells of stain image
CN1759804A (en) Intelligent analyzing and differentiating method of herbalist doctor through integrated references form four parts of diagnosis
CN1761205A (en) System for detecting eroticism and unhealthy images on network based on content
CN1207924C (en) Method for testing face by image
CN108596038B (en) Method for identifying red blood cells in excrement by combining morphological segmentation and neural network
CN110796661B (en) Fungal microscopic image segmentation detection method and system based on convolutional neural network
CN108229576A (en) Across the multiplying power pathological image feature learning method of one kind
CN108596247A (en) A method of fusion radiation group and depth convolution feature carry out image classification
CN113139977A (en) Mouth cavity curve image wisdom tooth segmentation method based on YOLO and U-Net
CN102129576B (en) Method for extracting duty ratio parameter of all-sky aurora image
CN1908984A (en) Coated tongue division and extracting method for colored digital photo of tongue
CN116597218A (en) Pathological section image lesion classification detection method
CN1746901A (en) Computer intelligent process and processor for early lung cancer cell smear color image information
Shi et al. High-throughput fat quantifications of hematoxylin-eosin stained liver histopathological images based on pixel-wise clustering
Liu et al. Bone image segmentation
Prabhu et al. Multi-organ squamous cell carcinoma classification using feature interpretation technique for explainability
CN118823771A (en) A lung cancer image recognition method based on frequency domain deep learning
CN114565762B (en) Weak supervision liver tumor segmentation method based on ROI and split fusion strategy
CN1295643C (en) Automatic identifying method for skin micro imiage symptom
CN115880245A (en) A self-supervised approach for breast cancer disease classification

Legal Events

Date Code Title Description
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C19 Lapse of patent right due to non-payment of the annual fee
CF01 Termination of patent right due to non-payment of annual fee