A method and system for X-ray image desharpening and dual-mask image enhancement

By acquiring and processing X-ray images and background images, and utilizing multiple filtering and high-frequency information superposition methods, the technical problems in the existing technology are solved, and the insufficient contrast and edge details are enhanced, thereby improving the contrast and edge details of the image and increasing the accuracy of image detection.

CN115511726BActive Publication Date: 2025-12-02GUANGDONG UNIV OF TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211035205.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-26
Publication Date
2025-12-02
Estimated Expiration
2042-08-26

AI Technical Summary

Technical Problem

Existing X-ray image enhancement methods mainly process images at a single scale, resulting in insufficient enhancement of image contrast and edge details, which affects the accuracy of image detection.

Method used

The X-ray image of the object under test and the background image without the object under test are acquired. After denoising, the real image is obtained. The first and second low-frequency images are obtained by filtering. High-frequency information is acquired for sharpening and enhancement. The images are then superimposed multiple times to achieve multi-scale image enhancement.

Benefits of technology

It improves image contrast and edge details, enhances the overall visual effect of the image, and improves the accuracy of the image detection process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115511726B_ABST
    Figure CN115511726B_ABST
Patent Text Reader

Abstract

This invention belongs to the field of image processing technology, and particularly relates to an X-ray image desharpening dual-mask image enhancement method and system, specifically including the following steps: S1: Acquire X-ray images of the object under test and background images when there is no object under test; S2: Perform denoising processing on the X-ray image of the object under test to obtain the real image of the object under test; S3: Perform filtering processing on the real image to obtain a first low-frequency image and a second low-frequency image; S4: Obtain high-frequency information from the first low-frequency image, sharpen and enhance the obtained high-frequency information, and superimpose it with the real image to obtain an edge-enhanced image; S5: Obtain high-frequency information from the second low-frequency image, sharpen and enhance the obtained high-frequency information, and superimpose it with the edge-enhanced image to obtain the final output image. By acquiring X-ray images of the object under test and background images when there is no object under test, it is convenient to obtain the real image of the object under test after denoising processing, thereby reducing image noise and local shadows.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image processing technology, and particularly relates to a method and system for desharpening and enhancing X-ray images using a dual-mask method. Background Technology

[0002] In recent years, due to the continuous development and innovation of X-ray imaging technology, it has been widely applied in fields such as medical diagnosis, security inspection, and metal exploration. To address issues such as low contrast or uneven contrast in X-ray images, gradient field-based X-ray image enhancement algorithms, desharpening mask image enhancement, and nonlinear desharpening mask image enhancement are used to enhance and improve local details and contrast in X-ray images. Many researchers have used desharpening and its improvements to enhance high-quality scan images such as CR, DR, and MR, with good results in improving image quality. While these methods improve edge details and contrast, their brightness adjustment is relatively limited, and further advancements are needed in X-ray image enhancement techniques.

[0003] Image noise is generally caused by electromagnetic interference during the transmission and conversion of image signals, resulting in various types of noise in X-ray images. This leads to problems such as noise in X-ray images and shadows at the edges, which seriously affect the imaging quality of X-ray imagers. In the process of detecting contraband, signal conversion and transmission often result in problems such as low contrast and blurred edges. The quality of X-ray images seriously affects the accuracy of X-ray detection results. Due to the inherent limitations of single-energy X-ray imagers, image quality problems such as low contrast, dark images, and blurred edges occur, necessitating improvements in image quality.

[0004] Chinese patent CN106530237A discloses an image enhancement method, including the following steps: a) denoising the input image to obtain a denoised image; b) extracting edges from the denoised image to obtain an edge image; c) enhancing the edge image to obtain a denoised and edge-enhanced image; d) processing the denoised image using a brightness-controllable histogram equalization method to obtain a globally enhanced image; e) linearly superimposing the images obtained in steps c and d to obtain the final output image. However, this anti-sharpening image enhancement mainly processes the image at a single scale, and the enhancement effect on image contrast and edge details is not ideal, resulting in insufficient image quality after processing. In actual detection processes, this affects the accuracy of X-ray detection. Summary of the Invention

