X-ray detector and image generation method
By classifying the pixels of the X-ray detector into different types and generating multiple images, and combining them with an image restoration network, the problem of simultaneous imaging was solved, enabling high-quality analysis of the internal structure of objects.
Patent Information
- Application Number
- CN202411038431.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-11-19
AI Technical Summary
Existing X-ray detectors cannot simultaneously and clearly image a combination of hard-to-penetrate and easy-to-penetrate materials, resulting in poor image quality and an inability to effectively analyze the internal structure of the object under test.
The pixels of the X-ray detector are divided into Class I pixels and Class II pixels, and short-exposure low-resolution images and long-exposure low-resolution images are generated respectively. The images are then restored using an image restoration network to finally generate a wide dynamic range fused image to improve imaging clarity.
It enables clear imaging of both hard-to-penetrate and easy-to-penetrate materials simultaneously, improving image quality and dynamic range, and effectively analyzing the internal structure of the object under test.
Smart Images

Figure CN118984430A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing, and in particular to an X-ray detector and an image generation method. Background Art
[0002] The X-ray generator emits X-rays to the object to be measured, and the X-ray detector receives the X-rays that pass through the object to be measured, images the object to be measured based on the X-rays, and analyzes the internal structure of the object to be measured based on the image. X-ray detectors can be used in the medical field and in the industrial field. When used in the medical field, the object to be measured can be human tissue. Human tissue includes bones and internal organs, etc. Since the density of human tissue does not vary much, human tissues of different densities can be clearly imaged.
[0003] When X-ray detectors are used in the industrial field, the object to be detected may be a combination of hard-to-penetrate and easy-to-penetrate materials, such as PCBA (Printed Circuit Board Assembly), etc. The traces and BGA (Ball Grid Array) solder joints in the PCBA are different types of materials.
[0004] When the objects to be measured include hard-to-penetrate materials and easy-to-penetrate materials, it is impossible to clearly image the different types of objects to be measured, resulting in poor image quality and inability to analyze the internal structure of the objects to be measured based on the images. Summary of the invention
[0005] The present application provides an X-ray detector, comprising a processing circuit, a first scanning driving circuit, a second scanning driving circuit, a pixel readout circuit and a pixel array, wherein the pixel array comprises a plurality of pixel groups;
[0006] For each pixel group, the pixel group includes M rows and N columns of pixels, where M and N are both positive integers; the pixels in the M rows and N columns include first-type pixels and second-type pixels, the first scanning driving circuit is connected to the first-type pixels, and the second scanning driving circuit is connected to the second-type pixels;
[0007] The processing circuit is used for controlling the first scanning driving circuit to conduct each first-type pixel of each row of the pixel array with the pixel readout circuit when the first selection time corresponding to the row is reached, and controlling the pixel readout circuit to read out the electrical signal of each first-type pixel;
[0008] When the second selection time corresponding to the row is reached, the first scanning driving circuit is controlled to conduct the first type of pixels in the row with the pixel readout circuit, and the pixel readout circuit is controlled to clear the electrical signals of the first type of pixels; and the second scanning driving circuit is controlled to conduct the second type of pixels in the row with the pixel readout circuit, and the pixel readout circuit is controlled to read the electrical signals of the second type of pixels;
[0009] The electrical signals of the first type of pixels in all rows of the pixel array are used to generate a short-exposure low-resolution image, and the electrical signals of the second type of pixels in all rows are used to generate a long-exposure low-resolution image.
[0010] Exemplarily, the number of first-category pixels is the same as the number of second-category pixels; or, the number of first-category pixels is greater than the number of second-category pixels; or, the number of first-category pixels is less than the number of second-category pixels; wherein the pixel group includes 4 pixel subsets, the first pixel subset includes pixels in odd rows and odd columns, the second pixel subset includes pixels in odd rows and even columns, the third pixel subset includes pixels in even rows and odd columns, and the fourth pixel subset includes pixels in even rows and even columns; wherein all pixels in K pixel subsets of the 4 pixel subsets are first-category pixels, K is greater than or equal to 1, and K is less than or equal to 3, and all pixels in the remaining pixel subsets are second-category pixels.
[0011] Exemplarily, if M is 2 and N is 2, the pixels in the odd columns are the first type of pixels, and the pixels in the even columns are the second type of pixels; or, the pixels in the even columns are the first type of pixels, and the pixels in the odd columns are the second type of pixels; or, the pixels in the odd rows and even columns are the first type of pixels, the pixels in the even rows and odd columns are the first type of pixels, the pixels in the odd rows and odd columns are the second type of pixels, and the pixels in the even rows and even columns are the second type of pixels; or, the pixels in the odd rows and odd columns are the first type of pixels, the pixels in the even rows and even columns are the first type of pixels, the pixels in the odd rows and even columns are the second type of pixels, and the pixels in the even rows and odd columns are the second type of pixels;
[0012] Or, if M is 2 and N is 2, then the pixels in odd rows are pixels of the first category, the pixels in even rows and odd columns are pixels of the first category, and the pixels in even rows and even columns are pixels of the second category; or, the pixels in odd rows are pixels of the first category, the pixels in even rows and even columns are pixels of the first category, and the pixels in even rows and odd columns are pixels of the second category; or, the pixels in even rows are pixels of the first category, the pixels in odd rows and odd columns are pixels of the first category, and the pixels in odd rows and even columns are pixels of the second category; or, the pixels in even rows are pixels of the first category, the pixels in odd rows and even columns are pixels of the first category, and the pixels in odd rows and odd columns are pixels of the second category;
[0013] Alternatively, if M is 2 and N is 2, the pixels in odd rows are second-class pixels, the pixels in even rows and odd columns are first-class pixels, and the pixels in even rows and even columns are second-class pixels; alternatively, the pixels in odd rows are second-class pixels, the pixels in even rows and even columns are first-class pixels, and the pixels in even rows and odd columns are second-class pixels; alternatively, the pixels in even rows are second-class pixels, the pixels in odd rows and odd columns are first-class pixels, and the pixels in odd rows and even columns are second-class pixels; alternatively, the pixels in even rows are second-class pixels, the pixels in odd rows and even columns are first-class pixels, and the pixels in odd rows and even columns are second-class pixels.
[0014] Exemplarily, for each row of the pixel array, the processing circuit is used to divide the scanning time corresponding to the row into a first energy integration time, a first gating time, a second energy integration time and a second gating time; wherein the first gating time is between the first energy integration time and the second energy integration time, and the second gating time is after the second energy integration time; wherein the duration of the second energy integration time is different from or the same as the duration of the first energy integration time; the processing circuit is used to control the first scanning driving circuit to disconnect each first type of pixel and the pixel readout circuit of the row, and control the second scanning driving circuit to disconnect each second type of pixel and the pixel readout circuit of the row when the first energy integration time corresponding to the row is reached;
[0015] The processing circuit is used to control the second scanning driving circuit to disconnect each second type of pixel of the row from the pixel readout circuit when the first gate time corresponding to the row is reached;
[0016] The processing circuit is used to control the first scanning drive circuit to disconnect the first type of pixels and the pixel readout circuit in the row, and control the second scanning drive circuit to disconnect the second type of pixels and the pixel readout circuit in the row when the second energy integration time corresponding to the row is reached.
[0017] Exemplarily, the X-ray detector further includes an analog-to-digital conversion circuit, which is used to convert the electrical signals of the first type of pixels into digital signals, and convert the electrical signals of the second type of pixels into digital signals; the processing circuit is used to generate a short-exposure low-resolution image based on the digital signals of the first type of pixels in all rows, and perform a first restoration operation on the short-exposure low-resolution image to obtain a short-exposure full-resolution image, wherein the first restoration operation is used to complete the pixel values of the second type of pixels;
[0018] The processing circuit is used to generate a long-exposure low-resolution image based on the digital signals of the second-type pixels in all rows, and perform a second restoration operation on the long-exposure low-resolution image to obtain a long-exposure full-resolution image, wherein the second restoration operation is used to complete the pixel values of the first-type pixels.
[0019] Exemplarily, when the processing circuit performs a first restoration operation on the short exposure low-resolution image to obtain a short exposure full-resolution image, it is specifically used to: input the short exposure low-resolution image to a first image restoration network, and perform a first restoration operation on the short exposure low-resolution image through the first image restoration network to obtain the short exposure full-resolution image; wherein the first image restoration network is obtained by training an initial network model using short exposure low-resolution sample images and full-resolution label images; when the processing circuit performs a second restoration operation on the long exposure low-resolution image to obtain a long exposure full-resolution image, it is specifically used to: input the long exposure low-resolution image to a second image restoration network, and perform a second restoration operation on the long exposure low-resolution image through the second image restoration network to obtain the long exposure full-resolution image; wherein the second image restoration network is obtained by training an initial network model using long exposure low-resolution sample images and full-resolution label images.
[0020] Exemplarily, the processing circuit is used to control the first scanning driving circuit to conduct each first-type pixel of each row and the pixel readout circuit when the second selection time corresponding to the row is reached, and control the pixel readout circuit to read out the electrical signal of each first-type pixel;
[0021] Controlling the second scanning driving circuit to conduct each second type of pixel in the row with the pixel readout circuit, and controlling the pixel readout circuit to read out the electrical signal of each second type of pixel;
[0022] The electrical signals of the first type of pixels in all rows of the pixel array and the electrical signals of the second type of pixels in all rows of the pixel array are used to generate the full-resolution label image.
[0023] Exemplarily, the processing circuit is further used to generate a wide dynamic fusion image based on the long exposure full-resolution image, the first weight coefficient, the short exposure full-resolution image and the second weight coefficient;
[0024] Among them, for each pixel in the wide dynamic fusion image, if the reference pixel value corresponding to the pixel in the long exposure full-resolution image is less than the first threshold, the first weight coefficient corresponding to the pixel is the first weight value; if the reference pixel value is greater than or equal to the first threshold and less than the second threshold, the first weight coefficient corresponding to the pixel is inversely proportional to the reference pixel value; if the reference pixel value is greater than or equal to the second threshold, the first weight coefficient corresponding to the pixel is the second weight value;
[0025] Among them, the second weight value is less than the first weight value; the second weight coefficient corresponding to the pixel point is determined based on the difference between the fixed value and the first weight coefficient corresponding to the pixel point.
[0026] The present application provides an X-ray detector, comprising a first scanning drive circuit, a second scanning drive circuit and a pixel array, wherein the pixel array comprises a plurality of pixel groups; for each pixel group, the pixel group comprises M rows and N columns of pixels, where M and N are both positive integers; the pixels of the M rows and N columns comprise a first type of pixels and a second type of pixels, wherein the first type of pixels are pixels connected to the first scanning drive circuit, and the second type of pixels are pixels connected to the second scanning drive circuit;
[0027] Among them, the number of pixels of the first category is the same as the number of pixels of the second category; or, the number of pixels of the first category is greater than the number of pixels of the second category; or, the number of pixels of the first category is less than the number of pixels of the second category;
[0028] The pixel group includes 4 pixel subsets, the first pixel subset includes pixels in odd rows and odd columns, the second pixel subset includes pixels in odd rows and even columns, the third pixel subset includes pixels in even rows and odd columns, and the fourth pixel subset includes pixels in even rows and even columns; all pixels in K pixel subsets of the 4 pixel subsets are used as first-category pixels, K is greater than or equal to 1, and K is less than or equal to 3, and all pixels in the remaining pixel subsets are used as second-category pixels.
[0029] The present application provides an image generation method, the method comprising:
[0030] Acquire a short-exposure low-resolution image and a long-exposure low-resolution image; wherein the pixel array of the X-ray detector includes a first type of pixel and a second type of pixel, the short-exposure low-resolution image is generated based on the electrical signals of the first type of pixel, and the long-exposure low-resolution image is generated based on the electrical signals of the second type of pixel;
[0031] Performing a first restoration operation on the short-exposure low-resolution image to obtain a short-exposure full-resolution image, wherein the first restoration operation is used to complete pixel values of the second type of pixels in the short-exposure low-resolution image;
[0032] Performing a second restoration operation on the long-exposure low-resolution image to obtain a long-exposure full-resolution image, wherein the second restoration operation is used to complete pixel values of first-category pixels in the long-exposure low-resolution image;
[0033] A wide dynamic range fusion image is generated based on the long-exposure full-resolution image and the short-exposure full-resolution image.
[0034] Exemplarily, performing a first restoration operation on the short-exposure low-resolution image to obtain a short-exposure full-resolution image includes: inputting the short-exposure low-resolution image to a first image restoration network, and performing a first restoration operation on the short-exposure low-resolution image through the first image restoration network to obtain the short-exposure full-resolution image; wherein the first image restoration network is obtained by training an initial network model using short-exposure low-resolution sample images and full-resolution label images;
[0035] The performing a second restoration operation on the long-exposure low-resolution image to obtain a long-exposure full-resolution image comprises: inputting the long-exposure low-resolution image to a second image restoration network, and performing a second restoration operation on the long-exposure low-resolution image through the second image restoration network to obtain the long-exposure full-resolution image; wherein the second image restoration network is obtained by training an initial network model using long-exposure low-resolution sample images and full-resolution label images;
[0036] The full-resolution label image is generated based on the electrical signals of all first-category pixels of the X-ray detector and the electrical signals of all second-category pixels of the X-ray detector.
[0037] It can be seen from the above technical solutions that in the embodiment of the present application, an X-ray detector is designed to divide all pixels of the X-ray detector into first-class pixels and second-class pixels, and a short-exposure low-resolution image can be generated based on the electrical signals of all first-class pixels, and a long-exposure low-resolution image can be generated based on the electrical signals of all second-class pixels. In this way, a wide dynamic fusion image can be generated based on the short-exposure low-resolution image and the long-exposure low-resolution image, so as to clearly image the object to be measured. Even if the object to be measured includes a difficult-to-penetrate substance and an easily-penetrable substance, different types of objects to be measured can be clearly imaged, so that the image quality is better, the image dynamic range can be improved, and the internal structure of the object to be measured can be analyzed based on the image. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 It is a schematic diagram of the structure of an X-ray emitter and an X-ray detector;
[0039] Figure 2 is a schematic diagram of the structure of an X-ray detector in one embodiment of the present application;
[0040] Figure 3A and Figure 3B It is a schematic diagram of the locations of the first type of pixels and the second type of pixels;
[0041] Figure 4A , Figure 4B and Figure 4C is a schematic diagram of the scanning time of each row of the pixel array;
[0042] Figure 5A and Figure 5B It is a schematic diagram of the image restoration network;
[0043] Fig. 6A and Figure 6B is a schematic diagram for a first weight coefficient and a second weight coefficient;
[0044] Figure 7 It is a flowchart of an image generation method in one embodiment of the present application. DETAILED DESCRIPTION
[0045] X-ray detectors may include but are not limited to area array detectors and linear array detectors, etc. Linear array detectors may include TDI (Tim Delay Integration) detectors, etc., and area array detectors may include flat panel detectors, etc. For example, X-ray detectors are widely used in medical detection and industrial detection, and the main function of X-ray detectors is to detect and image X-rays. X-rays are electromagnetic waves with extremely high frequency, extremely short wavelength and large energy, and have strong penetrating power.
[0046] The X-ray generator emits X-rays to the object to be tested, and the X-ray detector can receive the X-rays that pass through the object to be tested, image the object to be tested based on the X-rays, and analyze the internal structure of the object to be tested based on the image. In the industrial field, the object to be tested may be a combination of difficult-to-penetrate materials and easy-to-penetrate materials. When the object to be tested includes difficult-to-penetrate materials and easy-to-penetrate materials, it is impossible to clearly image different types of objects to be tested, resulting in poor image quality and inability to analyze the internal structure of the object to be tested based on the image.
[0047] See also Figure 1 , which is a schematic diagram of the structure of an X-ray emitter and an X-ray detector. The X-ray emitter emits X-rays to the object to be measured, and the X-ray detector receives the X-rays that pass through the object to be measured.
[0048] The object to be tested includes different types of materials, including easily penetrable materials and hard-to-penetrate materials. Easy-to-penetrate materials can be low-density materials or materials with a small thickness, and there is no restriction on this, and are materials that X-rays can easily penetrate. Hard-to-penetrate materials can be high-density materials or materials with a large thickness, and there is no restriction on this, and are materials that X-rays cannot easily penetrate.
[0049] In the above application scenario, in order to clearly image the easily penetrable material, the X-ray emitter is controlled to use a small dose of photons. However, when a small dose of photons is used, it is not possible to clearly image the hard-to-penetrate material. In order to clearly image the hard-to-penetrate material, the X-ray emitter is controlled to use a large dose of photons. However, when a large dose of photons is used, it is not possible to clearly image the easily penetrable material.
[0050] In summary, it is impossible to clearly image both the hard-to-penetrate substance and the easily-penetrate substance at the same time. That is, when the object to be measured includes the hard-to-penetrate substance and the easily-penetrate substance, it is impossible to clearly image the object to be measured.
[0051] In view of the above findings, an X-ray detector is proposed in an embodiment of the present application, in which all pixels of the X-ray detector can be divided into a first type of pixels and a second type of pixels. In this way, a short-exposure low-resolution image can be generated based on the electrical signals of all first-type pixels, and a long-exposure low-resolution image can be generated based on the electrical signals of all second-type pixels. Then, a wide dynamic fusion image can be generated based on the short-exposure low-resolution image and the long-exposure low-resolution image, so as to clearly image the object to be measured (it can clearly image both difficult-to-penetrate materials and easy-to-penetrate materials at the same time), improve the dynamic range of the image, and improve the industrial application scenario.
[0052] In the present application, an X-ray detector is proposed. Figure 2 As shown, it is a schematic diagram of the structure of the X-ray detector, and the X-ray detector may include a processing circuit, a first scanning driving circuit, a second scanning driving circuit, a pixel readout circuit, and a pixel array. Among them, the processing circuit may be implemented by an FPGA (Field Programmable Gate Array) or an ASIC (Application Specific Integrated Circuit), and there is no limitation on this. The processing circuit may be connected to the first scanning driving circuit, the second scanning driving circuit, the pixel readout circuit, and the pixel array, respectively.
[0053] The first scanning driving circuit can be implemented by a switch, one end of the first scanning driving circuit is connected to the pixel array (such as connecting all first-type pixels in the pixel array), and the other end of the first scanning driving circuit is connected to the pixel readout circuit. The first scanning driving circuit is used to turn on or off the pixel array and the pixel readout circuit.
[0054] The second scanning driving circuit can be implemented by a switch, one end of the second scanning driving circuit is connected to the pixel array (such as connecting all the second type of pixels in the pixel array), and the other end of the second scanning driving circuit is connected to the pixel readout circuit. The second scanning driving circuit is used to turn on or off the pixel array and the pixel readout circuit.
[0055] The pixel array may include a large number of pixels, such as 1920*1080 pixels, that is, 1920 pixels in the vertical direction and 1080 pixels in the horizontal direction, and there is no limit on the number of pixels. The pixel array may support a planar pixel array or a linear pixel array, and there is no limit on the type of pixel array.
[0056] For example, the pixel array may be a TFT (Thin Film Transistor) pixel array, that is, each pixel in the pixel array may be composed of a MOS (Metal Oxide Semiconductor Field Effect Transistor) tube and a photodiode.
[0057] For each picture element in the pixel array, the outer surface of the picture element may also be coated with a scintillator, through which the picture element can convert X-rays into visible light and achieve energy accumulation through visible light.
[0058] Illustratively, in addition to the processing circuit, the first scan drive circuit, the second scan drive circuit, the pixel readout circuit and the pixel array, the X-ray detector may also include an interface circuit and a power supply system. The X-ray detector is powered by the power supply system, and the communication function is realized through the interface circuit. There is no limitation on this.
[0059] Exemplarily, the pixel array may include a large number of pixels, and these pixels may be divided into a plurality of pixel groups, that is, the pixel array includes a plurality of pixel groups. For each pixel group, the pixel group may include pixels of M rows and N columns (all pixels of M rows and N columns form a pixel group), and both M and N may be positive integers, M is greater than 1, and N is greater than or equal to 1, or M is greater than or equal to 1, and N is greater than 1. For example, M may be 1, and N may be 2, 3, 4, etc. For another example, N may be 1, and M may be 2, 3, 4, etc.
[0060] In a possible implementation, M is greater than or equal to 2, and N is greater than or equal to 2. For example, M may be 2, and N may be 2, 3, 4, etc. For another example, N may be 2, and M may be 2, 3, 4, etc.
[0061] For the convenience of description, the following takes M equals 2 and N equals 2 as an example, and the processing of other cases is similar. Based on this, each pixel group includes pixels of 2 rows and 2 columns. For example, the pixels of the 1st row and 1st column, the pixels of the 1st row and 2nd column, the pixels of the 2nd row and 1st column, and the pixels of the 2nd row and 2nd column form a pixel group. The pixels of the 1st row and 3rd column, the pixels of the 1st row and 4th column, the pixels of the 2nd row and 3rd column, and the pixels of the 2nd row and 4th column form a pixel group, and so on. The pixels of the 3rd row and 1st column, the pixels of the 3rd row and 2nd column, the pixels of the 4th row and 1st column, and the pixels of the 4th row and 2nd column form a pixel group, and so on.
[0062] Exemplarily, for each pixel group, the pixels of M rows and N columns can be divided into first-type pixels and second-type pixels, that is, the pixel group includes first-type pixels and second-type pixels. The first-type pixels are pixels connected to the first scanning drive circuit (that is, the first scanning drive circuit is connected to the first-type pixels), and the second-type pixels are pixels connected to the second scanning drive circuit (that is, the second scanning drive circuit is connected to the second-type pixels).
[0063] For example, a pixel group includes pixels of 2 rows and 2 columns, that is, among the 4 pixels in a unit of 2*2, a part of the pixels are designed as first-class pixels (first-class pixels are short-exposure pixels), and the remaining part of the pixels are designed as second-class pixels (second-class pixels are long-exposure pixels). The number of first-class pixels and second-class pixels is not limited in this embodiment, as long as there is at least one first-class pixel and at least one second-class pixel. The positions of first-class pixels and second-class pixels are not limited in this embodiment, and the positions of first-class pixels and second-class pixels can be set arbitrarily.
[0064] Exemplarily, the number of first-class pixels and the number of second-class pixels may be the same, such as the number of first-class pixels is 2, and the number of second-class pixels is 2. For example, when an X-ray detector images an object to be detected, the number of first-class pixels and the number of second-class pixels are set to be the same based on the ratio between the hard-to-penetrate area and the easy-to-penetrate area of the object to be detected. For example, when the ratio of the hard-to-penetrate area to the easy-to-penetrate area is in a preset interval [ratio value 1, ratio value 2], the number of first-class pixels and the number of second-class pixels are set to be the same. Ratio value 1 can be configured based on experience, and can be a value less than or equal to 1, such as 0.8, 0.9, etc. Ratio value 2 can be configured based on experience, and can be a value greater than or equal to 1, such as 1.1, 1.2, etc.
[0065] Exemplarily, the number of first-class pixels may be greater than the number of second-class pixels, such as the number of first-class pixels is 3 and the number of second-class pixels is 1. For example, when an X-ray detector images an object to be detected, the number of first-class pixels is set to be greater than the number of second-class pixels based on the ratio between the hard-to-penetrate area and the easy-to-penetrate area of the object to be detected. For example, when the ratio of the hard-to-penetrate area to the easy-to-penetrate area is less than the ratio value 1, that is, the easy-to-penetrate area is greater than the hard-to-penetrate area, the number of first-class pixels is set to be greater than the number of second-class pixels, so that more pixels are used as short-exposure pixels, and more pixels are used for the easy-to-penetrate area.
[0066] Exemplarily, the number of first-class pixels may be smaller than the number of second-class pixels, such as the number of first-class pixels is 1 and the number of second-class pixels is 3. For example, when an X-ray detector images an object to be detected, the number of first-class pixels is set to be smaller than the number of second-class pixels based on the ratio between the hard-to-penetrate area and the easy-to-penetrate area of the object to be detected. For example, when the ratio of the hard-to-penetrate area to the easy-to-penetrate area is greater than the ratio value 2, that is, the hard-to-penetrate area is greater than the easy-to-penetrate area, and the number of first-class pixels is set to be smaller than the number of second-class pixels, so that more pixels are used as long-exposure pixels, and more pixels are used for the hard-to-penetrate area.
[0067] Exemplarily, regarding the positions of the first and second type of pixels, the pixel group can be divided into four pixel subsets, the first pixel subset includes pixels in odd rows and odd columns, the second pixel subset includes pixels in odd rows and even columns, the third pixel subset includes pixels in even rows and odd columns, and the fourth pixel subset includes pixels in even rows and even columns. On this basis, all pixels in K pixel subsets among the four pixel subsets are used as first type of pixels, K is greater than or equal to 1, and K is less than or equal to 3, and all pixels in the remaining pixel subsets are used as second type of pixels. For example, all pixels in the first pixel subset can be used as first type of pixels, and all pixels in the first pixel subset can also be used as second type of pixels. All pixels in the second pixel subset can be used as first type of pixels, and all pixels in the second pixel subset can also be used as second type of pixels. All pixels in the third pixel subset can be used as first type of pixels, and all pixels in the third pixel subset can also be used as second type of pixels. All pixels in the fourth pixel subset can be used as first-class pixels, and all pixels in the fourth pixel subset can also be used as second-class pixels. As long as there is a pixel subset used as first-class pixels and a pixel subset used as second-class pixels, it will be fine.
[0068] For example, if M is 2, N is 2, and the number of the first type of pixels is the same as the number of the second type of pixels, then the positions of the first type of pixels and the second type of pixels can be determined in the following manner:
[0069] The pixels in the odd-numbered columns are the first type of pixels, and the pixels in the even-numbered columns are the second type of pixels.
[0070] Alternatively, the pixels in the even-numbered columns are the first-class pixels, and the pixels in the odd-numbered columns are the second-class pixels.
[0071] Alternatively, pixels in odd rows and even columns are first-class pixels, pixels in even rows and odd columns are first-class pixels, pixels in odd rows and odd columns are second-class pixels, and pixels in even rows and even columns are second-class pixels.
[0072] Alternatively, pixels in odd rows and odd columns are first-class pixels, pixels in even rows and even columns are first-class pixels, pixels in odd rows and even columns are second-class pixels, and pixels in even rows and odd columns are second-class pixels.
[0073] See also Figure 3A The figure shows the location of the first and second type pixels. This is just an example. Figure 3A In the embodiment, the pixels in odd rows and odd columns are first type pixels (connected to the first scanning drive circuit), the pixels in odd rows and even columns are second type pixels (connected to the second scanning drive circuit), the pixels in even rows and even columns are first type pixels, and the pixels in even rows and odd columns are second type pixels.
[0074] For example, for the first pixel group, the pixels in the first row and first column are pixels of the first category, the pixels in the first row and second column are pixels of the second category, the pixels in the second row and first column are pixels of the second category, and the pixels in the second row and second column are pixels of the first category. For the second pixel group, the pixels in the first row and third column are pixels of the first category, the pixels in the first row and fourth column are pixels of the second category, the pixels in the second row and third column are pixels of the second category, and the pixels in the second row and fourth column are pixels of the first category. And so on, and this position will not be repeated.
[0075] For example, if M is 2, N is 2, and the number of first-class pixels is greater than the number of second-class pixels, then the positions of first-class pixels and second-class pixels can be determined in the following manner:
[0076] The pixels in odd rows (that is, all pixels in odd rows) are first-class pixels, the pixels in even rows and odd columns are first-class pixels, and the pixels in even rows and even columns are second-class pixels. Or,
[0077] The pixels in odd rows (that is, all pixels in odd rows) are first-class pixels, the pixels in even rows and even columns are first-class pixels, and the pixels in even rows and odd columns are second-class pixels. Or,
[0078] The pixels in even rows (that is, all pixels in even rows) are first-class pixels, the pixels in odd rows and odd columns are first-class pixels, and the pixels in odd rows and even columns are second-class pixels. Or,
[0079] The pixels in even rows (that is, all pixels in even rows) are first-class pixels, the pixels in odd rows and even columns are first-class pixels, and the pixels in odd rows and odd columns are second-class pixels.
[0080] See also Figure 3B The figure shows the location of the first and second type pixels. This is just an example. Figure 3B In the embodiment, all pixels in odd rows are first-type pixels (connected to the first scanning driving circuit), pixels in even rows and even columns are first-type pixels, and pixels in even rows and odd columns are second-type pixels.
[0081] For example, for the first pixel group, the pixels in the first row and first column are pixels of the first category, the pixels in the first row and second column are pixels of the first category, the pixels in the second row and first column are pixels of the second category, and the pixels in the second row and second column are pixels of the first category. For the second pixel group, the pixels in the first row and third column are pixels of the first category, the pixels in the first row and fourth column are pixels of the first category, the pixels in the second row and third column are pixels of the second category, and the pixels in the second row and fourth column are pixels of the first category. And so on, and this position will not be repeated.
[0082] For example, if M is 2, N is 2, and the number of first-class pixels is less than the number of second-class pixels, then the positions of first-class pixels and second-class pixels can be determined in the following manner:
[0083] The pixels in odd rows (that is, all pixels in odd rows) are second-class pixels, the pixels in even rows and odd columns are first-class pixels, and the pixels in even rows and even columns are second-class pixels. Or,
[0084] The pixels in odd rows (that is, all pixels in odd rows) are second-class pixels, the pixels in even rows and even columns are first-class pixels, and the pixels in even rows and odd columns are second-class pixels. Or,
[0085] The pixels in even rows (that is, all pixels in even rows) are second-class pixels, the pixels in odd rows and odd columns are first-class pixels, and the pixels in odd rows and even columns are second-class pixels. Or,
[0086] The pixels in even rows (that is, all pixels in even rows) are second-class pixels, the pixels in odd rows and even columns are first-class pixels, and the pixels in odd rows and odd columns are second-class pixels.
[0087] For the location of the first and second type pixels, see Figure 3B As shown, the first scanning driving circuit and the second scanning driving circuit can be interchanged. All pixels in odd rows are second-type pixels, pixels in even rows and even columns are second-type pixels, and pixels in even rows and odd columns are first-type pixels.
[0088] For example, for the first pixel group, the pixels in the first row and first column are second-class pixels, the pixels in the first row and second column are second-class pixels, the pixels in the second row and first column are first-class pixels, and the pixels in the second row and second column are second-class pixels. For the second pixel group, the pixels in the first row and third column are second-class pixels, the pixels in the first row and fourth column are second-class pixels, the pixels in the second row and third column are first-class pixels, and the pixels in the second row and fourth column are second-class pixels. And so on, and this position will not be repeated.
[0089] In the above application scenario, this embodiment involves a model training process and a model-based image generation process, which are described below.
[0090] First, for the model training process. During the model training process, it is necessary to train the first image restoration network and the second image restoration network. The first image restoration network is obtained by training the initial network model using short-exposure low-resolution sample images and full-resolution label images. The second image restoration network is obtained by training the initial network model using long-exposure low-resolution sample images and full-resolution label images.
[0091] For example, the object to be tested in the model training process can be called a sample object, the X-ray emitter emits X-rays to the object to be tested, and the X-ray detector receives the X-rays that pass through the object to be tested. Based on the X-rays that pass through the object to be tested, the X-ray detector can implement the imaging process using the following process.
[0092] The processing circuit images each row of the pixel array separately, so each row of the pixel array needs to be processed separately. For each row of the pixel array, the processing circuit can divide the scanning time corresponding to the row into a first energy integration time, a first gating time, a second energy integration time, and a second gating time.
[0093] In this embodiment, there is no restriction on the time length of the first energy integration time, the time length of the first gating time, the time length of the second energy integration time and the time length of the second gating time, as long as the first energy integration time is located before the first gating time, the first gating time is located between the first energy integration time and the second energy integration time, and the second energy integration time is located before the second gating time. The time length of the second energy integration time is different from or the same as the time length of the first energy integration time.
[0094] See also Figure 4AAs shown, it is a schematic diagram of the scanning time of each row of the pixel array. For each row of the pixel array, the red area in front of the blue area can represent the first energy integration time, the blue area can represent the first gating time, the red area behind the blue area can represent the second energy integration time, and the green and brown areas can represent the second gating time. For the processing of the first energy integration time, the first gating time, the second energy integration time and the second gating time, please refer to the subsequent embodiments.
[0095] Figure 4A It is for Figure 3A Schematic diagram of the scan time of the scene, for Figure 3B Scene, see Figure 4B , which is a schematic diagram of the scanning time of each row of the pixel array. For each row of the pixel array, the red area in front of the blue area can represent the first energy integration time, the blue area can represent the first gating time, the red area behind the blue area can represent the second energy integration time, and the green and brown areas can represent the second gating time. Figure 4B and Figure 4A In comparison, since there are no second-type pixels in the 1st, 3rd, 5th and 7th rows, the pixel value readout process after the second scanning drive circuit is enabled is not involved.
[0096] In order to train the first image restoration network and the second image restoration network, it is necessary to obtain long-exposure low-resolution sample images and short-exposure low-resolution sample images. The acquisition process is described below.
[0097] Exemplarily, for each row of the pixel array, when the first energy integration time corresponding to the row is reached, the processing circuit controls the first scanning driving circuit to disconnect each first-class pixel of the row from the pixel readout circuit (i.e., the first scanning driving circuit is not connected to each first-class pixel), so that each first-class pixel can achieve energy integration within the first energy integration time, i.e., energy integration of the light signal is performed, and there is no restriction on this process. Also, the processing circuit controls the second scanning driving circuit to disconnect each second-class pixel of the row from the pixel readout circuit (i.e., the second scanning driving circuit is not connected to each second-class pixel), so that each second-class pixel can achieve energy integration within the first energy integration time, i.e., energy integration of the light signal is performed.
[0098] When the first enable time corresponding to the row is reached, the processing circuit controls the first scanning drive circuit to turn on the first-class pixels of the row and the pixel readout circuit (that is, the first scanning drive circuit is connected to the first-class pixels), and the processing circuit controls the pixel readout circuit to read out the electrical signal of each first-class pixel (after the first-class pixels and the pixel readout circuit are turned on, the pixel readout circuit can read out the electrical signal of each first-class pixel).
[0099] Obviously, when the pixel readout circuit reads out the electrical signal of each first-type pixel, the electrical signal of the first-type pixel is an electrical signal for the first energy integration time, that is, an electrical signal for a shorter time.
[0100] When the first enable time corresponding to the row is reached, the processing circuit continues to control the second scanning drive circuit to disconnect the second type of pixels in the row from the pixel readout circuit, so that the second type of pixels can continue to realize energy integration within the first enable time, that is, perform energy integration on the light signal.
[0101] When the second energy integration time corresponding to the row is reached, the processing circuit controls the first scanning driving circuit to disconnect each first type pixel of the row from the pixel readout circuit, and each first type pixel realizes energy integration during the second energy integration time. Also, the processing circuit controls the second scanning driving circuit to disconnect each second type pixel of the row from the pixel readout circuit, and each second type pixel realizes energy integration during the second energy integration time.
[0102] When the second selection time corresponding to the row is reached, the processing circuit controls the first scanning driving circuit to conduct the first type of pixels of the row with the pixel readout circuit, and the processing circuit controls the pixel readout circuit to clear the electrical signals of the first type of pixels. For example, after the first type of pixels are conducted with the pixel readout circuit, the pixel readout circuit can read the electrical signals of the first type of pixels, and the pixel readout circuit needs to discard the electrical signals of the first type of pixels (not use the electrical signals of the first type of pixels), and then clear the electrical signals of the first type of pixels.
[0103] By clearing the electrical signals of each first-class pixel, the accumulation of electrical signals of each first-class pixel during the second energy integration time can be avoided, so that the electrical signals read out by the pixel readout circuit are electrical signals for the first energy integration time, that is, the electrical signals read out by the pixel readout circuit are electrical signals for a shorter time.
[0104] When the second enable time corresponding to the row is reached, the processing circuit controls the second scanning drive circuit to turn on the second type of pixels in the row and the pixel readout circuit (that is, the second scanning drive circuit is connected to each second type of pixel), and the processing circuit controls the pixel readout circuit to read out the electrical signal of each second type of pixel (after the second type of pixel and the pixel readout circuit are turned on, the pixel readout circuit can read out the electrical signal of each second type of pixel).
[0105] Obviously, when the pixel readout circuit reads out the electrical signals of each second type of pixel, the electrical signals of the second type of pixel are electrical signals for the first energy integration time, the first gating time and the second energy integration time, that is, electrical signals for a longer time. Compared with the electrical signals of the first type of pixel, the energy integration time of the electrical signals of the second type of pixel is greater than the energy integration time of the electrical signals of the first type of pixel.
[0106] Exemplarily, after performing the above processing on all rows of the pixel array, the electrical signals of the first type of pixels in all rows of the pixel array can be obtained, and the electrical signals of the second type of pixels in all rows of the pixel array can be obtained. The electrical signals of the first type of pixels in all rows are used to generate a short-exposure low-resolution sample image, and the electrical signals of the second type of pixels in all rows are used to generate a long-exposure low-resolution sample image. The short-exposure low-resolution sample image only has pixel values of the first type of pixels, but no pixel values of the second type of pixels. The long-exposure low-resolution sample image only has pixel values of the second type of pixels, but no pixel values of the first type of pixels.
[0107] For example, the X-ray detector may also include an analog-to-digital conversion circuit, and the pixel readout circuit may include an operational amplifier and a capacitor, the positive input terminal of the operational amplifier is a reference voltage (Vref), the negative input terminal of the operational amplifier is an electrical signal of the pixel, and the output terminal of the operational amplifier is the analog-to-digital conversion circuit.
[0108] After the pixel readout circuit obtains the electrical signal of the pixel (such as the first type of pixel or the second type of pixel), the electrical signal can be amplified, and the amplified electrical signal is input to the analog-to-digital conversion circuit.
[0109] The analog-to-digital conversion circuit is used to convert the electrical signal of the first type of pixel (the amplified electrical signal) into a digital signal, and to convert the electrical signal of the second type of pixel (the amplified electrical signal) into a digital signal.
[0110] The processing circuit can obtain the digital signal of the first type of pixel from the analog-to-digital conversion circuit, and the digital signal of the first type of pixel reflects the voltage value of the first type of pixel, and the pixel value of the first type of pixel can be obtained based on the voltage value. Based on the pixel values of all first type of pixels, a short exposure low resolution sample image can be generated (the short exposure low resolution image in the model training process is recorded as a short exposure low resolution sample image), and the short exposure low resolution sample image can include the pixel values of all first type of pixels.
[0111] The processing circuit can obtain the digital signal of the second type of pixel from the analog-to-digital conversion circuit, and the digital signal of the second type of pixel reflects the voltage value of the second type of pixel, and the pixel value of the second type of pixel can be obtained based on the voltage value. Based on the pixel values of all second type of pixels, a long exposure low resolution sample image can be generated (the long exposure low resolution image in the model training process is recorded as a long exposure low resolution sample image), and the long exposure low resolution sample image can include the pixel values of all second type of pixels.
[0112] In order to train the first image restoration network and the second image restoration network, it is also necessary to obtain the full-resolution label image. The process of obtaining the full-resolution label image is described below.
[0113] For example, see Figure 4C As shown, for each row of the pixel array, when the first energy integration time corresponding to the row is reached, the processing circuit controls the first scanning driving circuit to disconnect each first-type pixel of the row from the pixel readout circuit, and the processing circuit controls the second scanning driving circuit to disconnect each second-type pixel of the row from the pixel readout circuit. When the first selection time corresponding to the row is reached, the processing circuit controls the first scanning driving circuit to disconnect each first-type pixel of the row from the pixel readout circuit, and the processing circuit controls the second scanning driving circuit to disconnect each second-type pixel of the row from the pixel readout circuit. When the second energy integration time corresponding to the row is reached, the processing circuit controls the first scanning driving circuit to disconnect each first-type pixel of the row from the pixel readout circuit, and the processing circuit controls the second scanning driving circuit to disconnect each second-type pixel of the row from the pixel readout circuit. When the second selection time corresponding to the row is reached, the processing circuit controls the first scanning driving circuit to turn on each first-type pixel of the row from the pixel readout circuit, and the processing circuit controls the pixel readout circuit to read out the electrical signal of each first-type pixel. The processing circuit controls the second scanning driving circuit to conduct each second type of pixel in the row with the pixel readout circuit, and the processing circuit controls the pixel readout circuit to read out the electrical signal of each second type of pixel.
[0114] Obviously, when the pixel readout circuit reads out the electrical signals of each first-type pixel, the electrical signals of the first-type pixel are electrical signals for the first energy integration time, the first gating time and the second energy integration time.
[0115] When the pixel readout circuit reads out the electrical signals of each second type of pixel, the electrical signals of the second type of pixel are electrical signals for the first energy integration time, the first gating time and the second energy integration time.
[0116] Exemplarily, after obtaining the electrical signals of the first type of pixels in all rows of the pixel array and the electrical signals of the second type of pixels in all rows of the pixel array, the electrical signals of the first type of pixels in all rows and the electrical signals of the second type of pixels in all rows are used to generate a full-resolution label image. The full-resolution label image includes the pixel values of all the first type of pixels, and the full-resolution label image includes the pixel values of all the second type of pixels.
[0117] For example, after the pixel readout circuit obtains the electrical signal of the pixel, the electrical signal can be amplified, and the amplified electrical signal is input to the analog-to-digital conversion circuit. The analog-to-digital conversion circuit is used to convert the electrical signal of the first type of pixel into a digital signal, and convert the electrical signal of the second type of pixel into a digital signal.
[0118] The processing circuit can obtain the digital signal of the first type of pixel from the analog-to-digital conversion circuit, and then obtain the pixel value of the first type of pixel. The processing circuit can obtain the digital signal of the second type of pixel from the analog-to-digital conversion circuit, and then obtain the pixel value of the second type of pixel. On this basis, based on the pixel values of all the first type of pixels and the pixel values of all the second type of pixels, a full-resolution label image can be generated, and the full-resolution label image can include the pixel values of all the first type of pixels and the pixel values of all the second type of pixels.
[0119] After obtaining the short-exposure low-resolution sample image and the full-resolution label image, a first image restoration network can be trained based on the short-exposure low-resolution sample image and the full-resolution label image.
[0120] For example, a first initial network model (model to be trained) may be obtained in advance, and the structure of the first initial network model is not limited. The first initial network model is used to restore the low-resolution image, thereby completing the pixel values of the low-resolution image to obtain a full-resolution image.
[0121] Exemplarily, the short exposure low-resolution sample image can be input into the first initial network model, and the short exposure low-resolution sample image can be restored by the first initial network model, that is, the pixel values of the short exposure low-resolution sample image are completed to obtain a short exposure full-resolution sample image. There is no restriction on this restoration operation, as long as the pixel values of the short exposure low-resolution sample image can be completed.
[0122] Then, the loss value can be calculated based on the short-exposure full-resolution sample image and the full-resolution label image. There is no restriction on the method of calculating the loss value, and it can be obtained based on the difference between the two frames of images. Obviously, the greater the difference between the short-exposure full-resolution sample image and the full-resolution label image, the greater the loss value.
[0123] Then, the first initial network model can be adjusted based on the loss value, such as by using a gradient descent method, etc. The adjustment goal is to make the loss value smaller and smaller.
[0124] Then, if the adjusted network model does not converge, the adjusted network model is used as the first initial network model, and the operation of inputting the short-exposure low-resolution sample image to the first initial network model is returned to be executed.
[0125] If the adjusted network model has converged, the adjusted network model is used as the first image restoration network.
[0126] After obtaining the long-exposure low-resolution sample image and the full-resolution label image, a second image restoration network can be trained based on the long-exposure low-resolution sample image and the full-resolution label image.
[0127] For example, a second initial network model may be obtained in advance, and the structure of the second initial network model is not limited. The second initial network model may be the same as or different from the first initial network model. The second initial network model is used to restore the low-resolution image to obtain a full-resolution image.
[0128] Exemplarily, the long exposure low-resolution sample image can be input into the second initial network model, and the long exposure low-resolution sample image can be restored by the second initial network model, that is, the pixel values of the long exposure low-resolution sample image are completed to obtain the long exposure full-resolution sample image.
[0129] Then, a loss value can be calculated based on the long-exposure full-resolution sample image and the full-resolution label image, and the second initial network model can be adjusted based on the loss value to obtain an adjusted network model.
[0130] Then, if the adjusted network model does not converge, the adjusted network model is used as the second initial network model, and the operation of inputting the long-exposure low-resolution sample image to the second initial network model is returned.
[0131] If the adjusted network model has converged, the adjusted network model is used as the second image restoration network.
[0132] At this point, the model training process is completed, and the first image restoration network and the second image restoration network are obtained by training. Then, the image generation process can be performed based on the first image restoration network and the second image restoration network.
[0133] Second, the model-based image generation process. In the model-based image generation process, a short-exposure full-resolution image is obtained based on the first image restoration network, and a long-exposure full-resolution image is obtained based on the second image restoration network, and then the short-exposure full-resolution image and the long-exposure full-resolution image are fused.
[0134] Exemplarily, the processing circuit may support a synchronous working mode and a wide dynamic working mode. The processing circuit may enable the wide dynamic working mode. In the wide dynamic working mode, the processing circuit implements a model-based image generation process, that is, adopts the control flow of the image generation process. In addition, in the synchronous working mode, the processing circuit implements a model training process, that is, adopts the control flow of the model training process.
[0135] Exemplarily, the processing circuit images each row of the pixel array separately, and therefore, each row of the pixel array needs to be processed separately. For each row of the pixel array, the processing circuit can divide the scanning time corresponding to the row into a first energy integration time, a first gating time, a second energy integration time, and a second gating time. Figure 4A and Figure 4BAs shown, the red area in front of the blue area can represent the first energy integration time, the blue area can represent the first gating time, the red area behind the blue area can represent the second energy integration time, and the green and brown areas can represent the second gating time.
[0136] Exemplarily, for each row of the pixel array, when the first energy integration time corresponding to the row is reached, the processing circuit controls the first scanning driving circuit to disconnect each first type of pixel in the row from the pixel readout circuit. The processing circuit controls the second scanning driving circuit to disconnect each second type of pixel in the row from the pixel readout circuit.
[0137] When the first selection time corresponding to the row is reached, the processing circuit controls the first scanning driving circuit to turn on each first-class pixel of the row and the pixel readout circuit, and the processing circuit controls the pixel readout circuit to read out the electrical signal of each first-class pixel. Obviously, when the pixel readout circuit reads out the electrical signal of each first-class pixel, the electrical signal of the first-class pixel is the electrical signal for the first energy integration time, that is, the electrical signal for a shorter time. The processing circuit continues to control the second scanning driving circuit to disconnect each second-class pixel of the row from the pixel readout circuit.
[0138] When the second energy integration time corresponding to the row is reached, the processing circuit controls the first scanning driving circuit to disconnect the first type of pixels and the pixel readout circuit of the row, and the processing circuit controls the second scanning driving circuit to disconnect the second type of pixels and the pixel readout circuit of the row.
[0139] When the second selection time corresponding to the row is reached, the processing circuit controls the first scanning driving circuit to conduct the first type of pixels in the row with the pixel readout circuit, and the processing circuit controls the pixel readout circuit to clear the electrical signals of the first type of pixels. For example, the pixel readout circuit can read the electrical signals of the first type of pixels, discard the electrical signals of the first type of pixels, and then clear the electrical signals of the first type of pixels.
[0140] When the second gate time corresponding to the row is reached, the processing circuit controls the second scanning driving circuit to conduct the second type of pixels and the pixel readout circuit of the row, and the processing circuit controls the pixel readout circuit to read out the electrical signals of the second type of pixels. Obviously, the electrical signals of the second type of pixels are electrical signals for the first energy integration time, the first gate time and the second energy integration time, that is, electrical signals for a longer time.
[0141] In a possible implementation, the processing circuit may include a control submodule (i.e., a drive control submodule), the control submodule being used to control the first scanning drive circuit to connect the first type of pixel and the pixel readout circuit, or to control the first scanning drive circuit to disconnect the first type of pixel and the pixel readout circuit. Also, the control submodule is used to control the second scanning drive circuit to connect the second type of pixel and the pixel readout circuit, or to control the second scanning drive circuit to disconnect the second type of pixel and the pixel readout circuit.
[0142] After the above processing is performed on the pixel array, the electrical signals of the first type of pixels in all rows and the electrical signals of the second type of pixels in all rows can be obtained. The electrical signals of the first type of pixels in all rows are used to generate a short-exposure low-resolution image, and the electrical signals of the second type of pixels in all rows are used to generate a long-exposure low-resolution image. The short-exposure low-resolution image only has the pixel values of the first type of pixels, but not the pixel values of the second type of pixels. The long-exposure low-resolution image only has the pixel values of the second type of pixels, but not the pixel values of the first type of pixels.
[0143] For example, the X-ray detector may further include an analog-to-digital conversion circuit. After the pixel readout circuit obtains the electrical signal of the pixel, the electrical signal may be amplified, and the amplified electrical signal is input to the analog-to-digital conversion circuit. The analog-to-digital conversion circuit is used to convert the electrical signal of the first type of pixel (the amplified electrical signal) into a digital signal, and convert the electrical signal of the second type of pixel (the amplified electrical signal) into a digital signal.
[0144] The processing circuit obtains the digital signal of the first type of pixel from the analog-to-digital conversion circuit, and the digital signal of the first type of pixel reflects the voltage value of the first type of pixel, and the pixel value of the first type of pixel is obtained based on the voltage value. Based on the pixel values of all the first type of pixels, a short exposure low-resolution image can be generated, and the short exposure low-resolution image includes the pixel values of all the first type of pixels. The processing circuit obtains the digital signal of the second type of pixel from the analog-to-digital conversion circuit, and the digital signal of the second type of pixel reflects the voltage value of the second type of pixel, and the pixel value of the second type of pixel is obtained based on the voltage value. Based on the pixel values of all the second type of pixels, a long exposure low-resolution image can be generated, and the long exposure low-resolution image includes the pixel values of all the second type of pixels.
[0145] Exemplarily, after obtaining the short exposure low-resolution image, the processing circuit may further perform a first restoration operation on the short exposure low-resolution image to obtain a short exposure full-resolution image, wherein the first restoration operation is used to complete the pixel values of the second type of pixels. In this way, the short exposure full-resolution image includes the pixel values of the first type of pixels and the pixel values of the second type of pixels, and the pixel values of the second type of pixels are obtained by completing the first restoration operation.
[0146] For example, the first image restoration network is used to perform a restoration operation on a low-resolution image, thereby completing the pixel values of the low-resolution image to obtain a full-resolution image, and the first image restoration network is trained based on short-exposure low-resolution sample images and full-resolution label images. Therefore, the short-exposure low-resolution image can be input into the first image restoration network, and the first image restoration network performs a first restoration operation on the short-exposure low-resolution image (i.e., completing the pixel values of the second type of pixels) to obtain a short-exposure full-resolution image. There is no restriction on the restoration operation of the first image restoration network, as long as the pixel values can be completed.
[0147] See also Figure 5A As shown, it is a schematic diagram for the first image restoration network. In the model training process, the first image restoration network can be trained based on the short-exposure low-resolution sample image and the full-resolution label image. In the model-based image generation process, the short-exposure low-resolution image can be input to the first image restoration network for inference, and the first image restoration network outputs a short-exposure full-resolution image.
[0148] Exemplarily, after obtaining the long exposure low-resolution image, the processing circuit may further perform a second restoration operation on the long exposure low-resolution image to obtain a long exposure full-resolution image, wherein the second restoration operation is used to complete the pixel values of the first type of pixels. In this way, the long exposure full-resolution image includes the pixel values of the first type of pixels and the pixel values of the second type of pixels, and the pixel values of the first type of pixels are obtained by completing the second restoration operation.
[0149] For example, the second image restoration network is used to perform a restoration operation on the low-resolution image, thereby completing the pixel values of the low-resolution image to obtain a full-resolution image, and the second image restoration network is trained based on the long-exposure low-resolution sample image and the full-resolution label image. Therefore, the long-exposure low-resolution image can be input into the second image restoration network, and the second image restoration network performs a second restoration operation on the long-exposure low-resolution image (i.e., completing the pixel values of the first type of pixels) to obtain a long-exposure full-resolution image. There is no restriction on the restoration operation of the second image restoration network, as long as it can complete the pixel values.
[0150] See also Figure 5B As shown, it is a schematic diagram for the second image restoration network. In the model training process, the second image restoration network can be trained based on the long-exposure low-resolution sample image and the full-resolution label image. In the model-based image generation process, the long-exposure low-resolution image can be input to the second image restoration network for inference, and the second image restoration network outputs a long-exposure full-resolution image.
[0151] In one possible implementation, the processing circuit may include an image reconstruction submodule, which performs a first restoration operation on the short-exposure low-resolution image to obtain a short-exposure full-resolution image, and performs a second restoration operation on the long-exposure low-resolution image to obtain a long-exposure full-resolution image. For the first restoration operation and the second restoration operation, refer to the above embodiments.
[0152] Exemplarily, after obtaining the long exposure full resolution image and the short exposure full resolution image, the processing circuit may output the long exposure full resolution image and the short exposure full resolution image, and the processing circuit may also generate a wide dynamic fusion image based on the long exposure full resolution image and the short exposure full resolution image. For example, based on the long exposure full resolution image, the first weight coefficient corresponding to the long exposure full resolution image, the short exposure full resolution image and the second weight coefficient corresponding to the short exposure full resolution image, a wide dynamic fusion image is generated.
[0153] For example, see Fig. 6A As shown, it is a schematic diagram of the first weight coefficient. For each pixel in the wide dynamic fusion image, if the reference pixel value corresponding to the pixel in the long exposure full-resolution image is less than the first threshold value (which can be configured based on experience), the first weight coefficient corresponding to the pixel is the first weight value (such as 1). If the reference pixel value is greater than or equal to the first threshold value and less than the second threshold value, the first weight coefficient corresponding to the pixel is inversely proportional to the reference pixel value, that is, the larger the reference pixel value, the smaller the first weight coefficient corresponding to the pixel, and the first weight coefficient changes from the first weight value (such as 1) to the second weight value (such as 0). If the reference pixel value is greater than or equal to the second threshold value (which can be configured based on experience), the first weight coefficient corresponding to the pixel is the second weight value (such as 0). The second weight value is less than the first weight value, and the second weight value can be configured based on experience, such as 0, and the first weight value can be configured based on experience, such as 1.
[0154] After obtaining the first weight coefficient corresponding to the pixel, the second weight coefficient corresponding to the pixel can be determined based on the difference between the fixed value and the first weight coefficient corresponding to the pixel. For example, the fixed value can be 1, and the difference between 1 and the first weight coefficient can be used as the second weight coefficient.
[0155] For example, see Figure 6BAs shown, it is a schematic diagram of the second weight coefficient. For each pixel in the wide dynamic fusion image, if the reference pixel value corresponding to the pixel in the short exposure full-resolution image is less than the third threshold value (which can be configured based on experience), the second weight coefficient corresponding to the pixel is the third weight value (such as 0). If the reference pixel value is greater than or equal to the third threshold value and less than the fourth threshold value, the second weight coefficient corresponding to the pixel is proportional to the reference pixel value, that is, the larger the reference pixel value, the larger the second weight coefficient corresponding to the pixel, and the second weight coefficient changes from the third weight value (such as 0) to the fourth weight value (such as 1). If the reference pixel value is greater than or equal to the fourth threshold value (which can be configured based on experience), the second weight coefficient corresponding to the pixel is the fourth weight value (such as 1). The fourth weight value is greater than the third weight value, and the fourth weight value can be configured based on experience, such as 1, and the third weight value can be configured based on experience, such as 0.
[0156] After obtaining the second weight coefficient corresponding to the pixel, the first weight coefficient corresponding to the pixel can be determined based on the difference between the fixed value and the second weight coefficient corresponding to the pixel. For example, the fixed value can be 1, and the difference between 1 and the second weight coefficient can be used as the first weight coefficient.
[0157] Exemplarily, for each pixel in the wide dynamic fusion image, the target pixel value corresponding to the pixel in the wide dynamic fusion image is determined based on the first pixel value corresponding to the pixel in the long exposure full resolution image, the first weight coefficient corresponding to the pixel, the second pixel value corresponding to the pixel in the short exposure full resolution image, and the second weight coefficient corresponding to the pixel. For example, the target pixel value can be determined by the following formula: P = P1*W1+P2*W2. Wherein, P represents the target pixel value, P1 represents the first pixel value, W1 represents the first weight coefficient, P2 represents the second pixel value, and W2 represents the second weight coefficient.
[0158] In a possible implementation, the processing circuit may include a wide dynamic fusion submodule, which generates a wide dynamic fusion image based on the long exposure full resolution image and the short exposure full resolution image. For the process of generating the wide dynamic fusion image, refer to the above embodiment.
[0159] It can be seen from the above technical solutions that in the embodiment of the present application, an X-ray detector is designed to divide all pixels of the X-ray detector into first-class pixels and second-class pixels, and a short-exposure low-resolution image can be generated based on the electrical signals of all first-class pixels, and a long-exposure low-resolution image can be generated based on the electrical signals of all second-class pixels. In this way, a wide dynamic fusion image can be generated based on the short-exposure low-resolution image and the long-exposure low-resolution image, so as to clearly image the object to be measured. Even if the object to be measured includes a difficult-to-penetrate substance and an easily-penetrable substance, objects to be measured with different densities can be clearly imaged, so that the image quality is better, the image dynamic range can be improved, and the internal structure of the object to be measured can be analyzed based on the image.
[0160] A scanning circuit driving algorithm can be designed in a processing circuit (such as an FPGA), and the scanning circuit driving algorithm can make the X-ray detector work in a synchronous working mode or a wide dynamic working mode. In the synchronous working mode, the first image restoration network and the second image restoration network are trained. In the wide dynamic working mode, a short exposure full resolution image and a long exposure full resolution image are obtained based on the first image restoration network and the second image restoration network. A wide dynamic fusion algorithm can be designed in the processing circuit, and the wide dynamic fusion algorithm can fuse the short exposure full resolution image and the long exposure full resolution image into a wide dynamic image.
[0161] Without increasing the number of pixels and the size of the X-ray detector, full-resolution images of two exposure conditions are obtained. The long-exposure image and the short-exposure image are fused in a certain ratio according to the wide dynamic algorithm to obtain a larger dynamic range, and clear imaging of both difficult-to-penetrate objects and easy-to-penetrate objects can be obtained at the same time.
[0162] In the embodiment of the present application, an image generation method is proposed, which can be applied to X-ray detectors. Figure 7 FIG. 1 is a flow chart of the image generation method, which may include:
[0163] Step 701, obtaining a short-exposure low-resolution image and a long-exposure low-resolution image; wherein the pixel array of the X-ray detector includes a first type of pixel and a second type of pixel, the short-exposure low-resolution image is generated based on the electrical signals of the first type of pixel, and the long-exposure low-resolution image is generated based on the electrical signals of the second type of pixel.
[0164] Step 702: Perform a first restoration operation on the short-exposure low-resolution image to obtain a short-exposure full-resolution image. The first restoration operation is used to complete the pixel values of the second type of pixels in the short-exposure low-resolution image.
[0165] Step 703: Perform a second restoration operation on the long-exposure low-resolution image to obtain a long-exposure full-resolution image. The second restoration operation is used to complete the pixel values of the first type of pixels in the long-exposure low-resolution image.
[0166] Step 704: Generate a wide dynamic fusion image based on the long exposure full resolution image and the short exposure full resolution image. Generate a wide dynamic fusion image based on the long exposure full resolution image, the first weight coefficient of the long exposure full resolution image, the short exposure full resolution image, and the second weight coefficient of the short exposure full resolution image.
[0167] Exemplarily, performing a first restoration operation on a short-exposure low-resolution image to obtain a short-exposure full-resolution image may include: inputting the short-exposure low-resolution image to a first image restoration network, performing a first restoration operation on the short-exposure low-resolution image through the first image restoration network, and obtaining a short-exposure full-resolution image. The first image restoration network is obtained by training an initial network model (such as a first initial network model) using short-exposure low-resolution sample images and full-resolution label images.
[0168] Exemplarily, performing a second restoration operation on a long-exposure low-resolution image to obtain a long-exposure full-resolution image may include: inputting the long-exposure low-resolution image to a second image restoration network, performing a second restoration operation on the long-exposure low-resolution image through the second image restoration network, and obtaining the long-exposure full-resolution image. The second image restoration network is obtained by training an initial network model (such as a second initial network model) using long-exposure low-resolution sample images and full-resolution label images.
[0169] The full-resolution label image is generated based on the electrical signals of all first-class pixels of the X-ray detector and the electrical signals of all second-class pixels of the X-ray detector. For the short-exposure low-resolution sample image, long-exposure low-resolution sample image and full-resolution label image, please refer to the model training process.
[0170] Exemplarily, in the process of generating a wide dynamic fusion image based on a long exposure full resolution image, a first weight coefficient, a short exposure full resolution image and a second weight coefficient, for each pixel in the wide dynamic fusion image, if the reference pixel value corresponding to the pixel in the long exposure full resolution image is less than the first threshold, the first weight coefficient corresponding to the pixel is the first weight value; if the reference pixel value is greater than or equal to the first threshold and less than the second threshold, the first weight coefficient corresponding to the pixel is inversely proportional to the reference pixel value; if the reference pixel value is greater than or equal to the second threshold, the first weight coefficient corresponding to the pixel is the second weight value; wherein the second weight value may be less than the first weight value. In addition, the second weight coefficient corresponding to the pixel is determined based on the difference between the fixed value and the first weight coefficient corresponding to the pixel.
[0171] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. An X-ray detector, characterized in that: It includes a processing circuit, a first scanning driving circuit, a second scanning driving circuit, a pixel readout circuit and a pixel array, wherein the pixel array includes a plurality of pixel groups; For each pixel group, the pixel group includes M rows and N columns of pixels, where M and N are both positive integers; the pixels in the M rows and N columns include first-type pixels and second-type pixels, the first scanning driving circuit is connected to the first-type pixels, and the second scanning driving circuit is connected to the second-type pixels; The processing circuit is used for controlling the first scanning driving circuit to conduct each first-type pixel of each row of the pixel array with the pixel readout circuit when the first selection time corresponding to the row is reached, and controlling the pixel readout circuit to read out the electrical signal of each first-type pixel; When the second selection time corresponding to the row is reached, the first scanning driving circuit is controlled to conduct the first type of pixels in the row with the pixel readout circuit, and the pixel readout circuit is controlled to clear the electrical signals of the first type of pixels; and the second scanning driving circuit is controlled to conduct the second type of pixels in the row with the pixel readout circuit, and the pixel readout circuit is controlled to read the electrical signals of the second type of pixels; The electrical signals of the first type of pixels in all rows of the pixel array are used to generate a short-exposure low-resolution image, and the electrical signals of the second type of pixels in all rows are used to generate a long-exposure low-resolution image.
2. The X-ray detector according to claim 1, characterized in that: The number of pixels of the first category is the same as the number of pixels of the second category; or, the number of pixels of the first category is greater than the number of pixels of the second category; or, the number of pixels of the first category is less than the number of pixels of the second category; The pixel group includes 4 pixel subsets, the first pixel subset includes pixels in odd rows and odd columns, the second pixel subset includes pixels in odd rows and even columns, the third pixel subset includes pixels in even rows and odd columns, and the fourth pixel subset includes pixels in even rows and even columns; wherein all pixels in K pixel subsets of the 4 pixel subsets are used as first-category pixels, K is greater than or equal to 1, and K is less than or equal to 3, and all pixels in the remaining pixel subsets are used as second-category pixels.
3. The X-ray detector according to claim 1 or 2, characterized in that: If M is 2 and N is 2, the pixels in odd columns are the first type of pixels, and the pixels in even columns are the second type of pixels; or, the pixels in even columns are the first type of pixels, and the pixels in odd columns are the second type of pixels; or, the pixels in odd rows and even columns are the first type of pixels, the pixels in even rows and odd columns are the first type of pixels, the pixels in odd rows and odd columns are the second type of pixels, and the pixels in even rows and even columns are the second type of pixels; or, the pixels in odd rows and odd columns are the first type of pixels, the pixels in even rows and even columns are the first type of pixels, the pixels in odd rows and even columns are the second type of pixels, and the pixels in even rows and odd columns are the second type of pixels; Or, if M is 2 and N is 2, then the pixels in odd rows are pixels of the first category, the pixels in even rows and odd columns are pixels of the first category, and the pixels in even rows and even columns are pixels of the second category; or, the pixels in odd rows are pixels of the first category, the pixels in even rows and even columns are pixels of the first category, and the pixels in even rows and odd columns are pixels of the second category; or, the pixels in even rows are pixels of the first category, the pixels in odd rows and odd columns are pixels of the first category, and the pixels in odd rows and even columns are pixels of the second category; or, the pixels in even rows are pixels of the first category, the pixels in odd rows and even columns are pixels of the first category, and the pixels in odd rows and odd columns are pixels of the second category; Alternatively, if M is 2 and N is 2, the pixels in odd rows are second-class pixels, the pixels in even rows and odd columns are first-class pixels, and the pixels in even rows and even columns are second-class pixels; alternatively, the pixels in odd rows are second-class pixels, the pixels in even rows and even columns are first-class pixels, and the pixels in even rows and odd columns are second-class pixels; alternatively, the pixels in even rows are second-class pixels, the pixels in odd rows and odd columns are first-class pixels, and the pixels in odd rows and even columns are second-class pixels; alternatively, the pixels in even rows are second-class pixels, the pixels in odd rows and even columns are first-class pixels, and the pixels in odd rows and even columns are second-class pixels.
4. The X-ray detector according to claim 1, characterized in that: For each row of the pixel array, the processing circuit is used to divide the scanning time corresponding to the row into a first energy integration time, a first gating time, a second energy integration time and a second gating time; wherein the first gating time is between the first energy integration time and the second energy integration time, and the second gating time is after the second energy integration time; wherein the duration of the second energy integration time is different from or the same as the duration of the first energy integration time; The processing circuit is used to control the first scanning driving circuit to disconnect each first type of pixel in the row from the pixel readout circuit, and control the second scanning driving circuit to disconnect each second type of pixel in the row from the pixel readout circuit when the first energy integration time corresponding to the row is reached; The processing circuit is used to control the second scanning driving circuit to disconnect each second type of pixel of the row from the pixel readout circuit when the first gate time corresponding to the row is reached; The processing circuit is used to control the first scanning drive circuit to disconnect the first type of pixels and the pixel readout circuit in the row, and control the second scanning drive circuit to disconnect the second type of pixels and the pixel readout circuit in the row when the second energy integration time corresponding to the row is reached.
5. The X-ray detector according to claim 1, characterized in that: The X-ray detector further comprises an analog-to-digital conversion circuit, wherein the analog-to-digital conversion circuit is used to convert the electrical signals of the first type of pixels into digital signals, and to convert the electrical signals of the second type of pixels into digital signals; The processing circuit is used to generate a short-exposure low-resolution image based on the digital signals of the first-type pixels of all rows, and perform a first restoration operation on the short-exposure low-resolution image to obtain a short-exposure full-resolution image, wherein the first restoration operation is used to complete the pixel values of the second-type pixels; The processing circuit is used to generate a long-exposure low-resolution image based on the digital signals of the second-type pixels in all rows, and perform a second restoration operation on the long-exposure low-resolution image to obtain a long-exposure full-resolution image, wherein the second restoration operation is used to complete the pixel values of the first-type pixels.
6. The X-ray detector according to claim 5, characterized in that: The processing circuit performs a first restoration operation on the short-exposure low-resolution image to obtain a short-exposure full-resolution image, and is specifically used to: input the short-exposure low-resolution image to a first image restoration network, and perform a first restoration operation on the short-exposure low-resolution image through the first image restoration network to obtain the short-exposure full-resolution image; wherein the first image restoration network is obtained by training an initial network model using short-exposure low-resolution sample images and full-resolution label images; The processing circuit performs a second restoration operation on the long exposure low-resolution image to obtain a long exposure full-resolution image, and is specifically used to: input the long exposure low-resolution image to a second image restoration network, and perform a second restoration operation on the long exposure low-resolution image through the second image restoration network to obtain the long exposure full-resolution image; wherein the second image restoration network is obtained by training an initial network model using long exposure low-resolution sample images and full-resolution label images.
7. The X-ray detector according to claim 6, characterized in that: The processing circuit is used for controlling the first scanning driving circuit to conduct each first-type pixel of each row of the pixel array with the pixel readout circuit when the second selection time corresponding to the row is reached, and controlling the pixel readout circuit to read out the electrical signal of each first-type pixel; Controlling the second scanning driving circuit to conduct each second type of pixel in the row with the pixel readout circuit, and controlling the pixel readout circuit to read out the electrical signal of each second type of pixel; The electrical signals of the first type of pixels in all rows of the pixel array and the electrical signals of the second type of pixels in all rows of the pixel array are used to generate the full-resolution label image.
8. The X-ray detector according to claim 5, characterized in that: The processing circuit is further configured to generate a wide dynamic range fusion image based on the long exposure full resolution image, the first weight coefficient, the short exposure full resolution image and the second weight coefficient; Among them, for each pixel in the wide dynamic fusion image, if the reference pixel value corresponding to the pixel in the long exposure full-resolution image is less than the first threshold, the first weight coefficient corresponding to the pixel is the first weight value; if the reference pixel value is greater than or equal to the first threshold and less than the second threshold, the first weight coefficient corresponding to the pixel is inversely proportional to the reference pixel value; if the reference pixel value is greater than or equal to the second threshold, the first weight coefficient corresponding to the pixel is the second weight value; Among them, the second weight value is less than the first weight value; the second weight coefficient corresponding to the pixel point is determined based on the difference between the fixed value and the first weight coefficient corresponding to the pixel point.
9. An X-ray detector, characterized in that: The method comprises a first scanning driving circuit, a second scanning driving circuit and a pixel array, wherein the pixel array comprises a plurality of pixel groups; for each pixel group, the pixel group comprises pixels of M rows and N columns, where M and N are both positive integers; the pixels of the M rows and N columns comprise first-type pixels and second-type pixels, wherein the first-type pixels are pixels connected to the first scanning driving circuit, and the second-type pixels are pixels connected to the second scanning driving circuit; Among them, the number of pixels of the first category is the same as the number of pixels of the second category; or, the number of pixels of the first category is greater than the number of pixels of the second category; or, the number of pixels of the first category is less than the number of pixels of the second category; The pixel group includes 4 pixel subsets, the first pixel subset includes pixels in odd rows and odd columns, the second pixel subset includes pixels in odd rows and even columns, the third pixel subset includes pixels in even rows and odd columns, and the fourth pixel subset includes pixels in even rows and even columns; all pixels in K pixel subsets of the 4 pixel subsets are used as first-category pixels, K is greater than or equal to 1, and K is less than or equal to 3, and all pixels in the remaining pixel subsets are used as second-category pixels.
10. An image generation method, characterized in that: The method comprises: Acquire a short-exposure low-resolution image and a long-exposure low-resolution image; wherein the pixel array of the X-ray detector includes a first type of pixel and a second type of pixel, the short-exposure low-resolution image is generated based on the electrical signals of the first type of pixel, and the long-exposure low-resolution image is generated based on the electrical signals of the second type of pixel; Performing a first restoration operation on the short-exposure low-resolution image to obtain a short-exposure full-resolution image, wherein the first restoration operation is used to complete pixel values of the second type of pixels in the short-exposure low-resolution image; Performing a second restoration operation on the long-exposure low-resolution image to obtain a long-exposure full-resolution image, wherein the second restoration operation is used to complete pixel values of first-category pixels in the long-exposure low-resolution image; A wide dynamic range fusion image is generated based on the long-exposure full-resolution image and the short-exposure full-resolution image.
11. The method according to claim 10, characterized in that The performing a first restoration operation on the short-exposure low-resolution image to obtain a short-exposure full-resolution image comprises: inputting the short-exposure low-resolution image to a first image restoration network, performing a first restoration operation on the short-exposure low-resolution image through the first image restoration network to obtain the short-exposure full-resolution image; wherein the first image restoration network is obtained by training an initial network model using short-exposure low-resolution sample images and full-resolution label images; The performing a second restoration operation on the long-exposure low-resolution image to obtain a long-exposure full-resolution image comprises: inputting the long-exposure low-resolution image to a second image restoration network, and performing a second restoration operation on the long-exposure low-resolution image through the second image restoration network to obtain the long-exposure full-resolution image; wherein the second image restoration network is obtained by training an initial network model using long-exposure low-resolution sample images and full-resolution label images; The full-resolution label image is generated based on the electrical signals of all first-category pixels of the X-ray detector and the electrical signals of all second-category pixels of the X-ray detector.
