A multi-layer X-ray detector image calibration method and terminal

Through the gain correction and image registration method of the multi-layer X-ray detector, the problems of motion artifacts and dose increase in traditional multi-energy X-ray detection technology are solved, and high-quality image capture is achieved, which is suitable for shooting of moving objects.

CN112053312BActive Publication Date: 2024-10-22SHENZHEN ANGELL TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010835030.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-19
Publication Date
2024-10-22
Estimated Expiration
2040-08-19

AI Technical Summary

Technical Problem

Traditional multi-energy X-ray detection technology is prone to motion artifacts when photographing moving objects, and multiple exposures increase the X-ray dose of the object to be detected, resulting in a decrease in image quality.

Method used

The multi-layer X-ray detector image calibration method is used to generate a gain correction table by obtaining gain correction images, perform multi-point gain correction and image registration, eliminate mechanical errors, avoid artifacts, and improve image quality.

Benefits of technology

It implements a gain correction table to obtain multiple energies in one exposure, performs multi-point correction and image registration, improves image quality, reduces mechanical errors and X-ray dose, eliminates artifacts, and is suitable for image capture of moving objects. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112053312B_ABST
    Figure CN112053312B_ABST
Patent Text Reader

Abstract

The present invention provides a multi-layer X-ray detector image calibration method and terminal, which obtain a gain correction image and generate a gain correction table according to the gain correction image; obtain a multi-energy image of an object to be measured, the multi-energy image being an image respectively obtained by generating X-rays of different energies after the X-rays pass through the object to be measured and an X-ray detector with a multi-layer flat plate structure; perform multi-point gain correction on the multi-energy image according to the gain correction table to obtain a multi-energy correction image; and align the multi-energy correction image so that the images of the object to be measured in the multi-energy correction image overlap; compared with the previous method of correcting the acquired multi-energy image for the entire gain correction image, the present invention can obtain a higher quality image by performing multi-point correction according to the gain correction table, and the alignment can further eliminate the mechanical errors caused by the X-ray detector with a multi-layer flat plate structure during the installation process, avoid image artifacts, and achieve improved image quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing, and in particular to a multi-layer X-ray detector image calibration method and terminal. Background Art

[0002] Multi-energy X-ray detection technology is to collect at least two images, namely a high-energy image and a low-energy image, and achieve detection that meets specific goals through the corresponding dual-energy subtraction technology; this technology is widely used in medical and non-destructive testing fields, and can realize functions such as chest X-ray bone and flesh separation, bone density detection, and metal detection.

[0003] Traditional multi-energy X-ray detection technology is generally carried out by a single X-ray tube and a single detector. In specific application scenarios, the tube emits rays of different kV (such as high, medium, and low kV) in batches, and a single detector is used to collect images at different kVs to obtain multi-energy images. Specific functions can be achieved for the collected images through technologies such as dual-energy subtraction. However, the multi-energy images obtained by this method are formed by multiple exposures, not simultaneous exposures. Therefore, when shooting moving objects (such as chest X-rays), there will be motion differences in the multi-energy images, and motion artifacts will appear after dual-energy subtraction. In addition, multiple exposures also increase the X-ray dose received by the object or person to be detected. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a multi-layer X-ray detector image calibration method and terminal, which improves the image quality by preprocessing multi-energy images and facilitates subsequent image analysis.

[0005] In order to solve the above technical problems, a technical solution adopted by the present invention is:

[0006] A multi-layer X-ray detector image calibration method comprises the steps of:

[0007] S1. Acquire a gain correction image, and generate a gain correction table according to the gain correction image, wherein the gain correction image is an air image acquired by the X-ray detector of the multi-layer flat-panel structure when the X-ray is turned on;

[0008] S2. Acquire a multi-energy image of the object to be measured, wherein the multi-energy image is an image obtained by respectively generating X-rays of different energies after the X-rays pass through the object to be measured and the X-ray detector with a multi-layer flat-panel structure;

[0009] S3, performing multi-point gain correction on the multi-energy image according to the gain correction table to obtain a multi-energy corrected image;

[0010] S4. Register the multi-energy calibrated images so that the images of the objects to be measured in the multi-energy calibrated images overlap.

[0011] In order to solve the above technical problems, another technical solution adopted by the present invention is:

[0012] A multi-layer X-ray detector image calibration terminal comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:

[0013] S1. Acquire a gain correction image, and generate a gain correction table according to the gain correction image, wherein the gain correction image is an air image acquired by the X-ray detector of the multi-layer flat-panel structure when the X-ray is turned on;

[0014] S2. Acquire a multi-energy image of the object to be measured, wherein the multi-energy image is an image obtained by respectively generating X-rays of different energies after the X-rays pass through the object to be measured and the X-ray detector with a multi-layer flat-panel structure;

[0015] S3, performing multi-point gain correction on the multi-energy image according to the gain correction table to obtain a multi-energy corrected image;

[0016] S4. Register the multi-energy calibrated images so that the images of the objects to be measured in the multi-energy calibrated images overlap.

[0017] The beneficial effects of the present invention are as follows: a gain correction table is generated according to a gain correction image, and through an X-ray detector with a multi-layer flat-panel structure, a gain correction table corresponding to X-rays of various energies can be obtained by one exposure, and multi-point correction is performed to obtain a multi-energy correction image, and the multi-energy correction image is registered so that the images of the objects to be measured therein overlap. Compared with the previous correction of the multi-energy image obtained for the entire gain correction image, the multi-point correction according to the gain correction table can obtain an image with higher quality, and the registration can further eliminate the mechanical errors caused by the X-ray detector with a multi-layer flat-panel structure during the installation process, avoid image artifacts, and achieve improved image quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 A flowchart of a multi-layer X-ray detector image calibration method according to an embodiment of the present invention;

[0019] Figure 2 This is a schematic structural diagram of a multi-layer X-ray detector image calibration terminal according to an embodiment of the present invention;