[0005] The purpose of this invention is to provide an X-ray image desharpening dual-mask image enhancement method and system, which aims to solve the problem that existing image enhancement methods mainly process images at a single scale, resulting in insufficient enhancement effects on image contrast and edge details, inadequate image quality after processing, and affecting the accuracy of judgment in the image detection process.

[0006] This invention is implemented as follows: a method for desharpening and enhancing X-ray images using a dual-mask method, specifically including the following steps:

[0007] S1: Acquire X-ray images of the object under test and background images when there is no object under test;

[0008] S2: Denoise the X-ray image of the object under test to obtain the true image of the object under test;

[0009] S3: Filter the real image to obtain the first low-frequency image and the second low-frequency image;

[0010] S4: Obtain the high-frequency information of the first low-frequency image, sharpen and enhance the obtained high-frequency information, and then superimpose it with the real image to obtain an edge-enhanced image;

[0011] S5: Obtain the high-frequency information of the second low-frequency image, sharpen and enhance the obtained high-frequency information, and then superimpose it with the edge enhancement image to obtain the final output image.

[0012] This invention discloses an X-ray image desharpening dual-mask image enhancement method. By acquiring an X-ray image of the object under test and a background image without the object, the method facilitates denoising to obtain a true image of the object, thereby reducing image noise and local shadows. Different filtering processes are applied to the obtained true images to achieve image blunting and blurring, facilitating subsequent sharpening. First and second low-frequency images are used to obtain corresponding high-frequency information, more comprehensively preserving the high-frequency components. The high-frequency components are sharpened and enhanced in a single superposition, which improves the high-frequency components without affecting the low-frequency components, enhancing image contrast and texture information while preserving low-contrast details. A second enhancement superposition is performed on the image after the first enhancement, resulting in multi-scale image enhancement of the true image. This leads to higher image contrast, more prominent edge details, and a more significant image enhancement effect, thereby improving the accuracy of image detection.

[0013] Preferably, step S1 specifically includes:

[0014] S101: Place the object to be tested into the X-ray emission module and acquire X-ray images of the object through the image acquisition module;

[0015] S102: Remove the object to be tested from the X-ray emission module and acquire a background image without the object to be tested through the image acquisition module.

[0016] Preferably, step S2, which involves denoising the X-ray image of the object under test, specifically includes:

[0017] S201: Obtain the denoised image of the object under test by subtracting the X-ray image of the object under test from the background image;

[0018] S202: Normalize the denoised image from step S201 to reach a preset grayscale value range to obtain the true image of the object under test.

[0019] Preferably, in step S201, the formula for subtracting the X-ray image of the object under test from the background image is:

[0020] r(x,y)=V[o(x,y)-b(x,y)]

[0021] In the formula, x and y represent the position coordinates of the image, respectively; o(x,y) is the X-ray image of the object under test; b(x,y) is the background image; r(x,y) is the denoised image of the object under test; and V is a numeric type conversion character.

[0022] Preferably, in step S202, the formula for normalizing the denoised image is:

[0023]

[0024] In the formula, f(x,y) is the normalized real image of the object under test, G is the maximum gray value, g is the minimum gray value, and the gray value range of the real image of the object under test is (0, 255).

[0025] Preferably, in step S3, when performing the first filtering process on the real image, a Gaussian filter is used for low-pass filtering, with a mask size of 5×5. The principle formula is as follows:

[0026] d1(x,y)=G1(x,y)·f(x,y)

[0027] Gauss's formula is:

[0028]

[0029] In the formula, f(x, y) is the real image, d1(x, y) is the first low-frequency image, and σ is the standard deviation, which is (0.5, 2) here.

[0030] Preferably, in step S3, when performing the second filtering process on the real image, a Gaussian filter is used for two-dimensional Gaussian filtering, with a mask size of 7×7. The principle formula is as follows:

[0031] d2(x,y)=G2(x,y)·f(x,y)

[0032] Gauss's formula is:

[0033]

[0034] In the formula, f(x, y) is the real image, d2(x, y) is the second low-frequency image, and σ is the standard deviation, which is (0.5, 2) here.

[0035] Preferably, step S4 specifically includes:

[0036] S401: The high-frequency component g1(x, y) is obtained by subtracting the real image from the first low-frequency image;

[0037] S402: Sharpen the high-frequency component g1(x, y);

[0038] S403: The image sharpened in S402 is superimposed on the real image to obtain an edge-enhanced image, i.e.:

[0039] g1(x,y)=f(x,y)-d1(x,y)=f(x,y)-G1(x,y)·f(x,y)

[0040] z(x,y)=f(x,y)+β1·g1(x,y)=f(x,y)+β1·[f(x,y)-d1(x,y)]

[0041] In the formula, z(x,y) is the edge enhancement image, g1(x,y) is the high-frequency component corresponding to the first low-frequency image, f(x,y) is the real image, d1(x,y) is the first low-frequency image, and β1 is the first weight coefficient of the sharpening process, where β1 is (0.8,2).

[0042] Preferably, step S5 specifically includes:

[0043] S501: The high-frequency component g2(x, y) is obtained by subtracting the real image from the second low-frequency image;

[0044] S502: Sharpen the high-frequency component g2(x, y);

[0045] S503: The image sharpened by S502 is superimposed on the edge enhancement image to obtain the final output image, i.e.:

[0046] g2(x,y)=f(x,y)-d2(x,y)=f(x,y)-G2(x,y)·f(x,y)

[0047] Z(x, y)=z(x, y)+β2·g2(x, y)=[f(x, y)+β1·g1(x, y)]++β2·g2(x, y)

[0048] In the formula, Z(x,y) is the final output image, z(x,y) is the image after edge enhancement, f(x,y) is the real image, g1 and g2 are the high-frequency components of the image, and β2 is the second weighting coefficient, where β2 is (0.8, 2).

[0049] The present invention also provides an X-ray image desharpening dual-mask image enhancement system, comprising:

[0050] X-ray emission module: used to emit X-rays in a specified direction;

[0051] Image acquisition module: Receives X-rays emitted by the X-ray emission module and X-rays passing through the object under test, and converts the received X-rays into images;

[0052] The image enhancement module is connected to the image acquisition module via a signal connection. It is used to preprocess the converted image and perform detail enhancement on the preprocessed image based on an anti-sharpening dual mask.

[0053] Image display module: Connected to the image acquisition module and the image enhancement module, it records and displays the images acquired or generated by the image acquisition module and the image enhancement module.

[0054] The present invention discloses an X-ray image desharpening dual-mask image enhancement system. This system emits X-rays in a specified direction via a ray emission module, receives the X-rays using an image acquisition module, and converts them into an image, thereby obtaining an X-ray image of the object under test and a background image without the object. The image enhancement module facilitates denoising of the received image according to step S2 to obtain a true image. Step S3 filters the true image, and steps S4 and S5 perform multi-scale image enhancement on the true image, resulting in higher image contrast, more prominent edge details, and a more significant image enhancement effect.

[0055] Compared with the prior art, the beneficial effects of the present invention are:

[0056] (1) By acquiring the X-ray image of the object under test and the background image when there is no object under test, it is easier to obtain the real image of the object under test after noise reduction, which improves the shadow at the edge of the image and reduces background noise, making the overall visual effect of the image clearer.

[0057] (2) Different filtering processes are applied to the obtained real images to achieve image passivation and blurring, which facilitates subsequent sharpening processing; the corresponding high-frequency information is obtained by using the first low-frequency image and the second low-frequency image to more comprehensively preserve the high-frequency part; after sharpening and enhancing the high-frequency part, it is superimposed once to improve the high-frequency part of the image without affecting the low-frequency part, thereby enhancing the contrast and texture information of the image.

[0058] (3) The image after the first enhancement is superimposed with a second enhancement, thereby enhancing the real image at multiple scales, making the edge details of the image more prominent, the contrast improved and the texture information more prominent, and the overall visual effect of the image improved, which in turn helps to improve the judgment accuracy of the image detection process. Attached Figure Description

[0059] Figure 1 A flowchart of an X-ray image desharpening dual-mask image enhancement method provided by the present invention;

[0060] Figure 2 A schematic diagram illustrating the principle of desharpening mask image enhancement in an X-ray image desharpening dual-mask image enhancement method provided by this invention;

