Tooth color recognition method and device based on image processing and processing equipment

By segmenting and analyzing the saturation of tooth images, and combining the KNN algorithm to determine the target color in the RGB color space, the problem of light interference in tooth color recognition is solved, thus improving the accuracy of recognition.

CN115482399BActive Publication Date: 2025-12-23DONGGUAN LEBOND ELECTRONICS TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211039219.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-29
Publication Date
2025-12-23
Estimated Expiration
2042-08-29

AI Technical Summary

Technical Problem

Existing tooth color recognition technologies are easily affected by external interference factors such as image reflections, resulting in low color recognition accuracy.

Method used

By segmenting oral images, the saturation of each pixel in a single tooth image is obtained. The saturation is used as a recognition parameter, and the color coordinates in the RGB color space are judged to be within a preset range. The target color and color code are determined by combining the KNN maximum nearest neighbor algorithm.

Benefits of technology

It effectively filters out interference from light and reflections, improving the accuracy of tooth color recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115482399B_ABST
    Figure CN115482399B_ABST
Patent Text Reader

Abstract

The application is suitable for the technical field of computers, and provides a tooth color identification method based on image processing, comprising: performing segmentation processing on an oral cavity image, and obtaining a single tooth image according to a result of the segmentation processing and the oral cavity image; obtaining a saturation of each pixel point in the single tooth image; determining a target color corresponding to the single tooth image according to the saturation of each pixel point in the single tooth image; and determining a target color number corresponding to the target color, wherein the target color number is a tooth color corresponding to the single tooth image. By taking the saturation of an image color as a parameter for identifying a tooth color to be identified, the application can improve the accuracy of a tooth color identification result, and avoid the problem of low accuracy of tooth color identification caused by the influence of external interference factors such as picture reflection on a tooth image.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of computers, and particularly relates to a tooth color recognition method and device based on image processing and a processing device. BACKGROUND

[0002] In today's world where people pay more and more attention to oral health and tooth whitening has become a trend, tooth color is an important factor for doctors to focus on when formulating a tooth treatment, repair, and whitening diagnosis and treatment plan for patients, and is also an important basis for individuals to evaluate their own tooth cleaning or health on a daily basis. However, the existing tooth color recognition technology usually uses a camera to collect an oral cavity picture to determine tooth color. This method is susceptible to external interference factors such as picture reflection when identifying tooth color, thereby resulting in low accuracy of color recognition. SUMMARY

[0003] Embodiments of the present application provide a tooth color recognition method and device based on image processing and a processing device, aiming to solve the technical problem of low accuracy of existing tooth color recognition.

[0004] To achieve the above-mentioned purpose, the technical solution adopted by the present application is as follows:

[0005] In a first aspect, the embodiments of the present application provide a tooth color recognition method based on image processing, comprising:

[0006] segmenting an oral cavity image, and obtaining a single tooth image according to the segmentation result and the oral cavity image;

[0007] obtaining the saturation of each pixel point in the single tooth image;

[0008] determining a target color corresponding to the single tooth image according to the saturation of each pixel point in the single tooth image;

[0009] determining a target shade number corresponding to the target color, wherein the target shade number is the tooth color corresponding to the single tooth image.

[0010] The present application takes the saturation of the pixel points of the single tooth image as a parameter for recognizing the tooth color to be recognized. Since the saturation of the image color is less affected by light when the oral cavity image is collected by the camera, the present application can solve the problem of low accuracy of tooth color recognition results caused by external interference factors such as picture reflection.

[0011] In one embodiment of the first aspect, the color with the most same saturation among the pixel points of the single tooth image can be determined as the color to be measured. Then, the color to be measured is converted to the RGB color space to obtain the coordinates of the color to be measured in the RGB color space.

[0012] In one of the embodiments of the first aspect, it can be determined whether the coordinates of the color to be tested in the RGB color space are within a preset range. If the coordinates of the color to be tested in the RGB color space are within the preset range, the color to be tested is determined as the target color.

[0013] Optionally, if the coordinates of the color to be tested in the RGB color space are not within the preset range, the oral cavity image containing the teeth to be identified can be re-acquired for tooth color identification.

[0014] In one of the embodiments of the first aspect, before performing instance segmentation processing on the oral cavity image, a preset tooth color palette can be acquired.

[0015] For example, the tooth color palette can include a plurality of color numbers and color information corresponding to each color number. The color information corresponding to each color number can include the coordinates of the color corresponding to the color number in the RGB color space.

[0016] In one of the embodiments of the first aspect, the plurality of Euclidean distances can be determined by a KNN maximum value neighbor algorithm.

[0017] For example, the plurality of Euclidean distances are the Euclidean distances between the coordinates of the target color and each color number in the tooth color palette in the RGB color space.

[0018] In one of the embodiments of the first aspect, a first color number in the tooth color palette can be determined according to the plurality of Euclidean distances.

[0019] For example, the Euclidean distance between the first color number and the coordinates of the target color in the RGB color space is the smallest.

