A method for enhancing small dental X-ray images

Through the combination of gamma transformation, Sobel edge detection, Gaussian filtering and CLAHE algorithm, the problems of poor image quality and unclear details of X-ray small teeth are solved, and effective image enhancement and diagnostic efficiency are improved.

CN114972067BActive Publication Date: 2025-03-14CHONGQING NORMAL UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210394185.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-14
Publication Date
2025-03-14
Estimated Expiration
2042-04-14

AI Technical Summary

Technical Problem

The image quality of the small X-ray films is poor, and the details and texture information of the root edges are unclear, which affects the accuracy of diagnosis and image analysis efficiency.

Method used

Gamma transformation is used to correct the image grayscale, and the Sobel edge detection algorithm and Gaussian high-pass filter are combined to extract detailed feature images and fuse them with the original image. Then, the threshold is adaptively determined based on the characteristics of the grayscale histogram, and the image enhancement is performed using the CLAHE algorithm.

Benefits of technology

The contrast and detailed feature information of X-ray small teeth images are improved, and the visual effect and diagnostic readability of the image are significantly improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114972067B_ABST
    Figure CN114972067B_ABST
Patent Text Reader

Abstract

The present invention relates to a method for enhancing an X-ray dental film image, and belongs to the technical field of medical image enhancement. The method utilizes adaptive gamma transformation to correct the grayscale of an X-ray dental film image, adaptively determines its parameters through the grayscale information of the image, obtains a detail feature image by using a Sobel edge detection algorithm and a Gaussian high-pass filter for the corrected image, and fuses it with the weight of the original X-ray dental film image, and finally adaptively determines the threshold according to the grayscale histogram characteristics, and uses the CLAHE algorithm to enhance the image. The present invention can effectively improve the contrast of a dental film image, and can realize the enhancement of an X-ray dental film image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of medical image enhancement and relates to a method for enhancing a small X-ray dental film image. Background Art

[0002] "X-rays" are used to detect human diseases and facilitate clinical diagnosis and treatment plan formulation. X-ray images are composed of images with different grayscales from black to white. These images with different grayscales reflect the anatomical and pathological conditions of human tissue structures. Therefore, taking into full consideration the particularity of using X-rays to take images, people apply X-rays to oral medicine. X-ray images can clearly show the shape and structure of teeth, and can distinguish between enamel and dentin. Dentin and cementum have the same density. The pulp cavity is low-density inside the tooth, and the crown cavity and root canal are clearly displayed.

[0003] Medical image enhancement is a complex and critical step in the field of medical image processing. X-ray dental films are widely used in various stages of oral treatment due to their advantages such as high efficiency, fast speed, low radiation dose and low price. They are the most widely used examination method in the actual clinical application of stomatology and one of the most commonly used methods. However, the image is affected by many factors such as equipment, lighting conditions and compression, and to a certain extent, problems such as low image contrast and unclear detail features will occur, thus affecting the visual perception of the image by the human eye. Because the internal tissue structures of the oral cavity in the X-ray dental film images sometimes overlap with each other, some tissue structures are not easy to distinguish, which may cause misdiagnosis or missed diagnosis. At the same time, because the distance is fixed and the film size is also fixed, the edge of the root tip is blurred, and the quality of the X-ray dental film image taken is poor. Due to the large number of oral patients, a large number of X-ray dental films will be generated. A single manual analysis will become very time-consuming and may produce a large number of missed samples. Therefore, to achieve the enhancement of oral X-ray dental film images, it is necessary to process the grayscale features in the image.

[0004] In order to highlight the interesting parts of the image and make the main structure of the image clearer, the image needs to be improved. Image enhancement is to make the blurred original image clear by certain means, selectively highlight some interesting features in the image, strengthen the differences between the features of different objects in the image, suppress some uninteresting features, improve the image quality, enrich the image feature information, and facilitate the analysis and understanding of the image by people or machines. Since the grayscale distribution and overall exposure of images in different environments are different, and the individual differences are large, the setting of a single specified threshold will affect the image quality and cannot achieve a more ideal effect.

[0005] Therefore, a new method for enhancing small dental X-ray images is urgently needed. Summary of the invention

[0006] In view of this, the purpose of the present invention is to provide an image enhancement method for small dental X-ray films to solve the problems of poor image quality of small dental X-ray films and unclear detailed texture information of the root edge, effectively improve the quality of root X-ray images, and realize the enhancement of small dental X-ray film images.