[0061] Figure 3 A schematic diagram illustrating the principle of an X-ray image desharpening dual-mask image enhancement method provided by this invention.

[0062] Figure 4 The image is a preprocessed image of the X-ray image desharpening dual-mask image enhancement method provided by the present invention;

[0063] Figure 5 The image enhancement method provided by this invention is an X-ray image desharpening dual-mask image enhancement method.

[0064] Figure 6 The grayscale histogram of the object image after enhancement is provided by the present invention for an X-ray image desharpening dual-mask image enhancement method.

[0065] Figure 7 An evaluation table of experimental results after image enhancement for an X-ray image desharpening dual-mask image enhancement method provided by the present invention;

[0066] Figure 8 This is a schematic diagram of the structure of an X-ray image desharpening dual-mask image enhancement system provided by the present invention.

[0067] Appendix Figure 8 In the middle: 1-X-ray emission source, 2-object under test, 3-X-ray receiving plate, 4-Raspberry Pi, 5-monitor, 6-motion platform. Detailed Implementation

[0068] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0069] The specific implementation of the present invention will be described in detail below with reference to specific embodiments.

[0070] Example 1

[0071] like Figure 1 The diagram shows a flowchart of an X-ray image desharpening dual-mask image enhancement method provided by the present invention. The specific steps include:

[0072] S1: Acquire X-ray images of the object under test and background images when there is no object under test;

[0073] S2: Denoise the X-ray image of the object under test to obtain the true image of the object under test;

[0074] S3: Filter the real image to obtain the first low-frequency image and the second low-frequency image;

[0075] S4: Obtain the high-frequency information corresponding to the first low-frequency image, sharpen and enhance the obtained high-frequency information, and then superimpose it with the real image to obtain an edge-enhanced image;

[0076] S5: Obtain the high-frequency information corresponding to the second low-frequency image, sharpen and enhance the obtained high-frequency information, and then superimpose it with the edge enhancement image to obtain the final output image.

[0077] In practical applications, this embodiment acquires X-ray images of the object under test and background images without the object, facilitating denoising to obtain a true image of the object, thereby reducing image noise and local shadows. Different filtering processes are applied to the obtained true images to achieve image blunting and blurring, facilitating subsequent sharpening. First and second low-frequency images are used to obtain corresponding high-frequency information, more comprehensively preserving the high-frequency components. Sharpening and enhancing the high-frequency components, then superimposing them with the true image, enhances the high-frequency components without affecting the low-frequency components. A second enhancement superposition is performed on the first enhanced image, resulting in multi-scale image enhancement of the true image, higher contrast, more prominent edge details, and a more significant image enhancement effect.

[0078] In one embodiment, step S1 specifically includes:

[0079] S101: Align the object to be tested with the X-ray emission module and acquire the X-ray image of the object to be tested through the image acquisition module;

[0080] S102: Remove the object to be tested from the X-ray emission module and acquire a background image without the object to be tested through the image acquisition module.

[0081] In actual operation, the object to be tested is first aligned with the X-ray emission module so that the X-rays pass through the object, and the X-ray image of the object is acquired using the image acquisition module; then the object is removed from the X-ray emission module, and the background image without the object is acquired using the image acquisition module.

[0082] It should be noted that step S2, denoising the X-ray image of the object under test, specifically includes:

[0083] S201: Obtain the denoised image of the object under test by subtracting the X-ray image of the object under test from the background image;

[0084] S202: Normalize the denoised image from step S201 to reach a preset grayscale value range to obtain the true image of the object under test.

[0085] Specifically, the formula for step S201 described above is as follows:

[0086] r(x,y)=V[o(x,y)-b(x,y)]

[0087] In the formula, x and y represent the position coordinates of the image, respectively; o(x, y) is the X-ray image of the object under test; b(x, y) is the background image; r(x, y) is the denoised image of the object under test; and V is a numeric type conversion character.

[0088] It can be seen that by subtracting the X-ray image of the object under test from the background image, the corresponding pixels of r(x,y) representing the denoised image of the object under test and b(x,y) of the background image are directly subtracted to remove the background in the X-ray image, thereby obtaining the true image of the object under test after denoising, which is convenient for reducing image noise and local shadows.