[0020] Figure 3 A multi-layer X-ray detector according to an embodiment of the present invention;

[0021] Figure 4 A schematic diagram of image capture according to an embodiment of the present invention;

[0022] Figure 5 This is a schematic diagram of the image fusion effect before and after registration according to an embodiment of the present invention;

[0023] Description of labels:

[0024] 1. X-ray tube; 2. Multi-layer X-ray detector; 2-1. Upper detector; 2-2. Filter layer; 2-3. Lower detector; 3. Object to be measured; 4. A multi-layer X-ray detector image calibration terminal; 5. Processor; 6. Memory. DETAILED DESCRIPTION

[0025] In order to explain the technical content, achieved objectives and effects of the present invention in detail, the following is an explanation in conjunction with the implementation modes and the accompanying drawings.

[0026] Please refer to Figure 1 , a multi-layer X-ray detector image calibration method, comprising the steps of:

[0027] S1. Obtain a gain correction image and generate a gain correction table according to the gain correction image, wherein the gain correction image is an air image obtained by the X-ray detector of the multi-layer flat-panel structure when the X-ray is turned on;

[0028] S2. Acquire a multi-energy image of the object to be measured, wherein the multi-energy image is an image obtained by respectively generating X-rays of different energies after the X-rays pass through the object to be measured and the X-ray detector with a multi-layer flat-panel structure;

[0029] S3, performing multi-point gain correction on the multi-energy image according to the gain correction table to obtain a multi-energy corrected image;

[0030] S4. Register the multi-energy calibrated images so that the images of the objects to be measured in the multi-energy calibrated images overlap.

[0031] From the above description, it can be seen that the beneficial effects of the present invention are: a gain correction table is generated according to a gain correction image, and through an X-ray detector with a multi-layer flat-panel structure, a gain correction table corresponding to X-rays of various energies can be obtained by one exposure, and multi-point correction is performed to obtain a multi-energy correction image, and the multi-energy correction image is aligned to make the image of the object to be measured overlap. Compared with the previous correction of the multi-energy image obtained for the entire gain correction image, multi-point correction according to the gain correction table can obtain a higher quality image, and the alignment can further eliminate the mechanical errors caused by the X-ray detector with a multi-layer flat-panel structure during the installation process, avoid image artifacts, and achieve improved image quality.

[0032] Furthermore, the S1 is specifically:

[0033] Determine a first dose of X-rays that causes a grayscale value of an image obtained by X-rays of a certain energy in the multi-energy image to be within a first preset interval or a second preset interval;

[0034] An air map is taken with the first dose of X-rays to obtain a first image obtained by X-rays of a certain energy among multiple multi-energy images, and a weighted average is performed on the multiple first images to obtain a first gain correction table corresponding to a first preset interval and a second gain correction table corresponding to a second preset interval.

[0035] From the above description, it can be seen that multiple first images are taken with the X-ray dose that makes the grayscale value of the image obtained by a certain energy X-ray in the multi-energy image within a preset range as the standard, and the gain correction table corresponding to different preset ranges is obtained, thereby improving the accuracy of gain correction.

[0036] Furthermore, the image obtained by each energy of X-ray in S1 corresponds to at least two gain correction tables with different grayscale value ranges;

[0037] The S3 is specifically:

[0038] According to the gain correction table, multi-point gain correction is performed on the multi-energy image to obtain a multi-energy corrected image. The gain correction of each point in the multi-energy image is specifically as follows:

[0039] Calculate the gain factor:

[0040]

[0041] Wherein, m is the mean value of the grayscale value of the gain correction table, m + represents the mean of the gain correction table with higher grayscale value, m- represents the mean of the gain correction table with lower grayscale value; S is the grayscale value of a pixel on the multi-energy image, (u, v) represents a pixel on the multi-energy correction image; determine whether S is between the two gain correction tables, if so, then S _ = gain_l_(x,y), S + =gain_l + (x,y), where gain_l + Represents the gain correction table with higher grayscale value, gain_l - represents a gain correction table with a lower grayscale value, and (x, y) represents a pixel point on the multi-energy image;

[0042] Each pixel in the multi-energy image is multiplied by its corresponding gain coefficient to obtain the multi-energy corrected image.

[0043] From the above description, it can be seen that calculating the gain coefficient for each point in the multi-energy image and performing multi-point gain correction greatly improves the quality of the final image and facilitates subsequent operations such as image fusion and subtraction.

[0044] Furthermore, the S4 is specifically:

[0045] Acquire a multi-resolution card image of a resolution card, and crop an image at the same position in the multi-resolution card image to obtain a cropped image;

[0046] For the two cropped images f l and f h Perform Fourier transform and get F l and F h , and calculate the cross power spectrum between the two cropped images

[0047] Among them, F h * Indicates F h The complex conjugate of , (u, v) represents a pixel;

[0048] Performing a two-dimensional Fourier transform on the cross power spectrum to obtain a second image, dividing the second image into a first quadrant, a second quadrant, a third quadrant, and a fourth quadrant based on the center of the second image, swapping the first quadrant with the third quadrant, and swapping the second quadrant with the fourth quadrant to obtain an impulse response center;

[0049] A threshold is set, and according to the prefabrication and the impulse response center, a plurality of impulse responses and the coordinate difference between the impulse response and the impulse response center are obtained, and the regional correlation coefficient of the impulse response is calculated:

[0050]

[0051] Among them, A l and A h According to the coordinate difference, l and f h A third image captured in , m is the length of the third image, and n is the width of the third image;

[0052] A shift impulse response with the maximum regional correlation coefficient is obtained, and the multi-energy corrected image is registered according to the coordinate difference of the shift impulse response.

[0053] From the above description, it can be seen that the position of the captured image is marked by the resolution card, which is convenient for marking the relative displacement in the image. The regional correlation coefficient is set to exclude multiple impulse response centers, which ensures that the final determined offset is close to the actual value, thereby achieving accurate image registration.