[0020] In one of the embodiments of the first aspect, the size relationship between the Euclidean distance between the first color number and the coordinates of the target color in the RGB color space and a first preset value can be compared. If the Euclidean distance between the first color number and the coordinates of the target color in the RGB color space is less than or equal to the first preset value, the first color number is determined as the target color number of the target color.

[0021] Optionally, if the Euclidean distance between the first color number and the coordinates of the target color in the RGB color space is greater than the first preset value, the oral cavity image containing the teeth to be identified can be re-acquired for tooth color identification.

[0022] The application takes the saturation of the image color as the parameter for identifying the color of the to-be-identified tooth, because the saturation of the image color is less affected by the light when the oral cavity image is collected by the camera, so that the problem of low accuracy of the result of tooth color identification caused by the influence of external factors such as light conditions can be solved. Further, the application takes the color with the most same saturation in the pixel points of the single tooth image as the to-be-tested color, filters out the color not in the preset range in the process of obtaining the target color through the to-be-tested color, and filters out the color greater than the first set value in the process of obtaining the target color number of the target color through the first color number, so that the reflection and defect interference information can be eliminated, and the accuracy of the result of tooth color identification can be further improved.

[0023] In a second aspect, an embodiment of the application provides a tooth color identification device, comprising a processing unit, the processing unit is configured to:

[0024] perform segmentation processing on the oral cavity image, and obtain a single tooth image according to the result of the segmentation processing and the oral cavity image;

[0025] obtain the saturation of each pixel point in the single tooth image;

[0026] determine the target color corresponding to the single tooth image according to the saturation of each pixel point in the single tooth image;

[0027] determine the target color number corresponding to the target color, wherein the target color number is the tooth color corresponding to the single tooth image.

[0028] In one of the embodiments of the second aspect, when the target color corresponding to the single tooth image is obtained according to the saturation of each pixel point in the single tooth image, the processing unit can further be configured to determine the color with the most same saturation in the pixel points of the single tooth image as the to-be-tested color, and then convert the to-be-tested color to the RGB color space to obtain the coordinates of the to-be-tested color in the RGB color space.

[0029] In one of the embodiments of the second aspect, the processing unit can further be configured to judge whether the coordinates of the to-be-tested color in the RGB color space are in a preset range, and if the coordinates of the to-be-tested color in the RGB color space are in the preset range, determine the to-be-tested color as the target color.

[0030] Optionally, if the coordinates of the to-be-tested color in the RGB color space are not in the preset range, the processing unit can be configured to reacquire the oral cavity image containing the to-be-identified tooth to perform tooth color identification.

[0031] In one of the embodiments of the second aspect, before performing instance segmentation processing on the oral cavity image, the processing unit can further be configured to obtain a preset tooth color palette.

[0032] Exemplarily, the tooth color palette can include a plurality of color numbers and color information corresponding to each color number, where the color information can include coordinates of the color corresponding to the color number in the RGB color space.

[0033] In one of the embodiments of the second aspect, when determining the target color number corresponding to the target color according to the target color, the processing unit can be further configured to determine the plurality of Euclidean distances by using a KNN maximum nearest neighbor algorithm.

[0034] Exemplarily, the plurality of Euclidean distances are Euclidean distances between the target color and coordinates of each color number in the tooth color palette in the RGB color space.

[0035] In one of the embodiments of the second aspect, the processing unit can be configured to determine the first color number in the tooth color palette according to the plurality of Euclidean distances.

[0036] Exemplarily, the Euclidean distance between the first color number and the coordinates of the target color in the RGB color space is the smallest.

[0037] In one of the embodiments of the second aspect, the processing unit can be configured to compare the size relationship between the Euclidean distance between the first color number and the coordinates of the target color in the RGB color space and a first set value. If the Euclidean distance between the first color number and the coordinates of the target color in the RGB color space is less than or equal to the first set value, the first color number is determined as the target color number of the target color.

[0038] Optionally, if the Euclidean distance between the first color number and the coordinates of the target color in the RGB color space is greater than the first set value, the processing unit can be configured to reacquire the oral image containing the tooth to be identified to perform tooth color recognition.

[0039] In a third aspect, an embodiment of the present application provides a processing device, including a memory and a processor, the processor can be configured to execute a program (instructions) stored in the memory to implement the method provided in the first aspect.

[0040] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, including a computer program stored thereon, when the computer program is executed, the method provided in the first aspect can be implemented.

[0041] In a fifth aspect, an embodiment of the present application provides a computer program product, when the computer program product is run on a terminal device, the terminal device executes the method in any one of the first aspect.

[0042] It can be understood that the beneficial effects of the second aspect to the fifth aspect can be referred to the related description in the first aspect, which will not be repeated here.