[0089] More specifically, in step S202, the formula for normalizing the denoised image is:

[0090]

[0091] In the formula, f(x, y) is the normalized real image of the object under test, G is the maximum gray value, g is the minimum gray value, and the gray value range of the real image of the object under test is (0, 255).

[0092] It can be seen that normalizing a denoised image helps to obtain a suitable range of gray values, thereby reducing image noise and edge shadows, so as to meet the needs of subsequent image enhancement.

[0093] Furthermore, in step S3, when performing the first filtering process on the real image, a Gaussian filter is used for low-pass filtering, with a mask size of 5×5. The principle formula is as follows:

[0094] d1(x,y)=G1(x,y)·f(x,y)

[0095] Gauss's formula is:

[0096]

[0097] In the formula, f(x, y) is the real image, d1(x, y) is the first low-frequency image, and σ is the standard deviation, which is (0.5, 2) here.

[0098] Furthermore, in step S3, when performing a second filtering process on the real image, a two-dimensional Gaussian filter is used, with a mask size of 7×7. The principle formula is as follows:

[0099] d2(x,y)=G2(x,y)·f(x,y)

[0100] Gauss's formula is:

[0101]

[0102] In the formula, f(x,y) is the real image, d2(x,y) is the second low-frequency image, and σ is the standard deviation, which is (0.5,2) here;

[0103] It should be noted that the images after denoising are filtered separately. A two-dimensional Gaussian filter is used to suppress the high-frequency part of the denoised image, reduce the high-frequency components of the image, and cause the image to become blurred. Compared with the original image information, its grayscale becomes relatively smooth, which is convenient for subsequent sharpening processing.

[0104] In this embodiment, the first filtering process uses a 5×5 mask, and the second filtering process uses a 7×7 mask. The standard deviation σ can be 1 for both. After masking, the subtraction operation with the real image will reduce the low-frequency part of the real image and more comprehensively retain the high-frequency part. This makes it easier to sharpen and enhance the high-frequency part and superimpose it with the original real image to improve the high-frequency part of the image, without affecting the low-frequency part of the image.

[0105] Example 2

[0106] like Figures 1-3 As shown, based on Example 1, step S4 specifically includes:

[0107] S401: The high-frequency component g1(x, y) is obtained by subtracting the real image from the first low-frequency image;

[0108] S402: Sharpen the high-frequency component g1(x, y);

[0109] S403: The image sharpened in S402 is superimposed on the real image to obtain an edge-enhanced image, i.e.:

[0110] g1(x,y)=f(x,y)-d1(x,y)=f(x,y)-G1(x,y)·f(x,y)

[0111] z(x,y)=f(x,y)+β1·g1(x,y)=f(x,y)+β1·[f(x,y)-d1(x,y)]

[0112] In the formula, z(x,y) is the edge enhancement image, g1(x,y) is the high-frequency component corresponding to the first low-frequency image, f(x,y) is the real image, d1(x,y) is the first low-frequency image, and β1 is the first weight coefficient of the sharpening process, where β1 is (0.8,2).

[0113] In practical applications, this embodiment subtracts the real image from the first low-frequency image after Gaussian filtering masking to obtain the high-frequency component g1(x,y). Then, the high-frequency component g1(x,y) is sharpened and amplified to enhance the high-frequency part of the image. After being superimposed on the real image, the high-frequency information of the image's edges and details is strengthened, which can effectively suppress large-range brightness changes and maintain low-contrast details without affecting the low-frequency part of the image.

[0114] In practice, the magnitude of the weighting coefficient determines the enhancement factor of the high-frequency component g1(x,y) of the image. Only when the weighting coefficient is greater than 0 can the high-frequency information in the image be enhanced. After testing and comparison, the image enhancement effect is better when the weighting coefficient β1 is 1.1 during the first sharpening process.

[0115] Furthermore, step S5 specifically includes the following steps:

[0116] S501: The high-frequency component g2(x, y) is obtained by subtracting the real image from the second low-frequency image;

[0117] S502: Sharpen the high-frequency component g2(x, y);