[0054] Furthermore, after S4, the step further includes:

[0055] The registered multi-energy corrected images are fused and subtracted.

[0056] From the above description, it can be seen that after the images are corrected and registered, fusion and subtraction operations are performed, so that the fused and subtracted images have better quality.

[0057] Please refer to Figure 2 , a multi-layer X-ray detector image calibration terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:

[0058] S1. Acquire a gain correction image, and generate a gain correction table according to the gain correction image, wherein the gain correction image is an air image acquired by the X-ray detector of the multi-layer flat-panel structure when the X-ray is turned on;

[0059] S2. Acquire a multi-energy image of the object to be measured, wherein the multi-energy image is an image obtained by respectively generating X-rays of different energies after the X-rays pass through the object to be measured and the X-ray detector with a multi-layer flat-panel structure;

[0060] S3, performing multi-point gain correction on the multi-energy image according to the gain correction table to obtain a multi-energy corrected image;

[0061] S4. Register the multi-energy calibrated images so that the images of the objects to be measured in the multi-energy calibrated images overlap.

[0062] The beneficial effects of the present invention are as follows: a gain correction table is generated according to a gain correction image, and through an X-ray detector with a multi-layer flat-panel structure, a gain correction table corresponding to X-rays of various energies can be obtained by one exposure, and multi-point correction is performed to obtain a multi-energy correction image, and the multi-energy correction image is registered so that the images of the objects to be measured therein overlap. Compared with the previous correction of the multi-energy image obtained for the entire gain correction image, the multi-point correction according to the gain correction table can obtain an image with higher quality, and the registration can further eliminate the mechanical errors caused by the X-ray detector with a multi-layer flat-panel structure during the installation process, avoid image artifacts, and achieve improved image quality.

[0063] Furthermore, the S1 is specifically:

[0064] Determine a first dose of X-rays that causes a grayscale value of an image obtained by X-rays of a certain energy in the multi-energy image to be within a first preset interval or a second preset interval;

[0065] An air map is taken with the first dose of X-rays to obtain a first image obtained by X-rays of a certain energy among multiple multi-energy images, and a weighted average is performed on the multiple first images to obtain a first gain correction table corresponding to a first preset interval and a second gain correction table corresponding to a second preset interval.

[0066] From the above description, it can be seen that multiple first images are taken with the X-ray dose that makes the grayscale value of the image obtained by a certain energy X-ray in the multi-energy image within a preset range as the standard, and the gain correction table corresponding to different preset ranges is obtained, thereby improving the accuracy of gain correction.

[0067] Furthermore, the image obtained by each energy of X-ray in S1 corresponds to at least two gain correction tables with different grayscale value ranges;

[0068] The S3 is specifically:

[0069] According to the gain correction table, multi-point gain correction is performed on the multi-energy image to obtain a multi-energy corrected image. The gain correction of each point in the multi-energy image is specifically as follows:

[0070] Calculate the gain factor:

[0071]

[0072] Wherein, m is the mean value of the grayscale value of the gain correction table, m + Represents the mean value of the gain correction table with higher grayscale value, m - represents the mean of the gain correction table with lower grayscale value; S is the grayscale value of a pixel on the multi-energy image, (u, v) represents a pixel on the multi-energy correction image; determine whether S is between the two gain correction tables, if so, then S _ = gain_l_(x,y), S + =gain_l + (x,y), where gain_l + Represents the gain correction table with higher grayscale value, gain_l - represents a gain correction table with a lower grayscale value, and (x, y) represents a pixel point on the multi-energy image;

[0073] Each pixel in the multi-energy image is multiplied by its corresponding gain coefficient to obtain the multi-energy corrected image.

[0074] From the above description, it can be seen that calculating the gain coefficient for each point in the multi-energy image and performing multi-point gain correction greatly improves the quality of the final image and facilitates subsequent operations such as image fusion and subtraction.

[0075] Furthermore, the S4 is specifically:

[0076] Acquire a multi-resolution card image of a resolution card, and crop an image at the same position in the multi-resolution card image to obtain a cropped image;

[0077] For the two cropped images f l and f h Perform Fourier transform and get F l and F h , and calculate the cross power spectrum between the two cropped images

[0078] Among them, F h * Indicates F h The complex conjugate of , (u, v) represents a pixel;

[0079] Performing a two-dimensional Fourier transform on the cross power spectrum to obtain a second image, dividing the second image into a first quadrant, a second quadrant, a third quadrant, and a fourth quadrant based on the center of the second image, swapping the first quadrant with the third quadrant, and swapping the second quadrant with the fourth quadrant to obtain an impulse response center;

[0080] A threshold is set, and according to the prefabrication and the impulse response center, a plurality of impulse responses and the coordinate difference between the impulse response and the impulse response center are obtained, and the regional correlation coefficient of the impulse response is calculated:

[0081]

[0082] Among them, A l and A h According to the coordinate difference, l and f h A third image captured in , m is the length of the third image, and n is the width of the third image;

[0083] A shift impulse response with the maximum regional correlation coefficient is obtained, and the multi-energy corrected image is registered according to the coordinate difference of the shift impulse response.

[0084] From the above description, it can be seen that the position of the captured image is marked by the resolution card, which is convenient for marking the relative displacement in the image. The regional correlation coefficient is set to exclude multiple impulse response centers, which ensures that the final determined offset is close to the actual value, thereby achieving accurate image registration.

[0085] Furthermore, after S4, the step further includes:

[0086] The registered multi-energy corrected images are fused and subtracted.

[0087] From the above description, it can be seen that after the images are corrected and registered, fusion and subtraction operations are performed, so that the fused and subtracted images have better quality.

[0088] Please refer to Figure 1 , Embodiment 1 of the present invention is:

[0089] A multi-layer X-ray detector image calibration method, which can be used in all embodiments of this specification Figure 3 A multi-layer X-ray detector shown in the figure can set the kV value of the X-rays it emits. The X-ray tube 1 emits X-rays of corresponding kV value. The X-rays pass through the object to be detected 3 and reach the multi-layer X-ray detector 2. The multi-layer X-ray detector 2 converts the X-rays into visible light through the scintillator in the upper (low-energy) detector 2-1, and then collects electrons through photoelectric conversion to obtain a low-energy image; the residual X-rays pass through the filter layer 2-2 and are converted into high-energy X-rays, and pass through the lower (high-energy) detector 2-3 to obtain a high-energy image. A filter layer similar to 2-2 and a detector 2-3 can be added below the lower detector 2-3 in the multi-layer X-ray detector 2. By changing the composition of the filter layer, X-rays of different energies can be generated, thereby obtaining multi-energy images, which specifically includes:

[0090] S1. Acquire a gain correction image, and generate a gain correction table according to the gain correction image, wherein the gain correction image is an air image acquired by the X-ray detector of the multi-layer flat-panel structure when the X-ray is turned on;

[0091] Specifically:

[0092] Determine a first dose of X-rays that causes a grayscale value of an image obtained by X-rays of a certain energy in the multi-energy image to be within a first preset interval or a second preset interval;

[0093] Taking an air map with the first dose of X-rays, obtaining a first image obtained by X-rays of a certain energy among a plurality of multi-energy images, performing weighted averaging on the plurality of the first images, and obtaining a first gain correction table corresponding to a first preset interval and a second gain correction table corresponding to a second preset interval;

[0094] The image obtained by each energy of X-ray corresponds to at least two gain correction tables with different gray value ranges;

[0095] Before S1, it also included:

[0096] Acquire an offset correction image, and generate an offset correction table according to the offset correction image;

[0097] The offset correction image is obtained by turning off the X-rays and obtaining a plurality of dark images through an X-ray detector with a multi-layer flat-panel structure;

[0098] The dark image shows the circuit signal obtained by the X-ray detector itself when there is no input signal;

[0099] Performing weighted averaging on the plurality of dark images to obtain an offset correction table corresponding to X-rays of various energies;

[0100] S2. Acquire a multi-energy image of the object to be measured, wherein the multi-energy image is an image obtained by respectively generating X-rays of different energies after the X-rays pass through the object to be measured and the X-ray detector with a multi-layer flat-panel structure;

[0101] S3, performing multi-point gain correction on the multi-energy image according to the gain correction table to obtain a multi-energy corrected image;

[0102] Specifically:

[0103] According to the gain correction table, multi-point gain correction is performed on the multi-energy image to obtain a multi-energy corrected image. The gain correction of each point in the multi-energy image is specifically as follows:

[0104] Calculate the gain factor to compensate for the uneven grayscale of the image caused by the characteristics of the X-ray source:

[0105]

[0106] Wherein, m is the mean value of the grayscale value of the gain correction table, m + Represents the mean value of the gain correction table with higher grayscale value, m - represents the mean of the gain correction table with lower grayscale value; S is the grayscale value of a pixel on the multi-energy image, (u, v) represents a pixel on the multi-energy correction image; determine whether S is between the two gain correction tables, if so, then S _ =gain_l _ (x,y), S + =gain_l + (x,y), where gain_l + Represents the gain correction table with higher grayscale value, gain_l - represents a gain correction table with a lower grayscale value, and (x, y) represents a pixel point on the multi-energy image;

[0107] Multiplying each pixel in the multi-energy image by its corresponding gain coefficient to obtain the multi-energy corrected image;

[0108] S4. Register the multi-energy calibrated images so that the images of the objects to be measured in the multi-energy calibrated images overlap.

[0109] Embodiment 2 of the present invention is:

[0110] A multi-layer X-ray detector image calibration method, which is different from the first embodiment in that:

[0111] The S4 is specifically:

[0112] Acquire a multi-resolution card image of a resolution card, and crop an image at the same position in the multi-resolution card image to obtain a cropped image;

[0113] For the two cropped images f l and f h Perform Fourier transform and get F l and F h , and calculate the cross power spectrum between the two cropped images

[0114] Among them, F h * Indicates F h The complex conjugate of , (u, v) represents a pixel;

[0115] Performing a two-dimensional Fourier transform on the cross power spectrum to obtain a second image, dividing the second image into a first quadrant, a second quadrant, a third quadrant, and a fourth quadrant based on the center of the second image, swapping the first quadrant with the third quadrant, and swapping the second quadrant with the fourth quadrant to obtain an impulse response center;

[0116] A threshold is set, and according to the prefabrication and the impulse response center, a plurality of impulse responses and the coordinate difference between the impulse response and the impulse response center are obtained, and the regional correlation coefficient of the impulse response is calculated:

[0117]

[0118] Among them, A l and A h According to the coordinate difference, l and f h A third image captured in , m is the length of the third image, and n is the width of the third image;

[0119] Obtaining a shift impulse response with the largest regional correlation coefficient, and registering the multi-energy corrected image according to the coordinate difference of the shift impulse response;

[0120] After S4, it also includes:

[0121] The registered multi-energy corrected images are fused and subtracted.

[0122] Please refer to Figures 3 to 5 , Embodiment 3 of the present invention is:

[0123] Taking dual-energy images and triple-energy images as examples, the above-mentioned multi-layer X-ray detector image calibration method is explained:

[0124] If the multi-energy image is a dual-energy image, including a low-energy image and a high-energy image:

[0125] S1. Obtain an offset correction table, specifically:

[0126] Acquire an offset correction image, and generate an offset correction table according to the offset correction image;

[0127] The offset correction image is obtained by turning off the X-rays and obtaining a plurality of low-energy dark images and a plurality of high-energy dark images respectively through a low-energy X-ray detector and a high-energy X-ray detector of a double-layer flat-panel structure;