[0043] Compared with the prior art, the beneficial effects of the embodiment of the present application are that the present application takes the saturation of the pixel points of a single tooth image as a parameter for identifying the color of the tooth to be identified, and because the saturation of the image color is less affected by light when the oral cavity image is collected by the camera, the problem of low accuracy of the result of tooth color identification caused by the influence of external interference factors such as picture reflection can be solved. BRIEF DESCRIPTION OF DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0045] Figure 1 is a flowchart of a tooth color identification method provided by an embodiment of the present application;

[0046] Figure 2 is a flowchart of a tooth color identification method provided by an embodiment of the present application;

[0047] Figure 3 is an effective determination area diagram of each color number in a tooth color palette provided by an embodiment of the present application;

[0048] Figure 4 is a structural schematic diagram of a tooth color identification device provided by an embodiment of the present application;

[0049] Figure 5 is a structural schematic diagram of a processing device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0050] In the following description, specific details such as specific system structures, techniques, etc. are presented in order to thoroughly understand the embodiments of the present application. However, it should be clear to those skilled in the art that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits and methods are omitted to avoid unnecessary details that hinder the description of the present application.

[0051] It should be understood that when used in the specification and the appended claims of the present application, the term "comprising" indicates the presence of the described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or sets thereof.

[0052] It should also be understood that the term "and / or" as used herein refers to any one of the associated listed items, or a combination of any of the associated listed items, and all possible combinations, and includes these combinations unless the context specifically indicates otherwise.

[0053] As used in the description of the application and the appended claims, the term "if' can be interpreted to mean "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [a described condition or event] is detected" can be interpreted to mean "upon determining" or "in response to determining" or "upon detecting [the described condition or event]" or "in response to detecting [the described condition or event]," depending on the context.

[0054] In addition, in the description and the appended claims of the application, the terms "first", "second", "third", etc. are used merely to distinguish descriptions, and cannot be understood as indicating or implying relative importance.

[0055] Reference in the specification to "one embodiment" or "some embodiments" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the application. The appearances of the phrases "in one embodiment", "in some embodiments", "in other embodiments", "in additional embodiments", and so on, in various places in the specification are not necessarily all referring to the same embodiment, unless otherwise specifically stated. The terms "including", "containing", "comprising", and variations thereof are meant to encompass the terms "consisting of" and "consisting essentially of", unless otherwise specifically indicated.

[0056] The tooth color recognition method provided by the embodiments of the application can be applied to terminal devices such as mobile phones, tablet computers, wearable devices, notebook computers, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), and the like. The embodiments of the application do not make any limitation on the specific type of the terminal device.

[0057] Figure 1 A schematic flowchart of a tooth color recognition method based on image processing provided by the application is shown. The method can be performed by a tooth color recognition device based on image processing. The method 100 can include S101 to S105, and each step is described below.

[0058] S101, performing segmentation processing on the oral cavity image.

[0059] In one example, the oral cavity image can be segmented by instance segmentation, panorama segmentation, semantic segmentation, etc. It should be understood that the present application does not limit the method of segmenting the oral cavity image.

[0060] In an example, the Mask-RCNN algorithm can be used for instance segmentation of the oral cavity image.

[0061] In an example, the instance segmentation process can specifically be pixel-by-pixel labeling of the oral cavity image, so that the region belonging to the to-be-identified tooth in the to-be-identified oral cavity image can be separated.

[0062] For example, the oral cavity image includes three to-be-identified teeth, which can be labeled as #A, #B, and #C respectively. The pixel points belonging to the to-be-identified tooth #A in the oral cavity image can be labeled as 1, and the pixel points not belonging to the to-be-identified tooth #A can be labeled as 0. At this time, the pixel points belonging to the to-be-identified tooth #A in the result of the instance segmentation process are white, and the pixel points not belonging to the to-be-identified tooth are black. Thus, the region belonging to the to-be-identified tooth #A in the to-be-identified oral cavity image is separated.

[0063] S102, obtaining a single tooth image according to the result of the segmentation process and the oral cavity image.

[0064] In one example, the single tooth image can be obtained by matrix cross multiplication according to the result of the segmentation process and the oral cavity image.

[0065] In an example, the single tooth image only contains color information of the pixel points belonging to the to-be-identified tooth.

[0066] For example, because the result of the instance segmentation process does not include color information of the image but only includes attribution information of the pixel points in the above example, the result of the instance segmentation process can be used to mask and perform matrix cross multiplication with the oral cavity image. After matrix cross multiplication, the single tooth image of the to-be-identified tooth #A is obtained, in which the pixel points not belonging to the to-be-identified tooth #A are black, i.e. (0, 0, 0); and the pixel points belonging to the to-be-identified tooth #A retain the original color information. Based on a similar method, the single tooth image of the to-be-identified tooth #B and the single tooth image of the to-be-identified tooth #C can be obtained.

[0067] S103, obtaining the saturation of each pixel point in the single tooth image.

[0068] In one example, the saturation of each pixel point in the single tooth image can be determined by converting each pixel point in the single tooth image to the HSV color space to obtain the coordinates of each pixel point in the HSV color space, so that the saturation of each pixel point in the single tooth image is determined. The value of the S axis in the coordinates of each pixel point in the HSV color space is the saturation (saturation, S) of the color of the pixel point.