[0118] S503: The image sharpened by S502 is superimposed on the edge enhancement image to obtain the final output image, i.e.:

[0119] g2(x,y)=f(x,y)-d2(x,y)=f(x,y)-G2(x,y)·f(x,y)

[0120] Z(x, y)=z(x, y)+β2·g2(x, y)=[f(x, y)+β1·g1(x, y)]++β2·g2(x, y)

[0121] In the formula, Z(x,y) is the final output image, z(x,y) is the image after edge enhancement, f(x,y) is the real image, g1 and g2 are the high-frequency components of the image, and β2 is the second weighting coefficient, where β2 is (0.8, 2).

[0122] It should be noted that after filtering and masking the real image to obtain the first low-frequency image, and then amplifying and superimposing the high-frequency components, image processing can be achieved at a single scale, but the enhancement effect and contrast of the image are still not ideal.

[0123] Therefore, the image is double-sharpened and superimposed, and filtered using masks of different sizes to obtain a second low-frequency image. After amplification of the high-frequency components, it is superimposed with the edge-enhanced image after the first processing, thereby performing multi-scale image enhancement on the real image, making the image contrast higher, the edge details more prominent, and the image enhancement effect more obvious.

[0124] Based on the above specific embodiments, the effects of the present invention are verified below with reference to specific experiments:

[0125] First, experimental analysis and result verification were conducted based on image preprocessing: the adjustable range of the X-ray imager tube voltage was set to 45-90kV, and the adjustable range of the current was set to 250-500uA; the image light intensity varied with different tube voltage and current values. In order to better remove the background in the image, the background was acquired first each time the tube voltage was changed, and then the image of the object under test was acquired.

[0126] Furthermore, Figure 4 The test conditions were tube voltage 50kV and current 400uA; by Figure 4 It can be concluded that:

[0127] (a) is the background image acquired when the tube voltage is 50kV and the current is 400uA. It can be seen that there is shadow at the corners of the image.

[0128] (b) is an image of the object being measured under the same conditions as (a), and it can be seen that there are shadows at the corners of the image;

[0129] (c) is the image after image preprocessing of the detected image. It can be seen that the processed image has improved corner shadows and reduced background noise, and the overall visual effect of the image has become clearer.

[0130] Therefore, it can be concluded that by acquiring X-ray images of the object under test and background images without the object under test, and then performing noise reduction processing to obtain the true image of the object under test, image noise and local shadows can be reduced.

[0131] Secondly, experimental analysis and result verification were conducted based on image enhancement after image preprocessing: Figure 5 The test conditions were tube voltage 50kV and current 400uA;

