Method and apparatus for color recognition of cupping mark images

The method and device for color recognition of cupping marks enhance the accuracy of cupping therapy diagnosis by converting images to a target color space, analyzing color distribution, and using contour maps to determine cupping mark colors.

JP7861962B2Active Publication Date: 2026-05-19CAPITALBIO CORP +1
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
CAPITALBIO CORP
Filing Date
2023-08-25
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Conventional methods for determining the color of cupping marks in traditional Chinese medicine therapy are inaccurate due to the inability to reflect the overall color distribution of cupping mark images, leading to low accuracy in color recognition.

Method used

A method and device for color recognition of cupping mark images that involve acquiring an image, converting it to a target color space, statistically analyzing color distribution information, and determining the color based on contour maps and height thresholds in the color space.

Benefits of technology

This approach allows for accurate and automatic determination of cupping mark colors, improving the precision of cupping therapy diagnosis by analyzing the entire image's color distribution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007861962000002
    Figure 0007861962000002
  • Figure 0007861962000003
    Figure 0007861962000003
  • Figure 0007861962000004
    Figure 0007861962000004
Patent Text Reader

Abstract

The present application provides a method and apparatus for color recognition of cupping mark images. [Solution] The method includes the steps of acquiring a cupping mark image to be recognized, converting the cupping mark image to be recognized into a predetermined target color space, calculating color distribution information of the cupping mark image to be recognized in the target color space, the color distribution information being used to indicate the number of pixels of different colors in the cupping mark image to be recognized, and determining a color judgment result for the cupping mark image to be recognized based on the color distribution information. This solution automatically collects and analyzes color distribution information for the entire area of ​​the cupping mark image to be recognized, and can obtain a color judgment result for the cupping mark image to be recognized based on the color distribution information, thereby realizing automatic judgment of cupping marks and cupping colors and improving the accuracy of the judgment result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application claims the priority of a Chinese patent application filed with the State Intellectual Property Office of China on November 17, 2022, with the application number 202211437597.7 and the invention title "Color Recognition Method and Device for Cupping Mark Images", and all its contents are incorporated herein by reference.

[0002] The present invention relates to the technical field of image processing, and particularly to a color recognition method and device for cupping mark images.

Background Art

[0003] Cupping marks are marks of multiple patterns and colors that appear at the suction and removal sites on the skin surface after cupping. In the traditional Chinese medicine therapy of cupping, doctors generally observe the color and pattern characteristics of cupping marks in different regions of the back after cupping to penetrate the functional state of the human organs and the health state of the body. Therefore, accurately determining the color of cupping marks is particularly important.

[0004] The conventional method for determining the color of cupping marks is to photograph the cupping marks to obtain a cupping mark image, then extract the pixel values at multiple positions of the cupping mark image, and determine the color of the cupping mark based on the average value of these pixel values. The problem with such a method is that it cannot accurately reflect the color information of the cupping mark image from the pixel values at multiple positions sparsely distributed in the cupping mark image. Therefore, the accuracy of such a method is low.

Summary of the Invention

Problems to be Solved by the Invention

[0005] In view of the deficiencies of the above prior art, the present invention provides a color recognition method and device for cupping mark images in order to provide a solution for more accurately determining the color of cupping mark images.

Means for Solving the Problems

[0006] A first aspect of this application provides a method for color recognition of cupping mark images. The steps include: obtaining an image of the cupping marks to be recognized, The steps include converting the cupping mark image to be recognized into a predetermined target color space, A step of statistically calculating the color distribution information of the cupping mark image to be recognized in the target color space, wherein the color distribution information is used to indicate the number of pixels of different colors in the cupping mark image to be recognized. The method includes the step of determining the color determination result of the cupping mark image to be recognized based on the color distribution information.

[0007] Preferably, the step of acquiring an image of the cupping marks to be recognized is: The steps include acquiring an image of the original cupping marks using an imaging device, The process includes the step of performing image segmentation on the original cupping mark image to remove skin areas without cupping marks from the original cupping mark image and to obtain a cupping mark image to be recognized.

[0008] Preferably, the step of statistically analyzing the color distribution information of the cupping mark image to be recognized in the target color space is: The steps include determining a contour coordinate system whose coordinate axes are the color components of the target color space, For each point in the aforementioned contour coordinate system, the number of pixels in the cupping mark image to be recognized whose color component matches the coordinate of that point is statistically calculated, and the height of that point is determined based on the statistical results. The method includes the step of connecting points having the same height in the aforementioned contour coordinate system with curves to obtain a contour map showing color distribution information.

[0009] Preferably, before determining the contour coordinate system whose coordinate axes are the color components of the target color space, For each color component in the target color space, the range of values ​​for that color component is divided into a plurality of sub-intervals according to a predetermined step size for that color component, and the interval value of each sub-interval is determined. The method further includes the step of replacing the value of each pixel in the cupping mark image to be recognized with the interval value of the sub-interval to which it belongs.

[0010] Preferably, the step of determining the color determination result of the cupping mark image to be recognized based on the color distribution information is: A step of calculating at least one height threshold based on the height of each point in the aforementioned contour map, The steps include selecting a contour line corresponding to each of the height thresholds from the contour map as the target contour line, The method includes the step of determining a color determination result of a cupping mark image to be recognized based on a predetermined color determination interval to which each color component corresponding to each point in each of the target contour lines belongs, wherein each of the color determination intervals corresponds to one color.