[0128] Perform weighted averaging of multiple low-energy dark images to obtain a low-energy detector offset correction table offset_l, and perform weighted averaging of multiple high-energy dark images to obtain a high-energy detector offset correction table offset_h;

[0129] S2. Obtain a gain correction table, specifically:

[0130] After the acquired image is offset corrected, the gain correction table is calculated:

[0131] I off =I raw -offset, where I raw represents the original image collected by the X-ray detector, offset represents the offset correction table, I off Indicates the image after the offset correction is completed;

[0132] Determine a first X-ray dose that causes the grayscale value of the low-energy image to be within a first preset interval or a second preset interval;

[0133] Taking an air map with the first dose of X-rays to obtain a plurality of low-energy air images, performing weighted averaging on the plurality of low-energy air images to obtain a first low-energy gain correction table corresponding to a first preset interval and a second low-energy gain correction table corresponding to a second preset interval;

[0134] Taking an air map with the first dose of X-rays to obtain a plurality of high-energy air images, performing weighted averaging on the plurality of high-energy air images to obtain a first high-energy gain correction table corresponding to a first preset interval and a second high-energy gain correction table corresponding to a second preset interval;

[0135] Determine a second X-ray dose that causes the grayscale value of the high-energy image to be within a third preset interval or a fourth preset interval;

[0136] Taking an air map with the second dose of X-rays to obtain a plurality of low-energy air images, performing weighted averaging on the plurality of low-energy air images to obtain a third low-energy gain correction table corresponding to a third preset interval and a fourth low-energy gain correction table corresponding to a fourth preset interval;

[0137] Taking an air map with the second dose of X-rays to obtain a plurality of high-energy air images, performing weighted averaging on the plurality of high-energy air images to obtain a third high-energy gain correction table corresponding to a third preset interval and a fourth high-energy gain correction table corresponding to a fourth preset interval;

[0138] In an optional implementation, a first X-ray dose that makes the grayscale value of the low-energy image be between [5000, 6000] or [15000, 16000] is determined, an air map is taken with the first dose of X-rays, a plurality of low-energy air images are acquired through a low-energy X-ray detector, and a weighted average is performed on the plurality of low-energy air images to obtain a first low-energy gain correction table gain_l1 corresponding to [5000, 6000] and a second low-energy gain correction table gain_l2 corresponding to [15000, 16000]; an air map is taken with the first dose of X-rays, a plurality of high-energy air images are acquired through a high-energy X-ray detector, and a weighted average is performed on the plurality of high-energy air images to obtain a first high-energy gain correction table gain_h1 corresponding to [5000, 6000] and a second high-energy gain correction table gain_h2 corresponding to [15000, 16000];

[0139] Determine a second X-ray dose that makes the grayscale value of the high-energy image within [2000 3000] or [7000 8000]; take an air map with the second dose of X-rays, obtain multiple low-energy air images through a low-energy X-ray detector, and perform weighted averaging on the multiple low-energy air images to obtain a third low-energy gain correction table gain_l3 corresponding to [2000 3000] and a fourth low-energy gain correction table gain_l4 corresponding to [70008000]; take an air map with the second dose of X-rays, obtain multiple high-energy air images through a high-energy X-ray detector, and perform weighted averaging on the multiple high-energy air images to obtain a third high-energy gain correction table gain_h3 corresponding to [20003000] and a fourth high-energy gain correction table gain_h4 corresponding to [7000 8000];

[0140] The low-energy image acquired by the low-energy detector is subjected to offset correction to obtain a low-energy image I after offset correction. off_l , and then perform multi-point gain correction:

[0141] Get the low-energy gain correction tables gain_l1, gain_l2, gain_l3 and gain_l4, calculate their means respectively, and get ml1, ml2, ml3 and ml4, and for each gain correction table, calculate the low-energy gain coefficient of S respectively:

[0142]

[0143] Performing offset correction on the high-energy image acquired by the high-energy detector to obtain the offset-corrected high-energy image, and the process of obtaining the corresponding high-energy gain correction coefficient is the same as the process of obtaining the low-energy gain coefficient;

[0144] S3. Obtain the registration offset, specifically:

[0145] The object to be measured is set as a resolution card, and a certain dose of X-rays is set to obtain a low-energy resolution card image I1 and a high-energy resolution card image I2. The low-energy resolution card image and the high-energy resolution card image are placed in the same coordinate system, and a rectangle of size m×n is cut out of the same area to obtain f1 and f2 respectively;

[0146] In an optional implementation, the area size is set to 500×500 pixels2;

[0147] Perform two-dimensional Fourier transform on f1 and f2 respectively to obtain F1 and F2, and calculate the cross power spectrum P of F1 and F2:

[0148]

[0149] Perform a two-dimensional Fourier transform on P to obtain image p. Based on the center of image p, swap the first and third quadrants, the second and fourth quadrants of image p to obtain the impulse response δ(x, y).

[0150] The assembly error between the high-energy detector and the low-energy detector is obtained by machining accuracy, the assembly error multiplied by the pixel spacing is used as the first threshold, the center of the impulse response δ(x,y) is used as the reference, and the maximum value peak_value in the impulse response δ is searched within the first threshold range in the x- and y-axis directions of the center of the impulse response δ(x,y);

[0151] Setting a second threshold relative to the maximum value, searching for an impulse response greater than the second threshold within the first threshold range, and recording its coordinates relative to the center of the impulse response δ(x, y);

[0152] In an optional implementation, the mechanical assembly error is ±2mm, the pixel pitch is 7pixels / mm, the first threshold is 14, and the maximum value is found within the range of ±14 in the x, y direction of the impulse response center, and the maximum value is peak_value; the threshold is set, such as 0.7, the second threshold is 0.7×peak_value, and several impulse responses greater than 0.7×peak_value within the range of ±14 in the center are found, and their coordinates relative to the coordinates of the center of the impulse response δ(x,y) are (x0, y0);