[0132] Figure 5 In the image: (a) is the actual X-ray image of the object under test; (b) is the image with a single-enhancement anti-sharpening mask; (c) is the image with two-enhancement anti-sharpening double mask; (a') is a magnified view of the details of image (a); (b') is a magnified view of the details of image (b); (c') is a magnified view of the details of image (c).

[0133] Depend on Figure 5 It can be seen that by comparing the edges of images (a'), (b'), and (c'), the edges of the images have become sharper, the contrast has increased, and the texture information has become more prominent, resulting in an improved overall visual effect.

[0134] Figure 6 In the middle: (a) is the grayscale histogram of the true X-ray image of the object under test; (b) is the grayscale histogram of the anti-sharpening mask after one enhancement; (c) is the grayscale histogram of the anti-sharpening double mask image after two enhancements.

[0135] Depend on Figure 6 It can be seen from the gray-level histogram that the enhanced image has a more balanced gray-level probability distribution histogram, and the gray-level information of the image is better balanced.

[0136] Finally, in evaluating image quality, image sharpness is a crucial indicator, as it closely corresponds to human subjective perception. Sharpness evaluation describes the detail information of an image, while the gradient function describes edge information. Sharp images have sharper edges and more pronounced grayscale variations than blurry images; therefore, images with richer edge information have higher sharpness scores.

[0137] Commonly used image sharpness grayscale gradient functions mainly include the Brenner function, Laplacian function, Tenengrad function, and Variance function; entropy functions based on statistical features measure the richness of image information. The information entropy of a sharp image is more singular than that of a blurry image, and the entropy value is smaller for images with higher or lower brightness.

[0138] Depend on Figure 7 It can be observed that, based on the image grayscale gradient evaluation function, the evaluation results of desharpening dual-mask image enhancement are significantly improved compared to desharpening image enhancement. Furthermore, the desharpening dual-mask method shows substantial improvement for both brighter and darker images. In the entropy calculation, the value of dual-mask desharpening is lower than that of image desharpening. As can be seen from the effect images, the main reason is that after image enhancement, the grayscale information in the transition band is reduced, the dispersion of information decreases, resulting in a smaller entropy value. The reduced information in the transition band leads to a clearer image.

[0139] Example 3

[0140] like Figure 8 As shown, this embodiment is an example of an X-ray image desharpening dual-mask image enhancement system, including:

[0141] X-ray emission module: used to emit X-rays in a specified direction;

[0142] Image acquisition module: Receives X-rays emitted by the X-ray emission module and X-rays passing through the object under test, and converts the received X-rays into images;

[0143] The image enhancement module is connected to the image acquisition module via a signal connection. It is used to preprocess the converted image and perform detail enhancement on the preprocessed image based on an anti-sharpening dual mask.

[0144] Image display module: Connected to the image acquisition module and the image enhancement module, it records and displays the images acquired or generated by the image acquisition module and the image enhancement module.

[0145] The present invention discloses an X-ray image desharpening dual-mask image enhancement system. This system emits X-rays in a specified direction via a ray emission module, receives the X-rays using an image acquisition module, converts them into an image, and obtains an X-ray image of the object under test and a background image without the object. The image enhancement module facilitates denoising of the received image in step S2 to obtain a true image. Step S3 filters the true image, and steps S4 and S5 perform multi-scale image enhancement, resulting in higher image contrast, more prominent edge details, and a more significant image enhancement effect.

[0146] In actual operation, this embodiment is as follows: Figure 8 As shown, the X-ray emission module can be an X-ray emission source 1 that emits X-rays that pass through the object under test 2. The image acquisition module can use an X-ray receiving plate 3 to complete the reception, detection and conversion of X-rays, form an X-ray residual image through an image intensifier, and finally capture the X-ray residual image with a CCD camera to obtain the X-ray image of the object. The image enhancement module can use a Raspberry Pi 4 microcomputer to complete the preprocessing and desharpening of the image of the object under test using a dual-mask detail enhancement. Finally, the image display module displays the X-ray image through a monitor 5. In addition, a motion platform 6 can be added below the object to adjust the position of the object.

[0147] The above embodiments of the present invention provide an X-ray image desharpening dual-mask image enhancement method and system. By acquiring the X-ray image of the object under test and the background image without the object under test, it is convenient to obtain the real image of the object under test after noise reduction processing, thereby improving the image corner shadows and reducing background noise, and making the overall visual effect of the image clearer. Different filtering processes are applied to the obtained real images to achieve image blunting and blurring, which facilitates subsequent sharpening processing. The corresponding high-frequency information is obtained by using the first low-frequency image and the second low-frequency image respectively, so as to more comprehensively preserve the high-frequency part. The high-frequency part is sharpened and enhanced and then superimposed once, which can improve the high-frequency part of the image without affecting the low-frequency part, thereby enhancing the contrast and texture information of the image. The image after the first enhancement is enhanced and superimposed a second time, thereby performing multi-scale image enhancement on the real image, making the edge details of the image more prominent, improving the contrast and highlighting the texture information, improving the overall visual effect of the image, and thus improving the judgment accuracy of the image detection process.

[0148] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for desharpening and enhancing X-ray images using a dual-mask technique, characterized in that, Specifically, the following steps are included: S1: Acquire X-ray images of the object under test and background images when there is no object under test; S2: Denoise the X-ray image of the object under test to obtain the true image of the object under test; S3: Filter the real image to obtain the first low-frequency image and the second low-frequency image; S4: Obtain the high-frequency information of the first low-frequency image, sharpen and enhance the obtained high-frequency information, and then superimpose it with the real image to obtain an edge-enhanced image; S5: Obtain the high-frequency information of the second low-frequency image, sharpen and enhance the obtained high-frequency information, and then superimpose it with the edge enhancement image to obtain the final output image; Step S4 specifically includes: S401: The high-frequency component g1(x,y) is obtained by subtracting the real image from the first low-frequency image; S402: Sharpen the high-frequency component g1(x,y); S403: The image sharpened in S402 is superimposed on the real image to obtain an edge-enhanced image, i.e.: In the formula, z(x,y) is the edge enhancement image, g1(x,y) is the high-frequency component corresponding to the first low-frequency image, and f(x,y) is the real image. The first low-frequency image, This is the first weighting coefficient for sharpening. (0.8, 2); Step S5 specifically includes: S501: The high-frequency component g2(x,y) is obtained by subtracting the real image from the second low-frequency image; S502: Sharpen the high-frequency component g2(x,y); S503: The image sharpened by S502 is superimposed on the edge enhancement image to obtain the final output image, i.e.: In the formula, Z(x,y) is the final output image, z(x,y) is the image after edge enhancement, f(x,y) is the real image, and g1 and g2 are the high-frequency components of the image. This is the second weighting coefficient, here The value is (0.8, 2).

2. The X-ray image desharpening dual-mask image enhancement method according to claim 1, characterized in that, Step S1 specifically includes: S101: Align the object to be tested with the X-ray emission module and acquire X-ray images of the object to be tested through the image acquisition module; S102: Remove the object to be tested from the X-ray emission module and acquire a background image without the object to be tested through the image acquisition module.

3. The X-ray image desharpening dual-mask image enhancement method according to claim 2, characterized in that, Step S2, which involves denoising the X-ray image of the object under test, specifically includes: S201: Obtain the denoised image of the object under test by subtracting the X-ray image of the object under test from the background image; S202: Normalize the denoised image from step S201 to reach a preset grayscale value range to obtain the true image of the object under test.

4. The X-ray image desharpening dual-mask image enhancement method according to claim 3, characterized in that, In step S201, the formula for subtracting the X-ray image of the object under test from the background image is: In the formula, x and y represent the position coordinates of the image, respectively; o(x,y) is the X-ray image of the object under test; b(x,y) is the background image; r(x,y) is the denoised image of the object under test; and V is a numeric type conversion character.

5. The X-ray image desharpening dual-mask image enhancement method according to claim 4, characterized in that, In step S202, the formula for normalizing the denoised image is: In the formula, f(x,y) is the normalized real image of the object under test, G is the maximum gray value, g is the minimum gray value, and the gray value range of the real image of the object under test is (0, 255).

6. The X-ray image desharpening dual-mask image enhancement method according to claim 5, characterized in that, In step S3, when performing the first filtering process on the real image, a Gaussian filter is used for low-pass filtering, with a mask size of 5×5. The principle formula is as follows: Gauss's formula is: In the formula, f(x,y) is the real image. The first low-frequency image is σ, which is the standard deviation, and here it is (0.5, 2).

7. The X-ray image desharpening dual-mask image enhancement method according to claim 5, characterized in that, In step S3, when performing the second filtering process on the real image, a two-dimensional Gaussian filter is used, with a mask size of 7×7. The principle formula is as follows: Gauss's formula is: In the formula, f(x,y) is the real image. The second low-frequency image is shown, where σ is the standard deviation, which is (0.5, 2) here.

8. An X-ray image desharpening dual-mask image enhancement system, applied to the X-ray image desharpening dual-mask image enhancement method according to any one of claims 1-7, characterized in that, include: X-ray emission module: used to emit X-rays in a specified direction; Image acquisition module: Receives X-rays emitted by the X-ray emission module and X-rays passing through the object under test, and converts the received X-rays into images; An image enhancement module, signal-connected to the image acquisition module, is used to preprocess the converted image and perform detail enhancement on the preprocessed image based on an anti-sharpening dual mask. Image display module: Connected to the image acquisition module and the image enhancement module, it records and displays the images acquired or generated by the image acquisition module and the image enhancement module.

Citation Information

Patent Citations

  • Image enhancement method

    CN106530237A

  • Image enhancement method, apparatus and device, and storage medium

    CN108876733A

  • Method for extracting target object information from video

    CN110033455A