[0011] A second aspect of this application provides a color recognition device for cupping trace images. An acquisition unit that acquires cupping mark images to be recognized, A conversion unit that converts the cupping mark image to be recognized into a predetermined target color space, A statistical unit for statistically analyzing the color distribution information of the cupping mark image to be recognized in the target color space, wherein the color distribution information includes a statistical unit used to indicate the number of pixels of different colors in the cupping mark image to be recognized, The system includes a determination unit that determines the color determination result of the cupping mark image to be recognized based on the color distribution information.

[0012] Preferably, when the acquisition unit acquires the cupping mark image to be recognized, it specifically, We obtained an image of the original cupping marks taken with an imaging device. Image segmentation is performed on the original cupping mark image to remove skin areas without cupping marks from the original cupping mark image, thereby obtaining the cupping mark image to be recognized.

[0013] Preferably, when the statistical unit statistically analyzes the color distribution information of the cupping mark image to be recognized in the target color space, it specifically, Determine a contour coordinate system with the color components of the target color space as the coordinate axes. For each point in the aforementioned contour coordinate system, the number of pixels in the cupping mark image to be recognized whose color component matches the coordinate of that point is statistically calculated, and the height of that point is determined based on the statistical results. In the aforementioned contour coordinate system, points having the same elevation are connected by curves to obtain a contour map showing color distribution information.

[0014] Preferably, the statistical unit further, For each color component in the target color space, the range of values ​​for that color component is divided into a plurality of sub-intervals according to a predetermined step size for that color component, and the interval value of each sub-interval is determined. For each pixel of the cupping mark image to be recognized, the value of that pixel on each color component is replaced with the interval value of the sub-interval to which it belongs.

[0015] Preferably, when the determination unit determines the color determination result of the cupping mark image to be recognized based on the color distribution information, it specifically, Based on the height of each point in the aforementioned contour map, at least one height threshold is calculated. As target contour lines, select contour lines corresponding to each of the aforementioned height thresholds from the contour map, Based on a predetermined color determination interval to which each point in each of the target contour lines belongs, the color determination result of the cupping mark image to be recognized is determined, and each of the color determination intervals corresponds to one color. [Effects of the Invention]

[0016] This application provides a method and apparatus for color recognition of capping mark images. The method includes: obtaining a capping mark image to be recognized; converting the capping mark image to be recognized into a predetermined target color space; statistically analyzing color distribution information of the capping mark image in the target color space, where the color distribution information is used to indicate the number of pixels of different colors in the capping mark image to be recognized; and determining a color determination result of the capping mark image to be recognized based on the color distribution information. This solution can automatically collect and analyze color distribution information of the entire capping mark image to be recognized, and obtain a color determination result of the capping mark image to be recognized based on the color distribution information, thereby realizing automatic determination of capping marks and capping colors, and improving the accuracy of the determination result.

Brief Description of the Drawings

[0017] To more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the following briefly introduces the drawings necessary for the description of the embodiments or the prior art. The drawings described below are only embodiments of the present invention. Those skilled in the art can obtain other drawings based on the provided drawings on the premise of not performing inventive labor. [Figure 1] It is a flowchart of a method for color recognition of a capping mark image according to an embodiment of the present application. [Figure 2] It is a segmentation schematic diagram of an original capping mark image according to an embodiment of the present application. [Figure 3] It is a two-dimensional contour schematic diagram reflecting the number of pixels having different chromaticity components and saturation components according to an embodiment of the present application. [Figure 4] It is a two-dimensional contour schematic diagram reflecting the number of pixels having different chromaticity components and lightness components according to an embodiment of the present application. [Figure 5] It is a plan view of a three-dimensional contour diagram obtained by statistical analysis when the target color space is the HSV color space according to an embodiment of the present application. [Figure 6]This is a perspective view of a three-dimensional contour map obtained by statistical analysis when the target color space is the HSV color space, according to an embodiment of this application. [Figure 7] This is a side view of a three-dimensional contour plot obtained by statistical analysis when the target color space is the HSV color space, according to an embodiment of this application. [Figure 8] This is a schematic diagram of the structure of a color recognition device for cupping mark images according to an embodiment of this application. [Modes for carrying out the invention]

[0018] The following describes, in conjunction with the drawings of embodiments of the present invention, the technical solutions of embodiments of the present invention clearly and completely. The embodiments described are not all embodiments, but only a selection of embodiments of the present invention. Based on embodiments of the present invention, all other embodiments obtained, on the premise that those skilled in the art do not perform work worthy of inventive step, are all within the scope of protection of the present invention.

[0019] To facilitate understanding of the technical solutions presented in this application, we will first explain some of the possible concepts related to this application.

[0020] Traditional Chinese medicine cupping therapy is similar to so-called cupping (or cup removal), using specialized cupping equipment to stimulate specific reaction zones on the back of the body by applying suction and removal. By observing the color and characteristics of the cupping marks that appear in different areas of the back, it is a traditional Chinese medicine diagnostic and treatment method that allows for the visualization of the functional state of the body's organs and overall health. Currently, the application and research of cupping therapy mainly relies on human visual observation and individual experience, and the color and characteristics of the cupping marks are determined based on relevant traditional Chinese medicine and Western medical theories. While there is some agreement in traditional Chinese medicine cupping therapy regarding the determination of the color and characteristics of cupping marks, at present, the classification and judgment criteria for the color and characteristics of cupping marks are merely vague definitions, and accurate and standardized classification methods and criteria have not been established. Therefore, the diagnosis may differ depending on the doctor for the same cupping marks. This reliance on the doctor's experience and lack of objective criteria for determining the color and characteristics of cupping marks limits the wider dissemination and application of traditional Chinese medicine cupping therapy. Several conventional methods that use computer image processing capabilities to automatically recognize the color of cupping marks often suffer from problems such as inaccurate results and failure to reflect the overall color distribution of the cupping mark image, as described in the background section, for example.