[0153] Please refer to Figure 4 , x0 and y0 are the relative deviations between f1 and f2. The regions with coordinates different from (x0, y0) are intercepted in f1 and f2 to obtain A1 and A2, respectively, that is, the coordinates of the points in A1 and A2 differ from each other by (x0, y0).

[0154] In an optional implementation, rectangular areas of size (m-28)×(n-28) are intercepted in f1 and f2 respectively to obtain A1 and A2, the starting point of A1 in f1 is [14,14], and the starting point of A2 in f2 is [14+x0,14+y0];

[0155] For each impulse response corresponding to (x0, y0), calculate the regional correlation coefficient cc. The size of A1 and A2 is the same, both are m A ×n A ;

[0156]

[0157] The impulse response (x0, y0) corresponding to the highest regional correlation coefficient cc is the image offset;

[0158] S4. Preprocess the low-energy image and the high-energy image according to the offset correction table, the gain correction table and the registration offset, specifically:

[0159] The low energy detector obtains the original low energy image I raw_l , the high energy detector acquires the original high energy image I raw_h ;

[0160] Performing offset correction: I off_l =I raw_l -offset_l,I off_h =I raw_h -offset_h

[0161] I off_l Multiply by the low-energy gain coefficient to complete the multi-point gain correction and obtain image I l ;

[0162] I off_hMultiply by the high energy gain coefficient to complete the multi-point gain correction and obtain image I h ;

[0163] According to the determined offset (x0, y0), intercept I l and I h , making I l and I h The coordinate difference of the pixel point in the image is (x0, y0), and the preprocessing of the low-energy image and the high-energy image is completed;

[0164] If the multi-energy image is a three-energy image, including a low-energy image, a medium-energy image, and a high-energy image:

[0165] A1. Obtain the offset correction table, specifically:

[0166] Acquire an offset correction image, and generate an offset correction table according to the offset correction image;

[0167] The offset correction image is obtained by turning off the X-rays, and obtaining a plurality of low-energy dark images, a plurality of medium-energy dark images, and a plurality of high-energy dark images through a low-energy X-ray detector, a medium-energy X-ray detector, and a high-energy X-ray detector of a three-layer flat-panel structure respectively;

[0168] Perform weighted averaging of multiple low-energy dark images to obtain a low-energy detector offset correction table offset_l, perform weighted averaging of multiple medium-energy dark images to obtain a medium-energy detector offset correction table offset_m, and perform weighted averaging of multiple high-energy dark images to obtain a high-energy detector offset correction table offset_h;

[0169] A2. Obtain the gain correction table, which is different from the dual-energy correction in that:

[0170] Based on the image acquired by the low-energy X-ray detector, determine a first X-ray dose that makes the grayscale value of the low-energy image fall within a first preset interval or a second preset interval;

[0171] Taking an air map with the first dose of X-rays to obtain a plurality of low-energy air images, performing weighted averaging on the plurality of low-energy air images to obtain a first low-energy gain correction table corresponding to a first preset interval and a second low-energy gain correction table corresponding to a second preset interval;

[0172] Taking an air map with the first dose of X-rays to obtain a plurality of medium-energy air images, performing weighted averaging on the plurality of medium-energy air images to obtain a first medium-energy gain correction table corresponding to a first preset interval and a second medium-energy gain correction table corresponding to a second preset interval;

[0173] Taking an air map with the first dose of X-rays to obtain a plurality of high-energy air images, performing weighted averaging on the plurality of high-energy air images to obtain a first high-energy gain correction table corresponding to a first preset interval and a second high-energy gain correction table corresponding to a second preset interval;

[0174] The manner of obtaining the gain correction table based on the image acquired by the medium energy X-ray detector and the image acquired by the high energy X-ray detector is similar to the manner of obtaining the gain correction table based on the image acquired by the low energy X-ray detector;

[0175] A3. Obtain the registration offset, specifically:

[0176] Similar to the registration step in dual-energy images, the low-energy image is registered with the high-energy image, and the low-energy image is registered with the medium-energy image to obtain their respective offsets;

[0177] A4. Preprocess the three-energy image according to the offset correction table, the gain correction table and the registration offset.

[0178] Please refer to Figure 2 , Embodiment 4 of the present invention is:

[0179] A multi-layer X-ray detector image calibration terminal 1 includes a processor 2, a memory 3, and a computer program stored in the memory 3 and executable on the processor 2. When the processor 2 executes the computer program, each step in Embodiment 1, Embodiment 2, or Embodiment 3 is implemented.

[0180] In summary, the present invention provides a multi-layer X-ray detector image calibration method and terminal, which generates a gain correction table according to a gain correction image, and through a multi-layer flat-panel structure X-ray detector, can obtain the gain correction table corresponding to X-rays of multiple energies by one exposure, thereby avoiding the phenomenon that the acquisition of multi-energy images by time-divided exposure will cause motion artifacts in shooting objects in motion, such as chest X-rays, and can also reduce the radiation dose generated by irradiating X-rays, and perform multi-point correction to obtain a multi-energy correction image, and align the multi-energy correction image so that the images of the objects to be measured therein overlap. Compared with the previous correction of the multi-energy image obtained for the entire gain correction image, performing multi-point correction according to the gain correction table can obtain a higher quality image, and the alignment can further eliminate the mechanical errors caused by the multi-layer flat-panel structure X-ray detector during the installation process, avoid image artifacts, and improve image quality. It can also implement multi-dimensional preprocessing of the multi-energy image, eliminate errors, and facilitate subsequent analysis and processing of the multi-energy image.

