Projection image overexposure correction method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202512029757.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-30
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2045-12-30
AI Technical Summary
[0004]本申请提供了一种投影图像过曝校正方法、投影图像过曝校正装置、电子设备和计算机可读存储介质,以解决现有技术的投影图像过曝校正方法导致投影图像的重建图像出现较多的伪影的问题
[0015]In this embodiment, firstly, the original projected image of the target under test is acquired. Then, it is determined whether there are overexposed areas in the original projected image. Subsequently, if there are overexposed areas in the original projected image, the edge contours of the unexposed areas in the original projected image are identified. Finally, based on the edge contours of the unexposed areas, a dilation operation is performed on the unexposed areas to obtain the target projected image. Since the shape of the edge contours of the unexposed areas is similar to the edge contours of the target under test, the dilation operation on the unexposed areas is performed to fill in the edge parts of the target under test without significantly changing the shape of the edge contours of the target under test. This reduces artifacts in the reconstructed image, thereby solving the problem of numerous artifacts in the reconstructed image caused by the existing overexposure correction method for projected images.
Smart Images

Figure CN121903849B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of overexposure correction technology for projection images, and in particular to a method, apparatus, electronic device, and storage medium for overexposure correction of projection images. Background Technology
[0002] CBCT (Cone-Beam Computed Tomography) is a medical examination device. A CBCT scanner consists of an X-ray tube and a flat panel detector. The X-ray tube, located on one side of the body, emits X-rays that illuminate the body. The flat panel detector, located on the other side, receives the X-rays that penetrate the body and converts them into grayscale values. For X-rays penetrating thicker parts of the body (e.g., the middle), attenuation is high, resulting in a smaller X-ray signal received by the flat panel detector and a smaller converted grayscale value. Conversely, for X-rays penetrating thinner parts of the body (e.g., the edges), attenuation is low, resulting in a larger X-ray signal received by the flat panel detector and a larger converted grayscale value. As the X-ray tube rotates, projected images at different incident angles are obtained. A reconstruction algorithm then calculates the tomographic image of the body. In actual examinations, it is often necessary to... In situations where a high dose of X-rays is emitted by the X-ray tube to acquire a projected image, the flat panel detector has a grayscale upper limit (some products have a grayscale upper limit of 50,000, some have a grayscale upper limit of 60,000, but all products will not exceed 65,535). If the dose of X-rays emitted by the X-ray tube is too high, the attenuation of X-rays penetrating thinner parts of the body is small, and the X-ray signal received by the flat panel detector is very large. The converted grayscale value should be higher than the grayscale upper limit, but the flat panel detector will only convert the X-ray to the grayscale upper limit. This phenomenon is called overexposure. For the middle part of the body, the converted grayscale value is usually not overexposed, but for the edge parts of the body, it will be overexposed and displayed as the grayscale upper limit in the projected image. That is, the edge parts of the body are submerged in the projected image.
[0003] Currently, the overexposure correction method for projected images involves using an extrapolation algorithm on the left and right sides of the unexposed area of the body in the projected image to fill in the left and right edges of the body. However, this will significantly change the shape of the body's edge contour, resulting in more artifacts in the reconstructed image. Summary of the Invention
[0004] This application provides a method, apparatus, electronic device, and computer-readable storage medium for correcting overexposure of projected images, in order to solve the problem that existing methods for correcting overexposure of projected images result in numerous artifacts in the reconstructed images.
[0005] In a first aspect, this application provides a method for correcting overexposure of a projected image. The method includes: acquiring an original projected image of a target; determining whether there is an overexposed area in the original projected image; identifying the edge contour of an unexposed area in the original projected image when there is an overexposed area; and performing a dilation operation on the unexposed area based on the edge contour of the unexposed area to obtain a target projected image.
[0006] Optionally, determining whether the original projected image has an overexposed area includes: determining whether the grayscale value of each pixel in the original projected image meets a preset condition, wherein the preset condition is that the grayscale value of the pixel is not less than the upper limit of the grayscale value of the flat panel detector; if the grayscale value of at least one pixel in the original projected image meets the preset condition, it is determined that the original projected image has an overexposed area; if the grayscale value of all pixels in the original projected image does not meet the preset condition, it is determined that the original projected image does not have an overexposed area.
[0007] Optionally, before identifying the edge contours of the unexposed areas in the original projected image, the method further includes: filtering out pixels in the original projected image that do not meet the preset conditions; and determining the area composed of the filtered pixels as the unexposed areas.
[0008] Optionally, based on the edge contour of the unexposed area, a dilation operation is performed on the unexposed area to obtain a target projection image, including: a first determining step, determining the number of dilation operations based on the upper limit of grayscale and the target air grayscale value, wherein the target air grayscale value is the average grayscale value of all pixels in the air projection image of the preset area under ideal conditions, wherein the ideal conditions are that the air projection image of the preset area is obtained by scanning with X-rays of a target dose and is not overexposed, and the target dose is the dose of X-rays emitted by the X-ray tube when the original projection image is acquired; a processing step, based on the coordinates of all pixels of the edge contour of the (n-1)th dilation area, performing a dilation operation on the (n-1)th dilation area... The process involves performing a one-pixel dilation operation on each dilation region to obtain the coordinates of all pixels on the edge contour of the nth dilation region. The 0th dilation region is the unexposed region, and n is a positive integer. The second determination step involves determining the nth grayscale value based on the dilation count, the value of n, the upper grayscale limit, and the target air grayscale value. The assignment step involves assigning the nth grayscale value to each pixel on the edge contour of the nth dilation region based on the coordinates of each pixel. The process is repeated, including the processing steps, the second determination step, and the assignment step, until n equals the dilation count, to obtain the target projected image.
[0009] Optionally, the first determining step, based on the upper limit of grayscale and the target air grayscale value, determines the number of expansions, including: using a formula The number of expansions is determined, where N is the number of expansions, P1 is the target air gray value, and P2 is the upper limit of gray value.
[0010] Optionally, the nth grayscale value is determined based on the number of expansions, the value of n, the upper limit of grayscale, and the target air grayscale value, including: using the formula The target air grayscale value is determined, where x is the value of n, y is the nth grayscale value, N is the number of expansions, P1 is the target air grayscale value, and P2 is the upper limit of grayscale.
[0011] Optionally, the method further includes: obtaining the target air grayscale value, including: obtaining multiple air projection images of the preset area, each air projection image corresponding to a dose, the air projection images being obtained by X-ray scanning of the corresponding dose and not overexposed; calculating the average grayscale value of all pixels in each air projection image to obtain multiple air grayscale values, the air grayscale values corresponding one-to-one with the air projection images; fitting the dose and the air grayscale values to obtain a dose grayscale value function, the dose grayscale value function representing the mapping relationship between the dose and the air grayscale values; and determining the target air grayscale value based on the target dose and the dose grayscale value function.
[0012] Secondly, this application provides a projection image overexposure correction device, the device comprising: an acquisition module for acquiring an original projection image of a target under test; a determination module for determining whether there is an overexposed area in the original projection image; an identification module for identifying the edge contour of an unexposed area in the original projection image when there is an overexposed area; and a processing module for performing a dilation operation on the unexposed area based on the edge contour of the unexposed area to obtain a target projection image.
[0013] Thirdly, this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of any of the aforementioned projection image overexposure correction methods.
[0014] Fourthly, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the described projection image overexposure correction methods.
[0015] In this embodiment, firstly, the original projected image of the target under test is acquired. Then, it is determined whether there are overexposed areas in the original projected image. Subsequently, if there are overexposed areas in the original projected image, the edge contours of the unexposed areas in the original projected image are identified. Finally, based on the edge contours of the unexposed areas, a dilation operation is performed on the unexposed areas to obtain the target projected image. Since the shape of the edge contours of the unexposed areas is similar to the edge contours of the target under test, the dilation operation on the unexposed areas is performed to fill in the edge parts of the target under test without significantly changing the shape of the edge contours of the target under test. This reduces artifacts in the reconstructed image, thereby solving the problem of numerous artifacts in the reconstructed image caused by the existing overexposure correction method for projected images. Attached Figure Description
[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.
[0019] Figure 1 A schematic diagram of a CBCT device acquiring a projected image of a sphere; Figure 2(a) is a schematic diagram of the projected image of the sphere; Figure 2(b) is a schematic diagram of the projected image of the sphere after correction using the overexposure correction method for projected images in the prior art; Figure 3 An overexposure correction method for projected images is provided in this application embodiment; Figure 4(a) is a schematic diagram of the projected image after the edge contour of the unexposed area of the sphere is expanded by one ring using the overexposure correction method of the projection image of this application; Figure 4(b) is a schematic diagram of a target projection image of a sphere provided in an embodiment of this application; Figure 5 A structural block diagram of a projection image overexposure correction device provided in an embodiment of this application; Figure 6(a) is the reconstructed image of the projected image after correction using the overexposure correction method of the existing projected image; Figure 6(b) is a reconstructed image of the projection image after correction using the projection image overexposure correction method of this application. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0021] The following disclosure provides numerous different embodiments or examples for implementing various structures of the invention. To simplify the disclosure, specific examples of components and arrangements are described below. These are merely examples and are not intended to limit the scope of the invention. Furthermore, reference numerals and / or letters may be repeated in different examples. Such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.
[0022] Suppose a CBCT device is used to acquire a projection image of a sphere, such as Figure 1As shown, if the X-ray dose emitted by the X-ray tube is too high, and the edge of the sphere is relatively thin, the X-ray signal received by the flat panel detector penetrating the edge of the sphere is very large, resulting in a very large converted grayscale value. That is, the edge of the sphere is overexposed. In the projection image of the sphere, the edge of the sphere displays the upper limit of the grayscale value of the flat panel detector. In the projection image of the sphere, the edge of the sphere will be submerged. As shown in Figure 2(a), the white part is the unexposed area of the sphere, and the edge of the sphere is submerged in the black area. The purpose of overexposure correction is to fill in the edge of the sphere. If the overexposure correction method of the projection image in the existing technology is used, the extrapolation algorithm is used on the left and right sides of the unexposed area of the sphere to fill in the edge of the sphere. The edges of the sphere are filled in, but this will change the shape of the edge contour of the sphere, resulting in more artifacts in the reconstructed image. In Figure 2(b), the gray area is the unexposed area of the sphere, and the white areas on the left and right sides of the gray area are the left and right edge areas of the sphere filled in using the overexposure correction method of the projection image in the prior art. In fact, regardless of whether the edge area of the sphere is overexposed, the projection image of the sphere should be similar to Figure 2(a), and the shape of the edge contour of the unexposed area of the sphere should be similar to the edge contour of the sphere. However, as shown in Figure 2(b), after processing the projection image of the sphere using the overexposure correction method of the projection image in the prior art, the shape of the edge contour of the sphere is similar to the shape of the playground, and the shape of the edge contour of the sphere has changed significantly.
[0023] To address the problem that existing projection image overexposure correction methods result in numerous artifacts in the reconstructed projection image, this application provides a projection image overexposure correction method, a projection image overexposure correction device, an electronic device, and a computer-readable storage medium, which can solve the problem of numerous artifacts in the reconstructed projection image caused by existing projection image overexposure correction methods.
[0024] Figure 3 An overexposure correction method for projected images provided in this application embodiment, such as... Figure 3 As shown, the above method includes: Step S101: Obtain the original projected image of the target under test; Specifically, the target being measured can be the body or any object that requires an X-ray scan.
[0025] Step S102: Determine whether there are overexposed areas in the original projected image. Step S103: If there are overexposed areas in the original projected image, identify the edge contours of the unexposed areas in the original projected image. Specifically, the shape of the edge contour of the unexposed area is exactly the same as the shape of the edge contour of the target being measured.
[0026] Specifically, identifying the edge contour of a certain area is a prior art technique, therefore, it will not be described in detail here.
[0027] Step S104: Based on the edge contour of the unexposed area, perform a dilation operation on the unexposed area to obtain the target projection image.
[0028] Through the above embodiments, firstly, the original projected image of the target under test is acquired. Then, it is determined whether there are overexposed areas in the original projected image. Subsequently, if there are overexposed areas in the original projected image, the edge contours of the unexposed areas in the original projected image are identified. Finally, based on the edge contours of the unexposed areas, a dilation operation is performed on the unexposed areas to obtain the target projected image. Since the shape of the edge contours of the unexposed areas is similar to the shape of the edge contours of the target under test, the dilation operation on the unexposed areas is performed to fill in the edge parts of the target under test without significantly changing the shape of the edge contours of the target under test. This reduces artifacts in the reconstructed image, thereby solving the problem of numerous artifacts in the reconstructed image caused by the existing overexposure correction method for projected images.
[0029] In an optional embodiment, step S102 above can be implemented as follows: Determine whether the grayscale value of each pixel in the original projected image meets the preset condition. The preset condition is that the grayscale value of the pixel is not less than the grayscale upper limit value. The grayscale upper limit value is obtained by multiplying the grayscale upper limit value of the flat panel detector by a preset ratio. If at least one pixel in the original projected image satisfies the aforementioned preset condition, it is determined that the original projected image has an overexposed area. If none of the pixels in the original projected image satisfy the aforementioned preset condition, it is determined that the original projected image does not have an overexposed area.
[0030] In this embodiment, it is first determined whether the grayscale value of each pixel in the original projected image meets the preset conditions. If the grayscale value of at least one pixel meets the preset conditions, it is determined that there is an overexposed area in the original projected image and overexposed correction is required. If the grayscale values of all pixels do not meet the preset conditions, it is determined that there is no overexposed area in the original projected image and overexposed correction is not required.
[0031] In an optional embodiment, prior to step S103, the method further includes: Filter out pixels in the original projected image that do not meet the above preset conditions; The area composed of the selected pixels is determined to be the above-mentioned unexposed area.
[0032] In this embodiment, if the grayscale values of a pixel do not meet the preset conditions, then the pixel is located in an unexposed area, and the area composed of all pixels that do not meet the preset conditions is an unexposed area.
[0033] In an optional embodiment, step S104 above can be implemented as follows: Step S1041, first determining step, based on the above grayscale upper limit value and target air grayscale value, determine the number of expansions, the above target air grayscale value is the average grayscale value of all pixels in the air projection image of the preset area under ideal conditions, the above ideal conditions are that the air projection image of the preset area is obtained by scanning with X-rays of the target dose and is not overexposed, the above target dose is the dose of X-rays emitted by the X-ray tube when the above original projection image is acquired; Specifically, the greater the dose of X-rays emitted by the X-ray tube, the larger the overexposed area at the edge of the target being measured. In this case, the larger the area that needs to be compensated, the more expansion cycles are required. For X-rays that penetrate air, the attenuation is negligible. Therefore, the target air gray value can characterize the dose of X-rays, and the greater the dose of X-rays, the greater the target air gray value.
[0034] Step S1042, processing step: Based on the coordinates of all pixels of the edge contour of the (n-1)th expansion region, perform a one-pixel expansion operation on the (n-1)th expansion region to obtain the coordinates of all pixels of the edge contour of the nth expansion region. The 0th expansion region is the above-mentioned unexposed region, and n is a positive integer. Specifically, the existing technology is to perform a one-pixel dilation operation on the region based on the pixel coordinates of the region's edge contour, which will not be described in detail here.
[0035] Step S1043, the second determination step, determines the nth gray value based on the above expansion number, the value of n, the above gray value upper limit and the above target air gray value; Step S1044, assignment step: Based on the coordinates of each pixel of the edge contour of the nth expansion region, assign the nth gray value to each pixel of the edge contour of the nth expansion region. Step S1045: Repeat the above processing steps, the second determination step, and the assignment step until n equals the above dilation number to obtain the above target projection image.
[0036] In this embodiment, taking the processing of the projected image of a sphere as an example, as shown in Figure 4(a), the area within the white circle is the unexposed area, which is the 0th expansion area. Assuming the determined expansion number is 20, that is, performing 20 expansion operations on the unexposed area, it is equivalent to the radius of the final projected image of the sphere being 20 pixels larger than the radius of the original projected image of the sphere. The resulting target projected image is shown in Figure 4(b). The white area in Figure 4(b) is the supplemented area. The white circle in Figure 4(b) is thicker than that in Figure 4(a). The specific expansion operation process is as follows: after identifying the edge contour of the unexposed area (including the coordinates of the pixels in the edge contour), based on the edge of the unexposed area... The coordinates of all pixels of the contour are obtained. The unexposed area is dilated by one pixel to obtain the coordinates of all pixels of the edge contour of the first dilated area. The white circle in Figure 4(a) is the edge contour of the first dilated area. Then, based on the coordinates of each pixel of the edge contour of the first dilated area, a gray value is assigned to each pixel in the edge contour of the first dilated area. These edge contours of the first dilated area will be displayed in the projected image. After that, the same dilation operation is performed on the first dilated area again, and repeated 20 times. It is equivalent to expanding outward in circles. After dilution for 20 circles, Figure 4(b) can be obtained. The processing of the original projected image of the target is similar.
[0037] In an optional embodiment, step S1041 above can be implemented as follows: Using formula The number of expansions is determined, where N is the number of expansions, P1 is the target air gray value, and P2 is the upper limit of gray value.
[0038] In this embodiment, the formula is used. The number of expansions is determined, where N is the number of expansions, P1 is the target air gray value, and P2 is the upper limit of gray value. The target air gray value is positively correlated with the dose of X-rays emitted by the X-ray tube. The greater the dose of X-rays emitted by the X-ray tube, the larger the overexposed area in the edge of the target being measured. In this case, the area that needs to be compensated is larger, so the number of expansions is larger. That is, the number of expansions is positively correlated with the target air gray value. The upper limit of gray value is used to separate the overexposed area from the unexposed area. The smaller the upper limit of gray value, the smaller the part of the unexposed area in the original projection image, and the larger the area that needs to be compensated is. Therefore, the number of expansions is larger, so the number of expansions is negatively correlated with the upper limit of gray value.
[0039] In an optional embodiment, step S1043 above can be implemented as follows: Using formula The target air grayscale value is determined, where x is the value of n, y is the nth grayscale value, N is the number of expansions, P1 is the target air grayscale value, and P2 is the upper limit of grayscale value.
[0040] Specifically, the formula In this diagram, x represents the value of n, y represents the nth grayscale value, N represents the number of expansions, P1 represents the target air grayscale value, and P2 represents the upper limit of grayscale. The range of x is the same as the range of n, i.e., [1, N]. In the unexposed area, the grayscale value of the pixel is less than P2, and in the overexposed area, the grayscale value is not less than P2. P2 is used as the lower limit of y. The closer to the edge contour of the target, the thinner the pixel, and the larger its grayscale value should be, up to the target air grayscale value (the outer edge contour of the target is air). Therefore, the upper limit of y should be P1, and the range of y is [P2, P1]. The parabola formula is calculated using (0, P2) and (N, P1). 'a' in the context is Formula for calculating a parabola In this context, c represents P1.
[0041] In this embodiment, the formula In this model, the value range of x is the same as the value range of n, which is [1, N], and the value range of y is [P2, P1]. Therefore, y and n are positively correlated. The gray value of each pixel on the edge contour of the first-round expansion region is the upper limit of gray value. Then, as the number of rounds increases, the gray value of each pixel on the edge contour of the expansion region gradually increases. The gray value of each pixel on the edge contour of the Nth-round expansion region is the target air gray value. This conforms to the principle that the closer the edge contour is to the target being measured, the thinner it is, and the larger the gray value of the pixel should be, until the target air gray value (the outer side of the edge contour of the target being measured is air) is reached, making the target projection image more consistent with the actual situation.
[0042] In an optional embodiment, the method further includes: obtaining the target air grayscale value, including: Multiple air projection images of the aforementioned preset area are acquired, with each air projection image corresponding to a dose. The air projection images are obtained by X-ray scanning of the corresponding dose and are not overexposed. Specifically, the dose of X-rays can be achieved by adjusting the voltage (kV) and current (mAs) of the X-ray tube. For example, by keeping the voltage constant and adjusting the current, the X-ray tube can be controlled to emit different doses of X-rays, or by keeping the current constant and adjusting the voltage, the X-ray tube can be controlled to emit different doses of X-rays.
[0043] The average grayscale value of all pixels in each of the above-mentioned air projection images is calculated to obtain multiple air grayscale values, and the above-mentioned air grayscale values correspond one-to-one with the above-mentioned air projection images; By fitting the above dose and the above air gray value, a dose gray value function is obtained, which characterizes the mapping relationship between the above dose and the above air gray value; Based on the target dose and the dose gray value function, the target air gray value is determined.
[0044] In this embodiment, the air projection image obtained by scanning the preset area with X-rays using the target dose will definitely be overexposed. Therefore, multiple small dose X-rays are used to scan the preset area to obtain air projection images, so that the air projection images are not overexposed. The average gray value of all pixels in these air projection images is calculated to obtain multiple air gray values. These small doses and air gray values are fitted to obtain a dose gray value function. Based on the target dose and the dose gray value function, the average gray value of all pixels in the air projection image of the preset area under ideal conditions is obtained, that is, the target air gray value is determined.
[0045] Figure 5 An overexposure correction device for a projected image provided in this application embodiment, such as Figure 5 As shown, the above method includes: The acquisition module 10 is used to acquire the original projected image of the target under test; Specifically, the target being measured can be the body or any object that requires an X-ray scan.
[0046] The determination module 20 is used to determine whether there are overexposed areas in the original projected image. The recognition module 30 is used to recognize the edge contour of the unexposed area in the original projection image when there is an overexposed area in the original projection image. Specifically, the shape of the edge contour of the unexposed area is exactly the same as the shape of the edge contour of the target being measured.
[0047] Specifically, identifying the edge contour of a certain area is a prior art technique, therefore, it will not be described in detail here.
[0048] The processing module 40 is used to perform a dilation operation on the unexposed area based on the edge contour of the unexposed area to obtain a target projection image.
[0049] Through the above embodiments, firstly, the original projected image of the target under test is acquired. Then, it is determined whether there are overexposed areas in the original projected image. Subsequently, if there are overexposed areas in the original projected image, the edge contours of the unexposed areas in the original projected image are identified. Finally, based on the edge contours of the unexposed areas, a dilation operation is performed on the unexposed areas to obtain the target projected image. Since the shape of the edge contours of the unexposed areas is similar to the shape of the edge contours of the target under test, the dilation operation on the unexposed areas is performed to fill in the edge parts of the target under test without significantly changing the shape of the edge contours of the target under test. This reduces artifacts in the reconstructed image, thereby solving the problem of numerous artifacts in the reconstructed image caused by the existing overexposure correction method for projected images.
[0050] In an optional embodiment, the determining module includes: The first determining unit is used to determine whether the gray value of each pixel in the original projected image meets a preset condition. The preset condition is that the gray value of the pixel is not less than the upper limit of gray value. The upper limit of gray value is obtained by multiplying the upper limit of gray value of the flat panel detector by a preset ratio. The second determining unit is configured to determine that the original projected image has an overexposed area when the gray value of at least one pixel in the original projected image meets the preset condition, and to determine that the original projected image does not have an overexposed area when the gray value of all pixels in the original projected image does not meet the preset condition.
[0051] In this embodiment, it is first determined whether the grayscale value of each pixel in the original projected image meets the preset conditions. If the grayscale value of at least one pixel meets the preset conditions, it is determined that there is an overexposed area in the original projected image and overexposed correction is required. If the grayscale values of all pixels do not meet the preset conditions, it is determined that there is no overexposed area in the original projected image and overexposed correction is not required.
[0052] In an optional embodiment, the above-described apparatus further includes: The filtering module is used to filter out pixels in the original projected image that do not meet the preset conditions. The integration module is used to determine whether the area composed of the selected pixels is the aforementioned unexposed area.
[0053] In this embodiment, if the grayscale values of a pixel do not meet the preset conditions, then the pixel is located in an unexposed area, and the area composed of all pixels that do not meet the preset conditions is an unexposed area.
[0054] In an optional embodiment, the above-mentioned processing module includes: The third determining unit is used to perform the first determining step, and to determine the number of expansions based on the above grayscale upper limit value and the target air grayscale value. The target air grayscale value is the average grayscale value of all pixels in the air projection image of the preset area under ideal conditions. The ideal conditions are that the air projection image of the preset area is obtained by scanning with X-rays of the target dose and is not overexposed. The target dose is the dose of X-rays emitted by the X-ray tube when the original projection image is acquired. Specifically, the greater the dose of X-rays emitted by the X-ray tube, the larger the overexposed area at the edge of the target being measured. In this case, the larger the area that needs to be compensated, the more expansion cycles are required. For X-rays that penetrate air, the attenuation is negligible. Therefore, the target air gray value can characterize the dose of X-rays, and the greater the dose of X-rays, the greater the target air gray value.
[0055] The processing unit is used to perform processing steps, based on the coordinates of all pixels of the edge contour of the (n-1)th expansion region, to perform a one-pixel expansion operation on the (n-1)th expansion region to obtain the coordinates of all pixels of the edge contour of the nth expansion region, where the 0th expansion region is the aforementioned unexposed region, and n is a positive integer. Specifically, the existing technology is to perform a one-pixel dilation operation on the region based on the pixel coordinates of the region's edge contour, which will not be described in detail here.
[0056] The fourth determining unit is used to perform the second determining step, and to determine the nth gray value based on the above-mentioned number of expansions, the value of n, the above-mentioned upper limit of gray value and the above-mentioned target air gray value; The assignment unit is used to perform the assignment step, which assigns the nth gray value to each pixel of the edge contour of the nth expansion region based on the coordinates of each pixel of the edge contour of the nth expansion region. An iterative unit is used to perform repetitive steps, repeating the above processing steps, the above second determination steps, and the above assignment steps until n equals the above dilation number, to obtain the above target projection image.
[0057] In this embodiment, taking the processing of the projected image of a sphere as an example, as shown in Figure 4(a), the area within the white circle is the unexposed area, which is the 0th expansion area. Assuming the determined expansion number is 20, that is, performing 20 expansion operations on the unexposed area, it is equivalent to the radius of the final projected image of the sphere being 20 pixels larger than the radius of the original projected image of the sphere. The resulting target projected image is shown in Figure 4(b). The white area in Figure 4(b) is the supplemented area. The white circle in Figure 4(b) is thicker than that in Figure 4(a). The specific expansion operation process is as follows: after identifying the edge contour of the unexposed area (including the coordinates of the pixels in the edge contour), based on the edge of the unexposed area... The coordinates of all pixels of the contour are obtained. The unexposed area is dilated by one pixel to obtain the coordinates of all pixels of the edge contour of the first dilated area. The white circle in Figure 4(a) is the edge contour of the first dilated area. Then, based on the coordinates of each pixel of the edge contour of the first dilated area, a gray value is assigned to each pixel in the edge contour of the first dilated area. These edge contours of the first dilated area will be displayed in the projected image. After that, the same dilation operation is performed on the first dilated area again, and repeated 20 times. It is equivalent to expanding outward in circles. After dilution for 20 circles, Figure 4(b) can be obtained. The processing of the original projected image of the target is similar.
[0058] In an optional embodiment, the third determining unit is further configured to: Using formula The number of expansions is determined, where N is the number of expansions, P1 is the target air gray value, and P2 is the upper limit of gray value.
[0059] In this embodiment, the formula is used. The number of expansions is determined, where N is the number of expansions, P1 is the target air gray value, and P2 is the upper limit of gray value. The target air gray value is positively correlated with the dose of X-rays emitted by the X-ray tube. The greater the dose of X-rays emitted by the X-ray tube, the larger the overexposed area in the edge of the target being measured. In this case, the area that needs to be compensated is larger, so the number of expansions is larger. That is, the number of expansions is positively correlated with the target air gray value. The upper limit of gray value is used to separate the overexposed area from the unexposed area. The smaller the upper limit of gray value, the smaller the part of the unexposed area in the original projection image, and the larger the area that needs to be compensated is. Therefore, the number of expansions is larger, so the number of expansions is negatively correlated with the upper limit of gray value.
[0060] In an optional embodiment, the fourth determining unit is further configured to: Using formula The target air grayscale value is determined, where x is the value of n, y is the nth grayscale value, N is the number of expansions, P1 is the target air grayscale value, and P2 is the upper limit of grayscale value.
[0061] Specifically, the formula In this diagram, x represents the value of n, y represents the nth grayscale value, N represents the number of expansions, P1 represents the target air grayscale value, and P2 represents the upper limit of grayscale. The range of x is the same as the range of n, i.e., [1, N]. In the unexposed area, the grayscale value of the pixel is less than P2, and in the overexposed area, the grayscale value is not less than P2. P2 is used as the lower limit of y. The closer to the edge contour of the target, the thinner the pixel, and the larger its grayscale value should be, up to the target air grayscale value (the outer edge contour of the target is air). Therefore, the upper limit of y should be P1, and the range of y is [P2, P1]. The parabola formula is calculated using (0, P2) and (N, P1). 'a' in the context is Formula for calculating a parabola In this context, c represents P1.
[0062] In this embodiment, the formula In this model, the value range of x is the same as the value range of n, which is [1, N], and the value range of y is [P2, P1]. Therefore, y and n are positively correlated. The gray value of each pixel on the edge contour of the first-round expansion region is the upper limit of gray value. Then, as the number of rounds increases, the gray value of each pixel on the edge contour of the expansion region gradually increases. The gray value of each pixel on the edge contour of the Nth-round expansion region is the target air gray value. This conforms to the principle that the closer the edge contour is to the target being measured, the thinner it is, and the larger the gray value of the pixel should be, until the target air gray value (the outer side of the edge contour of the target being measured is air) is reached, making the target projection image more consistent with the actual situation.
[0063] In an optional embodiment, the above-mentioned device further includes: a data acquisition module, the data acquisition module being used to acquire the target air grayscale value, the data acquisition module comprising: The acquisition unit is used to acquire multiple air projection images of the preset area, each air projection image corresponding to a dose, and the air projection images are obtained by X-ray scanning of the corresponding dose and are not overexposed. Specifically, the dose of X-rays can be achieved by adjusting the voltage (kV) and current (mAs) of the X-ray tube. For example, by keeping the voltage constant and adjusting the current, the X-ray tube can be controlled to emit different doses of X-rays, or by keeping the current constant and adjusting the voltage, the X-ray tube can be controlled to emit different doses of X-rays.
[0064] The calculation unit is used to calculate the average gray value of all pixels in each of the above-mentioned air projection images to obtain multiple air gray values, and the air gray values correspond one-to-one with the above-mentioned air projection images. The fitting unit is used to fit the above dose and the above air gray value to obtain the dose gray value function, which represents the mapping relationship between the above dose and the above air gray value. The fifth determining unit is used to determine the target air gray value based on the target dose and the dose gray value function.
[0065] In this embodiment, the air projection image obtained by scanning the preset area with X-rays using the target dose will definitely be overexposed. Therefore, multiple small dose X-rays are used to scan the preset area to obtain air projection images, so that the air projection images are not overexposed. The average gray value of all pixels in these air projection images is calculated to obtain multiple air gray values. These small doses and air gray values are fitted to obtain a dose gray value function. Based on the target dose and the dose gray value function, the average gray value of all pixels in the air projection image of the preset area under ideal conditions is obtained, that is, the target air gray value is determined.
[0066] This application also provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps of the projection image overexposure correction method provided in any of the foregoing method embodiments.
[0067] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the projection image overexposure correction method provided in any of the foregoing method embodiments.
[0068] The beneficial technical effects of this application are as follows: The artifacts in the reconstructed image of the projected image are reduced. Figure 6(a) is the reconstructed image of the projected image after correction using the existing projection image overexposure correction method, and Figure 6(b) is the reconstructed image of the projected image after correction using the projection image overexposure correction method of this application. The white pixels pointed to by the white arrows in Figures 6(a) and 6(b) are artifacts. As shown in Figures 6(a) and 6(b), compared with the reconstructed image of the projected image after correction using the existing projection image overexposure correction method, the artifacts in the reconstructed image of the projected image after correction using the projection image overexposure correction method of this application are greatly reduced.
[0069] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0070] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general-purpose hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described above in various embodiments or some parts of embodiments.
[0071] It should be understood that the terminology used herein is for the purpose of describing particular exemplary embodiments only and is not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms “a,” “an,” and “the above” as used herein may also mean including the plural forms. The terms “comprising,” “including,” “containing,” and “having” are inclusive and therefore indicate the presence of the stated features, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, elements, components, and / or combinations thereof. The method steps, processes, and operations described herein are not construed as requiring them to be performed in a specific order described or illustrated unless the order of performance is explicitly indicated. It should also be understood that additional or alternative steps may be used.
[0072] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for correcting overexposure in projected images, characterized in that, The method includes: Acquire the original projected image of the target under test; Determine whether there are overexposed areas in the original projected image; In the case that there are overexposed areas in the original projected image, the edge contours of the unexposed areas in the original projected image are identified; Based on the edge contour of the unexposed area, a dilation operation is performed on the unexposed area to obtain the target projection image; Based on the edge contour of the unexposed region, a dilation operation is performed on the unexposed region to obtain a target projection image, including: The first determining step involves determining the number of expansions based on the upper limit of grayscale and the target air grayscale value. The target air grayscale value is the average grayscale value of all pixels in the air projection image of the preset area under ideal conditions. The ideal conditions are that the air projection image of the preset area is obtained by scanning with X-rays of the target dose and without overexposure. The target dose is the dose of X-rays emitted by the X-ray tube when the original projection image is acquired. The processing steps are as follows: based on the coordinates of all pixels of the edge contour of the (n-1)th expansion region, perform a one-pixel expansion operation on the (n-1)th expansion region to obtain the coordinates of all pixels of the edge contour of the nth expansion region. The 0th expansion region is the unexposed region, and n is a positive integer. The second determination step involves determining the nth gray value based on the number of expansions, the value of n, the upper limit of grayscale, and the target air grayscale value. The assignment step involves assigning the nth grayscale value to each pixel of the edge contour of the nth expansion region based on the coordinates of each pixel of the edge contour of the nth expansion region. Repeat the steps, including the processing step, the second determining step, and the assignment step, until n equals the dilation number, to obtain the target projection image.
2. The method according to claim 1, characterized in that, Determining whether there are overexposed areas in the original projected image includes: Determine whether the grayscale value of each pixel in the original projected image meets a preset condition, wherein the preset condition is that the grayscale value of the pixel is not less than the upper limit of grayscale value of the flat panel detector; If the grayscale value of at least one pixel in the original projected image meets the preset condition, it is determined that the original projected image has an overexposed area; if the grayscale value of all pixels in the original projected image does not meet the preset condition, it is determined that the original projected image does not have an overexposed area.
3. The method according to claim 2, characterized in that, Before identifying the edge contours of the unexposed areas in the original projected image, the method further includes: Filter out pixels in the original projected image that do not meet the preset conditions; The region composed of the selected pixels is determined to be the unexposed region.
4. The method according to claim 1, characterized in that, The first determining step, based on the upper limit of grayscale and the target air grayscale value, determines the number of expansions, including: Using formula The number of expansions is determined, where N is the number of expansions, P1 is the target air gray value, and P2 is the upper limit of gray value.
5. The method according to claim 1, characterized in that, Based on the expansion number, the value of n, the upper limit of grayscale, and the target air grayscale value, the nth grayscale value is determined, including: Using formula The target air grayscale value is determined, where x is the value of n, y is the nth grayscale value, N is the number of expansions, P1 is the target air grayscale value, and P2 is the upper limit of grayscale.
6. The method according to claim 1, characterized in that, The method further includes: obtaining the target air grayscale value, including: Multiple air projection images of the preset area are acquired, each air projection image corresponding to a dose, and the air projection images are obtained by X-ray scanning of the corresponding dose without overexposure; The average grayscale value of all pixels in each of the air projection images is calculated to obtain multiple air grayscale values, and each air grayscale value corresponds one-to-one with the air projection image. The dose and the air gray value are fitted to obtain a dose gray value function, which characterizes the mapping relationship between the dose and the air gray value; The target air gray value is determined based on the target dose and the dose gray value function.
7. A projection image overexposure correction device, characterized in that, The device includes: The acquisition module is used to acquire the original projected image of the target under test; The determination module is used to determine whether there are overexposed areas in the original projected image; The recognition module is used to identify the edge contours of unexposed areas in the original projected image when there are overexposed areas in the original projected image. The processing module is used to perform a dilation operation on the unexposed area based on the edge contour of the unexposed area to obtain a target projection image; The processing module includes: The third determining unit is used to perform the first determining step, and to determine the number of expansions based on the upper limit of grayscale and the target air grayscale value. The target air grayscale value is the average grayscale value of all pixels in the air projection image of the preset area under ideal conditions. The ideal conditions are that the air projection image of the preset area is obtained by scanning with X-rays of the target dose and is not overexposed. The target dose is the dose of X-rays emitted by the X-ray tube when the original projection image is acquired. The processing unit is used to perform processing steps, based on the coordinates of all pixels of the edge contour of the (n-1)th expansion region, to perform a one-pixel expansion operation on the (n-1)th expansion region to obtain the coordinates of all pixels of the edge contour of the nth expansion region, where the 0th expansion region is the unexposed region, and n is a positive integer. The fourth determining unit is used to perform the second determining step, which determines the nth gray value based on the number of expansions, the value of n, the upper limit of gray value, and the target air gray value. The assignment unit is used to perform the assignment step, which assigns the nth gray value to each pixel of the edge contour of the nth expansion region based on the coordinates of each pixel of the edge contour of the nth expansion region. An iterative unit is used to perform repetitive steps, repeating the processing step, the second determining step, and the assignment step until n equals the dilation number, to obtain the target projection image.
8. An electronic device, characterized in that, The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the projection image overexposure correction method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the projection image overexposure correction method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Method, device and equipment for identifying non-human tissue area of X-ray image and medium
CN114693634A