[0021] The HSV color space is a perceptual color model, and HSV is an acronym for Hue, Saturation, and Value. The chromaticity component of the HSV color space has clear skin clustering properties, and is therefore widely applied in fields such as skin image segmentation, image retrieval, and face detection. The HSV color space represents the color of a pixel as three components: Hue, Saturation, and Value.

[0022] Hue is measured in degrees, with a range of 0° to 360°. Calculated counterclockwise from red, red is 0°, yellow is 60°, green is 120°, cyan is 180°, blue is 240°, and magenta is 300°.

[0023] Saturation indicates the degree to which a color approaches its vector color; the higher the degree of proximity, the higher the color's saturation. The saturation value ranges from 0% to 100%, and the higher the saturation value, the more saturated the color becomes.

[0024] Brightness (Value), also known as luminance, indicates the degree of lightness of a color. Its value ranges from 0% to 100%, corresponding to black to the vector color (the brightest color of the current hue).

[0025] Preferably, since the hue range from 0° to 360° starts with red and ends with red, in this embodiment, in order to quantify the continuity of the red hue thereafter, the hue interval corresponding to red in the HSV color space is shifted. Specifically, the method of shifting the hue may be a clockwise rotation or a counterclockwise rotation, and the rotation angle may be determined according to the actual situation, with the aim of adjusting the hue intervals corresponding to red located on both sides of 0° to a region where the numerical values ​​are continuous. Exemplaryly, the above hue shift may be performed by rotating the hue clockwise by 20°, so that the interval that originally represents red, from 0° to 20°, is adjusted to 340° to 360°, and correspondingly, the interval that originally represents red, from 340° to 360°, is shifted to 320° to 340°, so that in the adjusted HSV color space, red can be represented in a continuous numerical interval of 320° to 360°.

[0026] The HSL color space, like the HSV color space, has three components: hue, saturation, and lightness. However, unlike HSV, the lightness component L in HSL represents white when it is 100 and black when it is 0.

[0027] The Lab color space is a color system based on physiological characteristics, and it primarily describes human visual perception in a digital way. In the Lab color space, the color of a pixel is represented by three components: L, a, and b. L is luminance, with a value range of [0, 100]; a is the component from green to red, with a value range of [127, -128]; and b is the component from blue to yellow, with a value range of [127, -128].

[0028] The YUV color space is a widely used color space in color television systems. This color space separates luminance information from chromaticity information and employs different sampling rates for luminance and chromaticity within the same frame of an image. In the YUV color model, the color of a pixel is represented by the luminance component Y, and the chromaticity components U and V, which indicate chromaticity. The luminance and chromaticity components are independent of each other.

[0029] Referring to Figure 1, which is a flowchart of a method for color recognition of cupping mark images according to an embodiment of this application, the method includes the following steps. S101: Acquire the cupping mark image to be recognized.

[0030] Preferably, the process of acquiring the cupping mark image to be recognized is: The steps include acquiring an image of the original cupping marks using an imaging device, The process includes the steps of performing image segmentation on the original cupping mark image to remove skin areas without cupping marks from the original cupping mark image and obtaining a cupping mark image to be recognized.

[0031] Referring to Figure 2, the original cupping mark image is obtained by taking a picture of the area of ​​the skin surface covered by the cups using an imaging device after cupping has been performed on a specified reaction zone on the back of the human body using a dedicated cupping device. Generally, due to the structure of the cups, as shown in Figure 2(1), there are areas of skin without cupping marks (i.e., marks of multiple shapes and colors that appear after the cups are sucked on and removed) around and in the center of the original cupping mark image. After obtaining the original cupping mark image, the areas of skin without cupping marks are removed from the original cupping mark image by image segmentation, and an image of the skin area completely covered by cupping marks, i.e., the cupping mark image to be recognized in step S101, is obtained as shown in Figure 2(2).

[0032] In some preferred embodiments, after separating the image of the region covered by the cupping marks from the original cupping mark image, further image preprocessing may be performed on the separated image to determine the preprocessed image as the cupping mark image to be recognized.

[0033] Image preprocessing may include adjusting the image size and balancing the image's white balance.

[0034] By adjusting the image size, the execution efficiency of steps S102 and subsequent steps can be improved. By adjusting the image's white balance, interference from background light to the pixel color in the cupping mark image to be recognized can be eliminated, resulting in more accurate color determination results.

[0035] S102: Converts the cupping mark image to be recognized into a predetermined target color space.

[0036] In this embodiment, the target color space may be any one of the above-mentioned HSV color space, HSL color space, Lab color space, and YUV color space.

[0037] For specific conversion methods, please refer to the technical literature on these color spaces; I will not repeat the explanation here.

[0038] S103: Statistically analyzes the color distribution information of the cupping mark image to be recognized in the target color space.

[0039] Color distribution information is used to indicate the number of pixels of different colors in the cupping mark image being recognized.

[0040] Color distribution information may have different display formats. Preferably, color distribution information may be shown as a two-dimensional contour map in Figures 3 and 4, or as a three-dimensional contour map in Figures 5, 6, and 7.

[0041] Figures 3 and 4 are two-dimensional contour maps representing the color distribution information of a cupping mark image to be recognized, according to an embodiment of this application, when the target color space is the HSV color space.

[0042] Figure 3 reflects the number of pixels with different combinations of chromaticity and saturation components. In Figure 3, the horizontal coordinate represents the chromaticity (Hue) component of the pixels in the cupping mark image to be recognized, and the vertical coordinate represents the saturation component of the pixels in the cupping mark image to be recognized. The acquisition process for Figure 3 is as follows: First, in the coordinate system of Figure 3, a corresponding height can be assigned to each point in the coordinate system according to the following rules.