[0181] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A multi-layer X-ray detector image calibration method, characterized in that: Includes steps: S1. Acquire a gain correction image, and generate a gain correction table according to the gain correction image, wherein the gain correction image is an air image acquired by an X-ray detector with a multi-layer flat-panel structure when the X-ray is turned on; S2. Acquire a multi-energy image of the object to be measured, wherein the multi-energy image is an image obtained by respectively generating X-rays of different energies after the X-rays pass through the object to be measured and an X-ray detector with a multi-layer flat-panel structure; S3, performing multi-point gain correction on the multi-energy image according to the gain correction table to obtain a multi-energy corrected image; S4, registering the multi-energy calibration images so that the images of the objects to be measured in the multi-energy calibration images overlap; After S4, it also includes: fusing and subtracting the registered multi-energy corrected images; The S1 is specifically: Determine a first dose of X-rays that causes a grayscale value of an image obtained by X-rays of a certain energy in the multi-energy image to be within a first preset interval or a second preset interval; Taking an air map with the first dose of X-rays, obtaining a first image obtained by X-rays of a certain energy among a plurality of multi-energy images, performing weighted averaging on the plurality of the first images, and obtaining a first gain correction table corresponding to a first preset interval and a second gain correction table corresponding to a second preset interval; If the multi-energy image is a dual-energy image, including a low-energy image and a high-energy image, then S1 is specifically: Determine a first X-ray dose that causes the grayscale value of the low-energy image to be within a first preset interval or a second preset interval; Taking an air map with the first dose of X-rays to obtain a plurality of low-energy air images, performing weighted averaging on the plurality of low-energy air images to obtain a first low-energy gain correction table corresponding to a first preset interval and a second low-energy gain correction table corresponding to a second preset interval; Taking an air map with the first dose of X-rays to obtain a plurality of high-energy air images, performing weighted averaging on the plurality of high-energy air images to obtain a first high-energy gain correction table corresponding to a first preset interval and a second high-energy gain correction table corresponding to a second preset interval; Determine a second X-ray dose that causes the grayscale value of the high-energy image to be within a third preset interval or a fourth preset interval; Taking an air map with the second dose of X-rays to obtain a plurality of low-energy air images, performing weighted averaging on the plurality of low-energy air images to obtain a third low-energy gain correction table corresponding to a third preset interval and a fourth low-energy gain correction table corresponding to a fourth preset interval; Taking an air map with the second dose of X-rays to obtain a plurality of high-energy air images, performing weighted averaging on the plurality of high-energy air images to obtain a third high-energy gain correction table corresponding to a third preset interval and a fourth high-energy gain correction table corresponding to a fourth preset interval; If the multi-energy image is a three-energy image, including a low-energy image, a medium-energy image, and a high-energy image, then S1 is specifically: Based on the image acquired by the low-energy X-ray detector, determine a first X-ray dose that makes the grayscale value of the low-energy image fall within a first preset interval or a second preset interval; Taking an air map with the first dose of X-rays to obtain a plurality of low-energy air images, performing weighted averaging on the plurality of low-energy air images to obtain a first low-energy gain correction table corresponding to a first preset interval and a second low-energy gain correction table corresponding to a second preset interval; Taking an air map with the first dose of X-rays to obtain a plurality of medium-energy air images, performing weighted averaging on the plurality of medium-energy air images to obtain a first medium-energy gain correction table corresponding to a first preset interval and a second medium-energy gain correction table corresponding to a second preset interval; An air map is taken with the first dose of X-rays to obtain multiple high-energy air images, and weighted averaging of the multiple high-energy air images is performed to obtain a first high-energy gain correction table corresponding to a first preset interval and a second high-energy gain correction table corresponding to a second preset interval.

2. A multi-layer X-ray detector image calibration method according to claim 1, characterized in that: The image obtained by each energy of X-ray in S1 corresponds to at least two gain correction tables with different gray value ranges; The S3 is specifically: According to the gain correction table, multi-point gain correction is performed on the multi-energy image to obtain a multi-energy corrected image. The gain correction of each point in the multi-energy image is specifically as follows: Calculate the gain factor: Wherein, m is the mean value of the grayscale value of the gain correction table, m + Represents the mean value of the gain correction table with higher grayscale value, m - represents the mean value of the gain correction table with lower grayscale value; S is the grayscale value of a pixel on the multi-energy image, (u, v) represents a pixel on the multi-energy correction image; determine whether S is between the two gain correction tables, if so, then , , where gain_l + Represents a gain correction table with higher grayscale values, represents a gain correction table with a lower grayscale value, and (x, y) represents a pixel point on the multi-energy image; Each pixel in the multi-energy image is multiplied by its corresponding gain coefficient to obtain the multi-energy corrected image.

3. The multi-layer X-ray detector image calibration method according to claim 1, characterized in that: The S4 is specifically: Acquire a multi-resolution card image of a resolution card, and crop an image at the same position in the multi-resolution card image to obtain a cropped image; For the two cropped images f l and f h Perform Fourier transform and get F l and F h , and calculate the cross power spectrum between the two cropped images ; in, express The complex conjugate of , (u, v) represents a pixel; Performing a two-dimensional Fourier transform on the cross power spectrum to obtain a second image, dividing the second image into a first quadrant, a second quadrant, a third quadrant, and a fourth quadrant based on the center of the second image, swapping the first quadrant with the third quadrant, and swapping the second quadrant with the fourth quadrant to obtain an impulse response center; A threshold is set, and based on the threshold and the impulse response center, multiple impulse responses and the coordinate difference between the impulse response and the impulse response center are obtained, and the regional correlation coefficient of the impulse response is calculated: Among them, A l and A h According to the coordinate difference, l and f h A third image captured in , m is the length of the third image, and n is the width of the third image; A shift impulse response with the maximum regional correlation coefficient is obtained, and the multi-energy corrected image is registered according to the coordinate difference of the shift impulse response.

