A method and system for detecting tooth crown surface defects
By preprocessing the crown surface image and adaptively adjusting the LBP histogram, the problem of robustness of caries detection under the influence of light is solved, and the accuracy and detail resolution of crown surface defect detection are improved.
Patent Information
- Application Number
- CN202410873991.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2044-07-02
AI Technical Summary
The existing technology is difficult to improve the robustness of caries detection on the crown surface under the influence of light, resulting in unclear boundaries between caries and surrounding tissue, making detection difficult.
By acquiring the crown surface image, preprocessing and analyzing the morphological regularity of the suspected caries defect area are performed, the neighborhood range of the LBP histogram is adaptively adjusted, and the LBP image is constructed for defect detection.
It improves the accuracy of crown surface defect detection while overcoming the influence of light, adapts to the size and shape of different caries defect areas, and enhances the resolution of details and the coverage of texture information.
Smart Images

Figure CN118429330B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image data processing, and in particular to a method and system for detecting surface defects of tooth crowns. Background Art
[0002] Dental caries is one of the most common defects on the tooth surface. It is caused by acid erosion produced by bacteria on the tooth surface. Dental caries usually appear as plaques on the tooth surface. In severe cases, it may form holes. If not treated in time, it may lead to tooth decay, infection, or even loss. Therefore, by regularly testing the tooth surface for dental caries, dental caries can be detected and treated in time to protect the health of teeth.
[0003] At present, the medical industry usually uses image processing related technologies to identify and locate defects such as caries on the crown surface. Specifically: high-quality crown surface images are obtained through devices such as oral endoscopes, X-ray imaging or ordinary digital cameras, and the defect area is located and detected through threshold segmentation or edge detection after preprocessing operations. However, in the actual detection process, changes in illumination when obtaining crown surface images will cause changes in light reflection on the tooth surface, thereby affecting the location or identification of caries areas. That is, different light sources and lighting angles will produce different results. Crown surface images under strong or weak light conditions may cause unclear boundaries between caries and surrounding tissues, making detection difficult.
[0004] Therefore, how to improve the robustness of crown surface caries detection under the influence of light becomes an urgent problem to be solved. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a method and system for detecting defects on the surface of a tooth crown, so as to solve the problem of how to improve the robustness of caries detection on the surface of a tooth crown under the influence of light.
[0006] In a first aspect, an embodiment of the present invention provides a method for detecting surface defects of a tooth crown, the method comprising the following steps:
[0007] Acquire a crown surface image, pre-process the crown surface image to obtain a corresponding grayscale image, and identify and detect a suspected caries defect area in the grayscale image;
[0008] According to the difference in the number of pixels contained in the suspected caries defect area and the grayscale image, the morphological regularity of the suspected caries defect area is obtained, and according to the morphological regularity of the suspected caries defect area, a reference neighborhood range of the suspected caries defect area is obtained for calculating the LBP value of each pixel in the suspected caries defect area;
[0009] Constructing a corresponding LBP histogram according to the LBP value of each pixel point in the suspected caries defect area, obtaining a distribution characteristic value of the LBP histogram, and adaptively adjusting a reference neighborhood range of the suspected caries defect area according to the distribution characteristic value of the LBP histogram to obtain an optimal neighborhood range corresponding to the suspected caries defect area;
[0010] According to the optimal neighborhood range corresponding to the suspected caries defect area in the grayscale image and the preset neighborhood range corresponding to the non-suspected caries defect area in the grayscale image, an LBP image of the grayscale image is obtained, and defect detection on the crown surface is performed based on the LBP image.
[0011] Preferably, the step of obtaining the degree of morphological regularity of the suspected caries defect area according to the difference in the number of pixels contained in the suspected caries defect area and the grayscale image includes:
[0012] Respectively counting the number of first pixels contained in the suspected caries defect area and the number of second pixels contained in the grayscale image, and normalizing the ratio between the number of the first pixels and the number of the second pixels to obtain a corresponding normalized value;
[0013] Obtaining a first region area of the suspected caries defect region, obtaining a convex hull area corresponding to the suspected caries defect region using a convex hull algorithm, and obtaining an area ratio between the first region area and the convex hull area;
[0014] A weighted sum is performed on the normalized value and the area ratio, and the corresponding result is used as the morphological regularity of the suspected caries defect area.
[0015] Preferably, obtaining a reference neighborhood range of the suspected caries defect area according to the morphological regularity of the suspected caries defect area includes:
[0016] Obtain a preset morphological regularity threshold. If the morphological regularity of the suspected caries defect area is greater than the morphological regularity threshold, the reference neighborhood range of the suspected caries defect area is a first preset range; if the morphological regularity of the suspected caries defect area is less than or equal to the morphological regularity threshold, the reference neighborhood range of the suspected caries defect area is a second preset range.
[0017] Preferably, the obtaining of the distribution characteristic value of the LBP histogram includes:
[0018] According to the peak distribution in the LBP histogram, obtaining the peak distribution characteristic value of the LBP histogram, and according to the abscissa value distribution in the LBP histogram, obtaining the LBP distribution characteristic value of the LBP histogram;
[0019] A difference between a constant 1 and an LBP distribution characteristic value of the LBP histogram is obtained, and a mean value between the difference and a peak distribution characteristic value of the LBP histogram is obtained as a distribution characteristic value of the LBP histogram.
[0020] Preferably, obtaining the peak distribution characteristic value of the LBP histogram according to the peak distribution in the LBP histogram includes:
[0021] Obtaining a maximum peak value in the LBP histogram, calculating a mean of the ordinate values according to each ordinate value in the LBP histogram, obtaining a subtraction result between the maximum peak value and the mean of the ordinate values, substituting the negative number of the subtraction result into an exponential function with a natural constant as the base, and obtaining a corresponding exponential function result;
[0022] According to the abscissa value corresponding to each peak value in the LBP histogram, respectively calculate the absolute value of the difference between the abscissa values corresponding to two adjacent peak values to obtain an average value of the absolute values of the difference, and perform normalization processing on the average value of the absolute values of the difference to obtain a corresponding normalization processing result;
[0023] The exponential function result and the normalization processing result are weightedly summed, and the obtained result is used as the peak distribution characteristic value of the LBP histogram.
[0024] Preferably, obtaining the LBP distribution characteristic value of the LBP histogram according to the distribution of the abscissa values in the LBP histogram includes:
[0025] According to a first horizontal coordinate value difference between the maximum horizontal coordinate value and the minimum horizontal coordinate value in the LBP histogram, according to a reference neighborhood range of the suspected caries defect area, a corresponding LBP value range is obtained, an extreme difference value between the maximum value and the minimum value in the LBP value range is obtained, and a ratio between the first horizontal coordinate value difference and the extreme difference value is obtained;
[0026] The ratio is rounded up to obtain a rounding result, and the opposite number of the rounding result is substituted into an exponential function with a natural constant as the base, and the corresponding exponential function result is used as the LBP distribution feature value of the LBP histogram.
[0027] Preferably, the step of adaptively adjusting the reference neighborhood range of the suspected caries defect area according to the distribution characteristic value of the LBP histogram to obtain the optimal neighborhood range corresponding to the suspected caries defect area includes:
[0028] Obtaining a preset first distribution characteristic value threshold and a second distribution characteristic value threshold, wherein the first distribution characteristic value threshold is greater than the second distribution characteristic value threshold, and if the distribution characteristic value of the LBP histogram is greater than the first distribution characteristic value threshold, reducing the reference neighborhood range of the suspected caries defect area by a preset level, and using the reduced reference neighborhood range as the optimal neighborhood range corresponding to the suspected caries defect area;
[0029] If the distribution characteristic value of the LBP histogram is less than the second distribution characteristic value threshold, the reference neighborhood range of the suspected caries defect area is increased by a preset level, and the increased reference neighborhood range is used as the optimal neighborhood range corresponding to the suspected caries defect area;
[0030] If the distribution eigenvalue of the LBP histogram is less than or equal to the first distribution eigenvalue threshold and greater than or equal to the second distribution eigenvalue threshold, the reference neighborhood range is used as the optimal neighborhood range corresponding to the suspected caries defect area.
[0031] Preferably, the step of acquiring the LBP image of the grayscale image according to the optimal neighborhood range corresponding to the suspected caries defect area in the grayscale image and the preset neighborhood range corresponding to the non-suspected caries defect area in the grayscale image comprises:
[0032] For any pixel point in the grayscale image, if the pixel point is in the suspected caries defect area, the neighborhood range of the pixel point is the optimal neighborhood range corresponding to the suspected caries defect area; if the pixel point is not in the suspected caries defect area, the neighborhood range of the pixel point is the preset neighborhood range;
[0033] According to the neighborhood range of each pixel in the grayscale image, the LBP value of the corresponding pixel is calculated, and according to the LBP value of each pixel in the grayscale image, the LBP image of the grayscale image is obtained.
[0034] In a second aspect, an embodiment of the present invention provides a system for detecting surface defects of a tooth crown, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein when the processor executes the computer program, it implements a method for detecting surface defects of a tooth crown as described in the first aspect.
[0035] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0036] The present invention obtains a crown surface image, pre-processes the crown surface image to obtain a corresponding grayscale image, identifies and detects a suspected caries defect area in the grayscale image; obtains the morphological regularity of the suspected caries defect area according to the difference in the number of pixel points contained in the suspected caries defect area and the grayscale image; obtains a reference neighborhood range of the suspected caries defect area according to the morphological regularity of the suspected caries defect area, which is used to calculate the LBP value of each pixel point in the suspected caries defect area; obtains a reference neighborhood range of the suspected caries defect area according to the morphological regularity of the suspected caries defect area; obtains a reference neighborhood range of the suspected caries defect area according to the morphological regularity of each pixel point in .... The LBP values of the pixels are used to construct the corresponding LBP histogram, the distribution characteristic value of the LBP histogram is obtained, and the reference neighborhood range of the suspected caries defect area is adaptively adjusted according to the distribution characteristic value of the LBP histogram to obtain the optimal neighborhood range corresponding to the suspected caries defect area; the LBP image of the grayscale image is obtained according to the optimal neighborhood range corresponding to the suspected caries defect area in the grayscale image and the preset neighborhood range corresponding to the non-suspected caries defect area in the grayscale image, and the defect detection of the crown surface is performed according to the LBP image. Among them, the size of the reference neighborhood range of each pixel in the grayscale image when using the LBP algorithm is obtained according to the size and shape of the suspected caries defect area in the grayscale image, for a larger suspected caries defect area, a larger neighborhood window range is used to cover more texture information, and for a smaller suspected caries defect area, a smaller neighborhood window range is used to improve the resolution of details, thereby obtaining a more realistic LBP image, and improving the accuracy of crown surface defect detection according to the LBP image while overcoming the interference of light. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0038] Figure 1 This is a method flow chart of a method for detecting surface defects of a tooth crown provided in Example 1 of the present invention. DETAILED DESCRIPTION
[0039] Embodiments of the present disclosure are described in detail below, and examples of the embodiments are shown in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, but should not be understood as limiting the present disclosure.
[0040] It should be noted that the terms "first", "second", etc. in the specification of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure.
[0041] In order to illustrate the technical solution of the present invention, specific embodiments are provided below for illustration.
[0042] See also Figure 1 , is a method flow chart of a method for detecting a defect on a crown surface provided by the first embodiment of the present invention, such as Figure 1 As shown, the method may include:
[0043] Step S101, obtaining a crown surface image, preprocessing the crown surface image to obtain a corresponding grayscale image, and identifying and detecting a suspected caries defect area in the grayscale image.
[0044] Use appropriate shooting equipment (such as an oral intraoral camera, an X-ray imaging device or an ordinary digital camera) to obtain an image of the crown surface under appropriate lighting conditions, which is recorded as the crown surface image, ensuring that the image is clear and properly exposed so that subsequent processing steps can be carried out accurately. After obtaining the crown surface image, the crown surface image is preprocessed. The specific preprocessing method is as follows: first, the crown surface image can be corrected by image rotation, cropping or perspective transformation to ensure that the crown surface image is in the correct position and direction; then, the crown surface image after image correction is denoised using denoising methods such as median filtering and Gaussian filtering to reduce the interference of noise data; finally, the denoised crown surface image is grayed to convert the color image into a grayscale image. At this point, the grayscale image corresponding to the crown surface image is obtained, and each means in the preprocessing method belongs to the prior art and will not be described in detail here.
[0045] After obtaining the grayscale image, the suspected caries defect area in the grayscale image is identified and located using traditional detection means, and marked. The traditional detection means can be feature extraction, that is, extracting caries features from the grayscale image for identification. These features can be edges, shapes, colors, etc. In caries identification, color features (such as the color of the caries area compared with the surrounding normal teeth) can also be used. Machine learning, deep learning or traditional image classification algorithms can be used to analyze and classify the extracted features, train a neural network model to distinguish between healthy tooth surfaces and caries areas, use supervised learning technology, provide image samples with known labels, and let the neural network model learn to identify tooth caries patterns. The identification and detection of suspected caries defect areas belongs to the existing technology and will not be described in detail here. So far, the suspected caries defect area in the grayscale image has been obtained.
[0046] Step S102, according to the difference in the number of pixels contained in the suspected caries defect area and the grayscale image, the morphological regularity of the suspected caries defect area is obtained, and according to the morphological regularity of the suspected caries defect area, the reference neighborhood range of the suspected caries defect area is obtained, which is used to calculate the LBP value of each pixel in the suspected caries defect area.
[0047] The purpose of the present invention is to detect crown surface defects based on LBP images, but in the LBP algorithm, the setting value of the neighborhood range size of the pixel point is an important parameter, which directly affects the extraction and description of local texture features. The setting of neighborhood range parameters of different pixel points can directly lead to very different feature analysis results. Therefore, it is necessary to adaptively obtain the neighborhood range of each pixel point in the grayscale image according to the size and shape characteristics of the suspected caries defect area in the grayscale image, so as to improve the accuracy of crown surface defect detection while overcoming the influence of light by extracting effective local texture features.
[0048] First, according to the size and shape of the suspected caries defect area, the neighborhood range corresponding to each pixel in the suspected caries defect area is obtained. For larger suspected caries defect areas, a larger neighborhood window range is used to cover more texture information, while for smaller suspected caries defect areas, a smaller neighborhood window range is used to improve the resolution of details. Specifically, according to the difference in the number of pixels contained in the suspected caries defect area and the grayscale image, the morphological regularity of the suspected caries defect area is obtained, and then according to the morphological regularity of the suspected caries defect area, the reference neighborhood range of the suspected caries defect area is obtained to calculate the LBP value of each pixel in the suspected caries defect area.
[0049] Among them, the method for obtaining the morphological regularity of the suspected caries defect area is:
[0050] Respectively counting the number of first pixels contained in the suspected caries defect area and the number of second pixels contained in the grayscale image, and normalizing the ratio between the number of the first pixels and the number of the second pixels to obtain a corresponding normalized value;
[0051] Obtaining a first region area of the suspected caries defect region, obtaining a convex hull area corresponding to the suspected caries defect region using a convex hull algorithm, and obtaining an area ratio between the first region area and the convex hull area;
[0052] A weighted sum is performed on the normalized value and the area ratio, and the corresponding result is used as the morphological regularity of the suspected caries defect area.
[0053] In one embodiment, the calculation expression for the morphological regularity of the suspected caries defect area is:
[0054]
[0055] in, represents the morphological regularity of the suspected caries defect area O, Norm() represents the normalization function, M(O) represents the number of pixels contained in the suspected caries defect area O, N represents the number of pixels contained in the grayscale image, S(O) represents the area of the suspected caries defect area O, represents the convex hull area corresponding to the suspected caries defect area O, represents the first weight, Represents the second weight.
[0056] Preferably, this solution provides reference weights: .
[0057] It should be noted that The value of is used to characterize the proportion of suspected caries defect areas. The larger the proportion, the larger the suspected caries defect area is relative to the crown surface image, and the greater the morphological regularity of the corresponding suspected caries defect area. The value of is used to indicate the regularity of the connected domain of the suspected caries defect area. The connected domain of regular shape usually has a convex hull area ratio close to 1, while the connected domain of irregular shape may have a smaller ratio. Therefore, The larger the value, the more obvious the morphological characteristics of the defect area are, such as larger area and more regular features.
[0058] Among them, according to the morphological regularity of the suspected caries defect area, the reference neighborhood range of the suspected caries defect area is obtained, including:
[0059] Obtain a preset morphological regularity threshold. If the morphological regularity of the suspected caries defect area is greater than the morphological regularity threshold, the reference neighborhood range of the suspected caries defect area is a first preset range; if the morphological regularity of the suspected caries defect area is less than or equal to the morphological regularity threshold, the reference neighborhood range of the suspected caries defect area is a second preset range.
[0060] In one embodiment, for larger caries defect areas, a larger neighborhood window can be used to cover more texture information; and for smaller caries defect areas, a smaller neighborhood window can be used to improve the resolution of details. Secondly, for areas with more regular shapes, selecting a smaller LBP pixel neighborhood can more finely describe the subtle features of the area, avoiding excessive redundant information, which helps to improve the expressiveness of texture features and makes the texture description of the area more accurate. On the contrary, for areas with irregular shapes, a larger LBP pixel neighborhood can be selected to capture a larger range of texture information, which can better cover the features of the entire area and improve the robustness and discrimination of the features.
[0061] Based on the above analysis, the reference neighborhood range of the suspected caries defect area can be obtained according to the morphological regularity of the suspected caries defect area. Generally speaking, the neighborhood range size of the pixel point in the LBP algorithm can be selected in different sizes. Common sizes include but are not limited to: 3×3 neighborhood, the central pixel is compared with the surrounding 8 pixels, a total of 9 pixels, which is the most basic neighborhood range size in the LBP algorithm and is suitable for the detection of smaller texture details; 5×5 neighborhood, the central pixel is compared with the surrounding 24 pixels, a total of 25 pixels, compared with the 3×3 neighborhood, the 5×5 neighborhood can better capture medium-scale texture features; 7×7 neighborhood, the central pixel is compared with the surrounding 48 pixels, a total of 49 pixels, this larger neighborhood range size is suitable for larger-scale texture feature extraction. Therefore, the morphological regularity threshold is set to 0.5. If the morphological regularity of the suspected caries defect area is greater than 0.5, the reference neighborhood range of the suspected caries defect area is a 7×7 neighborhood; if the morphological regularity of the suspected caries defect area is less than or equal to 0.5, the reference neighborhood range of the suspected caries defect area is a 5×5 neighborhood.
[0062] At this point, the reference neighborhood range of the suspected caries defect area can be obtained.
[0063] Step S103, constructing a corresponding LBP histogram according to the LBP value of each pixel point in the suspected caries defect area, obtaining the distribution characteristic value of the LBP histogram, and adaptively adjusting the reference neighborhood range of the suspected caries defect area according to the distribution characteristic value of the LBP histogram to obtain the optimal neighborhood range corresponding to the suspected caries defect area.
[0064] After obtaining the reference neighborhood range of the suspected caries defect area, the reference neighborhood range of the suspected caries defect area is used as the reference neighborhood range of each pixel point in the suspected caries defect area, and then according to the reference neighborhood range of each pixel point in the suspected caries defect area, the LBP algorithm is used to obtain the LBP value of each pixel point in the suspected caries defect area to construct an LBP histogram of the suspected caries defect area, wherein the horizontal axis in the LBP histogram represents the LBP value and the vertical axis represents the number of times the LBP value appears, wherein the method for obtaining the LBP value is a well-known technology and will not be repeated here.
[0065] After constructing the LBP histogram, it is necessary to analyze the distribution characteristics on the LBP histogram, so as to adaptively adjust the reference neighborhood range of the suspected caries defect area according to the analysis results, so as to ensure that the neighborhood range of the suspected caries defect area is more in line with the actual situation. Therefore, the distribution characteristics on the LBP histogram are first analyzed to obtain the distribution characteristic value of the LBP histogram, wherein the method for obtaining the distribution characteristic value is:
[0066] (1) According to the peak distribution in the LBP histogram, a peak distribution feature value of the LBP histogram is obtained.
[0067] Specifically, the maximum peak value in the LBP histogram is obtained, and according to each ordinate value in the LBP histogram, the mean ordinate value is calculated, and the subtraction result between the maximum peak value and the mean ordinate value is obtained, and the negative number of the subtraction result is substituted into an exponential function with a natural constant as the base to obtain a corresponding exponential function result;
[0068] According to the abscissa value corresponding to each peak value in the LBP histogram, respectively calculate the absolute value of the difference between the abscissa values corresponding to two adjacent peak values to obtain an average value of the absolute values of the difference, and perform normalization processing on the average value of the absolute values of the difference to obtain a corresponding normalization processing result;
[0069] The exponential function result and the normalization processing result are weightedly summed, and the obtained result is used as the peak distribution characteristic value of the LBP histogram.
[0070] In one embodiment, the calculation expression of the peak distribution characteristic value of the LBP histogram is:
[0071]
[0072] in, It represents the peak distribution characteristic value of the LBP histogram, exp() represents the exponential function with the natural constant as the base, represents the maximum peak value (maximum ordinate value) in the LBP histogram, n represents the number of all ordinate values in the LBP histogram, represents the i-th ordinate value, Norm() represents the normalization function, and m represents the number of peaks in the LBP histogram. represents the horizontal coordinate value corresponding to the j-th peak, represents the abscissa value corresponding to the j+1th peak, || represents the absolute value sign, represents the third weight, Represents the fourth weight.
[0073] Preferably, this solution provides reference weights: .
[0074] It should be noted that The larger the value, the more obvious the peak in the LBP histogram. Conversely, the less obvious the peak feature in the LBP histogram. When there is no obvious peak, it indicates that the reference neighborhood range of the suspected caries defect area is too large, resulting in insufficient capture of details. It is possible to consider reducing the reference neighborhood range of the suspected caries defect area to improve the resolution of details. Therefore, The larger the value of , the smaller the peak distribution characteristic value of the LBP histogram, indicating that there is no obvious peak in the LBP histogram; It is used to characterize the distance distribution between peaks in the LBP histogram. The larger the distance between peaks, the larger the peak distribution characteristic value of the corresponding LBP histogram, which means that there is no obvious boundary between the different texture features obtained in the reference neighborhood range of the suspected caries defect area, which means that the difference between different textures is more significant. This may be caused by the fact that the reference neighborhood range of the suspected caries defect area is too large. In this case, the reference neighborhood range of the suspected caries defect area should be reduced.
[0075] (2) According to the distribution of the horizontal coordinate values in the LBP histogram, an LBP distribution feature value of the LBP histogram is obtained.
[0076] Specifically, according to a first horizontal coordinate value difference between a maximum horizontal coordinate value and a minimum horizontal coordinate value in the LBP histogram, according to a reference neighborhood range of the suspected caries defect area, a corresponding LBP value range is obtained, an extreme difference value between a maximum value and a minimum value in the LBP value range is obtained, and a ratio between the first horizontal coordinate value difference and the extreme difference value is obtained;
[0077] The ratio is rounded up to obtain a rounding result, and the opposite number of the rounding result is substituted into an exponential function with a natural constant as the base, and the corresponding exponential function result is used as the LBP distribution feature value of the LBP histogram.
[0078] In one embodiment, the calculation expression of the LBP distribution characteristic value of the LBP histogram is:
[0079]
[0080] in, represents the LBP distribution characteristic value of the LBP histogram, exp() represents the exponential function with a natural constant as the base, Represents the difference between the maximum and minimum abscissa values in the LBP histogram. The difference between the maximum and minimum values in the LBP value range of the reference neighborhood range representing the suspected caries defect area, Indicates the round-up symbol.
[0081] The LBP value range of the reference neighborhood of the suspected caries defect area is , where p represents the size value of the reference neighborhood range of the suspected caries defect area, for example: the size value of 3×3 neighborhood is 3, the size value of 5×5 neighborhood is 5, and the size value of 7×7 neighborhood is 7.
[0082] It should be noted that The value of is used to characterize the distribution range of the LBP histogram on the horizontal axis. If the distribution range of the LBP histogram is too narrow, it may mean that the reference neighborhood range of the caries-like defect area is too small, resulting in insufficient local texture features. You can try to increase the reference neighborhood range size of the caries-like defect area to cover more texture information. Therefore, The smaller the value of , the smaller the LBP distribution characteristic value of the LBP histogram, and the smaller the LBP distribution characteristic value of the corresponding LBP histogram.
[0083] (3) Obtaining a difference between a constant 1 and an LBP distribution feature value of the LBP histogram, and obtaining a mean value between the difference and a peak distribution feature value of the LBP histogram as a distribution feature value of the LBP histogram.
[0084] Specifically, the calculation expression of the distribution characteristic value of the LBP histogram is:
[0085]
[0086] in, Represents the distribution characteristic value of the LBP histogram, avg() represents the mean function, Represents the peak distribution characteristic value of the LBP histogram, Represents the LBP distribution feature value of the LBP histogram, and 1 represents a constant.
[0087] It should be noted that the larger the peak distribution characteristic value of the LBP histogram, the smaller the LBP distribution characteristic value of the LBP histogram, corresponding to The larger the value is, the smaller the reference neighborhood range of the suspected caries defect area needs to be.
[0088] Furthermore, after obtaining the distribution characteristic value of the LBP histogram of the suspected caries defect area, the reference neighborhood range of the suspected caries defect area can be adaptively adjusted according to the distribution characteristic value of the LBP histogram to obtain the optimal neighborhood range corresponding to the suspected caries defect area. The specific adjustment method is:
[0089] Obtaining a preset first distribution characteristic value threshold and a second distribution characteristic value threshold, wherein the first distribution characteristic value threshold is greater than the second distribution characteristic value threshold, and if the distribution characteristic value of the LBP histogram is greater than the first distribution characteristic value threshold, reducing the reference neighborhood range of the suspected caries defect area by a preset level, and using the reduced reference neighborhood range as the optimal neighborhood range corresponding to the suspected caries defect area;
[0090] If the distribution characteristic value of the LBP histogram is less than the second distribution characteristic value threshold, the reference neighborhood range of the suspected caries defect area is increased by a preset level, and the increased reference neighborhood range is used as the optimal neighborhood range corresponding to the suspected caries defect area;
[0091] If the distribution eigenvalue of the LBP histogram is less than or equal to the first distribution eigenvalue threshold and greater than or equal to the second distribution eigenvalue threshold, the reference neighborhood range is used as the optimal neighborhood range corresponding to the suspected caries defect area.
[0092] In one embodiment, the first distribution eigenvalue threshold is set to 0.7, and the second distribution eigenvalue threshold is set to 0.3. When the distribution eigenvalue of the LBP histogram is greater than 0.7, the reference neighborhood range of the suspected caries defect area is reduced, for example: the reference neighborhood range of the suspected caries defect area is a 5×5 neighborhood, and after reducing the reference neighborhood range, a 3×3 neighborhood is selected as the optimal neighborhood range corresponding to the suspected caries defect area; when the distribution eigenvalue of the LBP histogram is less than 0.3, the reference neighborhood range of the suspected caries defect area is increased, for example: the reference neighborhood range of the suspected caries defect area is a 5×5 neighborhood, and after increasing the reference neighborhood range, a 7×7 neighborhood is selected as the optimal neighborhood range corresponding to the suspected caries defect area; when the distribution eigenvalue of the LBP histogram is between 0.7 and 0.3, the reference neighborhood range of the suspected caries defect area is not adjusted, and the reference neighborhood range of the suspected caries defect area at this time is the optimal neighborhood range.
[0093] At this point, the optimal neighborhood range corresponding to the suspected caries defect area is obtained.
[0094] Step S104, obtaining an LBP image of the grayscale image according to the optimal neighborhood range corresponding to the suspected caries defect area in the grayscale image and the preset neighborhood range corresponding to the non-suspected caries defect area in the grayscale image, and performing defect detection on the crown surface according to the LBP image.
[0095] After obtaining the optimal neighborhood range corresponding to the suspected caries defect area in the grayscale image, the LBP image of the grayscale image can be obtained according to the optimal neighborhood range corresponding to the suspected caries defect area in the grayscale image and the preset neighborhood range corresponding to the non-suspected caries defect area in the grayscale image, specifically:
[0096] For any pixel point in the grayscale image, if the pixel point is in the suspected caries defect area, the neighborhood range of the pixel point is the optimal neighborhood range corresponding to the suspected caries defect area; if the pixel point is not in the suspected caries defect area, the neighborhood range of the pixel point is the preset neighborhood range;
[0097] According to the neighborhood range of each pixel in the grayscale image, the LBP value of the corresponding pixel is calculated, and according to the LBP value of each pixel in the grayscale image, the LBP image of the grayscale image is obtained.
[0098] In one embodiment, for the pixel points in the grayscale image that belong to the suspected caries defect area, the neighborhood range is set to the optimal neighborhood range corresponding to the suspected caries defect area, and for the pixel points in the grayscale image that do not belong to the suspected caries defect area, the neighborhood range is set to a 3×3 neighborhood, thereby obtaining the optimal neighborhood range of each pixel point in the grayscale image in the process of obtaining an LBP image of the same size as the grayscale image using the LBP algorithm. Then, according to the neighborhood range of each pixel point in the grayscale image, the LBP value of the corresponding pixel point is calculated, and finally, according to the LBP value of each pixel point in the grayscale image, the LBP image of the grayscale image is obtained, wherein obtaining the LBP image using the LBP algorithm belongs to the prior art and will not be repeated here.
[0099] After obtaining the LBP image of the grayscale image, the defect detection of the crown surface can be performed according to the LBP image, wherein the defect detection of the crown surface according to the LBP image is not the focus of the present invention and will not be described in detail here. For example: select a suitable classifier, such as a support vector machine (SVM), a convolutional neural network (CNN), etc., and train it using the labeled training data (LBP image set) to perform defect detection.
[0100] In summary, the embodiment of the present invention obtains a crown surface image, pre-processes the crown surface image to obtain a corresponding grayscale image, identifies and detects a suspected caries defect area in the grayscale image; obtains the morphological regularity of the suspected caries defect area according to the difference in the number of pixels contained in the suspected caries defect area and the grayscale image; obtains a reference neighborhood range of the suspected caries defect area according to the morphological regularity of the suspected caries defect area, and calculates the LBP value of each pixel in the suspected caries defect area; and obtains a reference neighborhood range of the suspected caries defect area according to the morphological regularity of the suspected caries defect area. The LBP value of each pixel in the domain is used to construct a corresponding LBP histogram, and the distribution characteristic value of the LBP histogram is obtained. The reference neighborhood range of the suspected caries defect area is adaptively adjusted according to the distribution characteristic value of the LBP histogram to obtain the optimal neighborhood range corresponding to the suspected caries defect area; the LBP image of the grayscale image is obtained according to the optimal neighborhood range corresponding to the suspected caries defect area in the grayscale image and the preset neighborhood range corresponding to the non-suspected caries defect area in the grayscale image, and the defect detection of the crown surface is performed according to the LBP image. Among them, the size of the reference neighborhood range of each pixel in the grayscale image when using the LBP algorithm is obtained according to the size and shape of the suspected caries defect area in the grayscale image. For a larger suspected caries defect area, a larger neighborhood window range is used to cover more texture information, and for a smaller suspected caries defect area, a smaller neighborhood window range is used to improve the resolution of details, thereby obtaining a more realistic LBP image, and improving the accuracy of crown surface defect detection according to the LBP image while overcoming the interference of light.
[0101] Based on the same inventive concept as the above method, an embodiment of the present invention also provides a crown surface defect detection system, including a memory, a processor, and a computer program stored in the memory and running on the processor, and when the processor executes the computer program, the steps of any one of the above-mentioned crown surface defect detection methods are implemented.
[0102] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.
Claims
1. A method for detecting surface defects of a tooth crown, characterized in that: The method comprises: Acquire a crown surface image, pre-process the crown surface image to obtain a corresponding grayscale image, and identify and detect a suspected caries defect area in the grayscale image; According to the difference in the number of pixels contained in the suspected caries defect area and the grayscale image, the morphological regularity of the suspected caries defect area is obtained, and according to the morphological regularity of the suspected caries defect area, a reference neighborhood range of the suspected caries defect area is obtained for calculating the LBP value of each pixel in the suspected caries defect area; Constructing a corresponding LBP histogram according to the LBP value of each pixel point in the suspected caries defect area, obtaining a distribution characteristic value of the LBP histogram, and adaptively adjusting a reference neighborhood range of the suspected caries defect area according to the distribution characteristic value of the LBP histogram to obtain an optimal neighborhood range corresponding to the suspected caries defect area; Acquire an LBP image of the grayscale image according to an optimal neighborhood range corresponding to a suspected caries defect area in the grayscale image and a preset neighborhood range corresponding to a non-suspected caries defect area in the grayscale image, and perform defect detection on the crown surface according to the LBP image; The obtaining of the distribution characteristic value of the LBP histogram includes: Obtaining a maximum peak value in the LBP histogram, calculating a mean of the ordinate values according to each ordinate value in the LBP histogram, obtaining a subtraction result between the maximum peak value and the mean of the ordinate values, substituting the negative number of the subtraction result into an exponential function with a natural constant as the base, and obtaining a corresponding exponential function result; According to the abscissa value corresponding to each peak value in the LBP histogram, respectively calculate the absolute value of the difference between the abscissa values corresponding to two adjacent peak values to obtain an average value of the absolute values of the difference, and perform normalization processing on the average value of the absolute values of the difference to obtain a corresponding normalization processing result; Performing weighted summation on the exponential function result and the normalization processing result, and obtaining the result as the peak distribution characteristic value of the LBP histogram; According to a first horizontal coordinate value difference between the maximum horizontal coordinate value and the minimum horizontal coordinate value in the LBP histogram, according to a reference neighborhood range of the suspected caries defect area, a corresponding LBP value range is obtained, an extreme difference value between the maximum value and the minimum value in the LBP value range is obtained, and a ratio between the first horizontal coordinate value difference and the extreme difference value is obtained; Rounding up the ratio to obtain a rounding result, substituting the opposite of the rounding result into an exponential function with a natural constant as a base, and using the corresponding exponential function result as the LBP distribution feature value of the LBP histogram; Obtaining a difference between a constant 1 and an LBP distribution characteristic value of the LBP histogram, and obtaining a mean value between the difference and a peak distribution characteristic value of the LBP histogram as a distribution characteristic value of the LBP histogram; The step of adaptively adjusting the reference neighborhood range of the suspected caries defect area according to the distribution characteristic value of the LBP histogram to obtain the optimal neighborhood range corresponding to the suspected caries defect area includes: Obtaining a preset first distribution characteristic value threshold and a second distribution characteristic value threshold, wherein the first distribution characteristic value threshold is greater than the second distribution characteristic value threshold, and if the distribution characteristic value of the LBP histogram is greater than the first distribution characteristic value threshold, reducing the reference neighborhood range of the suspected caries defect area by a preset level, and using the reduced reference neighborhood range as the optimal neighborhood range corresponding to the suspected caries defect area; If the distribution characteristic value of the LBP histogram is less than the second distribution characteristic value threshold, the reference neighborhood range of the suspected caries defect area is increased by a preset level, and the increased reference neighborhood range is used as the optimal neighborhood range corresponding to the suspected caries defect area; If the distribution eigenvalue of the LBP histogram is less than or equal to the first distribution eigenvalue threshold and greater than or equal to the second distribution eigenvalue threshold, the reference neighborhood range is used as the optimal neighborhood range corresponding to the suspected caries defect area.
2. A method for detecting surface defects of a tooth crown according to claim 1, characterized in that: The step of obtaining the morphological regularity of the suspected caries defect area according to the difference in the number of pixels contained in the suspected caries defect area and the grayscale image includes: Respectively counting the number of first pixels contained in the suspected caries defect area and the number of second pixels contained in the grayscale image, and normalizing the ratio between the number of the first pixels and the number of the second pixels to obtain a corresponding normalized value; Obtaining a first region area of the suspected caries defect region, obtaining a convex hull area corresponding to the suspected caries defect region using a convex hull algorithm, and obtaining an area ratio between the first region area and the convex hull area; A weighted sum is performed on the normalized value and the area ratio, and the corresponding result is used as the morphological regularity of the suspected caries defect area.
3. A method for detecting surface defects of a tooth crown according to claim 1, characterized in that: The step of obtaining a reference neighborhood range of the suspected caries defect area according to the morphological regularity of the suspected caries defect area comprises: Obtain a preset morphological regularity threshold. If the morphological regularity of the suspected caries defect area is greater than the morphological regularity threshold, the reference neighborhood range of the suspected caries defect area is a first preset range; if the morphological regularity of the suspected caries defect area is less than or equal to the morphological regularity threshold, the reference neighborhood range of the suspected caries defect area is a second preset range.
4. A method for detecting surface defects of a tooth crown according to claim 1, characterized in that: The step of acquiring the LBP image of the grayscale image according to the optimal neighborhood range corresponding to the suspected caries defect area in the grayscale image and the preset neighborhood range corresponding to the non-suspected caries defect area in the grayscale image comprises: For any pixel point in the grayscale image, if the pixel point is in the suspected caries defect area, the neighborhood range of the pixel point is the optimal neighborhood range corresponding to the suspected caries defect area; if the pixel point is not in the suspected caries defect area, the neighborhood range of the pixel point is the preset neighborhood range; According to the neighborhood range of each pixel in the grayscale image, the LBP value of the corresponding pixel is calculated, and according to the LBP value of each pixel in the grayscale image, the LBP image of the grayscale image is obtained.
5. A tooth crown surface defect detection system, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of a method for detecting surface defects of a dental crown as described in any one of claims 1 to 4 are implemented.