[0043] For each point, the number of pixels in the cupping mark image to be recognized that have chromaticity and saturation components at the coordinates of that point is statistically calculated, and a corresponding height is assigned to that point based on the statistical results. This height may be equal to the total number of pixels in the cupping mark image to be recognized that have chromaticity and saturation components at the coordinates of that point, or it may be equal to the proportion of pixels in the cupping mark image to be recognized that have chromaticity and saturation components at the coordinates of that point.

[0044] The following explanation combines examples: In the coordinate system of Figure 3, for a point (190, 60) with a horizontal coordinate of 190 and a vertical coordinate of 60, the number of pixels in the cupping mark image to be recognized that have a chromaticity component equal to 190 and a saturation component equal to 60 is statistically calculated. If the statistical result shows that there are 100 pixels with a chromaticity component equal to 190 and a saturation component equal to 60, the height corresponding to point (190, 60) is set to 100. Alternatively, if the statistical result shows that the proportion of pixels in the cupping mark image to be recognized that have a chromaticity component equal to 190 and a saturation component equal to 60 is 1%, the height corresponding to point (190, 60) is set to 1%. The color coordinates on the right side of Figure 3 represent the height of each point as a proportion.

[0045] After assigning heights according to the above rules, lines are formed in Figure 3 by connecting several points with the same height, thereby obtaining multiple contour lines. Points on one contour line have the same height, while corresponding heights may differ between different contour lines. For example, Figure 3 shows three contour lines labeled 0.8, 1.6, and 2.4. Each point on the 0.8 contour line is at a height of 0.8%, each point on the 1.6 contour line is at a height of 1.6%, and each point on the 2.4 contour line is at a height of 2.4%.

[0046] Figure 4 reflects the number of pixels with different combinations of chromaticity and lightness components. In Figure 4, the horizontal coordinate represents the chromaticity (Hue) component of the pixels in the cupping mark image to be recognized, and the vertical coordinate represents the lightness (Value) component of the pixels in the cupping mark image to be recognized. The acquisition process for Figure 4 is as follows: First, in the coordinate system of Figure 4, the corresponding height is assigned to each point in the coordinate system according to the following rules.

[0047] For each point, the number of pixels in the cupping mark image to be recognized that have chromaticity and brightness components at the coordinates of that point is statistically calculated, and a corresponding height is assigned to that point based on the statistical results. This height may be equal to the total number of pixels in the cupping mark image to be recognized that have chromaticity and brightness components at the coordinates of that point, or it may be equal to the proportion of pixels in the cupping mark image to be recognized that have chromaticity and brightness components at the coordinates of that point.

[0048] Similar to Figure 3, after assigning heights according to the above rules, lines can be formed in Figure 4 by connecting several points that have the same height, thereby obtaining multiple contour lines. Points on one contour line have the same height, while corresponding heights may differ between different contour lines.

[0049] Figures 5 to 7 are three-dimensional contour plots representing the color distribution information of a cupping mark image to be recognized, obtained by statistical analysis when the target color space is the HSV color space, according to an embodiment of this application. Figure 5 is a plan view of the three-dimensional plot, Figure 6 is a perspective view of the three-dimensional plot, and Figure 7 is a side view of the three-dimensional plot.

[0050] Referring to Figure 6, in this three-dimensional diagram, the X-axis coordinate represents chromaticity, the Y-axis coordinate represents saturation, and the Z-axis coordinate represents lightness.

[0051] The process for obtaining the 3D contour maps shown in Figures 5 to 7 is similar to the process for obtaining the 2D contour maps described earlier; that is, first, a corresponding height is assigned to each point in the 3D coordinate system according to the following rules: For each point, the number of pixels in the cupping mark image to be recognized that have chromaticity, saturation, and brightness components at the coordinates of that point is statistically calculated. For example, for a point with coordinates (100, 50, 60), the number of pixels in the cupping mark image to be recognized that have a chromaticity of 100, a saturation of 50, and a brightness of 60 is statistically calculated. Based on the statistical results, a corresponding height is assigned to that point. This height may be equal to the number of pixels in the cupping mark image to be recognized that have chromaticity, brightness, and saturation components at the coordinates of that point, or it may be equal to the ratio of the number of pixels in the cupping mark image to be recognized that have chromaticity, brightness, and saturation components at the coordinates of that point.

[0052] After assigning heights according to the above rules, lines can be formed by connecting several points with the same height in the 3D coordinate system. This yields multiple contour lines in the 3D coordinate system, where points on a single contour line have the same height, and corresponding heights may differ between different contour lines.

[0053] Preferably, when the above three-dimensional contour map is displayed on the visual interface of a terminal device, the height corresponding to each point is indicated by the color of that point, with the darker the color of the point, the greater the height, and the lighter the color of the point, the smaller the height.

[0054] Figures 3 to 7 are schematic contour diagrams representing color distribution information, obtained through statistical analysis under the assumption that the target color space is determined to be the HSV color space.

[0055] The process described above for obtaining two-dimensional and three-dimensional contour maps is similarly applicable to situations where the target color space is another color space (e.g., Lab color space). In such cases, only the color components of the HSV color space involved in the above process need to be replaced with the corresponding color components of the other color space, and the explanation will not be repeated here.

[0056] If the color distribution information is shown in a contour map so that it can be determined based on the above process for determining the contour map, the specific execution process of step S103 is as follows: The steps include determining a contour coordinate system with the color components of the target color space as the coordinate axes, For each point in the contour coordinate system, the number of pixels in the cupping mark image to be recognized whose color component matches the coordinate of that point is statistically calculated, and the height of that point is determined based on the statistical results. The method may also include the step of obtaining a contour map showing color distribution information by connecting points having the same height in a contour coordinate system with curves.