4. A multi-layer X-ray detector image calibration terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the following steps are implemented: S1. Acquire a gain correction image, and generate a gain correction table according to the gain correction image, wherein the gain correction image is an air image acquired by an X-ray detector with a multi-layer flat-panel structure when the X-ray is turned on; S2. Acquire a multi-energy image of the object to be measured, wherein the multi-energy image is an image obtained by respectively generating X-rays of different energies after the X-rays pass through the object to be measured and an X-ray detector with a multi-layer flat-panel structure; S3, performing multi-point gain correction on the multi-energy image according to the gain correction table to obtain a multi-energy corrected image; S4, registering the multi-energy calibration images so that the images of the objects to be measured in the multi-energy calibration images overlap; After S4, it also includes: fusing and subtracting the registered multi-energy corrected images; The S1 is specifically: Determine a first dose of X-rays that causes a grayscale value of an image obtained by X-rays of a certain energy in the multi-energy image to be within a first preset interval or a second preset interval; Taking an air map with the first dose of X-rays, obtaining a first image obtained by X-rays of a certain energy among a plurality of multi-energy images, performing weighted averaging on the plurality of the first images, and obtaining a first gain correction table corresponding to a first preset interval and a second gain correction table corresponding to a second preset interval; If the multi-energy image is a dual-energy image, including a low-energy image and a high-energy image, then S1 is specifically: Determine a first X-ray dose that causes the grayscale value of the low-energy image to be within a first preset interval or a second preset interval; Taking an air map with the first dose of X-rays to obtain a plurality of low-energy air images, performing weighted averaging on the plurality of low-energy air images to obtain a first low-energy gain correction table corresponding to a first preset interval and a second low-energy gain correction table corresponding to a second preset interval; Taking an air map with the first dose of X-rays to obtain a plurality of high-energy air images, performing weighted averaging on the plurality of high-energy air images to obtain a first high-energy gain correction table corresponding to a first preset interval and a second high-energy gain correction table corresponding to a second preset interval; Determine a second X-ray dose that causes the grayscale value of the high-energy image to be within a third preset interval or a fourth preset interval; Taking an air map with the second dose of X-rays to obtain a plurality of low-energy air images, performing weighted averaging on the plurality of low-energy air images to obtain a third low-energy gain correction table corresponding to a third preset interval and a fourth low-energy gain correction table corresponding to a fourth preset interval; Taking an air map with the second dose of X-rays to obtain a plurality of high-energy air images, performing weighted averaging on the plurality of high-energy air images to obtain a third high-energy gain correction table corresponding to a third preset interval and a fourth high-energy gain correction table corresponding to a fourth preset interval; If the multi-energy image is a three-energy image, including a low-energy image, a medium-energy image, and a high-energy image, then S1 is specifically: Based on the image acquired by the low-energy X-ray detector, determine a first X-ray dose that makes the grayscale value of the low-energy image fall within a first preset interval or a second preset interval; Taking an air map with the first dose of X-rays to obtain a plurality of low-energy air images, performing weighted averaging on the plurality of low-energy air images to obtain a first low-energy gain correction table corresponding to a first preset interval and a second low-energy gain correction table corresponding to a second preset interval; Taking an air map with the first dose of X-rays to obtain a plurality of medium-energy air images, performing weighted averaging on the plurality of medium-energy air images to obtain a first medium-energy gain correction table corresponding to a first preset interval and a second medium-energy gain correction table corresponding to a second preset interval; An air map is taken with the first dose of X-rays to obtain multiple high-energy air images, and weighted averaging of the multiple high-energy air images is performed to obtain a first high-energy gain correction table corresponding to a first preset interval and a second high-energy gain correction table corresponding to a second preset interval.

5. The multi-layer X-ray detector image calibration terminal according to claim 4, characterized in that: The image obtained by each energy of X-ray in S1 corresponds to at least two gain correction tables with different gray value ranges; The S3 is specifically: According to the gain correction table, multi-point gain correction is performed on the multi-energy image to obtain a multi-energy corrected image. The gain correction of each point in the multi-energy image is specifically as follows: Calculate the gain factor: Wherein, m is the mean value of the grayscale value of the gain correction table, m + Represents the mean value of the gain correction table with higher grayscale value, m - represents the mean value of the gain correction table with lower grayscale value; S is the grayscale value of a pixel on the multi-energy image, (u, v) represents a pixel on the multi-energy correction image; determine whether S is between the two gain correction tables, if so, then , , where gain_l + Represents a gain correction table with higher grayscale values, represents a gain correction table with a lower grayscale value, and (x, y) represents a pixel point on the multi-energy image; Each pixel in the multi-energy image is multiplied by its corresponding gain coefficient to obtain the multi-energy corrected image.

6. The multi-layer X-ray detector image calibration terminal according to claim 4, characterized in that: The S4 is specifically: Acquire a multi-resolution card image of a resolution card, and crop an image at the same position in the multi-resolution card image to obtain a cropped image; Perform Fourier transform on the two cropped images fl and fh to obtain Fl and Fh respectively, and calculate the cross power spectrum between the two cropped images ; in, express The complex conjugate of , (u, v) represents a pixel; Performing a two-dimensional Fourier transform on the cross power spectrum to obtain a second image, dividing the second image into a first quadrant, a second quadrant, a third quadrant, and a fourth quadrant based on the center of the second image, swapping the first quadrant with the third quadrant, and swapping the second quadrant with the fourth quadrant to obtain an impulse response center; A threshold is set, and based on the threshold and the impulse response center, multiple impulse responses and the coordinate difference between the impulse response and the impulse response center are obtained, and the regional correlation coefficient of the impulse response is calculated: Wherein, Al and Ah are third images intercepted in fl and fh respectively according to the coordinate difference, m is the length of the third image, and n is the width of the third image; A shift impulse response with the maximum regional correlation coefficient is obtained, and the multi-energy corrected image is registered according to the coordinate difference of the shift impulse response.