[0069] For example, the color of a pixel point in a single tooth image has a coordinate of (35, 12.1, 87.8) in the HSV color space, where the value of the S axis is 12.1, and the saturation of the color of the pixel point is 12.1%.

[0070] S104, determining a target color corresponding to the single tooth image according to the saturation of each pixel point in the single tooth image.

[0071] In an implementation manner, the color corresponding to the pixel point with the most same saturation in the single tooth image can be determined as the to-be-tested color, and the to-be-tested color is the main color of the single tooth image. After the to-be-tested color is determined, the to-be-tested color can be converted to the RGB color space to obtain the coordinate of the to-be-tested color in the RGB color space. Then, it can be judged whether the coordinate of the to-be-tested color in the RGB color space is within a preset range. The method of determining the to-be-tested color (main color) can be determined by the pixel point with the most same saturation, or by the mean value of the pixel point with the most similar saturation, or by the pixel point with the most normal distribution range.

[0072] In an example, if the coordinate of the to-be-tested color in the RGB color space is within the preset range, the to-be-tested color is determined as the target color. By filtering out the to-be-tested color outside the preset range, interference information such as reflection can be excluded, and the accuracy of tooth color recognition can be improved.

[0073] S105, determining a target color corresponding to the single tooth image according to the target color, wherein the target color is the tooth color corresponding to the single tooth image.

[0074] In an example, before starting the recognition, a preset tooth color palette can be obtained. The tooth color palette can include a plurality of color numbers, and each color number corresponds to a color. The color information of the color corresponding to each color number in the palette under standard lighting conditions can be collected by a camera, and the color information can include the coordinate of the color in the RGB color space.

[0075] In another example, a plurality of Euclidean distances can be determined by a KNN maximum value neighbor algorithm, and then a first color number in the tooth color palette can be determined according to the plurality of Euclidean distances.

[0076] For example, the plurality of Euclidean distances can be the Euclidean distances between the target color and the coordinates of the colors corresponding to the color numbers in the palette in the RGB color space.

[0077] Exemplarily, the first color number is determined as the target color number of the target color when the Euclidean distance between the first color number and the target color is less than or equal to a first set value.

[0078] Exemplarily, the first color number is determined as the target color number of the target color when the Euclidean distance between the first color number and the target color is less than or equal to a first set value.

[0079] The present application takes the saturation of the image color as a parameter for identifying the color of the tooth to be identified, because the saturation of the image color is less affected by the light when the oral cavity image is collected by the camera, so as to solve the problem of low accuracy of the result of tooth color identification caused by the influence of external factors such as light conditions. Further, the present application takes the color with the most same saturation in the pixel points of the single tooth image as the color to be measured, and filters out the color not in the preset range in the process of obtaining the target color through the color to be measured, and filters out the color greater than the first set value in the process of obtaining the target color number of the target color through the first color number, so as to eliminate the interference information of reflection and defects, and further improve the accuracy of the result of tooth color identification.

[0080] Figure 2 A schematic flowchart of a tooth color identification method 200 based on image processing provided by the present application is shown, the method 200 is a specific example of the method 100, and the method 200 can include steps S201 to S210, which will be described below.

[0081] S201, obtaining an oral cavity image containing a tooth to be identified.

[0082] Exemplarily, the oral cavity image of the user can be obtained by the camera, and the oral cavity image can include a plurality of teeth to be identified. In addition, the oral cavity image can also include information of other parts in the oral cavity, such as the tongue or the gums, etc.

[0083] S202, performing segmentation processing on the oral cavity image.

[0084] S203, obtaining a single tooth image according to the result of the segmentation processing and the oral cavity image.

[0085] S204, obtaining the saturation of each pixel point in the single tooth image.

[0086] S202-S204 are the same as S101-S103, and specific descriptions can be referred to in S101-S103, which will not be repeated here.

[0087] S205, determining the color to be measured corresponding to the pixel point with the most same saturation in the single tooth image.

[0088] In one example, the color with the most same saturation in the pixels of the single tooth image can be determined as the to-be-tested color, which is the main color of the single tooth image.

[0089] For example, in all the pixels of the single tooth image of the to-be-identified tooth A, the pixel with the saturation of 12.1% has 4000, the pixel with the saturation of 23.1% has 800, and the pixel with the saturation of 25.1% has 200. The pixel with the saturation of 12.1% has the most, so the color with the saturation of 12.1% of the pixel can be determined as the to-be-tested color.

[0090] S206, judging whether the coordinates of the to-be-tested color in the RGB color space are in a preset range.

[0091] In one example, after the to-be-tested color is determined, the to-be-tested color can be converted to the RGB color space to obtain the coordinates of the to-be-tested color in the RGB color space. Then, whether the coordinates of the to-be-tested color in the RGB color space are in a preset range can be judged. That is, whether the coordinates of the to-be-tested color are in a valid color gamut range, and the preset range is a kind of preset valid color gamut condition information.