[0057] In some preferred embodiments, when performing S103, the above color distribution information may be obtained by directly statistically analyzing the color components of each pixel in the cupping mark image to be recognized in the target color space.

[0058] In some other preferred embodiments, the color components may be compressed from the cupping mark image to be recognized, and then color distribution information may be statistically calculated based on the compressed cupping mark image to be recognized. In other words, the execution of step S103 may include the following steps. A1: For each color component in the target color space, the range of values ​​for that color component is divided into multiple sub-intervals according to the step size corresponding to that color component, and the interval value for each sub-interval is determined.

[0059] The step sizes corresponding to different color components may be the same or different. For example, when performing A1 in the HSV color space, the step size corresponding to the chromaticity component is 5, and the step size corresponding to the saturation component is 10.

[0060] For example, let us assume that for the HSV color space, the step size corresponding to the hue component is 10, and the step sizes for both the saturation and lightness components are 5. Then, the range of chromatic values, 0° to 360°, can be divided into a total of 36 chromatic sub-intervals: 0° to 10°, 10° to 20°, ... 350° to 360°. The range of saturation values, 0% to 100%, can be divided into a total of 20 saturation sub-intervals: 0% to 5%, 5% to 10%, ... 95% to 100%. Similarly, lightness can be divided into a total of 20 lightness sub-intervals: 0% to 5%, 5% to 10%, ... 95% to 100%.

[0061] The interval value for each sub-interval is determined based on the numerical values ​​within that interval. In this embodiment, the specific method for determining the interval value is not limited. For example, the interval value for one sub-interval may be any one of the following: mean, maximum, minimum, median, quantile, mode, and midpoint (average of the maximum and minimum values ​​within the interval).

[0062] Using the 36 chromaticity sub-intervals mentioned above as examples, if we take the minimum value of each sub-interval as the interval value of that sub-interval, we can infer that the interval value for the 0°~10° interval is 0°, the interval value for the 10°~20° interval is 20°, and the interval value for the 350°~360° interval is 350°.

[0063] A2: For each pixel in the cupping mark image to be recognized, replace the value of that pixel in each color component with the interval value of the sub-interval to which it belongs.

[0064] In step A2, the following operation is performed on each pixel of the cupping mark image to be recognized: After determining which sub-interval of the color component to which the numerical value of each color component of the pixel belongs (as determined in step A1), the numerical value of the color component corresponding to the pixel is replaced with the interval value of the sub-interval to which it belongs.

[0065] Continuing with the example from step A1, assume that a pixel in the cupping mark image to be recognized has a chromaticity of 136°, a lightness of 72%, and a saturation of 34%. Then, based on the subintervals of chromaticity, lightness, and saturation divided in step A1, it can be determined that the chromaticity of the pixel belongs to the 130° to 140° interval, and therefore, the chromaticity value of the pixel is replaced with the interval value of the 130° to 140° interval from the original 136°, for example, the minimum value of that interval, which is 130°; Similarly, it can be determined that the brightness of the pixel in question falls within the 70% to 75% range, and the brightness value of the pixel is replaced with the range value from the original 72% to 70% to 75%, for example, the minimum value of that range, which is 70%; The saturation of the pixel in question falls within the 30% to 35% range. The saturation value of the pixel is then replaced with a value within the 30% to 35% range, for example, the minimum value of 30%. After performing the above operation, the chromaticity of the pixel is 130°, the brightness is 70%, and the saturation is 30%.

[0066] As can be seen from this, step A2 classifies color components with similar values ​​into the same sub-interval and uniformly sets the values ​​to the interval values ​​of that sub-interval, thereby achieving the objective of compressing the amount of data and improving efficiency.

[0067] When adopting the solution of compressing color components before statistically analyzing color distribution information, the coordinates corresponding to the color components in the contour plot representing the color distribution information are discontinuous coordinates. Using Figure 3 as an example, after dividing the chromaticity, lightness, and saturation components into the above sub-intervals according to the example in step A1, the coordinate values ​​on the chromaticity coordinate axis in Figure 3 become several discrete values, namely 0°, 10°, 20°...360°, and in this case, the interval between two adjacent coordinate values ​​is the step size when dividing the sub-intervals.

[0068] Compressing the color components before statistically analyzing the color distribution information has the advantage of reducing the computational complexity required to perform the statistical analysis, thereby improving the execution efficiency of this embodiment.

[0069] S104: Based on the color distribution information, the color determination result of the cupping mark image to be recognized is determined.

[0070] When showing color distribution information using contour plots (2D contours or 3D contours), the specific execution process of step S104 includes the following steps: B1: Calculate at least one height threshold based on the height of each point in the contour map; B2: Select the contour lines corresponding to each height threshold from the contour map as the target contour lines; B3: Based on the predetermined color determination interval to which each point on each target contour line belongs, the color determination result of the cupping mark image to be recognized is determined, and each color determination interval corresponds to one color.

[0071] When step B1 is performed, if the color distribution information is shown in a 3D contour plot, one or more of the mean, maximum, minimum, median, quantile, mode, and midpoint values ​​of the height of all points in the 3D contour plot can be directly calculated, and the calculation result can be used as at least one height threshold in B1. Of course, more height thresholds can be calculated according to other algorithms, for example, 50% of the mean height of all points can be calculated as a height threshold, and this embodiment does not limit the specific algorithm.

