Standardized collection method of tongue diagnosis image and related device
By acquiring and analyzing images in real time and calculating parameters using mouth and tongue feature models, the problem of unstable tongue diagnosis image acquisition was solved, and rapid standardization and efficient feature recognition of tongue diagnosis images were achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI RONGDA INFORMATION TECH CO LTD
- Filing Date
- 2022-12-20
- Publication Date
- 2026-05-08
AI Technical Summary
Tongue diagnosis image acquisition is difficult to standardize, and patients have difficulty maintaining a stable tongue posture during image acquisition, which leads to difficulties in subsequent feature recognition and matching.
By acquiring and analyzing real-time images, using mouth and tongue feature models, multiple model parameters are calculated to determine whether the tongue diagnosis image meets the standards.
It enables rapid and standardized acquisition of tongue diagnosis images, improving the efficiency of tongue diagnosis and the accuracy of feature recognition.
Smart Images

Figure CN116128814B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image detection, and in particular to a standardized method and related apparatus for acquiring tongue diagnosis images. Background Technology
[0002] With the advent of the era of medical automation, online pharmacies and hospitals have gradually launched functions such as automated consultation and automated prescription. For example, by capturing images of a person's face and performing feature recognition, it is possible to preliminarily determine the related symptoms that a patient may be experiencing.
[0003] Facial features are mainly concentrated in the five sense organs, followed by the skin, and are evenly distributed with minimal interference from adjacent features. Therefore, facial image acquisition is currently quite mature. However, for tongue diagnosis, tongue features include tongue shape, length, width, thickness, color, surface unevenness, tongue coating distribution, tongue coating shape, and tongue coating color. With multiple features concentrated on the small tongue, standardized acquisition of tongue images is particularly important.
[0004] In practice, it was found that some patients would unconsciously curl their tongues, protrude their tongues too short, tilt them to the left or right, or not face the camera. Therefore, it was necessary to constantly adjust their posture to achieve the standard posture. However, because the tongue is relatively small and contains many features, it is difficult for patients to maintain the same tongue shape during image acquisition. If the image of the tongue is not standard, it will be difficult to match it with the standard template in the database for feature recognition in the later stages. Summary of the Invention
[0005] In order to facilitate patients to quickly obtain standard tongue diagnosis images and improve the efficiency of tongue diagnosis, this application provides a standardized method and related device for acquiring tongue diagnosis images.
[0006] Firstly, this application provides a standardized method for acquiring tongue diagnosis images, employing the following technical solution:
[0007] A standardized method for acquiring tongue diagnosis images includes the following steps:
[0008] Real-time image acquisition is performed to obtain continuous multi-frame tongue diagnosis images;
[0009] In response to the acquired tongue diagnosis image, the tongue diagnosis image is analyzed to determine that the image includes the mouth and tongue;
[0010] The images collected during tongue diagnosis are extracted and analyzed to extract several mouth feature regions and tongue feature regions;
[0011] Each mouth feature region and each tongue feature region are analyzed to obtain the corresponding tongue feature model;
[0012] Multiple model parameters are obtained from the tongue feature model. Matching values are calculated based on the model parameters, and the tongue diagnosis image is determined based on the matching values.
[0013] By employing the aforementioned technical solution, real-time image acquisition is performed to obtain continuous multi-frame images. This allows patients to obtain compliant tongue diagnosis images during tongue changes as required, even after multiple adjustments. The tongue diagnosis images are then analyzed to extract the mouth and tongue from the acquired images. The mouth is used to establish a standard coordinate system, providing a reference for the tongue's position, thus obtaining a tongue feature model based on the mouth reference. Compared to schemes that establish a reference based on the tongue itself, this scheme is more compatible with differences in tongue shapes and improves standardization. Multiple model parameters are obtained from the tongue feature model, allowing for matching of different indicators. The combined matching values are then used to calculate whether the acquired tongue diagnosis image meets the standard. In summary, this standardized acquisition method for tongue diagnosis images enables convenient and rapid standardized input of tongue diagnosis images, facilitating quick and standardized tongue diagnosis images for patients and improving the efficiency of tongue diagnosis.
[0014] Optionally, the step of extracting and parsing the tongue diagnosis image to extract several mouth feature regions and tongue feature regions includes:
[0015] Obtain multiple preset mouth recognition models and tongue recognition models;
[0016] Based on a pre-defined mouth recognition model, the mouth feature region and tongue feature region are obtained, wherein the mouth feature region distinguishes the upper lip and lower lip.
[0017] By employing the above technical solution, pre-defined recognition feature models are used to select feature regions on the tongue diagnosis images. For example, the pre-defined mouth recognition model includes features such as teeth and lips, while the pre-defined tongue recognition feature model includes the tip, sides, middle, root, or other parts of the tongue. For instance, the middle and root of the tongue have features such as tongue surface convexity / concavity, tongue coating color, tongue coating distribution, and tongue coating shape, while the sides of the tongue have features such as tongue thickness. Through these pre-defined recognition feature models, comprehensive selection and judgment can be performed, thereby improving the recognition ability of the mouth and tongue.
[0018] Optionally, the step of parsing each mouth feature region and each tongue feature region to obtain the corresponding tongue feature model includes:
[0019] The longitudinal axis is obtained based on the relative positions of the upper and lower lips, wherein the upper and lower lips are symmetrical about the longitudinal axis.
[0020] The tongue image is divided into a left tongue image and a right tongue image based on the vertical central axis;
[0021] Edge extraction was performed on the left and right tongue images to obtain the tongue edge contour feature model.
[0022] By employing the above technical solution, since most people's lips are symmetrical both vertically and horizontally, feature points are picked up based on the relative positions of the upper and lower lips according to a preset method to generate a vertical central axis. A standard human tongue diagnosis image requires symmetry, elongation, and the tongue surface facing the camera. Therefore, using the vertical central axis as a reference, the tongue image is delineated into a left-side and a right-side image. Edge extraction is then performed on both the left and right-side images, facilitating the recognition, matching, and / or judgment of image features.
[0023] Optionally, the steps of obtaining multiple model parameters based on the tongue feature model, calculating matching values based on the model parameters, and determining the tongue diagnosis image determination result based on the matching values include:
[0024] The edges of the tongue image are smoothed, and the curvature of the edges of the left and right tongue images is calculated to determine the tongue shape. The extreme value of the curvature of the tongue image edge is taken as the tip of the tongue. The tongue shape includes the regular tongue shape and the split tongue shape.
[0025] By employing the above technical solution, a conventional tongue shape has a single tip, while a split tongue shape has two tips, with the tongue muscles capable of independently controlling the asynchronous movements of the two sides. Therefore, by using the extreme curvature of the tongue image edge as the tip, a split tongue shape can be identified, yielding two tips. Smoothing processing significantly reduces noise caused by unevenness at the tongue image edges.
[0026] Optionally, the step of obtaining multiple model parameters based on the tongue feature model, calculating matching values based on the model parameters, and determining the tongue diagnosis image determination result based on the matching values further includes:
[0027] The first matching value is obtained by calculating the degree of symmetry between the edges of the left and right tongue images;
[0028] The second matching value is obtained by calculating the aspect ratio of the edges of the left and right tongue images.
[0029] By adopting the above technical solution, the first matching value is used to characterize the symmetry of the tongue, and the second matching value is used to characterize the protrusion length of the tongue.
[0030] Optionally, the step of calculating the degree of symmetry between the edges of the left and right tongue images to obtain the first matching value includes:
[0031] Several calculation points were collected along the longitudinal central axis. Perpendicular lines were drawn from the calculation points to both sides of the longitudinal central axis until the edges of the left and right tongue images were reached.
[0032] Calculate the ratio of the lengths of the perpendicular lines on both sides of the same calculation point, and determine whether the ratio falls within the preset threshold range. If it does, it is considered a qualified point; otherwise, it is considered an unqualified point.
[0033] The ratio of the number of qualified points to the number of unqualified points is used as the first matching value.
[0034] By adopting the above technical solution, when the actual symmetrical central axis of the tongue coincides with the longitudinal central axis determined by the lips, the ratio of the lengths of the perpendicular lines on both sides of the same calculation point will fall within the preset threshold range. Since the human tongue is not perfectly symmetrical, by calculating the ratio of qualified points to unqualified points, the influence of some asymmetrical areas can be eliminated.
[0035] Optionally, the step of calculating the aspect ratio of the left tongue image edge to the right tongue image edge to obtain the second matching value includes:
[0036] A reference axis parallel to the longitudinal central axis is generated based on the position of the tongue tip;
[0037] Collect several reference points along the reference axis, and draw perpendicular lines from the reference points to both sides until the edge of the adjacent tongue image and the longitudinal central axis;
[0038] Calculate the ratio of the sum of the perpendiculars on both sides of the same reference point to the distance from the reference point to the corresponding tongue tip on the reference axis, and use this ratio as the second matching value.
[0039] By adopting the above technical solution, after the tongue image is determined to be symmetrical, a reference axis is generated based on the tongue tip along the longitudinal central axis. For a regular tongue shape, there is one reference axis, and for a split tongue shape, there are two reference axes. The judgment ranges required for the second matching value calculated for the regular tongue shape and the split tongue shape are different. The second matching value calculated for the regular tongue shape is usually twice that calculated for the split tongue shape, and the endpoint values of the matching range of the second matching value calculated for the regular tongue shape are also twice those of the endpoint values of the matching range of the second matching value calculated for the split tongue shape.
[0040] Optionally, the steps of obtaining multiple model parameters based on the tongue feature model, calculating matching values based on the model parameters, and determining the tongue diagnosis image determination result based on the matching values include:
[0041] If all correlation values are greater than the corresponding preset threshold, or if the weighted average of all correlation values is greater than the preset threshold, then the image is determined to be a standardized tongue diagnosis image.
[0042] By employing the above technical solution, it is determined whether the first matching value is greater than a first preset threshold. If so, the left and right tongue images are determined to be symmetrical. Simultaneously, it is determined whether the ratio is less than a second preset threshold. If so, the length standard of the tongue feature model of the tongue image is determined.
[0043] Secondly, the electronic device provided in this application adopts the following technical solution:
[0044] An electronic device comprising:
[0045] One or more processors;
[0046] Memory;
[0047] One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications being configured to:
[0048] Perform the standardized acquisition method for tongue diagnosis images described above.
[0049] Thirdly, this application provides a computer-readable storage medium that adopts the following technical solution:
[0050] A computer-readable storage medium storing a computer program that can be loaded by a processor and executed as described above.
[0051] The storage medium stores at least one instruction, at least one program, a code set, or an instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the following:
[0052] The standardized acquisition method for tongue diagnosis images, as described above. Attached Figure Description
[0053] Figure 1 This is a flowchart illustrating a standardized method for acquiring tongue diagnosis images in an embodiment of this application.
[0054] Figure 2 This is a flowchart illustrating sub-step S3 in an embodiment of this application.
[0055] Figure 3 This is a flowchart illustrating sub-step S4 in an embodiment of this application.
[0056] Figure 4 This is a flowchart illustrating sub-step S52 in an embodiment of this application.
[0057] Figure 5 This is a flowchart illustrating sub-step S53 in an embodiment of this application. Detailed Implementation
[0058] The present application will be further described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely illustrative of the application and are not intended to limit the scope of the application.
[0059] Figure 1 This is a flowchart illustrating a standardized method for acquiring tongue diagnosis images in one embodiment. It should be understood that, although... Figure 1-5 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows; unless explicitly stated otherwise, there is no strict order requirement for the execution of these steps, and they can be executed in other orders; and Figure 1-5 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0060] Furthermore, the labels for each step in this embodiment are for illustrative purposes only and do not represent a limitation on the execution order of each step. In practical applications, the execution order of each step can be adjusted or performed simultaneously as needed, and such adjustments or substitutions are all within the protection scope of this invention.
[0061] In the following description, numerous specific details are set forth for purposes of explanation in order to provide a thorough understanding of the inventive concept. As part of this specification, some of the accompanying drawings of this disclosure are block diagrams illustrating structures and devices to avoid complicating the disclosed principles. For clarity, not all features of the actual embodiment need to be described. Furthermore, the language used in this disclosure has been primarily chosen for readability and instructional purposes and may not have been chosen to define or limit the subject matter of the invention, thus requiring the necessary claims to determine such inventive subject matter. References to “an embodiment” or “an embodiment” in this disclosure mean that a particular feature, structure, or characteristic described in connection with that embodiment is included in at least one embodiment, and multiple references to “an embodiment” or “an embodiment” should not be construed as necessarily referring to the same embodiment.
[0062] Unless explicitly defined, the terms “a,” “an,” and “the” are not intended to refer to a singular entity, but rather to include a general category whose specific examples can be used for illustration. Therefore, the use of the terms “a” or “an” can mean any number of at least one, including “a,” “one or more,” “at least one,” and “one or more.” The term “or” means any of the options and any combination of the options, including all options unless explicitly indicated that the options are mutually exclusive. The phrase “at least one of” when combined with a list of items refers to a single item in the list or any combination of items in the list. The phrase does not require all items listed unless explicitly defined as such.
[0063] Tongue diagnosis image recognition mainly includes five stages: tongue diagnosis image acquisition, tongue image detection, image preprocessing, feature extraction, and matching and recognition. First, we will give a brief introduction to these five stages.
[0064] Tongue diagnosis image acquisition involves capturing images of the tongue using a camera lens. For example, when a user is within the camera's field of view, the camera will record an image of the face with the tongue visible.
[0065] Tongue image detection is mainly used for the preprocessing of tongue image recognition, that is, to accurately mark the position and size of the tongue in the image and extract the required information.
[0066] Image preprocessing involves performing tasks such as light compensation, grayscale transformation, histogram equalization, normalization, geometric correction, filtering, noise filtering, and sharpening on an image. It is based on the results of tongue image detection and is a process of processing the image to ultimately serve feature extraction.
[0067] Image feature extraction, also known as tongue representation, is the process of modeling the features of the tongue. The purpose is to extract the features that the tongue recognition system can use (such as visual features, pixel statistical features, tongue image transformation coefficient features, tongue image algebraic features, etc.) to provide a sufficient amount of reference data for subsequent matching and recognition.
[0068] Matching and recognition involves searching and matching the extracted tongue image feature data with the feature templates stored in the database. By setting a threshold, when the similarity exceeds this threshold, the matching result is output. Tongue recognition compares the tongue features to be identified with the obtained tongue feature templates, and judges the shape of the tongue based on the degree of similarity in order to match the relevant diseases.
[0069] Throughout the entire recognition process, the prerequisite is that the acquired tongue images must be standardized; otherwise, misdiagnosis is likely to occur.
[0070] This application discloses a standardized method for acquiring tongue diagnosis images. (Refer to...) Figure 1 The standardized acquisition method for this tongue diagnosis image includes the following steps:
[0071] S1. Obtain multiple consecutive frames of tongue diagnosis images.
[0072] In this step, the computer acquires multiple consecutive frames of tongue diagnosis images. In different embodiments, these images may be acquired based on pre-recorded video, meaning that the image acquisition involves extracting frames from the video according to a preset step size. In other embodiments, the images may be acquired based on real-time video.
[0073] S2. In response to the acquired tongue diagnosis image, analyze the tongue diagnosis image to determine that the image includes the mouth and tongue.
[0074] When a server or smart terminal receives an image, it will begin to analyze the acquired tongue diagnosis image. The purpose of the analysis is to determine whether there is a tongue and mouth in the acquired tongue diagnosis image. If there is a tongue and mouth, the subsequent steps will continue based on that frame of image. If there is no tongue and mouth, the next frame of image will be processed until the standardized acquisition is completed.
[0075] The analysis process mainly provides reference material for subsequent comparisons. Therefore, during the analysis process, it is necessary to perform light compensation, grayscale transformation, histogram equalization, normalization, geometric correction, filtering, noise filtering, and sharpening on the image. The purpose is to remove some interference factors to facilitate the subsequent recognition process.
[0076] S3. Extract and analyze the images collected from the tongue diagnosis, and extract several mouth feature regions and tongue feature regions.
[0077] Optionally, S3 includes the following sub-steps:
[0078] S31. Obtain multiple preset mouth recognition models and tongue recognition models.
[0079] S32. Obtain the mouth feature region and tongue feature region based on the preset mouth recognition model, wherein the mouth feature region distinguishes the upper lip and lower lip.
[0080] Pre-defined recognition feature models are used to select feature regions on the acquired image. For example, a pre-defined mouth recognition model includes features such as teeth and lips, while a pre-defined tongue recognition feature model includes features such as the tip, sides, middle, and root of the tongue, or other parts. For instance, the middle and root of the tongue have features such as tongue surface convexity, tongue coating color, tongue coating distribution, and tongue coating shape, while the sides of the tongue have features such as tongue thickness. Through these pre-defined recognition feature models, comprehensive selection and judgment can be performed, thereby improving the recognition ability of the mouth and tongue.
[0081] When using a preset recognition feature model, a fuzzy algorithm can be used as the algorithm for recognizing feature regions. Common fuzzy algorithms, such as mean fuzzing and Gaussian fuzzing, are based on the following process: calculating the sum of a feature value of a certain pixel in a certain neighborhood around a pixel and applying the corresponding weight to obtain the result value.
[0082] S4. Analyze each mouth feature region and each tongue feature region to obtain the corresponding tongue feature model.
[0083] The tongue diagnosis images are analyzed to obtain the mouth and tongue from the acquired images. The mouth is used to establish a standard coordinate system to provide a reference for the tongue's position, thus obtaining a tongue feature model based on the mouth reference. Compared to schemes that establish a reference based on the tongue itself, this scheme can accommodate differences arising from different tongue shapes while improving the degree of standardization. During the analysis process, various feature regions of the tongue are decomposed, such as the tip, sides, middle, and root of the tongue. These feature regions belong to the human image, but in subsequent comparisons, these feature regions will affect the final recognition result through individual comparisons.
[0084] Optionally, S4 includes the following sub-steps:
[0085] S41. The longitudinal axis is obtained based on the relative positions of the upper lip and the lower lip, wherein the upper lip and the lower lip are symmetrical about the longitudinal axis.
[0086] S42. Based on the longitudinal central axis, the tongue image is divided into a left tongue image and a right tongue image.
[0087] S43. Extract edges from the left and right tongue images respectively to obtain the tongue edge contour feature model.
[0088] By employing the above technical solution, since most people's lips are symmetrical both vertically and horizontally, feature points are picked up based on the relative positions of the upper and lower lips according to a preset method to generate a vertical central axis. A standard human tongue diagnosis image requires symmetry, elongation, and the tongue surface facing the camera. Therefore, using the vertical central axis as a reference, the tongue image is delineated into a left-side and a right-side image. Edge extraction is then performed on both the left and right-side images, facilitating the recognition, matching, and / or judgment of image features.
[0089] S5. Based on the tongue feature model, multiple model parameters are obtained, matching values are calculated based on the model parameters, and the tongue diagnosis image is determined based on the matching values.
[0090] Model parameters refer to parameters such as tongue shape, tongue length, tongue width, and tongue thickness. By performing calculations using these parameters, it is possible to determine whether the obtained tongue diagnosis image is standard.
[0091] Optionally, S5 includes the following sub-steps:
[0092] S51. Smooth the edges of the tongue image, calculate the curvature of the left and right edges of the tongue image to determine the tongue shape, and take the extreme value of the curvature of the tongue image edge as the tip of the tongue; wherein, the tongue shape includes the regular tongue shape and the split tongue shape.
[0093] A standard tongue shape has a single tip, while a split tongue shape has two tips, with the tongue muscles controlling the asynchronous movements of the two sides. Therefore, by using the extreme curvature of the tongue image edge as the tip, split tongue shapes can be identified, yielding two tips. Smoothing processing significantly reduces noise caused by unevenness at the tongue image edges.
[0094] S52. Calculate the degree of symmetry between the edges of the left and right tongue images to obtain the first matching value.
[0095] Optionally, S52 includes the following steps:
[0096] S521. Collect several calculation points along the longitudinal central axis, and draw perpendicular lines from the calculation points to both sides of the longitudinal central axis until the edges of the left and right tongue images.
[0097] When the actual symmetrical midline of the tongue coincides with the longitudinal midline determined by the lips, the ratio of the lengths of the perpendicular lines on both sides of the same calculation point will fall within the preset threshold range. Since the human tongue is not perfectly symmetrical, it is necessary to detect the width of the tongue on both sides of the midline.
[0098] S522. Calculate the ratio of the lengths of the perpendicular lines on both sides of the same calculation point, and determine whether the ratio falls within the preset threshold range. If it does, it is considered a qualified point; otherwise, it is considered an unqualified point.
[0099] The preset threshold range is an adaptive compensation for measurement and physiological errors. For example, the preset threshold range can be set to (0.95, 1.05). For the two perpendicular lines on the same foot of the perpendicular, if the ratio of the two perpendicular lines is within the preset threshold range, it indicates that the left and right tongue images are symmetrical on both sides of the foot of the perpendicular.
[0100] S523. Calculate the ratio of the number of qualified points to the number of unqualified points as the first matching value.
[0101] Similarly, since the human tongue is not perfectly symmetrical, by setting non-compliance points, we can eliminate the influence of some asymmetrical areas or misidentification factors.
[0102] S53. Calculate the aspect ratio of the left tongue image edge to the right tongue image edge to obtain the second matching value.
[0103] Optionally, S53 includes the following steps:
[0104] S531. Generate a reference axis parallel to the longitudinal central axis based on the position of the tongue tip.
[0105] By adopting the above technical solution, after the tongue image is determined to be symmetrical, a reference axis is generated based on the tip of the tongue along the longitudinal central axis. For a regular tongue shape, there is one reference axis, and for a split tongue shape, there are two reference axes.
[0106] S532. Collect several reference points along the reference axis, and draw perpendicular lines from the reference points to both sides until reaching the edge of the adjacent tongue image and the longitudinal central axis.
[0107] In different embodiments, the calculation points can be collected uniformly along the reference axis, or collected in a pattern of increasing density or decreasing density. For different sampling locations, the width of the human tongue is smallest at the tip and largest at the base; therefore, along the reference axis towards the tip of the tongue, the width gradually decreases.
[0108] S533. Calculate the ratio of the sum of the perpendiculars on both sides of the same reference point to the distance from the reference point to the corresponding tongue tip of the reference axis, and use it as the second matching value.
[0109] The required judgment range for the second matching value calculated for the standard tongue shape and the split tongue shape differs. The second matching value calculated for the standard tongue shape is typically twice that calculated for the split tongue shape, and the endpoint values of the matching range for the standard tongue shape are also twice those for the split tongue shape. For example, the required second matching value for the standard tongue shape should be less than one-half, while the required second matching value for the split tongue shape should be less than one-quarter.
[0110] S54. When all correlation values are greater than the corresponding preset threshold, or when the weighted calculation of all correlation values is greater than the preset threshold, the image is determined to be a standardized tongue diagnosis image.
[0111] For example, in this step, it can be determined whether the first matching value is greater than the first preset threshold. If so, it is determined that the left tongue image and the right tongue image are symmetrical. Then, it is determined whether the ratio is less than the second preset threshold. If so, the length standard of the tongue feature model of the tongue image is determined, and the image is determined to be a standardized tongue diagnosis image.
[0112] Alternatively, a weighted calculation method can be used. For example, different weights can be assigned to the correlation between the first matching value and the preset threshold, and the second matching value and the preset threshold. Then, the two are weighted and summed, and it is determined whether they fall within a preset threshold. If so, the image is determined to be a standardized tongue diagnosis image; otherwise, the image is determined not to be a standardized tongue diagnosis image.
[0113] This application also discloses an electronic device, including a memory and a processor. The memory stores a computer program that can be loaded by the processor and executed, such as the standardized acquisition method for tongue diagnosis images described above. The execution entity of the method in this embodiment can be a control device, which is installed on the electronic device. The current device can be an electronic device with WIFI functionality, such as a mobile phone, tablet computer, or laptop computer. Alternatively, the execution entity of the method in this embodiment can directly be the CPU (central processing unit) of the electronic device.
[0114] This application also discloses a computer-readable storage medium storing a computer program capable of being loaded by a processor and executing the standardized tongue diagnosis image acquisition method described above. Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented using software plus necessary general-purpose hardware platforms, and of course, hardware can also be used, but in many cases the former is a better implementation. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, including several instructions to cause a device (which may be a mobile phone, computer, server, controlled terminal, or network device, etc.) to execute the methods of each embodiment of this application.
[0115] The above are all preferred embodiments of this application, and are not intended to limit the scope of protection of this application. Therefore, all equivalent changes made in accordance with the structure, shape and principle of this application should be covered within the scope of protection of this application.
Claims
1. A standardized method for acquiring tongue diagnosis images, characterized in that, Includes the following steps: Obtain multiple consecutive frames of tongue diagnosis images; In response to the acquired tongue diagnosis image, the tongue diagnosis image is analyzed to determine that the image includes the mouth and tongue; The images collected during tongue diagnosis are extracted and analyzed to extract several mouth feature regions and tongue feature regions; Each mouth feature region and each tongue feature region are analyzed to obtain the corresponding tongue feature model; Multiple model parameters are obtained from the tongue feature model, matching values are calculated based on the model parameters, and the tongue diagnosis image is determined based on the matching values. The steps of extracting and analyzing tongue diagnosis images to extract several mouth and tongue feature regions include: Obtain multiple preset mouth recognition models and tongue recognition models; The mouth feature region is obtained based on a preset mouth recognition model, and the tongue feature region is obtained based on a preset tongue recognition model. The mouth feature region distinguishes between the upper lip and the lower lip. The steps of analyzing each mouth feature region and each tongue feature region to obtain the corresponding tongue feature model include: The longitudinal axis is obtained based on the relative positions of the upper and lower lips, wherein the upper and lower lips are symmetrical about the longitudinal axis. The tongue image is divided into a left tongue image and a right tongue image based on the vertical central axis; Edge extraction was performed on the left and right tongue images respectively to obtain the tongue edge contour feature model; The steps of obtaining multiple model parameters based on the tongue feature model, calculating matching values based on the model parameters, and determining the tongue diagnosis image based on the matching values include: The edges of the tongue image are smoothed, and the curvature of the edges of the left and right tongue images is calculated to determine the tongue shape. The extreme value of the curvature of the tongue image edge is taken as the tip of the tongue. The tongue shape includes the regular tongue shape and the split tongue shape.
2. The standardized acquisition method for tongue diagnosis images according to claim 1, characterized in that, The steps of obtaining multiple model parameters based on the tongue feature model, calculating matching values based on the model parameters, and determining the tongue diagnosis image determination result based on the matching values further include: The first matching value is obtained by calculating the degree of symmetry between the edges of the left and right tongue images; The second matching value is obtained by calculating the aspect ratio of the edges of the left and right tongue images.
3. The standardized acquisition method for tongue diagnosis images according to claim 2, characterized in that, The step of calculating the degree of symmetry between the edges of the left and right tongue images to obtain a first matching value includes: Several calculation points were collected along the longitudinal central axis. Perpendicular lines were drawn from the calculation points to both sides of the longitudinal central axis until the edges of the left and right tongue images were reached. Calculate the ratio of the lengths of the perpendicular lines on both sides of the same calculation point, and determine whether the ratio falls within the preset threshold range. If it does, it is considered a qualified point; otherwise, it is considered an unqualified point. The ratio of the number of qualified points to the number of unqualified points is used as the first matching value.
4. The standardized acquisition method for tongue diagnosis images according to claim 3, characterized in that, The step of calculating the aspect ratio of the left tongue image edge to the right tongue image edge to obtain the second matching value includes: A reference axis parallel to the longitudinal central axis is generated based on the position of the tongue tip; Several reference points are collected along the reference axis, and perpendicular lines are drawn from the reference points to both sides until the edge of the adjacent tongue image and the longitudinal central axis. Calculate the ratio of the sum of the perpendiculars on both sides of the same reference point to the distance from the reference point to the corresponding tongue tip on the reference axis, and use this ratio as the second matching value.
5. An electronic device, characterized in that, It includes: One or more processors; Memory; One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications being configured to: Perform the standardized acquisition method for tongue diagnosis images according to any one of claims 1 to 4.
6. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction, at least one program, a code set, or an instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the following: The standardized acquisition method for tongue diagnosis images as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Chinese medicine tongue manifestation retrieval method based on image content analysis
CN102426583A
Apparatus and method for photographing tongue image
KR101265849B1