[0007] In order to achieve the above object, the present invention provides the following technical solutions:

[0008] A method for enhancing an X-ray dental image is provided. The gamma transform is used to correct the grayscale of the X-ray dental image. The parameters are adaptively determined through the grayscale information of the image. The Sobel edge detection algorithm and the Gaussian high-pass filter are applied to the corrected image to obtain a detail feature image, which is then fused with the original X-ray dental image. Finally, the threshold is adaptively determined according to the grayscale histogram characteristics, and the image is enhanced using CLAHE. The method specifically includes the following steps:

[0009] S1: Convert the original RGB image of the X-ray dental film into the original grayscale image f0(x);

[0010] S2: Use adaptive gamma transformation to adjust the grayscale of the image in step S1 to improve the overall brightness;

[0011] S3: Use the Sobel edge detection algorithm to extract the detail features of the processing result of step S2, and use the Gaussian high-pass filter to remove noise, so as to obtain a more accurate edge detail feature image f1(x) and reduce noise interference;

[0012] S4: image f0(x) and edge detail feature image f1(x) are fused according to the weight fusion ratio α;

[0013] S5: Using the image histogram, find the maximum value of the peak (x1, y1) and the minimum value of the trough (x2, y2) in the histogram, and use these two points to determine the straight line L. Then, on the histogram curve between the peak and the trough, find the farthest distance d from a point to the straight line L, and determine the gray level N here. In order to ensure the overall gray level, the gray mean T of the image is used to obtain the gray range δ of the control image.

[0014] S6: Calculate the optimal threshold W according to δ and N; use the CLAHE algorithm to divide the image into non-overlapping sub-regions, and then reconstruct the grayscale of the non-overlapping sub-regions according to the optimal threshold, so as to obtain an enhanced X-ray small dental film image.

[0015] Further, in step S2, the calculation formula of the adaptive gamma transform method is:

[0016] V o =cV i γ

[0017] Where c is a positive constant; V i Represents the gray level of the input; V o Represents the output grayscale; γ is a positive constant, and the calculation formula is:

[0018]

[0019] Where T represents the grayscale mean of the image, and s represents the distance between T / 255 and 0.5.

[0020] Further, in step S4, the calculation formula for image fusion is:

[0021] g(x)=αf0(x)+(1-α)f1(x)

[0022] Among them, f0(x) represents the original image, f1(x) represents the edge detail feature image, g(x) represents the fused image; α represents the weight fusion ratio, and the calculation formula is:

[0023]

[0024] Among them, I1 and I2 represent the information entropy redundancy of the image occupied by the number of pixels of the gray level at the peak in the original image f0(x) and the edge detail feature image f1(x), respectively;

[0025] The calculation formula of the information entropy redundancy I of the image is:

[0026]

[0027] Among them, R represents the proportion of the number of grayscale pixels Q at the peak in the color histogram of the image to the total number of pixels M, and the expression is

[0028] Further, in step S5, the calculation formula for controlling the grayscale range δ of the image is:

[0029] Further, in step S6, the method for determining the optimal threshold W is:

[0030] The beneficial effects of the present invention are as follows: the present invention improves the contrast of small X-ray dental film images to a certain extent, obtains good image enhancement effect, obtains more detailed feature information, and significantly improves the image visual effect.

[0031] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below in conjunction with the accompanying drawings, wherein:

[0033] Figure 1 This is a flow chart of the method for enhancing small dental X-ray images of the present invention;

[0034] Figure 2 This is a sample image of a small dental X-ray;

[0035] Figure 3 for Figure 2 Corresponding to the enhanced result of the small dental X-ray. DETAILED DESCRIPTION

[0036] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.

[0037] See also Figure 1 to Figure 3 In order to enhance the X-ray small dental film image, it is first necessary to adjust the grayscale of the small dental film image. The nonlinear operation on the grayscale value of the input image can make the grayscale value of the output image exponentially related to the input grayscale value through transformation. The basic form of gamma transformation is shown in formula (1).

[0038] V o =cV i γ (1)