[0092] If the coordinates of the to-be-tested color in the RGB color space are in the preset range, step S207 is performed; if the coordinates of the to-be-tested color in the RGB color space are not in the preset range, step S201 is performed to reacquire the oral cavity image containing the to-be-identified tooth for tooth color identification.

[0093] If the method for determining the saturation of each pixel in the single tooth image by converting each pixel in the single tooth image to the HSV color space in the example of step S103 is adopted, when the to-be-tested color is converted to the RGB color space, the to-be-tested color can be converted from the HSV color space to the RGB color space by using the following formula to obtain the coordinates of the to-be-tested color in the RGB color space.

[0094] When 0≤H<360, 0≤S≤land 0≤V≤1:

[0095] C=V×S

[0096]

[0097] m=V-C

[0098]

[0099] (R, G, B)=((R'+m)×255, (G'+m)×255, (B'+m)×255)

[0100] For example, the preset range can be 200≤R≤235, 160≤G≤220, 120≤B≤210.

[0101] For example, the coordinates of the color to be measured in the HSV space are (35, 12.1, 87.8), which are converted to the RGB color space to obtain the coordinates of the color to be measured in the RGB color space, i.e., (224, 213, 197). Since the coordinates of the color to be measured in the RGB color space are within the preset range, step S207 can be performed.

[0102] S207, determining the color to be measured as the target color.

[0103] In one example, when the coordinates of the color to be measured in the RGB color space are within the preset range, the color to be measured can be determined as the target color. It is understood that the color to be measured and the target color are essentially the same, i.e., the color corresponding to the pixel point with the highest saturation in the single tooth image.

[0104] As in the example in step S206, the coordinates of the color to be measured in the RGB color space are within the preset range, so the color to be measured is determined as the target color.

[0105] S208, determining a plurality of Euclidean distances by using the KNN maximum neighbor algorithm, and determining the first shade number in the tooth color palette according to the plurality of Euclidean distances.

[0106] For example, the tooth color palette can include five shade numbers A1, A2, A3, C1, and C3, wherein the coordinates of the shade number A1 in the RGB color space are (220, 212, 201), the coordinates of the shade number A2 in the RGB color space are (228, 210, 186), the coordinates of the shade number A3 in the RGB color space are (229, 203, 176), the coordinates of C1 in the RGB color space are (224, 210, 197), and the coordinates of the shade number C3 in the RGB color space are (223, 198, 167).

[0107] As the example in step S206, the coordinates of the target color in the RGB color space are (224, 213, 197). The Euclidean distance between the coordinates of the target color and the coordinates of the color number Al in the RGB color space is 5.74, the Euclidean distance between the coordinates of the target color and the coordinates of the color number A2 in the RGB color space is 12.08, the Euclidean distance between the coordinates of the target color and the coordinates of the color number A3 in the RGB color space is about 23.79, the Euclidean distance between the coordinates of the target color and the coordinates of the color number Cl in the RGB color space is 3.00, and the Euclidean distance between the coordinates of the target color and the coordinates of the color number C3 in the RGB color space is about 33.56. Since the Euclidean distance between the coordinates of the target color and the coordinates of the color number Cl in the RGB color space is the smallest, the color number Cl is determined as the first color number, i.e., the nearest color number.

[0108] In step S209, it is determined whether the Euclidean distance between the coordinates of the first color number and the coordinates of the target color in the RGB color space is less than or equal to a first set value.

[0109] In one example, the coordinates of the first color number and the coordinates of the target color in the RGB color space are obtained, and the Euclidean distance between the coordinates of the first color number and the coordinates of the target color in the RGB color space is calculated. Then, the size relationship between the Euclidean distance between the coordinates of the first color number and the coordinates of the target color in the RGB color space and the first set value is compared. It is determined whether the Euclidean distance between the coordinates of the first color number and the coordinates of the target color in the RGB color space is less than or equal to the first set value.

[0110] If the Euclidean distance between the first color number and the target color is less than or equal to the first set value, step S210 is performed; if the Euclidean distance between the first color number and the target color is greater than the first set value, step S201 is performed, and the oral image including the tooth to be recognized is obtained again for tooth color recognition.

[0111] In an example, the Euclidean distance between the coordinates of the color corresponding to each color number in the tooth color palette in the RGB color space and the coordinates of the colors corresponding to the remaining color numbers in the RGB color space is calculated, and the maximum value of the Euclidean distances is determined as the first set value. In this way, when the first set value is too small or the color corresponding to the target color number is too different from the target color, the phenomenon that the tooth color recognition result is inaccurate can be avoided.

[0112] For example, the Euclidean distance between the coordinates of color number A1 and color number A2, color number A3, color number C1, color number C3 in the RGB color space is 17.12, 28.05, 6.00, 36.89, respectively. The Euclidean distance between the coordinates of color number A2 and color number A3, color number C1, color number C3 in the RGB color space is 12.25, 11.70, 23.02, respectively. The Euclidean distance between the coordinates of color number A3 and color number C1, color number C3 in the RGB color space is 22.69, 11.91, respectively. The Euclidean distance between the coordinates of color number C1 and color number C3 in the RGB color space is 32.33.

[0113] Since the Euclidean distance between the coordinates of color number A1 and color number C3 in the RGB color space is the largest, 36.89 can be determined as the first set value.

[0114] As shown in the effective determination area diagram of each color number in the tooth color palette, Figure 3 each color number is divided into an effective determination area by taking 36.89 as the first set value. Only when the coordinates of the target color in the RGB color space are within the effective determination area (i.e., the dotted part in Figure 3 ), that is, the Euclidean distance between the coordinates of the first color number and the target color in the RGB color space is less than or equal to the first set value, the first color number can be determined as the target color number of the target color.

[0115] For example, the target color of the tooth to be identified #A can be denoted as P1, and the target color of the tooth to be identified #B can be denoted as P2. In the effective determination area diagram of each color number in the tooth color palette, Figure 3 the coordinates of the target color P1 in the RGB color space are within the effective determination area, so color number C1 can be determined as the target color number of the target color P1. The target color P2 is not within the effective determination area in the RGB color space, so the target color number of the target color P2 cannot be determined, at which time the oral image including the tooth to be identified #B needs to be re-collected for tooth color identification.

[0116] It should be understood that as the number of color numbers in the tooth color palette increases and the numerical value changes, the specific process of determining the first set value should also be adaptively adjusted.

[0117] It should be understood that the present application does not limit the method of determining the first set value.

[0118] S210, determining the first color number as the target color number of the target color.

[0119] In one example, when the Euclidean distance between the first color number and the target color is less than or equal to the first set value, the first color number can be determined as the target color number of the target color.

[0120] As in the above example, after obtaining the first color number (i.e., color number C1) and the coordinates of the target color in the RGB color space, the Euclidean distance between the first color number (i.e., color number C1) and the coordinates of the target color in the RGB color space is 3.00, which is less than the first set value, i.e., 36.89, so the color number C1 can be determined as the target color number of the target color P1.

[0121] The present application takes the saturation of the image color as a parameter for identifying the color of the tooth to be identified, because the saturation of the image color is less affected by light when the oral cavity image is collected by the camera, so the problem of low accuracy of tooth color identification result caused by the influence of external factors such as light conditions can be solved. Further, the present application takes the color with the most same saturation in the pixel points of the single tooth image as the color to be measured, and filters out the colors not in the preset range in the process of determining the target color through the color to be measured, and filters out the colors greater than the first set value in the process of determining the target color number of the target color through the first color number, so that the reflection and defect interference information can be eliminated, and the accuracy of the result of tooth color identification can be further improved.

[0122] Since the color to be measured and the target color are essentially the same, they are both the color corresponding to the pixel point with the most adjacent saturation in the single tooth image. The order of steps S206 and S209 in the above embodiment can be interchanged, or steps S206 and S209 can be arranged immediately before step S207.

[0123] In another embodiment, a scheme for reducing computational complexity is provided. Specifically, after step S205, step S208 is performed, and then steps S206 or S209 are performed. That is, after determining the target color corresponding to the pixel point with the most adjacent saturation, the nearest color number (first color number) of the target color is determined according to the minimum Euclidean distance, and then the target color number of the target color is determined. Further, it is judged whether the target color satisfies the preset valid color range condition information, so as to determine the target color number corresponding to the target color. The preset valid color range condition information can be the preset range or the first set value in the above embodiment.

[0124] When the preset valid color range condition information is the aforementioned preset range, the scheme is executed as follows:

[0125] After determining the target color (also referred to as the color to be measured or the main color) corresponding to the pixel point with the most adjacent saturation, the color number with the minimum Euclidean distance to the target color in the tooth color palette information is determined as the nearest color number of the target color. At the same time or in sequence, it is judged whether the color space coordinates of the target color or the nearest color number are located in the preset range according to the preset range, and if the color space coordinates of the target color or the nearest color number are located in the preset range, it is determined that the nearest color number is the target color number of the target color.

[0126] When the preset effective color gamut condition information is the first preset value, the scheme execution process is as follows:

[0127] After determining the target color (also referred to as a to-be-detected color or a main color) corresponding to the pixel point with the maximum adjacent saturation, the color number with the minimum Euclidean distance to the target color in the tooth color palette information is determined as the nearest color number of the target color. Then, it is judged whether the Euclidean distance between the nearest color number and the target color in the color space coordinates is less than or equal to the first preset value. If it is less than or equal to the first preset value, the nearest color number is determined as the target color number of the target color.

[0128] The above scheme can simplify the single execution step of the scheme, reduce the calculation complexity, and save the energy consumption of the related equipment to a certain extent. Therefore, the technical personnel has more selection space when facing different detection accuracy and energy consumption limitation requirements, and the applicability and scalability of the technical scheme in different fields are further improved.

[0129] Figure 4 A structure diagram of a tooth color recognition device 400 is shown. The tooth color recognition device 400 can include a processing unit 410, which is configured to:

[0130] Segmenting the oral image, and obtaining a single tooth image according to the segmentation result and the oral image.

[0131] Obtaining the saturation of each pixel point in the single tooth image.

[0132] Determining a target color corresponding to the single tooth image according to the saturation of each pixel point in the single tooth image.

[0133] Determining a target color number corresponding to the target color according to the target color, wherein the target color number is a tooth color corresponding to the single tooth image.

[0134] In one example, when the target color corresponding to the single tooth image is obtained according to the saturation of each pixel point in the single tooth image, the processing unit 410 can also be configured to determine a to-be-detected color as the color with the maximum same saturation in the single tooth image, and then convert the to-be-detected color to the RGB color space to obtain the coordinates of the to-be-detected color in the RGB color space.

[0135] In one example, the processing unit 410 can also be configured to judge whether the coordinates of the to-be-detected color in the RGB color space are within a preset range.

[0136] For example, if the coordinates of the to-be-tested color in the RGB color space are within the preset range, the to-be-tested color is determined as the target color.

[0137] Optionally, if the coordinates of the to-be-tested color in the RGB color space are not within the preset range, the processing unit 410 can be configured to reacquire the oral cavity image containing the to-be-identified tooth for tooth color identification.

[0138] In one example, before performing the instance segmentation processing on the oral cavity image, the processing unit 410 can also be configured to acquire a preset tooth color palette.

[0139] For example, the tooth color palette can include a plurality of color numbers and color information corresponding to each color number, where the color information can include the coordinates of the color corresponding to the color number in the RGB color space.

[0140] In one example, when determining the target color number corresponding to the target color according to the target color, the processing unit 410 can also be configured to determine a plurality of Euclidean distances by using a KNN maximum value nearest neighbor algorithm.

[0141] For example, the plurality of Euclidean distances are the Euclidean distances between the coordinates of the target color and each color number in the tooth color palette in the RGB color space.

[0142] In one example, the processing unit 410 can be configured to determine a first color number in the tooth color palette according to the plurality of Euclidean distances.

[0143] For example, the Euclidean distance between the first color number and the coordinates of the target color in the RGB color space is the smallest.

[0144] In one example, the processing unit 410 can be configured to compare the size relationship between the Euclidean distance between the first color number and the target color and a first preset value. If the Euclidean distance between the first color number and the target color is less than or equal to the first preset value, the first color number is determined as the target color number of the target color.

[0145] Optionally, if the Euclidean distance between the first color number and the coordinates of the target color in the RGB color space is greater than the first preset value, the processing unit 410 can be configured to reacquire the oral cavity image containing the to-be-identified tooth for tooth color identification.

[0146] This application uses the color saturation of an image as a parameter for identifying the color of the tooth to be identified. Since the color saturation of an image captured by a camera is less affected by lighting conditions, this application solves the problem of low accuracy in tooth color recognition caused by external factors such as lighting conditions. Furthermore, this application uses the color with the highest saturation among pixels in a single tooth image as the test color. During the process of obtaining the target color from the test color, colors outside a preset range are filtered out. Similarly, during the process of obtaining the target color number from a first color number, colors exceeding a first set value are filtered out. This eliminates interference from reflections and defects, further improving the accuracy of tooth color recognition.

[0147] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0148] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0149] Figure 5 The diagram shown is a structural schematic of a processing device provided in one embodiment of this application. Figure 5 The processing device 500 shown may include: at least one processor 510 ( Figure 5 The diagram shows only one processor, a memory 520, and a computer program 550 stored in the memory 520 and executable on the at least one processor 510, which, when executed, implements the steps in any of the above method embodiments.

[0150] The processing device 500 may be a robot or other processing device capable of implementing the above methods. This application embodiment does not impose any restrictions on the specific type of processing device.

[0151] Those skilled in the art can understand that, Figure 5 The processing device 500 is merely an example and does not constitute a limitation on the processing device, and can include more or fewer components than shown, or combine certain components, or different components. For example, the processing device 500 can also include an input / output interface.

[0152] The processor 510 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gates or transistor logic components, discrete hardware components, etc. The general-purpose processor can be a microprocessor or can also be any conventional processor.

[0153] The memory 520 can be an internal storage unit, such as a hard disk or a memory, in some embodiments. The memory 520 can also be an external storage device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc., in other embodiments. Further, the memory 520 can include both an internal storage unit and an external storage device. The memory 520 is used to store an operating system, application programs, a boot loader, data, and other programs, such as program codes of the computer program, etc. The memory 520 can also be used to temporarily store data that has been output or will be output.

[0154] It should be understood that the size of the serial number of each step in the above embodiments does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0155] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of each functional unit and module is exemplified, and in actual application, the above-mentioned functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or software functional unit. In addition, the specific names of each functional unit and module are only for easy distinction, and do not limit the protection scope of the present application. The specific working process of the unit and module in the above system can refer to the corresponding process in the foregoing method embodiment, which will not be described here.

