CN113256557B - Traditional Chinese medicine tongue state identification method and device based on tongue manifestation clinical symptom image - Google Patents

Traditional Chinese medicine tongue state identification method and device based on tongue manifestation clinical symptom image Download PDF

Info

Publication number
CN113256557B
CN113256557B CN202110370110.7A CN202110370110A CN113256557B CN 113256557 B CN113256557 B CN 113256557B CN 202110370110 A CN202110370110 A CN 202110370110A CN 113256557 B CN113256557 B CN 113256557B
Authority
CN
China
Prior art keywords
tongue
picture
array matrix
clinical
calculating
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.)
Active
Application number
CN202110370110.7A
Other languages
Chinese (zh)
Other versions
CN113256557A (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 Lianshi Technology Co ltd
Original Assignee
Beijing Lianshi Technology Co ltd
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 Lianshi Technology Co ltd filed Critical Beijing Lianshi Technology Co ltd
Priority to CN202110370110.7A priority Critical patent/CN113256557B/en
Publication of CN113256557A publication Critical patent/CN113256557A/en
Application granted granted Critical
Publication of CN113256557B publication Critical patent/CN113256557B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0012Biomedical image inspection
    • G06T7/0014Biomedical image inspection using an image reference approach
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H30/00ICT specially adapted for the handling or processing of medical images
    • G16H30/20ICT specially adapted for the handling or processing of medical images for handling medical images, e.g. DICOM, HL7 or PACS
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H50/00ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics
    • G16H50/20ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics for computer-aided diagnosis, e.g. based on medical expert systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Public Health (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Radiology & Medical Imaging (AREA)
  • Biomedical Technology (AREA)
  • Primary Health Care (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • Epidemiology (AREA)
  • Evolutionary Computation (AREA)
  • Databases & Information Systems (AREA)
  • Measuring And Recording Apparatus For Diagnosis (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Quality & Reliability (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Pathology (AREA)
  • Bioinformatics & Cheminformatics (AREA)

Abstract

The invention relates to the technical field of tongue manifestation of traditional Chinese medicine, in particular to a method and a device for identifying tongue state of traditional Chinese medicine based on tongue manifestation critical picture, which comprises the steps of obtaining the tongue manifestation critical picture to be determined and collecting the pixel value of the tongue manifestation critical picture; calculating the RGB value of the tongue picture clinical picture according to the collected pixel value; deep analysis is carried out on the RGB values of the tongue picture clinical picture to obtain an array matrix of the tongue picture clinical picture; and comparing the array matrix of the tongue picture clinical picture with the array matrix of the tongue state sample picture stored in advance to determine the tongue state corresponding to the tongue picture clinical picture. By the method and the device, the tongue state corresponding to the tongue picture clinical picture can be determined more accurately.

Description

Traditional Chinese medicine tongue state identification method and device based on tongue manifestation clinical symptom image
Technical Field
The invention relates to the technical field of tongue manifestation of traditional Chinese medicine, in particular to a method and a device for identifying tongue state of traditional Chinese medicine based on tongue manifestation clinical picture.
Background
The tongue manifestation of TCM plays an important role in clinical diagnosis, and is one of the important manifestations of TCM theory in clinical application. In order to resolve the disease of the patient, doctors need to organically combine the theory of traditional Chinese medicine with years of clinical experience, make differentiation on tongue color and morphological signs of the patient, and then determine a treatment scheme (treatment) in combination with other symptoms. In clinical practice, there are the saying that the herbs do not leave the prescription, the prescriptions do not leave the symptoms, and the symptoms do not leave the symptoms (including tongue symptoms), and it seems that the symptoms are the bridge between the prescriptions and the symptoms. For the study of syndrome differentiation, there is much ingenuity behind syndrome differentiation, and it is necessary to trace back to the source to know the nature and the shortcut of the syndrome differentiation. The traditional Chinese medicine tongue is composed of 108 standardized names, such as a map tongue, a tongue with tooth marks, a tongue with cracks, a tongue with petechiae, a fur with cracks, … … and the like.
In the past, the tongue color and the tongue state of a patient are described by characters recognized sensitively in traditional Chinese medicine, for example, the tongue is mapped, the tongue has tooth marks, the tongue has cracks, the tongue has petechia, the coating has cracks and the like, a doctor usually judges the tongue corresponding to the coating of the tongue of the patient through much clinical experience of the doctor, and the condition may cause the problem of misjudgment caused by insufficient experience of the doctor.
Disclosure of Invention
The embodiment of the invention provides a method and a device for traditional Chinese medicine tongue state identification based on tongue manifestation clinical picture, the technical proposal is as follows:
in one aspect, a method for traditional Chinese medicine tongue state identification based on tongue manifestation clinical picture is provided, the method is applied to electronic equipment, and the method comprises the following steps:
acquiring a tongue picture clinical picture to be determined, and collecting a pixel value of the tongue picture clinical picture;
calculating the RGB value of the tongue picture clinical picture according to the collected pixel value;
deep analysis is carried out on the RGB values of the tongue picture clinical picture to obtain an array matrix of the tongue picture clinical picture;
and comparing the array matrix of the tongue picture clinical picture with the array matrix of the tongue state sample picture stored in advance to determine the tongue state corresponding to the tongue picture clinical picture.
Optionally, the acquiring pixel values of the tongue picture clinical image comprises:
calculating the number of lines of the tongue picture clinical picture according to the following formula (1):
PixelRow=PixelRow+arrByte(i+22)×256i……(1)
wherein PixelRow is the number of lines, arrByte is the image array, and i is the line variable;
calculating the number of columns of the tongue picture clinical picture according to the following formula (2):
PixelCol=PixelCol+arrByte(j+18)×256j……(2)
wherein PixelCol is the number of columns, and j is a column variable;
if the number of the rows or the number of the columns is not a multiple of 4, carrying out zero padding operation, and setting zero equal to 1, otherwise, setting zero equal to 0;
calculating a first pixel intermediate value according to the following equation (3):
lngPos=53+j+(i-1)×(PixelCol×3+Zeroize)……(3)
calculating a second pixel intermediate value according to the following equation (4):
c=RGB(arrByte(lngPos+2),arrByte(lngPos+1),arrByte(lngPos))……(4)。
optionally, the calculating RGB values of the tongue picture clinical image according to the acquired pixel values includes:
for each pixel, calculating the R value of the tongue picture image through the following formula (5), calculating the G value of the tongue picture image through the following formula (6), and calculating the B value of the tongue picture image through the following formula (7):
R=c Mod 256……(7)
G=(c-R)÷256Mod 256……(8)
B=(c-R-G×256)÷2562……(9)
wherein c is the second pixel intermediate value, and Mod is a remainder operation.
Optionally, after calculating the RGB values of the tongue picture clinical image, the method further includes:
respectively establishing array matrixes TCr, TCg and TCb;
storing the R value of the tongue picture clinical picture into an array matrix TCr:
Figure GDA0003367985970000021
storing the G values of the tongue picture images in an array matrix TCg:
Figure GDA0003367985970000031
storing the B value of the tongue picture clinical picture into an array matrix TCb:
Figure GDA0003367985970000032
optionally, the deep parsing of the RGB values of the tongue picture clinical image to obtain an array matrix of the tongue picture clinical image includes:
building 768 array matrixes LRGBn, wherein the row number of each array matrix LRGB is equal to the row number of the tongue picture clinical picture, the column number of each array matrix LRGB is equal to the column number of the tongue picture clinical picture, the 768 array matrixes LRGBn indicate R, G, B that each channel comprises 256 channels, and the array matrixes LRGBn correspond to 768 channels in total, and n is a positive integer which is greater than 0 and less than or equal to 768;
judging whether each pixel of the tongue picture clinical picture is displayed in each channel of each channel according to array matrixes TCr, TCg and TCb, and if so, judging whether the array matrix LRGB corresponding to the channel corresponding to the pixel is displayednIs marked.
Optionally, the array matrix LRGB corresponding to the channel corresponding to the pixelnComprising:
for the pixels positioned in p rows and q columns, when the pixels are determined to be displayed on the x channel, the array matrix LRGB corresponding to the x channelxIn the method, the data positioned in p rows and q columns are assigned to be 1;
wherein p is a positive integer greater than 0 and less than or equal to PixelRow, q is a positive integer greater than 0 and less than or equal to PixelCol, and x is a positive integer greater than 0 and less than or equal to 768.
Optionally, the method further comprises:
if the array matrix LRGBnIf all the data from the 1 st row to the ith row are 0, shifting the data from the i +1 th row to the PixelRow row up by i-1 row, and assigning the data from the 200 th row to the PixelRow row as 0;
if the array matrix LRGBnIn the method, all the data from the 1 st column to the j th column are 0, the data from the j +1 th column to the PixelCol row are all shifted up by j-1 column, and the data from the 200-j th column to the PixelCol column are all assigned to be 0.
Optionally, the comparing the array matrix of the tongue manifestation clinical picture with the array matrix of the pre-stored tongue state sample picture includes:
acquiring an array matrix YRGbn of pre-stored tongue state sample images, wherein the number of the tongue state sample images is y, and y is a positive integer greater than 0;
calculating the similarity between the tongue picture clinical picture and a tongue state sample picture according to the following formulas (10) and (11):
Figure GDA0003367985970000041
Figure GDA0003367985970000042
wherein n is 1, 2, 3, … …, 768, which represents the number of array matrix LRGB and array matrix YRGB; k is the number of the difference between LRGBn and YRGbn; 1, 2, 3, … … and PixelRow, which represents the row number of the array matrix; j is 1, 2, 3, … …, PixelCol, which indicates the number of columns of the array matrix; m is 1, 2, … …, y.
Optionally, the determining the tongue state corresponding to the tongue manifestation image includes:
for a plurality of obtained similarity SXmSorting is carried out to determine the maximum SXmmax
Determining the maximum SXmmaxDetermining the corresponding tongue state as the tongue state corresponding to the tongue picture clinical picture;
calculating the similarity between the tongue picture clinical picture and the corresponding tongue state according to the following formula (12);
STm=100×SXmmax÷(256×3)……(12)。
in one aspect, an apparatus for traditional Chinese medical tongue state identification based on tongue picture clinical picture is provided, the apparatus is applied to electronic equipment, the apparatus comprises:
the acquisition unit is used for acquiring a tongue picture clinical picture to be determined and acquiring a pixel value of the tongue picture clinical picture;
the calculating unit is used for calculating the RGB value of the tongue picture clinical picture according to the collected pixel value;
the analysis unit is used for carrying out deep analysis on the RGB values of the tongue picture clinical picture to obtain an array matrix of the tongue picture clinical picture;
and the comparison unit is used for comparing the array matrix of the tongue picture clinical picture with the array matrix of the pre-stored tongue state sample picture to determine the tongue state corresponding to the tongue picture clinical picture.
Optionally, the acquisition unit is configured to:
calculating the number of lines of the tongue picture clinical picture according to the following formula (1):
PixelRow=PixelRow+arrByte(i+22)×256i……(1)
wherein PixelRow is the number of lines, arrByte is the image array, and i is the line variable;
calculating the number of columns of the tongue picture clinical picture according to the following formula (2):
PixelCol=PixelCol+arrByte(j+18)×256j……(2)
wherein PixelCol is the number of columns, and j is a column variable;
if the number of the rows or the number of the columns is not a multiple of 4, carrying out zero padding operation, and setting zero equal to 1, otherwise, setting zero equal to 0;
calculating a first pixel intermediate value according to the following equation (3):
lngPos=53+j+(i-1)×(PixelCol×3+Zeroize)……(3)
calculating a second pixel intermediate value according to the following equation (4):
c=RGB(arrByte(lngPos+2),arrByte(lngPos+1),arrByte(lngPos))……(4)。
optionally, the computing unit is configured to:
for each pixel, calculating the R value of the tongue picture image through the following formula (5), calculating the G value of the tongue picture image through the following formula (6), and calculating the B value of the tongue picture image through the following formula (7):
R=c Mod 256……(7)
G=(c-R)÷256Mod 256……(8)
B=(c-R-G×256)÷2562……(9)
wherein c is the second pixel intermediate value, and Mod is a remainder operation.
Optionally, the method further includes a establishing unit, configured to:
after calculating the RGB value of the tongue picture clinical picture, respectively establishing array matrixes TCr, TCg and TCb;
storing the R value of the tongue picture clinical picture into an array matrix TCr:
Figure GDA0003367985970000051
storing the G values of the tongue picture images in an array matrix TCg:
Figure GDA0003367985970000052
storing the B value of the tongue picture clinical picture into an array matrix TCb:
Figure GDA0003367985970000053
optionally, the parsing unit is configured to:
establishing 768 array matrix LRGBnWherein, the line number of each array matrix LRGB is equal to the line number of the tongue picture clinical picture, the column number of each array matrix LRGB is equal to the column number of the tongue picture clinical picture, 768 array matrices LRGBnArray matrix LRGB representing that each channel R, G, B comprises 256 channels and 768 channels in totalnN is a positive integer greater than 0 and less than or equal to 768;
judging whether each pixel of the tongue picture clinical picture is displayed in each channel of each channel according to array matrixes TCr, TCg and TCb, and if so, judging whether the array matrix LRGB corresponding to the channel corresponding to the pixel is displayednIs marked.
Optionally, the parsing unit is configured to:
for the pixels positioned in p rows and q columns, when the pixels are determined to be displayed on the x channel, the array matrix LRGB corresponding to the x channelxIn the method, the data positioned in p rows and q columns are assigned to be 1;
wherein p is a positive integer greater than 0 and less than or equal to PixelRow, q is a positive integer greater than 0 and less than or equal to PixelCol, and x is a positive integer greater than 0 and less than or equal to 768.
Optionally, the mobile device further comprises a data moving unit, configured to:
if the array matrix LRGBnIf all the data from the 1 st row to the ith row are 0, shifting the data from the i +1 th row to the PixelRow row up by i-1 row, and assigning the data from the 200 th row to the PixelRow row as 0;
if the array matrix LRGBnIn the method, all the data from the 1 st column to the j th column are 0, the data from the j +1 th column to the PixelCol row are all shifted up by j-1 column, and the data from the 200-j th column to the PixelCol column are all assigned to be 0.
Optionally, the alignment unit is configured to:
acquiring array matrix YRGB of pre-stored tongue state sample imagenThe number of the tongue state sample images is y, and y is a positive integer greater than 0;
calculating the similarity between the tongue picture clinical picture and a tongue state sample picture according to the following formulas (10) and (11):
Figure GDA0003367985970000061
Figure GDA0003367985970000062
wherein n is 1, 2, 3, … …, 768, which represents the number of array matrix LRGB and array matrix YRGB; k is the number of the difference between LRGBn and YRGbn; 1, 2, 3, … … and PixelRow, which represents the row number of the array matrix; j is 1, 2, 3, … …, PixelCol, which indicates the number of columns of the array matrix; m is 1, 2, … …, y.
Optionally, the alignment unit is configured to:
for a plurality of obtained similarity SXmSorting is carried out to determine the maximum SXmmax
Determining the maximum SXmmaxDetermining the corresponding tongue state as the tongue state corresponding to the tongue picture clinical picture;
calculating the similarity between the tongue picture clinical picture and the corresponding tongue state according to the following formula (12);
STm=100×SXmmax÷(256×3)……(12)。
in one aspect, an electronic device is provided, which includes a processor and a memory, where the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the above method for tongue state discrimination based on tongue manifestation and clinical symptom images in traditional Chinese medicine.
In one aspect, a computer-readable storage medium is provided, in which at least one instruction is stored, and the at least one instruction is loaded and executed by a processor to implement the above method for tongue state identification in traditional Chinese medicine based on tongue manifestation and clinical symptom images.
The technical scheme provided by the embodiment of the invention has the beneficial effects that at least:
in the scheme, the tongue picture clinical picture to be determined is obtained, the pixel value of the tongue picture clinical picture is collected, the RGB value of the tongue picture clinical picture is calculated according to the collected pixel value, deep analysis is carried out on the RGB value of the tongue picture clinical picture to obtain an array matrix of the tongue picture clinical picture, data movement is carried out on the array matrix LRGBn, the array matrix of the tongue picture clinical picture is compared with an array matrix of a tongue state sample picture stored in advance, and the tongue state corresponding to the tongue picture clinical picture is determined. According to the invention, through the combination of the physical positions and colors of the pixels, the RGB values of the tongue manifestation clinical picture are deeply analyzed, and through the one-by-one comparison of the 768 array matrixes after the analysis and the 768 array matrixes of the sample picture, the external interference of a plurality of pictures is eliminated, so that the comparison result is more accurate, thereby realizing the development of the tongue manifestation of the traditional Chinese medicine from perceptual character description to rational digital description, intuitively telling doctors about the tongue change condition of patients after the tongue manifestation of the traditional Chinese medicine is digitalized, and providing a brand-new means for better diagnosis and treatment of the doctors.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a diagram of an implementation environment provided by an embodiment of the invention;
FIG. 2 is a flowchart of a method for tongue state identification in traditional Chinese medicine based on tongue manifestation images according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of experimental data of tongue state identification in traditional Chinese medicine based on tongue manifestation images according to an embodiment of the present invention;
FIG. 4 is a block diagram of a device for tongue state identification in traditional Chinese medicine based on tongue manifestation images according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the technical problems, technical solutions and advantages of the present invention more apparent, the following detailed description is given with reference to the accompanying drawings and specific embodiments.
The embodiment of the invention provides a method for traditional Chinese medicine tongue state identification based on tongue manifestation clinical picture, and the implementation environment can comprise at least one terminal 101 and a server 102 for providing service for the plurality of terminals 101. At least one terminal 101 is connected to the server 102 through a wireless or wired network, and the plurality of terminals 101 may be computer devices or intelligent terminals, etc. capable of accessing the server 102.
For the tongue state identification process, as shown in fig. 1, at least a pixel value acquisition program, an RGB value calculation program, a deep analysis program, etc. of the tongue state clinical image need to be installed in the terminal 101, and an image comparison program may also be installed in the terminal, and the server 102 may have at least one database for storing an array matrix of the tongue state sample image, and may also store the image comparison program. During identification, the terminal 101 performs pixel value acquisition, RGB value calculation and deep analysis on the tongue picture clinical picture to obtain an array matrix of the tongue picture clinical picture, and during image comparison, the terminal can acquire matrix data of a tongue state sample image from a server and perform comparison; or the terminal sends the array matrix of the tongue picture clinical picture to the server, and the server compares the array matrix with the tongue picture clinical picture, which is not limited by the invention. The server 102 may be a single terminal or a group of terminals.
The embodiment of the invention provides a traditional Chinese medicine tongue state identification method based on a tongue picture clinical picture, which can be realized by electronic equipment, wherein the electronic equipment can be a terminal or a server, and the electronic equipment is prestored with an algorithm for calculating an image RGB value and an algorithm for deeply analyzing the image RGB value. As shown in fig. 2, the flow chart of the method for traditional Chinese medicine tongue state identification based on tongue manifestation temporary symptom image, the processing flow of the method may include the following steps:
step 201, obtaining a tongue picture clinical picture to be determined, and collecting a pixel value of the tongue picture clinical picture.
In one possible embodiment, the tongue manifestation image to be determined can be obtained by acquiring a tongue manifestation image of the patient, and the tongue manifestation image to be determined can be obtained in various ways, for example, an image acquisition device such as a camera or the like can be provided to temporarily acquire the tongue manifestation image of the patient and then transmit the acquired tongue manifestation image to an electronic device; alternatively, a pre-stored image of the patient's tongue manifestation, without limitation, may be obtained.
After acquiring the tongue picture clinical picture, the electronic device first reads the image data, and then acquires the pixel value of the tongue picture clinical picture, which may specifically include the following steps 2011-2015:
step 2011, the number of lines of the tongue manifestation image is calculated according to the following formula (1):
PixelRow=PixelRow+arrByte(i+22)×256i……(1)
wherein PixelRow is the number of rows, arrByte is the image array, and i is the row variable.
Step 2012, calculating the number of columns of the tongue picture clinical picture according to the following formula (2):
PixelCol=PixelCol+arrByte(j+18)×256j……(2)
where PixelCol is the number of columns and j is the column variable.
Step 2013, if the number of rows or columns is not a multiple of 4, performing zero padding operation, and setting Zeroize to 1, otherwise, setting Zeroize to 0;
step 2014, calculating a first pixel middle value according to the following formula (3):
lngPos=53+j+(i-1)×(PixelCol×3+Zeroize)……(3)
step 2015, calculating a second pixel intermediate value according to the following formula (4):
c=RGB(arrByte(lngPos+2),arrByte(lngPos+1),arrByte(lngPos))……(4)。
it should be noted that the size of the tongue manifestation image and the size of the pre-stored sample image need to be the same, and for convenience of subsequent processing and reduction of computation amount, the tongue manifestation image may be pre-processed before the pixel values of the tongue manifestation image are acquired, so that the size of the tongue manifestation image is 200 × 200 pixels, in which case, the size of the pre-stored sample image in the electronic device is also 200 × 200 pixels.
Step 202, calculating the RGB value of the tongue picture clinical picture according to the collected pixel values.
In a possible embodiment, after the pixel values of the tongue manifestation image are collected in step 201, the RGB values of the tongue manifestation image are calculated according to the collected pixel values. There are various ways to calculate the RGB values of an image, and preferably, the RGB values can be calculated by:
for each pixel, the R value of the tongue manifestation limb disease image is calculated by the following formula (5), the G value of the tongue manifestation limb disease image is calculated by the following formula (6), and the B value of the tongue manifestation limb disease image is calculated by the following formula (7):
R=c Mod 256……(7)
G=(c-R)÷256Mod 256……(8)
B=(c-R-G×256)÷2562……(9)
where c is the second pixel intermediate value and Mod is the remainder operation.
Optionally, in order to facilitate data storage and subsequent operations, after calculating RGB values of the tongue manifestation image, array matrices TCr, TCg, and TCb may be respectively established, and the RGB data is stored in corresponding array matrices, where a row number of each array matrix is equal to a pixel row number of the tongue manifestation image, and a column number of each array matrix is equal to a pixel column number of the tongue manifestation image, and the specific manner may be as follows:
storing the R value of the tongue picture clinical picture into an array matrix TCr:
Figure GDA0003367985970000091
the G values of the tongue picture images are stored in array matrix TCg:
Figure GDA0003367985970000092
storing the B value of the tongue picture clinical picture into an array matrix TCb:
Figure GDA0003367985970000101
and 203, deep analyzing the RGB values of the tongue picture clinical picture to obtain an array matrix of the tongue picture clinical picture.
In one possible embodiment, R, G, B colors can be regarded as 3 channels, and as is well known, RGB has 256 levels of brightness, and each level of brightness can be regarded as one channel, that is, the number of channels of the colors is 3 × 256 to 768, the physical position of each pixel of the tongue image clinical image is combined with the channels of the RGB colors, and the characteristics of the tongue image clinical image are deeply analyzed, so that the accuracy of the comparison result can be greatly improved in the subsequent comparison process. Specifically, the following steps 2031-2034 can be included:
step 2031, establish 768 array matrixes LRGBn
Wherein, the line number of each array matrix LRGB is equal to the line number of the tongue picture clinical picture, the column number of each array matrix LRGB is equal to the column number of the tongue picture clinical picture, 768 array matrices LRGBnArray matrix LRGB representing that each channel R, G, B comprises 256 channels and 768 channels in totalnAnd n is a positive integer greater than 0 and less than or equal to 768.
In a possible embodiment, an array matrix LRGB is establishednThe data in each array matrix is assigned a value of 0.
Step 2032, according to the array matrices TCr, TCg, TCb, determine whether each pixel of the tongue manifestation image is displayed in each channel of each channel.
Step 2033, if there is display, then array matrix LRGB corresponding to the channel corresponding to the pixelnIs marked.
Alternatively, the method of labeling may be as follows:
for the pixel in p rows and q columns, when the pixel is determined to be displayed on the x channel, the array matrix LRGB corresponding to the x channelxIn the method, the data in p rows and q columns is assigned to 1, and the corresponding program language can be as follows:
(TCr(CellRow,CellCol),i,j)=1
(TCg(CellRow,CellCol),i,j)=1
(TCb(CellRow,CellCol),i,j)=1
wherein p is a positive integer greater than 0 and less than or equal to PixelRow, q is a positive integer greater than 0 and less than or equal to PixelCol, and x is a positive integer greater than 0 and less than or equal to 768.
Step 2034, if not, keeping the array matrix LRGB corresponding to the channel corresponding to the pixelnThe data in (1) is 0.
The method of step 2031-2034 is exemplified as follows: assuming that the size of the tongue manifestation image is 200 × 200 pixels and the R value of the pixel points located in the 1 st row and 1 st column is 251, when deep analysis is performed, 768 array matrices are established, and then the array matrix corresponding to the R value 251 is foundLRGBR251Assigning the data positioned in the 1 st row and the 1 st column in the matrix to be 1; assuming that the G value of the pixel points located in the 4 th row and the 8 th column is 113, when performing deep analysis, the array matrix LRGB corresponding to the G value 113 is foundG113The data in the matrix at row 4 and column 8 is assigned a value of 1.
Step 204, log matrix LRGBnData movement is performed.
In a possible embodiment, if the array matrix LRGBnIf all the data from the 1 st row to the ith row are 0, shifting the data from the i +1 th row to the PixelRow row up by i-1 row, and assigning the data from the 200 th row to the PixelRow row as 0; if array matrix LRGBnIn the method, all the data from the 1 st column to the j th column are 0, the data from the j +1 th column to the PixelCol row are all shifted up by j-1 column, and the data from the 200-j th column to the PixelCol column are all assigned to be 0. Therefore, the problem of inaccurate comparison when similar objects are located at different positions of different images can be solved. For example, assume that the array matrix LRGB is obtained in step 203R200As shown in table 1 below:
TABLE 1
Figure GDA0003367985970000111
As can be seen from table 1 above, the data in the first 2 columns of the array matrix are all 0, and therefore, the data in the 3 rd column to the last column can be shifted to the left, so that the data in the 3 rd column originally becomes the data in the 1 st column, and then, the data in the last two columns are all assigned to 0, which becomes the data shown in table 2 below:
TABLE 2
Figure GDA0003367985970000112
Step 205, comparing the array matrix of the tongue manifestation critical image with the array matrix of the tongue state sample image stored in advance, and determining the tongue state corresponding to the tongue manifestation critical image.
In a feasible implementation manner, the pre-stored array matrix of the tongue state sample image is obtained in the same manner as the array matrix of the tongue manifestation image, that is, the array matrix of the tongue state sample image is obtained by acquiring the pixel value of the tongue state sample image, calculating the RGB value of the tongue manifestation image, performing deep analysis on the RGB value of the tongue manifestation image to obtain the array matrix of the tongue manifestation image, and performing a data moving step on the array matrix LRGBn, and is stored in the electronic device, and the specific processing manner may refer to the step 201 and 204.
Accordingly, the alignment process may be as follows:
step 2051, obtaining array matrix YRGB of tongue state sample image stored in advancenAnd the number of the tongue state sample images is y, and y is a positive integer greater than 0.
Step 2052, calculating the similarity between the tongue picture clinical picture and a tongue state sample picture according to the following formulas (10) and (11):
Figure GDA0003367985970000121
Figure GDA0003367985970000122
wherein n is 1, 2, 3, … …, 768, which represents the number of array matrix LRGB and array matrix YRGB; k is the number of the difference between LRGBn and YRGbn; 1, 2, 3, … … and PixelRow, which represents the row number of the array matrix; j is 1, 2, 3, … …, PixelCol, which indicates the number of columns of the array matrix; m is 1, 2, … …, y.
Step 2053, comparing the obtained plurality of similarity SXmSorting is carried out to determine the maximum SXmmax
Step 2054, determine maximum SXmmaxAnd determining the corresponding tongue state as the tongue state corresponding to the tongue picture clinical picture.
It should be noted that, at present, tongue states are usually divided into 35 tongue states, and when 35 tongue states are subjected to sample learning, the more the number of the learned samples is, the more accurate the tongue state clinical symptom comparison is.
And step 2055, calculating the similarity between the tongue picture clinical picture and the corresponding tongue state according to the following formula (12).
STm=100×SXmmax÷(256×3)……(12)。
In a possible embodiment, as shown in fig. 3, which is a schematic diagram of experimental results, the tongue state corresponding to the tongue manifestation image can be determined more accurately by the above method.
In the embodiment of the invention, the tongue picture clinical picture to be determined is obtained, the pixel value of the tongue picture clinical picture is collected, the RGB value of the tongue picture clinical picture is calculated according to the collected pixel value, the RGB value of the tongue picture clinical picture is subjected to deep analysis to obtain an array matrix of the tongue picture clinical picture, the array matrix LRGBn is subjected to data movement, the array matrix of the tongue picture clinical picture is compared with the array matrix of the pre-stored tongue state sample picture to determine the tongue state corresponding to the tongue picture clinical picture. According to the invention, through the combination of the physical positions and colors of the pixels, the RGB values of the tongue manifestation clinical picture are deeply analyzed, and through the one-by-one comparison of the 768 array matrixes after the analysis and the 768 array matrixes of the sample picture, the external interference of a plurality of pictures is eliminated, so that the comparison result is more accurate, thereby realizing the development of the tongue manifestation of the traditional Chinese medicine from perceptual character description to rational digital description, intuitively telling doctors about the tongue change condition of patients after the tongue manifestation of the traditional Chinese medicine is digitalized, and providing a brand-new means for better diagnosis and treatment of the doctors.
Fig. 4 is a block diagram of an apparatus for traditional chinese medical tongue state discrimination based on tongue picture images according to an exemplary embodiment. Referring to fig. 4, the apparatus includes an acquisition unit 410, a calculation unit 420, an analysis unit 430, and a comparison unit 440.
The acquisition unit 410 is used for acquiring a tongue picture clinical image to be determined and acquiring a pixel value of the tongue picture clinical image;
a calculating unit 420, configured to calculate RGB values of the tongue picture clinical picture according to the acquired pixel values;
the analysis unit 430 is configured to perform deep analysis on the RGB values of the tongue picture clinical picture to obtain an array matrix of the tongue picture clinical picture;
a comparing unit 440, configured to compare the array matrix of the tongue manifestation critical image with the array matrix of the pre-stored tongue state sample image, and determine a tongue state corresponding to the tongue manifestation critical image.
Optionally, the acquisition unit 410 is configured to:
calculating the number of lines of the tongue picture clinical picture according to the following formula (1):
PixelRow=PixelRow+arrByte(i+22)×256i……(1)
wherein PixelRow is the number of lines, arrByte is the image array, and i is the line variable;
calculating the number of columns of the tongue picture clinical picture according to the following formula (2):
PixelCol=PixelCol+arrByte(j+18)×256j……(2)
wherein PixelCol is the number of columns, and j is a column variable;
if the number of the rows or the number of the columns is not a multiple of 4, carrying out zero padding operation, and setting zero equal to 1, otherwise, setting zero equal to 0;
calculating a first pixel intermediate value according to the following equation (3):
lngPos=53+j+(i-1)×(PixelCol×3+Zeroize)……(3)
calculating a second pixel intermediate value according to the following equation (4):
c=RGB(arrByte(lngPos+2),arrByte(lngPos+1),arrByte(lngPos))……(4)。
optionally, the calculating unit 420 is configured to:
for each pixel, calculating the R value of the tongue picture image through the following formula (5), calculating the G value of the tongue picture image through the following formula (6), and calculating the B value of the tongue picture image through the following formula (7):
R=cMod 256……(7)
G=(c-R)÷256Mod 256……(8)
B=(c-R-G×256)÷2562……(9)
wherein c is the second pixel intermediate value, and Mod is a remainder operation.
Optionally, the method further includes a creating unit 450, configured to:
after calculating the RGB value of the tongue picture clinical picture, respectively establishing array matrixes TCr, TCg and TCb;
storing the R value of the tongue picture clinical picture into an array matrix TCr:
Figure GDA0003367985970000141
storing the G values of the tongue picture images in an array matrix TCg:
Figure GDA0003367985970000142
storing the B value of the tongue picture clinical picture into an array matrix TCb:
Figure GDA0003367985970000143
optionally, the parsing unit 430 is configured to:
building 768 array matrixes LRGBn, wherein the row number of each array matrix LRGB is equal to the row number of the tongue picture clinical picture, the column number of each array matrix LRGB is equal to the column number of the tongue picture clinical picture, the 768 array matrixes LRGBn indicate R, G, B that each channel comprises 256 channels, and the array matrixes LRGBn correspond to 768 channels in total, and n is a positive integer which is greater than 0 and less than or equal to 768;
judging whether each pixel of the tongue picture clinical picture is displayed in each channel of each channel according to array matrixes TCr, TCg and TCb, and if so, judging whether the array matrix LRGB corresponding to the channel corresponding to the pixel is displayednIs marked.
Optionally, the parsing unit 430 is configured to:
for bitIn p rows and q columns of pixels, when the pixels are determined to be displayed on the x channel, the array matrix LRGB corresponding to the x channelxIn the method, the data positioned in p rows and q columns are assigned to be 1;
wherein p is a positive integer greater than 0 and less than or equal to PixelRow, q is a positive integer greater than 0 and less than or equal to PixelCol, and x is a positive integer greater than 0 and less than or equal to 768.
Optionally, a data moving unit 460 is further included for:
if the array matrix LRGBnIf all the data from the 1 st row to the ith row are 0, shifting the data from the i +1 th row to the PixelRow row up by i-1 row, and assigning the data from the 200 th row to the PixelRow row as 0;
if the array matrix LRGBnIn the method, all the data from the 1 st column to the j th column are 0, the data from the j +1 th column to the PixelCol row are all shifted up by j-1 column, and the data from the 200-j th column to the PixelCol column are all assigned to be 0.
Optionally, the alignment unit 440 is configured to:
acquiring array matrix YRGB of pre-stored tongue state sample imagenThe number of the tongue state sample images is y, and y is a positive integer greater than 0;
calculating the similarity between the tongue picture clinical picture and a tongue state sample picture according to the following formulas (10) and (11):
Figure GDA0003367985970000151
Figure GDA0003367985970000152
wherein n is 1, 2, 3, … …, 768, which represents the number of array matrix LRGB and array matrix YRGB; k is the number of the difference between LRGBn and YRGbn; 1, 2, 3, … … and PixelRow, which represents the row number of the array matrix; j is 1, 2, 3, … …, PixelCol, which indicates the number of columns of the array matrix; m is 1, 2, … …, y.
Optionally, the alignment unit 440 is configured to:
for a plurality of obtained similarity SXmSorting is carried out to determine the maximum SXmmax
Determining the maximum SXmmaxDetermining the corresponding tongue state as the tongue state corresponding to the tongue picture clinical picture;
calculating the similarity between the tongue picture clinical picture and the corresponding tongue state according to the following formula (12);
STm=100×SXmmax÷(256×3)……(12)。
in the embodiment of the invention, the tongue picture clinical picture to be determined is obtained, the pixel value of the tongue picture clinical picture is collected, the RGB value of the tongue picture clinical picture is calculated according to the collected pixel value, the RGB value of the tongue picture clinical picture is subjected to deep analysis to obtain an array matrix of the tongue picture clinical picture, the array matrix LRGBn is subjected to data movement, the array matrix of the tongue picture clinical picture is compared with the array matrix of the pre-stored tongue state sample picture to determine the tongue state corresponding to the tongue picture clinical picture. According to the invention, through the combination of the physical positions and colors of the pixels, the RGB values of the tongue manifestation clinical picture are deeply analyzed, and through the one-by-one comparison of the 768 array matrixes after the analysis and the 768 array matrixes of the sample picture, the external interference of a plurality of pictures is eliminated, so that the comparison result is more accurate, thereby realizing the development of the tongue manifestation of the traditional Chinese medicine from perceptual character description to rational digital description, intuitively telling doctors about the tongue change condition of patients after the tongue manifestation of the traditional Chinese medicine is digitalized, and providing a brand-new means for better diagnosis and treatment of the doctors.
Fig. 5 is a schematic structural diagram of an electronic device 500 according to an embodiment of the present invention, where the electronic device 500 may generate relatively large differences due to different configurations or performances, and may include one or more processors (CPUs) 501 and one or more memories 502, where the memory 502 stores at least one instruction, and the at least one instruction is loaded and executed by the processor 501 to implement the following method for traditional Chinese medicine tongue state identification based on a tongue manifestation image:
acquiring a tongue picture clinical picture to be determined, and collecting a pixel value of the tongue picture clinical picture;
calculating the RGB value of the tongue picture clinical picture according to the collected pixel value;
deep analysis is carried out on the RGB values of the tongue picture clinical picture to obtain an array matrix of the tongue picture clinical picture;
and comparing the array matrix of the tongue picture clinical picture with the array matrix of the tongue state sample picture stored in advance to determine the tongue state corresponding to the tongue picture clinical picture.
In the embodiment of the invention, the tongue picture clinical picture to be determined is obtained, the pixel value of the tongue picture clinical picture is collected, the RGB value of the tongue picture clinical picture is calculated according to the collected pixel value, the RGB value of the tongue picture clinical picture is subjected to deep analysis to obtain an array matrix of the tongue picture clinical picture, the array matrix LRGBn is subjected to data movement, the array matrix of the tongue picture clinical picture is compared with the array matrix of the pre-stored tongue state sample picture to determine the tongue state corresponding to the tongue picture clinical picture. According to the invention, through the combination of the physical positions and colors of the pixels, the RGB values of the tongue manifestation clinical picture are deeply analyzed, and through the one-by-one comparison of the 768 array matrixes after the analysis and the 768 array matrixes of the sample picture, the external interference of a plurality of pictures is eliminated, so that the comparison result is more accurate, thereby realizing the development of the tongue manifestation of the traditional Chinese medicine from perceptual character description to rational digital description, intuitively telling doctors about the tongue change condition of patients after the tongue manifestation of the traditional Chinese medicine is digitalized, and providing a brand-new means for better diagnosis and treatment of the doctors.
In an exemplary embodiment, a computer-readable storage medium, such as a memory, including instructions executable by a processor in a terminal, is also provided for performing the above method for tongue state discrimination in traditional Chinese medicine based on a tongue picture clinical picture. For example, the computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (9)

1. A traditional Chinese medicine tongue state identification method based on tongue manifestation clinical symptom images is characterized by comprising the following steps:
acquiring a tongue picture clinical picture to be determined, and collecting a pixel value of the tongue picture clinical picture;
calculating the RGB value of the tongue picture clinical picture according to the collected pixel value;
deep analysis is carried out on the RGB values of the tongue picture clinical picture to obtain an array matrix of the tongue picture clinical picture;
comparing the array matrix of the tongue picture clinical picture with the array matrix of the tongue state sample picture stored in advance, and determining the tongue state corresponding to the tongue picture clinical picture;
wherein, the collecting the pixel value of the tongue picture clinical picture comprises:
calculating the number of lines of the tongue picture clinical picture according to the following formula (1):
PixelRow=PixelRow+arrByte(i+22)×256i……(1)
wherein PixelRow is the number of lines, arrByte is the image array, and i is the line variable;
calculating the number of columns of the tongue picture clinical picture according to the following formula (2):
PixelCol=PixelCol+arrByte(j+18)×256j……(2)
wherein PixelCol is the number of columns, and j is a column variable;
if the number of the rows or the number of the columns is not a multiple of 4, carrying out zero padding operation, and setting zero equal to 1, otherwise, setting zero equal to 0;
calculating a first pixel intermediate value according to the following equation (3):
lngPos=53+j+(i-1)×(PixelCol×3+Zeroize)……(3)
calculating a second pixel intermediate value according to the following equation (4):
c=RGB(arrByte(lngPos+2),arrByte(lngPos+1),arrByte(lngPos))……(4)。
2. the method according to claim 1, wherein said calculating RGB values of said tongue picture clinical image from the acquired pixel values comprises:
for each pixel, calculating the R value of the tongue picture image through the following formula (5), calculating the G value of the tongue picture image through the following formula (6), and calculating the B value of the tongue picture image through the following formula (7):
R=c Mod 256……(7)
G=(c-R)÷256 Mod 256……(8)
B=(c-R-G×256)÷2562……(9)
wherein c is the second pixel intermediate value, and Mod is a remainder operation.
3. The method according to claim 2, wherein after calculating the RGB values of the tongue picture clinical image, further comprising:
respectively establishing array matrixes TCr, TCg and TCb;
storing the R value of the tongue picture clinical picture into an array matrix TCr:
Figure FDA0003367985960000021
storing the G values of the tongue picture images in an array matrix TCg:
Figure FDA0003367985960000022
storing the B value of the tongue picture clinical picture into an array matrix TCb:
Figure FDA0003367985960000023
4. the method as claimed in claim 3, wherein the deep parsing of the RGB values of the tongue manifestation image to obtain the array matrix of the tongue manifestation image comprises:
establishing 768 array matrix LRGBnWherein, the line number of each array matrix LRGB is equal to the line number of the tongue picture clinical picture, the column number of each array matrix LRGB is equal to the column number of the tongue picture clinical picture, 768 array matrices LRGBnArray matrix LRGB representing that each channel R, G, B comprises 256 channels and 768 channels in totalnN is a positive integer greater than 0 and less than or equal to 768;
judging whether each pixel of the tongue picture clinical picture is displayed in each channel of each channel according to array matrixes TCr, TCg and TCb, and if so, judging whether the array matrix LRGB corresponding to the channel corresponding to the pixel is displayednIs marked.
5. The method of claim 4, wherein the array matrix LRGB corresponding to the channel corresponding to the pixelnComprising:
for the pixels positioned in p rows and q columns, when the pixels are determined to be displayed on the x channel, the array matrix LRGB corresponding to the x channelxIn the method, the data positioned in p rows and q columns are assigned to be 1;
wherein p is a positive integer greater than 0 and less than or equal to PixelRow, q is a positive integer greater than 0 and less than or equal to PixelCol, and x is a positive integer greater than 0 and less than or equal to 768.
6. The method of claim 5, further comprising:
if the array matrix LRGBnIf all the data from the 1 st row to the ith row are 0, shifting the data from the i +1 th row to the PixelRow row up by i-1 row, and assigning the data from the 200 th row to the PixelRow row as 0;
if the array matrix LRGBnIn the method, all the data from the 1 st column to the j th column are 0, the data from the j +1 th column to the PixelCol row are all shifted up by j-1 column, and the data from the 200-j th column to the PixelCol column are all assigned to be 0.
7. The method according to claim 6, wherein comparing the array matrix of the tongue manifestation and clinical picture with the array matrix of the pre-stored tongue state sample picture comprises:
acquiring array matrix YRGB of pre-stored tongue state sample imagenThe number of the tongue state sample images is y, and y is a positive integer greater than 0;
calculating the similarity between the tongue picture clinical picture and a tongue state sample picture according to the following formulas (10) and (11):
Figure FDA0003367985960000031
Figure FDA0003367985960000032
wherein n is 1, 2, 3, … …, 768, which represents the number of array matrix LRGB and array matrix YRGB; k is the number of the difference between LRGBn and YRGbn; 1, 2, 3, … … and PixelRow, which represents the row number of the array matrix; j is 1, 2, 3, … …, PixelCol, which indicates the number of columns of the array matrix; m is 1, 2, … …, y.
8. The method according to claim 7, wherein the determining the tongue state corresponding to the tongue manifestation image comprises:
for a plurality of obtained similarity SXmSorting is carried out to determine the maximum SXmmax
Determining the maximum SXmmaxDetermining the corresponding tongue state as the tongue state corresponding to the tongue picture clinical picture;
calculating the similarity between the tongue picture clinical picture and the corresponding tongue state according to the following formula (12);
STm=100×SXmmax÷(256×3)……(12)。
9. a traditional Chinese medicine tongue state identification device based on tongue manifestation clinical picture is characterized in that the device comprises:
the acquisition unit is used for acquiring a tongue picture clinical picture to be determined and acquiring a pixel value of the tongue picture clinical picture;
the calculating unit is used for calculating the RGB value of the tongue picture clinical picture according to the collected pixel value;
the analysis unit is used for carrying out deep analysis on the RGB values of the tongue picture clinical picture to obtain an array matrix of the tongue picture clinical picture;
the comparison unit is used for comparing the array matrix of the tongue picture clinical picture with the array matrix of the tongue state sample picture stored in advance to determine the tongue state corresponding to the tongue picture clinical picture;
wherein, the collection unit is used for:
calculating the number of lines of the tongue picture clinical picture according to the following formula (1):
PixelRow=PixelRow+arrByte(i+22)×256i……(1)
wherein PixelRow is the number of lines, arrByte is the image array, and i is the line variable;
calculating the number of columns of the tongue picture clinical picture according to the following formula (2):
PixelCol=PixelCol+arrByte(j+18)×256j……(2)
wherein PixelCol is the number of columns, and j is a column variable;
if the number of the rows or the number of the columns is not a multiple of 4, carrying out zero padding operation, and setting zero equal to 1, otherwise, setting zero equal to 0;
calculating a first pixel intermediate value according to the following equation (3):
lngPos=53+j+(i-1)×(PixelCol×3+Zeroize)……(3)
calculating a second pixel intermediate value according to the following equation (4):
c=RGB(arrByte(lngPos+2),arrByte(lngPos+1),arrByte(lngPos))……(4)。
CN202110370110.7A 2021-04-07 2021-04-07 Traditional Chinese medicine tongue state identification method and device based on tongue manifestation clinical symptom image Active CN113256557B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110370110.7A CN113256557B (en) 2021-04-07 2021-04-07 Traditional Chinese medicine tongue state identification method and device based on tongue manifestation clinical symptom image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110370110.7A CN113256557B (en) 2021-04-07 2021-04-07 Traditional Chinese medicine tongue state identification method and device based on tongue manifestation clinical symptom image

Publications (2)

Publication Number Publication Date
CN113256557A CN113256557A (en) 2021-08-13
CN113256557B true CN113256557B (en) 2022-02-15

Family

ID=77220382

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110370110.7A Active CN113256557B (en) 2021-04-07 2021-04-07 Traditional Chinese medicine tongue state identification method and device based on tongue manifestation clinical symptom image

Country Status (1)

Country Link
CN (1) CN113256557B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103745217A (en) * 2013-12-31 2014-04-23 北京工业大学 Automatic analysis method of tongue color and coating color in traditional Chinese medicine based on image retrieval
CN109461154A (en) * 2018-11-16 2019-03-12 京东方科技集团股份有限公司 A kind of tongue picture detection method, device, client, server and system
CN112488917A (en) * 2019-09-12 2021-03-12 北京地平线信息技术有限公司 Image processing method, image processing device, electronic equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101799920A (en) * 2009-02-06 2010-08-11 天津市医学堂科技有限公司 Tongue picture analysis method based on colour feature and application thereof
US20110311144A1 (en) * 2010-06-17 2011-12-22 Microsoft Corporation Rgb/depth camera for improving speech recognition
CN104636754B (en) * 2015-01-31 2018-02-27 华南理工大学 Intelligent image sorting technique based on tongue body subregion color characteristic
CN105930798B (en) * 2016-04-21 2019-05-03 厦门快商通科技股份有限公司 The tongue picture towards mobile phone application based on study quickly detects dividing method
CN111084609A (en) * 2019-12-19 2020-05-01 东莞宇龙通信科技有限公司 Tongue picture based health diagnosis method, apparatus, storage medium and electronic device
CN111340721B (en) * 2020-02-18 2021-02-12 国网电子商务有限公司 Pixel correction method, device, equipment and readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103745217A (en) * 2013-12-31 2014-04-23 北京工业大学 Automatic analysis method of tongue color and coating color in traditional Chinese medicine based on image retrieval
CN109461154A (en) * 2018-11-16 2019-03-12 京东方科技集团股份有限公司 A kind of tongue picture detection method, device, client, server and system
CN112488917A (en) * 2019-09-12 2021-03-12 北京地平线信息技术有限公司 Image processing method, image processing device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113256557A (en) 2021-08-13

Similar Documents

Publication Publication Date Title
CN109508681B (en) Method and device for generating human body key point detection model
WO2022247005A1 (en) Method and apparatus for identifying target object in image, electronic device and storage medium
US10296196B2 (en) System, method and apparatus for displaying a non-biasing and self-adjusting visual analog scale on a computing device
US20240169518A1 (en) Method and apparatus for identifying body constitution in traditional chinese medicine, electronic device, storage medium and program
CN110930414A (en) Lung region shadow marking method and device of medical image, server and storage medium
US10832410B2 (en) Computer system, method, and program for diagnosing subject
CN112036295A (en) Bill image processing method, bill image processing device, storage medium and electronic device
CN112559341A (en) Picture testing method, device, equipment and storage medium
CN108647264A (en) A kind of image automatic annotation method and device based on support vector machines
WO2019221676A1 (en) Analysis of urine test strips with mobile camera analysys and providing recommendation by customising data
CN111429547A (en) Abnormal color vision test chart synthesis method based on false homochromy search
US9619900B2 (en) Systems and methods for identifying anomalous test item renderings
CN113256557B (en) Traditional Chinese medicine tongue state identification method and device based on tongue manifestation clinical symptom image
CN109767468B (en) Visceral volume detection method and device
CN112651315A (en) Information extraction method and device of line graph, computer equipment and storage medium
CN107833631A (en) A kind of medical image computer-aided analysis method
CN107832695A (en) The optic disk recognition methods based on textural characteristics and device in retinal images
CN116597246A (en) Model training method, target detection method, electronic device and storage medium
CN113705686B (en) Image classification method, device, electronic equipment and readable storage medium
CN113537407B (en) Image data evaluation processing method and device based on machine learning
CN114297720A (en) Image desensitization method and device, electronic equipment and storage medium
CN113255456A (en) Non-active living body detection method, device, electronic equipment and storage medium
CN112084092A (en) Method, device, equipment and storage medium for determining diagnosis rule
Brenner et al. Subjective assessments of legibility in ancient manuscript images-the SALAMI dataset
CN114882130A (en) Water quality grading method, device, equipment and medium based on water color image

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
GR01 Patent grant
GR01 Patent grant