[0039] Where c is a positive constant, V i Represents the gray level of the input; V oRepresents the grayscale of the output; γ is a positive constant, where the value of γ determines the degree of image scaling. Aiming at the defect of manually setting γ in the traditional gamma transform algorithm, the traditional gamma transform algorithm is further improved, γ in the algorithm is set to adaptive, and grayscale correction is considered in combination with the grayscale information of the original image. Its calculation is shown in formula (2).

[0040]

[0041] Among them, T represents the grayscale mean of the image, and s represents the distance between T / 255 and 0.5. In the experiment, the value of c is 1. Through the adaptive gamma transform algorithm, the grayscale values ​​that are too bright or too dark in the image are adjusted so that the grayscale values ​​in the image tend to be within the stable range.

[0042] For the grayscale corrected image, in order to obtain more detailed information as much as possible, the Sobel edge detection algorithm is used to add the weighted difference of the grayscale values ​​of the four areas around each pixel in the image, and the edge is detected at the edge. In the implementation process of the Sobel edge detection algorithm, the 3×3 template is used as the kernel to perform convolution and operation with each pixel point of the gamma transformed improved image to extract the edge. Since dental X-ray images are easily affected by noise, the image edge may have more than one pixel, and the gradient image needs to be processed to remove noise. The Gaussian filter can effectively suppress noise and smooth the image. After the Sobel edge detection and Gaussian high-pass filter processing, the edge detail image f1(x) is obtained. In order to obtain richer and more accurate detail information and facilitate the processing and analysis of dental X-ray medical images, image fusion will be used to highlight the detail features of the image to obtain a better image. The calculation of image fusion is shown in formula (3).

[0043] g(x)=αf0(x)+(1-α)f1(x) (3)

[0044] Among them, α represents the ratio of image fusion, f0(x) represents the original image, f1(x) represents the edge detail feature image, and g(x) represents the weighted image after fusion of the two images. By modifying the value of α (α∈[0,1]), images with different weights can be fused.

[0045] In order to preserve the original information of the original image as much as possible and ensure that the target features of the image are more obvious, appropriate weights are selected for image fusion based on the feature information of the image itself. The image histogram reflects the distribution characteristics of the image. Therefore, when analyzing, the position of the peak is important for the grayscale distribution of the entire image. By counting the color histogram of the image, the number of grayscale pixels Q at the peak is calculated, and its proportion R to the total number of pixels M is calculated. The calculation is shown in formula (4).

[0046]

[0047] The image is composed of pixels. The histogram reflects the grayscale distribution in the image. The number of pixels with grayscale level at the peak is selected to calculate the weight through information entropy redundancy. The calculation is shown in formula (5).

[0048]

[0049] Calculate the image redundancy of the number of grayscale pixels at the peak in the original image f0(x) and the detail feature image f1(x), respectively, and substitute them into formula (4) and formula (5) to obtain I1 and I2. The weight calculation of the original peak pixel is shown in formula (6).

[0050]

[0051] Among them, α is the weighted fusion ratio. Through this method, the image can better obtain more detailed features than the original image, making the target in the fused image more accurate and more suitable for subsequent processing.

[0052] In order to improve the local contrast of X-ray small dental film images and obtain more image details, the CLAHE algorithm is used to divide the image into non-overlapping areas, and then the local histogram of the image is calculated for each sub-area. The contrast threshold is limited when calculating the histogram, and then the grayscale is redistributed according to the threshold to achieve the purpose of improving the image contrast. The present invention proposes to find a suitable threshold for histogram equalization based on the image itself, and determine the threshold based on the number of grayscale levels in the grayscale histogram of the original image and the grayscale mean of the image. The histogram reflects the distribution of the image, with the horizontal axis being the grayscale level and the vertical axis being the frequency of occurrence. Since there may be peaks at both ends of the histogram, which are signals of no interest, the maximum value in the center or the main peak of the histogram is found, and the grayscale range is limited to [51,205]. The maximum value of the peak and the minimum value of the trough are found according to the histogram, and a straight line is determined. The expression form of the straight line L is shown in formula (7).

[0053] Ax+By+C=0 (7)

[0054] In the above formula (7), A = y2-y1, B = x1-x2, C = x2y1-x1y2, where (x1, y1) and (x2, y2) represent the coordinates of the two points with the maximum peak and the minimum valley, respectively. To find the appropriate grayscale, calculate the distance between the corresponding point between the maximum peak and the minimum valley in the histogram and the straight line L, and then find the grayscale of the point P corresponding to the maximum distance, and determine it as the optimal grayscale. The distance from the point to the straight line L is shown in formula (8).