[0156] The embodiment of the present application further provides a computer readable storage medium, the computer readable storage medium stores a computer program, and the computer program is executed by a processor to realize the steps in each method embodiment described above.

[0157] The embodiment of the present application provides a computer program product, when the computer program product runs on the tooth color identification device, the tooth color identification device executes to realize the steps in each method embodiment described above.

[0158] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on this understanding, the embodiment of the present application realizes all or part of the processes in the above method, which can be completed by a computer program instructing related hardware. The computer program can be stored in a computer readable storage medium. The computer program is executed by a processor to realize the steps in each method embodiment described above. The computer program includes computer program code, which can be in the form of source code, object code, executable file or some intermediate form, etc. The computer readable medium at least includes any entity or device capable of carrying the computer program code to the photographing device / terminal equipment, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium. For example, U disk, mobile hard disk, magnetic disk or optical disk, etc. In some jurisdictions, according to legislation and patent practice, the computer readable medium cannot be an electrical carrier signal and a telecommunication signal.

[0159] In the above embodiments, the description of each embodiment has its own focus, and the parts not described or recorded in detail in a certain embodiment can be referred to the relevant description of other embodiments.

[0160] Those skilled in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

Claims

1. A tooth color recognition method based on image processing, characterized by, The method comprises: segmenting an oral image, and obtaining a single tooth image according to a result of the segmentation and the oral image; obtaining saturation of each pixel point in the single tooth image; determining a target color corresponding to the single tooth image according to the saturation of each pixel point in the single tooth image; determining a target color number corresponding to the target color according to the target color, wherein the target color number is a tooth color corresponding to the single tooth image; wherein the target color corresponding to the single tooth image is determined according to the saturation of each pixel point in the single tooth image, comprising: calculating a to-be-tested color corresponding to a pixel point with the most same saturation in the single tooth image according to the saturation of each pixel point in the single tooth image; converting the to-be-tested color to an RGB color space to obtain coordinates of the to-be-tested color in the RGB color space; determining the target color according to the coordinates of the to-be-tested color in the RGB color space.