[0072] When color distribution information is represented by a two-dimensional contour plot, at least two two-dimensional contour plots can be statistically obtained from a single cupping mark image to be recognized. In this case, the two-dimensional contour plot that has the greatest influence on the actual color of the pixels is selected from the two two-dimensional contour plots as the reference two-dimensional contour plot. One or more of the following values ​​are calculated for the height of all points in the reference two-dimensional contour plot: mean, minimum, median, quantile, mode, midpoint, and 50% of the mean. The calculation result is set as at least one height threshold in B1.

[0073] In step B2, when the color distribution information is shown in a 3D contour map, the contour lines corresponding to the height threshold are determined according to the following method: In a 3D contour map, contour lines whose height is equal to a height threshold are determined as the contour lines corresponding to that height threshold. For example, in a 3D contour map, if the height of one contour line is 3.5 and the height threshold obtained by calculation in B1 is 3.5, then the contour line with a height of 3.5 is the target contour line corresponding to the height threshold of 3.5.

[0074] When the color distribution information is shown in a two-dimensional contour map, the target contour lines corresponding to each height threshold are determined in the reference two-dimensional contour map determined in step B1 according to the above method.

[0075] As can be seen from this, step B2 allows us to determine the single target contour line corresponding to each height threshold, and the target contour line is the contour line whose height is equal to the corresponding height threshold.

[0076] In step B3, once the color distribution information is shown in a three-dimensional contour map, the color determination result of the cupping mark image to be recognized can be determined according to the following method: For each target contour line, the color component corresponding to each point on that contour line is detected to determine which color determination interval it belongs to. Then, the color corresponding to the color determination interval to which these points belong is determined as the color determination result for that target contour line. This result must include at least one color. A set of colors that do not overlap in the color determination results for each target contour line may be considered as the color determination result for the cupping mark image being recognized.

[0077] For example, if two target contours are determined from a 3D contour map, and the color determination result corresponding to one of the target contours includes red and purple, and the color determination result of the other target contour is red, then the set formed by both is red and purple, and therefore the color determination result of the cupping mark image to be recognized is red and purple.

[0078] To implement the above method, at least one color determination interval can be set in advance for each color component, and it is possible to specify which combination of color determination intervals corresponds to which color. For example, in the HSV color space, the correspondence between the above combination of color determination intervals and colors is shown in Table 1 below.

[0079] [Table 1]

[0080] In the cells of Table 1, the symbol " / " indicates that the cell is the default. A default cell means that whether the color of a pixel corresponds to the color of the default cell is unrelated to the color component of the default cell. For example, in Table 1, red is the default cell in the row where red is located, and as can be seen from this, whether the color of a pixel is red is unrelated to the numerical value of the brightness component of that pixel.

[0081] The meaning of Table 1 will be explained below using the three colors red, purple, and cyan as examples.

[0082] Red belongs to the second row of Table 1. As can be determined based on Table 1, if the chromaticity of a pixel is within the range of 156 to 190 and the saturation is 60 or greater, then the color of that pixel is red. In other words, the color determination interval corresponding to red is a chromaticity of 156 to 190 and a saturation greater than 60.

[0083] As can be determined based on the two rows to which purple belongs in Table 1, if a pixel's chromaticity is between 125 and 155 and its saturation is 60 or greater, the pixel will be displayed in purple. Alternatively, if a pixel's chromaticity is between 125 and 155, its saturation is 52 or greater, and its lightness is 148 or less, the pixel will be displayed in purple. In other words, the color determination interval corresponding to purple includes cases where the chromaticity is between 125 and 155 and the saturation is greater than 60, and cases where the chromaticity is between 125 and 155, the saturation is greater than 52, and the lightness is less than 148.

[0084] As can be determined based on the two rows to which cyan belongs in Table 1, a pixel is displayed as cyan when its chromaticity is in the range of 125 to 155 and its saturation is in the range of 25 to 50, or when its chromaticity is in the range of 100 to 124 and its saturation is 34 or higher. In other words, the color determination interval corresponding to cyan includes cases where the chromaticity is 125 to 155 and the saturation is 25 to 50, and cases where the chromaticity is 100 to 124 and the saturation is 34 or higher.

[0085] By combining the examples in Table 1, if, for any one target contour line, the color component corresponding to each point on that target contour line falls within the color determination interval corresponding to purple in Table 1, then the color determination result for that target contour line is purple; If the color components corresponding to some points on the target contour line fall within the purple color determination interval, and the color components corresponding to other points fall within the cyan color determination interval, then the color determination result for the target contour line is purple and cyan. If the color components corresponding to some points on the target contour line fall within the purple color determination interval, and the color components corresponding to other points do not fall within the color determination interval of any one of the colors specified in Table 1, then the color determination result for the target contour line is purple and pink.

[0086] When color distribution information is represented by a two-dimensional contour map, the color determination intervals for only two color components in the reference two-dimensional contour image are predetermined. For example, if the reference two-dimensional contour image is a two-dimensional contour map corresponding to chromaticity-saturation, the color determination intervals for chromaticity and saturation corresponding to each of the normal colors are predetermined, for example; The color detection interval corresponding to cyan includes cases where the chromaticity is 125 to 155 and the saturation is 25 to 50, and cases where the chromaticity is 100 to 124 and the saturation is 34 or higher.

[0087] The color detection interval corresponding to red is a chromaticity of 156 to 190 and a saturation greater than 60.

[0088] Then, referring to the above process for determining the color determination result of target contour lines based on a 3D contour map, the respective color determination results in the 2D contour map are determined.

[0089] In the above determination process, the color determination interval corresponding to each color is calculated and obtained based on the color settings of the color space and the experience of the cupping therapist.