[0055]

[0056] The coordinates of point P are (x0, y0), and d is the distance from the point to the line. The point farthest from the line is found by calculation, and the gray level N of the point is determined.

[0057] The grayscale mean reflects the overall grayscale level of the image. In order to ensure the rationality of the brightness of each sub-region, the grayscale range of the image is controlled by setting the grayscale mean. The calculation formula is shown in formula (9).

[0058]

[0059] Where T is the grayscale mean. At this time, the threshold of the contrast-limited adaptive histogram can be adjusted based on the original image, and its calculation is shown in formula (10).

[0060]

[0061] Through this method, the optimal threshold W is determined, and then the pixels are redistributed and the grayscale values ​​are reconstructed to complete the image enhancement processing, improve the image quality, and enable the image to display more details. The enhanced X-ray small dental image has increased contrast, and the image details are more prominent, helping the human eye to obtain better visual effects.

[0062] Figure 1 FIG. 1 is an overall flow chart of the method for enhancing the image of a small dental X-ray film of the present invention. Figure 1 As shown, the method specifically comprises the following steps:

[0063] 1) Convert the RGB image into a grayscale image, calculate the grayscale mean T of the X-ray small dental film image, and compare T / 255 with 0.5 to determine the overall image brightness. According to formula (2), γ is obtained. The gamma transform calculation formula (1) is used to adjust the grayscale of the X-ray small dental film image and improve the overall brightness.

[0064] 2) Use the Sobel edge detection algorithm to extract the improved image detail features, and use the Gaussian high-pass filter to remove noise to obtain a more accurate image detail feature map f1(x) and reduce noise interference.

[0065] 3) According to the information entropy redundancy formula (5) of the image, the values ​​of the original image f0(x) and the detail feature map f1(x) are calculated respectively, and substituted into the formula (6) to obtain the image fusion weight α, and finally substituted into the image fusion formula (3) to obtain the fused image.

[0066] 4) Using the image histogram, since there may be peaks at both ends of the histogram, both of which are uninteresting signals, we find the maximum value in the center or the main peak of the histogram, and limit the grayscale range to [51,205]. Find the maximum value of the peak (x1, y1) and the minimum value of the trough (x2, y2) in the histogram, and use these two points to determine the straight line L. Then, on the histogram curve between the peak and the trough, find the farthest distance d from a point to the straight line L through formula (8) to determine the grayscale level N here. In order to ensure the overall grayscale level, the grayscale mean value is used to control its range. Substitute it into formula (9) to obtain δ.

[0067] 5) Substitute δ and N into formula (10) to calculate the threshold W. Use the CLAHE algorithm to divide the image size into 4×4 non-overlapping areas for grayscale reconstruction to obtain the enhanced X-ray small dental image.

[0068] Embodiment 1:

[0069] The following will describe the X-ray dental image enhancement process in conjunction with a specific implementation. In this embodiment, 933 X-ray dental images are used. Figure 2As shown, the three-channel image histogram distribution of the original image of the X-ray dental film is the same, so a single-channel image is used for processing in the present invention. First, the RGB image of the X-ray dental film needs to be converted into a grayscale image, and the grayscale mean T of the X-ray dental film image needs to be calculated, and T / 255 is compared with 0.5 to determine the overall image brightness. The grayscale mean of the image reflects the brightness of the entire image. The distance s between the mean and 0.5 is calculated, and γ is obtained by s and T according to formula (2). Substitute γ into the gamma transform calculation formula (1) to achieve the grayscale range of the X-ray dental film image and improve the overall brightness. Secondly, the Sobel edge detection algorithm is used to calculate the gradient components in the x and y directions. The 3×3 template is used as the kernel to perform convolution and operation with each pixel of the improved image after gamma transformation to extract the edge detail features of the improved image. Since the X-ray small dental film image is easily affected by noise, there may be more than one pixel around the edge pixel of the acquired image. The gradient image needs to be processed to remove noise. The Gaussian filter can effectively suppress noise and smooth the image. Therefore, by removing noise with a Gaussian high-pass filter with a filtering radius of 1, a more accurate image detail feature map f1(x) will be obtained, while reducing the noise interference of the soft tissue around the teeth. When analyzing an image, the histogram reflects the distribution characteristics of the image. Therefore, the ratio R of the number of pixels Q at the peak gray level to the total number of pixels M in the image is calculated by formula (4), and the pixels at the peak are used as the basis of the image information entropy redundancy. Substitute them into formula (5), calculate the values ​​of the original image f0(x) and the detail feature map f1(x), respectively, and obtain I1 and I2, and substitute them into formula (6) to obtain the fusion ratio α of the two images, and finally substitute them into the image fusion formula (3) to obtain the fused image. At the same time, the image histogram is used. Since there may be peaks at both ends of the histogram, which are signals of no interest, the maximum value in the center or the main peak of the histogram is found, and the grayscale range is limited to [51,205]. Find the maximum value of the peak (x1, y1) and the minimum value of the trough (x2, y2) in the histogram, and use these two points to determine the straight line L. Then, on the histogram curve between the peak and the trough, find the maximum distance d from a point to the straight line L through formula (8) to determine the gray level N here. In order to ensure the overall gray level, the gray mean value is used to control its range. Substitute it into formula (9) to get δ. Substitute δ and N into formula (10) to calculate the threshold W. Use the CLAHE algorithm to divide the image size into 4x4 non-overlapping areas to redistribute the pixels, thereby obtaining the enhanced X-ray small dental film image. The result is shown in Figure 3 In. By Figure 3 It can be seen that the method of the present invention has a certain effect on the enhancement of small X-ray dental film images, the tooth root boundary is clearer, and the detail information is more prominent.

[0070] The above method and steps were used to experimentally process 933 X-ray small dental film images. The results show that the method of the present invention can better enhance the readability of the image and improve the overall grayscale range. Since all the parameters in the above steps are automatically calculated, the method of the present invention can achieve automatic processing. On the basis of the present invention, that is, on the basis of X-ray small dental film image enhancement, the accuracy of X-ray small dental film image segmentation can be further improved.

[0071] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.

Claims

1. A method for enhancing an X-ray small dental film image, characterized in that: The method specifically comprises the following steps: S1: Convert the original RGB image of the X-ray dental film into the grayscale original image f0(x); S2: using adaptive gamma transformation to adjust the grayscale of the image processed in step S1; The calculation formula for adaptive gamma transform is: V o =cV i γ Where c is a positive constant; V i Represents the gray level of the input; V o Represents the output grayscale; γ is a positive constant, and the calculation formula is: Where T represents the grayscale mean of the image, and s represents the distance between T / 255 and 0.5; S3: Use the Sobel edge detection algorithm to extract the detail features of the processing result of step S2, and use a Gaussian high-pass filter to remove noise to obtain the edge detail feature image f1(x); S4: image f0(x) and edge detail feature image f1(x) are fused according to the weight fusion ratio α; The calculation formula for image weight fusion is: g(x)=αf0(x)+(1-α)f1(x) Among them, f0(x) represents the original image, f1(x) represents the edge detail feature image, g(x) represents the fused image; α represents the weight fusion ratio, and the calculation formula is: Among them, I1 and I2 represent the information entropy redundancy of the image occupied by the number of pixels of the gray level at the peak in the original image f0(x) and the edge detail feature image f1(x), respectively; The calculation formula of the information entropy redundancy I of the image is: Among them, R represents the proportion of the number of grayscale pixels Q at the peak in the color histogram of the image to the total number of pixels M, and the expression is S5: Using the image histogram, find the maximum value of the peak (x1, y1) and the minimum value of the trough (x2, y2) in the histogram, and use these two points to determine the straight line L. Then, on the histogram curve between the peak and the trough, find the farthest distance d from a point to the straight line L, determine the gray level N here, and use the gray mean T of the image to obtain the gray range δ of the control image; The calculation formula for controlling the grayscale range δ of the image is: S6: Calculate the optimal threshold W according to δ and N; use the CLAHE algorithm to divide the image into non-overlapping sub-regions, and then reconstruct the grayscale of the non-overlapping sub-regions according to the optimal threshold, so as to obtain an enhanced X-ray small dental film image; The method to determine the optimal threshold W is:

Citation Information

Patent Citations

  • Image enhancement method

    CN106530237A

  • Large-scale target three-dimensional reconstruction method and system based on binocular vision

    CN113963107A