2. The method of claim 1, wherein, The target color is determined according to the coordinates of the to-be-tested color in the RGB color space, comprising: judging whether the coordinates of the to-be-tested color in the RGB color space are within a preset range; if the coordinates of the to-be-tested color in the RGB color space are within the preset range, the to-be-tested color is determined as the target color.

3. The method according to any one of claims 1 to 2, characterized in that, Before the oral image is segmented, the method further comprises: obtaining a preset tooth color palette, the tooth color palette comprising a plurality of color numbers and color information corresponding to each color number, wherein the color information comprises coordinates of a color corresponding to each color number in the RGB color space.

4. The method of claim 3, wherein, The target color number corresponding to the target color is determined according to the target color, comprising: determining a plurality of Euclidean distances by a KNN maximum value neighbor algorithm, the plurality of Euclidean distances being Euclidean distances between the target color and coordinates of each color number in the RGB color space in the tooth color palette; determining the target color number of the target color according to the plurality of Euclidean distances.

5. The method of claim 4, wherein, The target color number of the target color is determined according to the plurality of Euclidean distances, comprising: determining a first color number in the tooth color palette according to the plurality of Euclidean distances, wherein a Euclidean distance between the first color number and the coordinates of the target color in the RGB color space is the smallest; determining the target color number of the target color according to the first color number.

6. The method of claim 5, wherein, The target color number of the target color is determined according to the first color number, comprising: comparing a size relationship between the Euclidean distance between the first color number and the coordinates of the target color in the RGB color space and a first set value; if the Euclidean distance between the first color number and the coordinates of the target color in the RGB color space is less than or equal to the first set value, the first color number is determined as the target color number of the target color.

7. An image processing-based tooth color recognition apparatus, characterized by, The processing unit is configured to: segment an oral image, and obtain a single tooth image according to a result of the segmentation and the oral image; obtain saturation of each pixel point in the single tooth image; According to the saturation of each pixel point in the single tooth image, a target color corresponding to the single tooth image is determined, comprising: According to the saturation of each pixel point in the single tooth image, a target color corresponding to the single tooth image is determined, comprising: According to the saturation of each pixel point in the single tooth image, a target color corresponding to the single tooth image is determined, comprising: According to the target color, a target color number corresponding to the target color is determined, wherein the target color number is a tooth color corresponding to the single tooth image. The processor executes the computer program to realize the method of any one of claims 1 to 6.

8. A processing device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The computer program is executed by the processor to realize the method of any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 8. ​

Citation Information

Patent Citations

  • Tooth color number identification method and device, equipment and storage medium

    CN114419052A