[0090] If the color determination result of the cupping mark image to be recognized contains one or more colors, and in particular the color determination result obtained in step B3 contains multiple colors, then the multiple colors in the result are subjected to duplicate removal and merging according to predetermined duplicate removal and merging rules to obtain a more accurate color determination result. The duplicate removal and merging rules can be set based on actual application scenarios and relevant experience in the art, and this embodiment is not limited.

[0091] Some examples of merger rules may include the following: Merging Rule 1 defines a first priority for multiple colors in a cupping mark. If the color determination result includes multiple colors, the colors are sorted in descending order according to their first priority, and only the first N colors are retained as the color determination result for the cupping mark image to be recognized, where N is a preset value, for example, set to 2. A preferred first priority setting is that the first priority of red and purple is the same and highest, and the first priority of white, cyan, and pink is the same and lower than that of red and purple.

[0092] The function of merger rule 1 is as follows: colors with a high first priority generally indicate abnormal cupping colors. For example, red and purple are abnormal cupping colors, and the presence of even a small amount of red or purple in the cupping marks indicates a problem. Therefore, it is necessary to emphasize colors with a high first priority as a result of the color determination.

[0093] In merger rule 2, the second priority of each color is determined based on the height corresponding to each color in the contour plot. The higher the height, the higher the second priority. Several colors with the same first priority are sorted in descending order according to their second priority, and only the first N colors are retained as the color determination result of the cupping mark image to be recognized. The height of a single color in the contour plot is equal to the sum of the heights of all points in the contour plot whose coordinates fall within the color determination interval of that color. Here, it is understood that the higher the height of a single color in the contour plot, the more pixels of that color there are in the cupping mark image to be recognized.

[0094] In merger rule 3, if the color determination result includes several colors with different first priorities, the first and second priorities of these colors are combined and sorted. For example, sort in descending order according to the first priority, then sort colors with the same first priority in descending order according to the second priority. After sorting is complete, only the first N colors are retained as the color determination result of the cupping mark image to be recognized. For example, if N is set to 2 and the color determination result includes three colors, cyan, red, and white, these three colors are sorted by red, cyan, and white, and the first two colors, red and cyan, are retained as the color determination result of the cupping mark image to be recognized.

[0095] In addition to the aforementioned combination rules, other combination rules may be established based on the organ being treated with cupping therapy, and this embodiment is not specifically limited. For example, in the case of cupping therapy performed on the lungs, the color determination result of the cupping marks obtained may include red and purple simultaneously, or white and cyan simultaneously.

[0096] In addition to the merging rules listed above, there may be other merging rules established based on the physician's diagnostic and treatment experience, and these are not limited to those listed here.

[0097] The beneficial effects of this solution are as follows: This invention provides a method for analyzing the color of cupping mark images. Based on this method, it is possible to automatically recognize and classify the color of the entire cupping mark / functional area, avoiding the influence of human subjectivity, forming a unified classification standard for cupping colors, improving efficiency, and reducing labor costs.

[0098] Furthermore, this analysis method extracts all color features of the cupping marks to form color distribution information, and then uses contour lines to find color ranges where colors tend to be concentrated, as a result of cupping color determination. This method not only takes all color information into full consideration, but also obtains important color information of the cupping marks, and can accurately determine the color results, especially for cupping mark images that have multiple color features.

[0099] Based on the method for recognizing the color of cupping marks provided by the embodiments of this application, the embodiments of this application further provide a color recognition apparatus for cupping marks, with reference to Figure 8, which is a schematic diagram of the structure of the apparatus, the apparatus is An acquisition unit 801 acquires cupping mark images to be recognized, A conversion unit 802 converts the cupping mark image to be recognized into a predetermined target color space, A statistical unit 803 that statistically calculates color distribution information of a cupping mark image to be recognized in a target color space, wherein the color distribution information is used to indicate the number of pixels of different colors in the cupping mark image to be recognized, It includes a decision unit 804 that determines the color determination result of the cupping mark image to be recognized based on color distribution information.

[0100] Preferably, when the acquisition unit 801 acquires the cupping mark image to be recognized, specifically, We obtained an image of the original cupping marks taken with an imaging device. The original cupping mark image is segmented to remove skin areas without cupping marks from the original image, thereby obtaining the cupping mark image to be recognized.

[0101] Preferably, when the statistical unit 803 statistically analyzes the color distribution information of the cupping mark image to be recognized in the target color space, it specifically performs the following: Determine a contour coordinate system with the color components of the target color space as the coordinate axes. For each point in the contour coordinate system, the number of pixels in the cupping mark image to be recognized whose color component matches the coordinate of that point is statistically calculated, and the height of that point is determined based on the statistical results. In a contour coordinate system, points with the same elevation are connected by curves to obtain a contour map showing color distribution information.

[0102] Preferably, the statistical unit 803 further, For each color component in the target color space, the range of values ​​for that color component is divided into multiple sub-intervals according to a predetermined step size for that color component, and the interval value for each sub-interval is determined. For each pixel in the cupping mark image to be recognized, the value of that pixel in each color component is replaced with the interval value of the sub-interval to which it belongs.

[0103] Preferably, when the determination unit 804 determines the color determination result of the cupping mark image to be recognized based on the color distribution information, specifically, Based on the height of each point in the contour map, calculate at least one height threshold, As target contour lines, select the contour lines corresponding to each height threshold from the contour map. Based on the predetermined color determination interval to which each point on each target contour belongs, the color determination result of the cupping mark image to be recognized is determined, and each color determination interval corresponds to one color.

