CN112614106A - Method and system for determining tongue color and coating color based on color space - Google Patents
Method and system for determining tongue color and coating color based on color space Download PDFInfo
- Publication number
- CN112614106A CN112614106A CN202011542262.2A CN202011542262A CN112614106A CN 112614106 A CN112614106 A CN 112614106A CN 202011542262 A CN202011542262 A CN 202011542262A CN 112614106 A CN112614106 A CN 112614106A
- Authority
- CN
- China
- Prior art keywords
- tongue
- determining
- color
- coating
- pixel points
- 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.)
- Pending
Links
- 239000011248 coating agent Substances 0.000 title claims abstract description 151
- 238000000576 coating method Methods 0.000 title claims abstract description 151
- 238000000034 method Methods 0.000 title claims abstract description 27
- 239000006185 dispersion Substances 0.000 claims description 15
- MCSXGCZMEPXKIW-UHFFFAOYSA-N 3-hydroxy-4-[(4-methyl-2-nitrophenyl)diazenyl]-N-(3-nitrophenyl)naphthalene-2-carboxamide Chemical compound Cc1ccc(N=Nc2c(O)c(cc3ccccc23)C(=O)Nc2cccc(c2)[N+]([O-])=O)c(c1)[N+]([O-])=O MCSXGCZMEPXKIW-UHFFFAOYSA-N 0.000 claims description 2
- 208000010798 Tongue disease Diseases 0.000 claims description 2
- 238000004422 calculation algorithm Methods 0.000 description 11
- 238000010586 diagram Methods 0.000 description 9
- 238000004590 computer program Methods 0.000 description 7
- 238000004458 analytical method Methods 0.000 description 6
- 239000003814 drug Substances 0.000 description 6
- 230000006870 function Effects 0.000 description 6
- 238000012986 modification Methods 0.000 description 5
- 230000004048 modification Effects 0.000 description 5
- 238000003745 diagnosis Methods 0.000 description 4
- 201000010099 disease Diseases 0.000 description 4
- 208000037265 diseases, disorders, signs and symptoms Diseases 0.000 description 4
- 210000000056 organ Anatomy 0.000 description 4
- 238000009498 subcoating Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 238000007689 inspection Methods 0.000 description 3
- 238000000926 separation method Methods 0.000 description 3
- 238000003860 storage Methods 0.000 description 3
- CBCKQZAAMUWICA-UHFFFAOYSA-N 1,4-phenylenediamine Chemical compound NC1=CC=C(N)C=C1 CBCKQZAAMUWICA-UHFFFAOYSA-N 0.000 description 2
- 241000195940 Bryophyta Species 0.000 description 2
- 206010043945 Tongue coated Diseases 0.000 description 2
- 230000007812 deficiency Effects 0.000 description 2
- 238000002405 diagnostic procedure Methods 0.000 description 2
- 238000000638 solvent extraction Methods 0.000 description 2
- 210000005182 tip of the tongue Anatomy 0.000 description 2
- 230000002087 whitening effect Effects 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 239000008280 blood Substances 0.000 description 1
- 210000004369 blood Anatomy 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000007621 cluster analysis Methods 0.000 description 1
- 238000013527 convolutional neural network Methods 0.000 description 1
- 239000013078 crystal Substances 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 230000004069 differentiation Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000001815 facial effect Effects 0.000 description 1
- 235000008216 herbs Nutrition 0.000 description 1
- 150000002500 ions Chemical class 0.000 description 1
- 239000002932 luster Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 231100000915 pathological change Toxicity 0.000 description 1
- 230000036285 pathological change Effects 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 210000000952 spleen Anatomy 0.000 description 1
- 210000002784 stomach Anatomy 0.000 description 1
- 210000001835 viscera Anatomy 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0012—Biomedical image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/23—Clustering techniques
- G06F18/232—Non-hierarchical techniques
- G06F18/2321—Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
- G06F18/23213—Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10024—Color image
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- Evolutionary Computation (AREA)
- Probability & Statistics with Applications (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Evolutionary Biology (AREA)
- Artificial Intelligence (AREA)
- General Engineering & Computer Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- Bioinformatics & Computational Biology (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
- Radiology & Medical Imaging (AREA)
- Quality & Reliability (AREA)
- Image Analysis (AREA)
Abstract
The application discloses a method and a system for determining tongue color and coating color based on a color space. Wherein, the method comprises the following steps: clustering tongue images into a plurality of tongue subsets; determining coordinate values of all pixel points of the tongue image, and determining a tongue contour image according to the coordinate values of all the pixel points, wherein the tongue contour image is the tongue image without non-tongue-texture pixel points and non-tongue-coating pixel points; determining the discrete degree of the pixel points according to the pixel points and the central points of the tongue contour image, and dividing the tongue subsets into tongue proton sets and tongue coating subsets according to the discrete degree; determining a tongue color range and a coating color range through an HSV color space, determining the tongue color of the tongue proton concentration according to the tongue color range, and determining the coating color of the tongue coating subset according to the coating color range.
Description
Technical Field
The application relates to the technical field of power systems, in particular to a method and a system for determining tongue color and coating color based on a color space.
Background
TCM is the treasure of our Chinese nation and is a smart crystal that has been perfected by many generations over thousands of years. With the development of the times and the progress of the society and the deep mind of the concept of preventing and treating diseases in the traditional Chinese medicine, the traditional Chinese medicine is combined with the modern science and technology to generate a series of modernized achievements. In addition to the modern extraction and preparation of Chinese herbs, the diagnostic methods of Chinese medicine are developed in the direction of automation and digitalization. Just as in ancient and modern medical systems: "the physician asks and cuts four words, which is the outline of the doctor. "the inspection and the inquiry constitute the four diagnostic methods of the traditional Chinese medicine. Lingshu Benzang chapter: According to the external response, to know the internal organs, then know the disease."it is known that inspection has a very important role. Inspection can be divided into facial diagnosis and tongue diagnosis. The tongue-distinguishing guide: differentiation of tongue proper from deficiency or excess of zang-fu organs can be used to determine the superficial or deep of the six excesses. The tongue is the sprout of the heart, the exterior of the spleen, and the coating is generated by stomach qi. The zang-fu organs are connected with the tongue through the meridians, and the pathological changes of the zang-fu organs can be reflected on the tongue proper and tongue coating. The tongue diagnosis is mainly used to diagnose the tongue proper and the tongue coating morphology, color and luster, so as to determine the nature of the disease, the depth of the disease, the abundance or insufficiency of qi and blood, and the deficiency or excess of the zang-fu organs.
With the gradual development of image processing technology and the continuous maturity of artificial intelligence technologies such as machine learning and deep learning, deep convolutional neural networks are beginning to be applied to tongue diagnosis in traditional Chinese medicine, and various methods are generated. However, when analyzing the tongue color and the tongue coating color, the tongue image is divided into a tongue proper part and a tongue coating part by tongue proper separation, and then the tongue proper color and the tongue coating color are analyzed. However, when clustering is performed by using a clustering algorithm such as kmeans, the total number of categories needs to be specified; the tongue coating sometimes has a color similar to that of the face or other non-tongue coating areas, which causes deviation when directly clustering 3 types (tongue coating, tongue proper and background).
Aiming at the existing prior art, when tongue color and coating color are analyzed, coating quality separation is needed to be carried out firstly, a tongue image is divided into a tongue quality part and a coating part, and then the tongue quality color and the coating color are analyzed. However, when clustering is performed by using a clustering algorithm such as kmeans, the total number of categories needs to be specified; however, the tongue coating sometimes has a color similar to that of the face or other non-tongue coating areas, which causes a technical problem of deviation when directly clustering 3 types (tongue coating, tongue proper and background).
Disclosure of Invention
The embodiment of the disclosure provides a method and a system for determining tongue color and coating color based on a color space, so as to at least solve the problem that in the prior art, coating quality separation is required to be performed firstly when the tongue color and coating color are analyzed, a tongue image is divided into a tongue quality part and a coating part, and then the tongue quality color and the coating color are analyzed. However, when clustering is performed by using a clustering algorithm such as kmeans, the total number of categories needs to be specified; the tongue coating sometimes has a color similar to that of the face or other non-tongue coating areas, which leads to the technical problem of deviation when directly clustering 3 types (tongue coating, tongue proper and background).
According to an aspect of the embodiments of the present disclosure, there is provided a method for determining a tongue coating color based on a color space, including: clustering tongue images into a plurality of tongue subsets; determining coordinate values of all pixel points of the tongue image, and determining a tongue profile image according to the coordinate values of all the pixel points, wherein the tongue profile image is the tongue image without non-tongue pixel points and non-tongue fur pixel points; determining the discrete degree of the pixel points according to the pixel points and the central points of the tongue contour image, and dividing a plurality of tongue subsets into tongue proton sets and tongue coating subsets according to the discrete degree; determining a tongue color range and a coating color range through the HSV color space, determining the tongue color of the concentrated tongue proton according to the tongue color range, and determining the coating color of the sub-coating according to the coating color range.
According to another aspect of the embodiments of the present disclosure, there is also provided a system for determining a tongue coating color based on a color space, including: a tongue clustering subset module for clustering the tongue images into a plurality of tongue subsets; the tongue contour image determining module is used for determining coordinate values of all pixel points of the tongue image and determining the tongue contour image according to the coordinate values of all the pixel points, and the tongue contour image is the tongue image without non-tongue-quality pixel points and non-tongue-coating pixel points; the tongue coating dividing module is used for determining the discrete degree of the pixel points according to the pixel points and the central points of the tongue contour image, and dividing a plurality of tongue subsets into tongue proton sets and tongue coating subsets according to the discrete degree; and the tongue color and coating color determining module is used for determining a tongue color range and a coating color range through the HSV color space, determining the tongue color of the concentrated tongue proton according to the tongue color range, and determining the coating color of the tongue coating subset according to the coating color range.
In the invention, the coordinate values of all pixel points of the tongue image are determined, and the tongue contour image is determined according to the coordinate values of all the pixel points, wherein the tongue contour image is the tongue image without non-tongue-texture pixel points and non-tongue-coating pixel points. And determining the dispersion degree of the pixel points according to the pixel points and the central points of the tongue contour image, and dividing a plurality of tongue subsets into tongue proton sets and tongue coating subsets according to the dispersion degree. Determining the range of the tongue color and the range of the fur color through the HSV color space, determining the tongue color of the tongue proton concentration according to the range of the tongue color, and determining the fur color of the tongue fur subset according to the range of the fur color
Clustering tongue images into a plurality of tongue subsets, and determining the subsets belonging to tongue coating and tongue proper; and judging the color of each subset so as to obtain the tongue color and the fur color. Dividing the tongue image into tongue subsets allows a finer analysis of the tongue image, thereby reducing bias. Further solves the problem that the tongue color and the tongue fur color are analyzed by separating the tongue texture and dividing the tongue image into a tongue texture part and a tongue fur part when analyzing the tongue color and the tongue fur color in the prior art. However, when clustering is performed by using a clustering algorithm such as kmeans, the total number of categories needs to be specified; the tongue coating sometimes has a color similar to that of the face or other non-tongue coating areas, which leads to the technical problem of deviation when directly clustering 3 types (tongue coating, tongue proper and background).
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the disclosure and together with the description serve to explain the disclosure and not to limit the disclosure. In the drawings:
fig. 1 is a schematic flowchart of a method for determining a coating color of a tongue based on a color space according to an embodiment of the present disclosure;
FIG. 2 is a schematic illustration of a tongue image according to an embodiment of the present disclosure;
FIG. 3 is a schematic view of 10 tongue subsets according to an embodiment of the present disclosure;
FIG. 4 is a schematic view of center points of respective tongue subsets according to an embodiment of the present disclosure;
FIG. 5 is a schematic illustration of HSV color space partitioning according to an embodiment of the present disclosure;
fig. 6 is a schematic flowchart of a system for determining a tongue coating color based on a color space according to an embodiment of the present disclosure.
Detailed Description
The exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, however, the present invention may be embodied in many different forms and is not limited to the embodiments described herein, which are provided for complete and complete disclosure of the present invention and to fully convey the scope of the present invention to those skilled in the art. The terminology used in the exemplary embodiments illustrated in the accompanying drawings is not intended to be limiting of the invention. In the drawings, the same units/elements are denoted by the same reference numerals.
Unless otherwise defined, terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Further, it will be understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and will not be interpreted in an idealized or overly formal sense.
First, some of the nouns or terms appearing in the description of the embodiments of the present disclosure are applicable to the following explanations:
K-Means is a method of cluster analysis. Clustering is the grouping of data objects into multiple classes or clusters (clusters) such that objects in the same Cluster have higher similarity and objects in different clusters differ more. The clustering algorithm is an unsupervised learning algorithm. The k-means algorithm is the most widely used one, and takes an unlabeled data set and then clusters the data into different groups. The algorithm has the biggest characteristics of simplicity, good comprehension and high operation speed, but can only be applied to continuous data, and the algorithm is required to be manually specified before clustering and needs to be divided into several classes.
According to a first aspect of the present embodiment, a method 100 of determining a tongue coating color based on a color space is provided. Fig. 1 shows a schematic flow diagram of the method, and referring to fig. 1, the method 100 includes:
s102: clustering tongue images into a plurality of tongue subsets;
s104: determining coordinate values of all pixel points of the tongue image, and determining a tongue profile image according to the coordinate values of all the pixel points, wherein the tongue profile image is the tongue image without non-tongue pixel points and non-tongue fur pixel points;
s106: determining the discrete degree of the pixel points according to the pixel points and the central points of the tongue contour image, and dividing a plurality of tongue subsets into tongue proton sets and tongue coating subsets according to the discrete degree;
s108: determining a tongue color range and a coating color range through the HSV color space, determining the tongue color of the concentrated tongue proton according to the tongue color range, and determining the coating color of the sub-coating according to the coating color range.
Specifically, the tongue images are clustered into several tongue subsets. For example, the kmeans function in opencv is called to implement clustering of tongue images into several tongue subsets. In the present embodiment, 10 tongue subsets are taken as an example for explanation. Referring to fig. 2, the left graph of fig. 2 is the tongue original, and the right graph of fig. 2 is the kmeans clustering result, and the color shades represent different clustering subsets. Referring to fig. 3, 10 classification maps are arranged in sequence, corresponding to 10 tongue subsets.
Further, coordinate values of all pixel points of the tongue image are determined, and a tongue contour image is determined according to the coordinate values of all the pixel points, wherein the tongue contour image is the tongue image without non-tongue-quality pixel points and non-tongue-coating pixel points. For example, excluding the face and the shadow caused by the ray: the centers of the clustered pixel coordinate values may be used to exclude non-tongue coating and tongue quality portions, with the center points of the respective tongue subsets as shown in fig. 4. The tongue image is uniformly 256 × 256 pixels, the coordinate values of the center points of the tongue subsets are shown in table 1, and the y coordinate values in table 1 are observed, so that it is obvious that the y coordinate values of the subsets 4, 7, and 9 are all less than 20 and are closer to the lip, and certainly, the y coordinate values may be less than other values and are closer to the lip, and subsequent analysis may be influenced and eliminated due to darker light; the y value of the subset 10 is greater than 220, although it is possible that the y coordinate value is greater than other values near the tip of the tongue and closer to the tip of the tongue. The outline can be found by using the findContours function of opencv, and the centers of the two outlines are respectively positioned at the lower left corner and the lower right corner of the image, so that the non-tongue nature or the tongue coating can be determined and removed.
TABLE 1
| x | y | |
1 | 115 | 132 | |
2 | 116 | 78 | |
3 | 142 | 144 | |
4 | 196 | 15 | |
5 | 132 | 147 | |
6 | 117 | 131 | |
7 | 115 | 12 | |
8 | 127 | 124 | |
9 | 126 | 17 | |
10 | 131 | 224 |
Further, determining the discrete degree of the pixel points according to the pixel points and the central points of the tongue contour image, and dividing a plurality of tongue subsets into tongue proton sets and tongue coating subsets according to the discrete degree. For example, the tongue coating is generally closer to the middle of the tongue and more concentrated, so the patent uses the average distance of all the pixels in the subset from the center of the subset to represent the degree of dispersion of the pixels in the subset.
For example, for a particular tongue subset, the tongue subset pixel (x) is first determinedi,yi) 1,2, N, center of NPoint:and then calculating the average distance between all the pixel points and the central point, wherein the calculation formula is as follows:as shown in table 2, when the value of the degree of dispersion is less than 75, it can be obtained that the tongue subsets 1 and 5 belong to the tongue coating subset; the tongue subset 2, 3, 6, 8 belongs to the tongue subset.
TABLE 2
And finally, determining a tongue color range and a coating color range through the HSV color space, determining the tongue color of the concentrated tongue proton according to the tongue color range, and determining the coating color of the tongue coating subset according to the coating color range. Referring to table 3, an HSV color space is shown. H is hue, S is saturation, V is lightness, hmin is hue minimum, hmax is hue maximum, smin is saturation minimum, smax is saturation maximum, vmin is lightness minimum, and vmax is lightness maximum. For the pale white tongue color in the traditional Chinese medicine, a large amount of observation and analysis show that the tongue color is not pure white in the table above, but is very pale reddish; according to the degree of redness, the color which is redder than pale white is pale red, and the color which is redder is reddish; the darker of the red is dark red on the tongue, and the darker of the red is deep red on the tongue. Based on this analysis, the HSV color space partitioning is shown in fig. 5.
TABLE 3
Therefore, according to the present embodiment, the coordinate values of all the pixels of the tongue image are determined, and the tongue contour image is determined according to the coordinate values of all the pixels, where the tongue contour image is the tongue image without the non-tongue-texture pixels and the non-tongue-coating pixels. And determining the dispersion degree of the pixel points according to the pixel points and the central points of the tongue contour image, and dividing a plurality of tongue subsets into tongue proton sets and tongue coating subsets according to the dispersion degree. Determining a tongue color range and a coating color range through the HSV color space, determining the tongue color of the concentrated tongue proton according to the tongue color range, and determining the coating color of the sub-coating according to the coating color range.
Clustering tongue images into a plurality of tongue subsets, and determining the subsets belonging to tongue coating and tongue proper; and judging the color of each subset so as to obtain the tongue color and the fur color. Dividing the tongue image into tongue subsets allows a finer analysis of the tongue image, thereby reducing bias. Further solves the problem that the tongue color and the tongue fur color are analyzed by separating the tongue texture and dividing the tongue image into a tongue texture part and a tongue fur part when analyzing the tongue color and the tongue fur color in the prior art. However, when clustering is performed by using a clustering algorithm such as kmeans, the total number of categories needs to be specified; the tongue coating sometimes has a color similar to that of the face or other non-tongue coating areas, which leads to the technical problem of deviation when directly clustering 3 types (tongue coating, tongue proper and background).
Optionally, determining coordinate values of all pixel points of the tongue image, and determining the tongue profile image according to the coordinate values of all the pixel points, including: determining longitudinal coordinate values of all pixel points of the tongue image; under the condition that the first longitudinal coordinate value is smaller than a first threshold value, determining pixel points corresponding to the first longitudinal coordinate value as non-tongue-texture pixel points and non-tongue-coating pixel points; under the condition that the second longitudinal coordinate value is larger than a second threshold value, determining pixel points corresponding to the second longitudinal coordinate value as non-tongue-texture pixel points and non-tongue-coating pixel points; and eliminating the non-tongue-texture pixel points and the non-tongue-coating pixel points, and determining the eliminated tongue image as a tongue contour image.
Optionally, before determining the discrete degree of the pixel point according to the pixel point and the central point of the tongue profile image, the method includes: according to the following disclosureDetermining coordinate values of the central point of the tongue profile image:wherein,coordinate value (x) indicating the center point of the tongue profile imagei,yi) And the ith pixel point represents the tongue contour image, and N represents the tongue contour image and has N pixel points.
Optionally, determining the discrete degree of the pixel point according to the pixel point and the central point of the tongue profile image, including: determining the average distance between the pixel point of the tongue profile image and the central point according to the following formula:where dist is the average distance; and determining the average distance as the discrete degree of the pixel points.
Optionally, the dividing of the number of tongue subsets into tongue proton sets and tongue coating subsets according to the degree of dispersion comprises: comparing the degree of dispersion with a third threshold; under the condition that the discrete degree is larger than a third threshold value, determining that the pixel point corresponding to the discrete degree belongs to the tongue texture subset; and under the condition that the discrete degree is smaller than the third threshold value, determining that the pixel point corresponding to the discrete degree belongs to the tongue coating subset.
Optionally, the tongue color is classified into pale purple, pale white, pale red, dark red and dark red; the color of the tongue coating is classified into gray black, yellow and white tongue coating and yellow and white tongue coating.
Optionally, determining the tongue color range by HSV color space includes: determining the range of the light purple tongue through the HSV color space as follows:determining the range of pale tongue through HSV color space as follows:by HSV color spaceThe range of the tongue with pale red is as follows:determining the range of tongue redness by HSV color space as follows:the range of dark red tongue determined by HSV color space is:the range of deep tongue is determined by the HSV color space as follows:wherein S is saturation, H is hue, and V is lightness; s0=60,S1=110,V0=60,V1=125。
Optionally, determining the fur color range through the HSV color space includes: determining the range of grey and black moss by HSV color space as follows:andwherein Sa=220,Va=0,Vb30; determining the range of the yellow tongue coating through HSV color space as follows:andwherein Sc=70,Sd=140,Vc=10,Vd=180,Hc=3,Hd15; determining the range of moss white through HSV color space as follows:moss white includes a pale-white color; scope with combined yellow and white coatingThe enclosure consists of white pixel points with white fur and yellow pixel points with yellow fur. Wherein S is saturation, H is hue, and V is lightness.
Optionally, determining the tongue color of the tongue proton concentration according to the tongue color range, and determining the coating color of the tongue coating subset according to the coating color range, including: determining the tongue color of the pixel points in the tongue proton set according to the tongue color range; and determining the fur color of the pixel points in the tongue fur subset according to the fur color range.
Therefore, according to the present embodiment, the coordinate values of all the pixels of the tongue image are determined, and the tongue contour image is determined according to the coordinate values of all the pixels, where the tongue contour image is the tongue image without the non-tongue-texture pixels and the non-tongue-coating pixels. And determining the dispersion degree of the pixel points according to the pixel points and the central points of the tongue contour image, and dividing a plurality of tongue subsets into tongue proton sets and tongue coating subsets according to the dispersion degree. Determining a tongue color range and a coating color range through the HSV color space, determining the tongue color of the concentrated tongue proton according to the tongue color range, and determining the coating color of the sub-coating according to the coating color range.
Clustering tongue images into a plurality of tongue subsets, and determining the subsets belonging to tongue coating and tongue proper; and judging the color of each subset so as to obtain the tongue color and the fur color. Dividing the tongue image into tongue subsets allows a finer analysis of the tongue image, thereby reducing bias. Further solves the problem that the tongue color and the tongue fur color are analyzed by separating the tongue texture and dividing the tongue image into a tongue texture part and a tongue fur part when analyzing the tongue color and the tongue fur color in the prior art. However, when clustering is performed by using a clustering algorithm such as kmeans, the total number of categories needs to be specified; the tongue coating sometimes has a color similar to that of the face or other non-tongue coating areas, which leads to the technical problem of deviation when directly clustering 3 types (tongue coating, tongue proper and background).
According to another aspect of the present embodiment, a system 600 for determining tongue coating color based on a color space is provided. Referring to fig. 6, the system 600 includes: a tongue clustering subset module 610 for clustering tongue images into a number of tongue subsets; a tongue contour image determining module 620, configured to determine coordinate values of all pixel points of the tongue image, and determine the tongue contour image according to the coordinate values of all the pixels, where the tongue contour image is a tongue image after non-tongue-quality pixel points and non-tongue-coating pixel points are removed; the tongue quality and tongue coating dividing module 630 is used for determining the discrete degree of the pixel points according to the pixel points and the central points of the tongue contour image, and dividing a plurality of tongue subsets into tongue quality sets and tongue coating subsets according to the discrete degree; and the tongue color and coating color determining module 640 is used for determining a tongue color range and a coating color range through the HSV color space, determining the color of the concentrated tongue proton according to the tongue color range, and determining the coating color of the tongue coating subset according to the coating color range.
Optionally, the determine tongue profile image module 620 includes: a longitudinal coordinate value determining submodule for determining longitudinal coordinate values of all pixel points of the tongue image; the first non-tongue quality non-coating quality submodule is used for determining pixel points corresponding to the first longitudinal coordinate value as non-tongue quality pixel points and non-coating pixel points under the condition that the first longitudinal coordinate value is smaller than a first threshold value; the submodule for determining the second non-tongue non-coating quality is used for determining the pixel point corresponding to the second longitudinal coordinate value as a non-tongue quality pixel point and a non-coating pixel point under the condition that the second longitudinal coordinate value is larger than a second threshold value; and the tongue contour image determining submodule is used for eliminating the non-tongue pixel points and the non-tongue fur pixel points, and determining the eliminated tongue image as a tongue contour image.
Optionally, the tongue coating dividing module 630 comprises: a center point coordinate value determining submodule for determining coordinate values of a center point of the tongue profile image according to the following formula:wherein,coordinate value (x) indicating the center point of the tongue profile imagei,yi) And the ith pixel point represents the tongue contour image, and N represents the tongue contour image and has N pixel points.
Optionally, the tongue coating dividing module 630 comprises: it doesThe average distance ion determining module is used for determining the average distance between the pixel points of the tongue profile image and the central point according to the following formula:where dist is the average distance; and the discrete degree determining submodule is used for determining the average distance as the discrete degree of the pixel point.
Optionally, the tongue coating dividing module 630 comprises: the comparison submodule is used for comparing the dispersion degree with a third threshold value; the tongue quality subset determining submodule is used for determining that the pixel points corresponding to the discrete degree belong to the tongue quality subset under the condition that the discrete degree is greater than a third threshold value; and the tongue coat subset determining submodule is used for determining that the pixel point corresponding to the discrete degree belongs to the tongue coat subset under the condition that the discrete degree is smaller than the third threshold value.
Optionally, the tongue color is classified into pale purple, pale white, pale red, dark red and dark red; the color of the tongue coating is classified into gray black, yellow and white tongue coating and yellow and white tongue coating.
Optionally, the determine tongue coating color module 640 includes: a determine tongue light purple sub-module for determining the range of tongue light purple through HSV color space as:the tongue whitening determining submodule is used for determining the tongue whitening range through the HSV color space as follows:and the determine tongue light red submodule is used for determining the range of the tongue light red through the HSV color space as follows:the tongue red determining submodule is used for determining the range of tongue red through the HSV color space as follows:determining tongue dark red submodule for determining tongue dark red by HSV color spaceThe range is as follows:a tongue crimson determining sub-module for determining a tongue crimson range through the HSV color space as follows:wherein S is saturation, H is hue, and V is lightness; s0=60,S1=110,V0=60,V1=125。
Optionally, the determine tongue coating color module 640 includes: and the determining grayish black submodule is used for determining the grayish black range of the mosses through the HSV color space as follows:andwherein Sa=220,Va=0,Vb30; the fur yellow determining submodule is used for determining that the range of the fur yellow through the HSV color space is as follows:andwherein Sc=70,Sd=140,Vc=10,Vd=180,Hc=3,Hd15; the mosses-determining submodule is used for determining the range of mosses through the HSV color space as follows:moss white includes a pale-white color; the scope of the combination of yellow and white fur consists of white pixel points of white fur and yellow pixel points of yellow fur; wherein S is saturation, H is hue, and V is lightness.
Optionally, the determine tongue coating color module 640 includes: determining the tongue color of the pixel points in the tongue proton set according to the tongue color range; and determining the fur color of the pixel points in the tongue fur subset according to the fur color range.
The system for determining the tongue color and the coating color based on the color space in the embodiment of the present invention corresponds to the method for determining the tongue color and the coating color based on the color space in another embodiment of the present invention, and is not described herein again.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein. The scheme in the embodiment of the application can be implemented by adopting various computer languages, such as object-oriented programming language Java and transliterated scripting language JavaScript.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.
Claims (10)
1. A method for determining tongue fur color based on color space is characterized by comprising the following steps:
clustering tongue images into a plurality of tongue subsets;
determining coordinate values of all pixel points of the tongue image, and determining a tongue contour image according to the coordinate values of all the pixel points, wherein the tongue contour image is the tongue image without non-tongue-texture pixel points and non-tongue-coating pixel points;
determining the discrete degree of the pixel points according to the pixel points and the central points of the tongue contour image, and dividing the tongue subsets into tongue proton sets and tongue coating subsets according to the discrete degree;
determining a tongue color range and a coating color range through an HSV color space, determining the tongue color of the tongue proton concentration according to the tongue color range, and determining the coating color of the tongue coating subset according to the coating color range.
2. The method of claim 1, wherein determining coordinate values of all pixels of the tongue image and determining a tongue profile image based on the coordinate values of all pixels comprises:
determining longitudinal coordinate values of all pixel points of the tongue image;
under the condition that the first longitudinal coordinate value is smaller than a first threshold value, determining pixel points corresponding to the first longitudinal coordinate value as non-tongue-texture pixel points and non-tongue-coating pixel points;
under the condition that the second ordinate value is larger than a second threshold value, determining pixel points corresponding to the second ordinate value as non-tongue-texture pixel points and non-tongue-coating pixel points;
and eliminating the non-tongue-texture pixel points and the non-tongue-coating pixel points, and determining the eliminated tongue image as a tongue contour image.
3. The method of claim 1, prior to determining the degree of dispersion of the pixels based on the pixels of the tongue profile image and the center point, comprising:
determining coordinate values of a center point of the tongue profile image according to the following formula:
4. The method of claim 3, wherein determining the degree of dispersion of the pixel points according to the pixel points of the tongue profile image and the center point comprises:
determining the average distance between the pixel points of the tongue profile image and the central point according to the following formula:
wherein the dist is the average distance;
and determining the average distance as the discrete degree of the pixel point.
5. The method of claim 4, wherein dividing the plurality of tongue subsets into tongue proton sets and tongue coating subsets according to the degree of dispersion comprises:
comparing the degree of dispersion to a third threshold;
under the condition that the discrete degree is larger than a third threshold value, determining that the pixel point corresponding to the discrete degree belongs to the tongue texture subset;
and under the condition that the discrete degree is smaller than a third threshold value, determining that the pixel point corresponding to the discrete degree belongs to the tongue coating subset.
6. The method of claim 1,
the tongue color is divided into pale purple, pale white, pale red, dark red and deep-red;
the tongue coating is divided into grey black, yellow, white and yellow tongue coating.
7. The method of claim 6, wherein determining the tongue color range from the HSV color space comprises:
determining the range of the light purple tongue through the HSV color space as follows:
determining the range of pale tongue through HSV color space as follows:
determining the range of pale-red tongue by HSV color space as follows:
determining the range of tongue redness by HSV color space as follows:
the range of dark red tongue determined by HSV color space is:
the range of deep tongue is determined by the HSV color space as follows:
wherein S is saturation, H is hue, and V is lightness; s0=60,S1=110,V0=60,V1=125。
8. The method of claim 6, wherein determining the moss color range from the HSV color space comprises:
determining the range of grey and black moss by HSV color space as follows:
wherein Sa=220,Va=0,Vb=30;
Determining the range of the yellow tongue coating through HSV color space as follows:
wherein Sc=70,Sd=140,Vc=10,Vd=180,Hc=3,Hd=15;
Determining the range of moss white through HSV color space as follows:
the moss comprises a pale white color of the moss;
the scope of the combination of yellow and white fur consists of white pixel points of the white fur and yellow pixel points of the yellow fur;
wherein S is saturation, H is hue, and V is lightness.
9. The method of claim 8, wherein determining a tongue color in the tongue proton set from the tongue color range and a coating color of the tongue coating subset from the coating color range comprises:
determining the tongue color of the pixel points in the tongue quality subset according to the tongue color range;
and determining the fur color of the pixel points in the tongue fur subset according to the fur color range.
10. A system for determining tongue coating color based on a color space, comprising:
a tongue clustering subset module for clustering the tongue images into a plurality of tongue subsets;
a tongue contour image determining module, configured to determine coordinate values of all pixel points of the tongue image, and determine a tongue contour image according to the coordinate values of all the pixel points, where the tongue contour image is a tongue image with non-tongue-texture pixel points and non-tongue-coating pixel points removed;
the tongue coating dividing module is used for determining the discrete degree of pixel points according to the pixel points and the central points of the tongue contour image, and dividing the tongue subsets into tongue proton sets and tongue coating subsets according to the discrete degree;
and the tongue color and coating color determining module is used for determining a tongue color range and a coating color range through an HSV color space, determining the tongue color of the tongue proton set according to the tongue color range, and determining the coating color of the tongue coating subset according to the coating color range.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011542262.2A CN112614106A (en) | 2020-12-23 | 2020-12-23 | Method and system for determining tongue color and coating color based on color space |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011542262.2A CN112614106A (en) | 2020-12-23 | 2020-12-23 | Method and system for determining tongue color and coating color based on color space |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112614106A true CN112614106A (en) | 2021-04-06 |
Family
ID=75244613
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011542262.2A Pending CN112614106A (en) | 2020-12-23 | 2020-12-23 | Method and system for determining tongue color and coating color based on color space |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112614106A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102147921A (en) * | 2011-04-08 | 2011-08-10 | 浙江理工大学 | Graph theory-based Chinese medicinal tongue nature and tongue coat separation algorithm |
CN107330889A (en) * | 2017-07-11 | 2017-11-07 | 北京工业大学 | A kind of traditional Chinese medical science tongue color coating colour automatic analysis method based on convolutional neural networks |
CN109598297A (en) * | 2018-11-29 | 2019-04-09 | 新绎健康科技有限公司 | A kind of tongue fur tongue analysis method, system, computer equipment and storage medium |
CN110060250A (en) * | 2019-04-24 | 2019-07-26 | 北京峰云视觉技术有限公司 | A kind of tongue body image processing method, device and electronic equipment |
CN111860538A (en) * | 2020-07-20 | 2020-10-30 | 河海大学常州校区 | Tongue color identification method and device based on image processing |
-
2020
- 2020-12-23 CN CN202011542262.2A patent/CN112614106A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102147921A (en) * | 2011-04-08 | 2011-08-10 | 浙江理工大学 | Graph theory-based Chinese medicinal tongue nature and tongue coat separation algorithm |
CN107330889A (en) * | 2017-07-11 | 2017-11-07 | 北京工业大学 | A kind of traditional Chinese medical science tongue color coating colour automatic analysis method based on convolutional neural networks |
CN109598297A (en) * | 2018-11-29 | 2019-04-09 | 新绎健康科技有限公司 | A kind of tongue fur tongue analysis method, system, computer equipment and storage medium |
CN110060250A (en) * | 2019-04-24 | 2019-07-26 | 北京峰云视觉技术有限公司 | A kind of tongue body image processing method, device and electronic equipment |
CN111860538A (en) * | 2020-07-20 | 2020-10-30 | 河海大学常州校区 | Tongue color identification method and device based on image processing |
Non-Patent Citations (1)
Title |
---|
陈海燕等: "一种基于多色彩通道动态阈值的舌苔舌质分离算法", 《北京生物医学工程》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108376400B (en) | Automatic bone marrow cell classification method | |
CN108664976B (en) | Super-pixel-based fuzzy spectral clustering brain tumor image automatic segmentation method | |
CN113256641B (en) | Skin lesion image segmentation method based on deep learning | |
CN111860538A (en) | Tongue color identification method and device based on image processing | |
CN112070772A (en) | Blood leukocyte image segmentation method based on UNet + + and ResNet | |
Senan et al. | Classification of PH2 images for early detection of skin diseases | |
CN109635846A (en) | A kind of multiclass medical image judgment method and system | |
WO2023124562A1 (en) | Cell segmentation and typing method, apparatus and device based on machine learning, and medium | |
Naito et al. | Identification and segmentation of myelinated nerve fibers in a cross-sectional optical microscopic image using a deep learning model | |
CN112560911B (en) | Tongue image classification method and tongue image classification system for traditional Chinese medicine | |
Sigit et al. | Identification of leukemia diseases based on microscopic human blood cells using image processing | |
Ilyasova et al. | Intelligent feature selection technique for segmentation of fundus images | |
CN109636864A (en) | A kind of tongue dividing method and system based on color correction Yu depth convolutional neural networks | |
Wang et al. | Facial image medical analysis system using quantitative chromatic feature | |
Shelke et al. | Automated segmentation and detection of brain tumor from MRI | |
CN105869151A (en) | Tongue segmentation and tongue coating and tongue body separation method | |
Subashini et al. | Brain tumour detection using Pulse coupled neural network (PCNN) and back propagation network | |
CN112614106A (en) | Method and system for determining tongue color and coating color based on color space | |
Kanawong et al. | ZHENG classification in Traditional Chinese Medicine based on modified specular-free tongue images | |
CN108629780B (en) | Tongue image segmentation method based on color decomposition and threshold technology | |
CN108921179B (en) | Automatic extraction and quantification method for colors of lesion areas of infantile hemangioma | |
Fedorenko et al. | Semantic segmentation system of pigmented skin lesions based on convolutional neural networks | |
CN110929740A (en) | LGBM model-based tongue quality and tongue coating separation method | |
CN116416452A (en) | Lung adenocarcinoma invasive intelligent classification system based on two-stage deep learning model | |
CN109711306A (en) | A kind of method and apparatus obtaining facial characteristics based on depth convolutional neural networks |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210406 |