[0104] For specific operating principles and beneficial effects of the color recognition device for cupping mark images provided by the embodiments of this application, refer to the relevant steps and beneficial effects of the color recognition method for cupping mark images provided by the embodiments of this application, and will not be repeated here.

[0105] Finally, in this specification, relational terms such as those in the first and second paragraphs are used solely to distinguish one entity or operation from another, and do not necessarily require or imply that there is an actual relationship or order between these entities or operations. The terms “includes,” “consistes of,” or any other variation are intended to cover non-exclusive inclusion, so that a process, method, article, or apparatus containing a set of elements not only includes those elements but also includes other elements not explicitly listed, or further includes elements specific to such process, method, article, or apparatus. Unless otherwise specified, an element limited by the phrase “includes XX” does not preclude that a process, method, article, or apparatus containing that element may have other identical elements.

[0106] Furthermore, the concepts of "first," "second," etc., as used in this invention are merely for distinguishing different devices, modules, or units, and do not limit the order of functions performed by these devices, modules, or units or their interdependencies.

[0107] Those skilled in the art can implement or use this application. Various amendments to these embodiments are obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of this application. Accordingly, this application is not limited to the embodiments described herein, but covers the broadest scope that is consistent with the principles and novel features disclosed herein.

Claims

1. A method for recognizing the color of a cupping mark image, performed by a computer, The steps include: obtaining an image of the cupping marks to be recognized, The steps include converting the cupping mark image to be recognized into a predetermined target color space, A step of statistically calculating the color distribution information of the cupping mark image to be recognized in the target color space, wherein the color distribution information is used to indicate the number of pixels of different colors in the cupping mark image to be recognized. The steps include determining the color determination result of the cupping mark image to be recognized based on the aforementioned color distribution information, A method characterized by including the following.

2. The step of obtaining the cupping mark image to be recognized is: The steps include acquiring an image of the original cupping marks using an imaging device, The steps include: performing image segmentation on the original cupping mark image to remove skin areas without cupping marks from the original cupping mark image and obtaining a cupping mark image to be recognized; The method according to claim 1, characterized by including the following:

3. The step of statistically calculating the color distribution information of the cupping mark image to be recognized in the target color space is: The steps include determining a contour coordinate system whose coordinate axes are the color components of the target color space, For each point in the aforementioned contour coordinate system, the number of pixels in the cupping mark image to be recognized whose color component matches the coordinate of that point is statistically calculated, and the height of that point is determined based on the statistical results. The steps include: obtaining a contour map showing color distribution information by connecting points having the same height in the aforementioned contour coordinate system with curves; The method according to claim 1, characterized by including the following:

4. Before determining the contour coordinate system whose coordinate axes are the color components of the target color space, For each color component in the target color space, the range of values ​​for that color component is divided into a plurality of sub-intervals according to a predetermined step size for that color component, and the interval value of each sub-interval is determined. For each pixel of the cupping mark image to be recognized, the step of replacing the value of the pixel on each color component with the interval value of the sub-interval to which it belongs, The method according to claim 3, further comprising:

5. The step of determining the color determination result of the cupping mark image to be recognized based on the color distribution information is as follows: A step of calculating at least one height threshold based on the height of each point in the aforementioned contour map, The steps include selecting a contour line corresponding to each of the height thresholds from the contour map as the target contour line, A step of determining the color determination result of a cupping mark image to be recognized based on a predetermined color determination interval to which each color component corresponding to each point in each of the target contour lines belongs, wherein each of the color determination intervals corresponds to one color, The method according to claim 3, characterized by including the following:

6. A color recognition device for cupping trace images, An acquisition unit that acquires cupping mark images to be recognized, A conversion unit that converts the cupping mark image to be recognized into a predetermined target color space, A statistical unit for statistically analyzing the color distribution information of the cupping mark image to be recognized in the target color space, wherein the color distribution information includes a statistical unit used to indicate the number of pixels of different colors in the cupping mark image to be recognized, A determination unit that determines the color determination result of the cupping mark image to be recognized based on the aforementioned color distribution information, An apparatus characterized by including

7. The acquisition unit, when acquiring the cupping mark image to be recognized, specifically, We obtained an image of the original cupping marks taken with an imaging device. Image segmentation is performed on the original cupping mark image to remove skin areas without cupping marks from the original cupping mark image and obtain the cupping mark image to be recognized. The apparatus according to feature 6.

8. The statistical unit, when statistically analyzing the color distribution information of the cupping mark image to be recognized in the target color space, specifically, Determine a contour coordinate system with the color components of the target color space as the coordinate axes. For each point in the aforementioned contour coordinate system, the number of pixels in the cupping mark image to be recognized whose color component matches the coordinate of that point is statistically calculated, and the height of that point is determined based on the statistical results. In the aforementioned contour coordinate system, points having the same elevation are connected by curves to obtain a contour map showing color distribution information. The apparatus according to feature 6.

9. The aforementioned statistical unit further, For each color component in the target color space, the range of values ​​for that color component is divided into a plurality of sub-intervals according to a predetermined step size for that color component, and the interval value of each sub-interval is determined. For each pixel of the cupping mark image to be recognized, the value of that pixel on each color component is replaced with the interval value of the sub-interval to which it belongs. The apparatus according to feature 8.

10. The decision unit, in determining the color determination result of the cupping mark image to be recognized based on the color distribution information, specifically, Based on the height of each point in the aforementioned contour map, at least one height threshold is calculated. As target contour lines, select contour lines corresponding to each of the aforementioned height thresholds from the contour map, Based on a predetermined color determination interval to which each point in each of the target contour lines belongs, the color determination result of the cupping mark image to be recognized is determined, and each of the color determination intervals corresponds to one color. The apparatus according to feature 8.