Image correction method and related device
By obtaining the image samples of the X-ray detector at different temperatures, determining the polynomial function and applying the temperature compensation function to correct the image output by the X-ray detector, the problem that temperature changes affect image quality is solved and efficient image correction is achieved.
Patent Information
- Application Number
- CN202411035105.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-11-22
AI Technical Summary
The temperature changes of the X-ray detector affect image quality, and it is difficult for the prior art to effectively correct the deviation caused by temperature changes.
By obtaining the image samples of the X-ray detector at different temperatures, a polynomial function is determined to establish a temperature compensation function, and based on the function, each pixel point in the original image is corrected. The correction process includes obtaining the image to be corrected, determining the polynomial coefficients and Apply the temperature compensation function.
The deviation caused by temperature changes is quickly and efficiently corrected, improving the imaging quality and image correction efficiency of the X-ray detector.
Smart Images

Figure CN119006293A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing, and in particular to an image correction method and related devices. Background Art
[0002] X-ray detectors refer to image sensors that convert X-rays into electrical signals and form image outputs. X-ray detectors include photoelectric converters that convert X-rays into electrical signals and TFT (Thin Film Transistor) switch devices that read electrical signals to form images. These two devices are sensitive to temperature. When the ambient temperature of the X-ray detector changes, it will affect the working performance of these two devices, thereby affecting the clarity of the final image.
[0003] Based on this, there is an urgent need for an image correction method to perform temperature compensation on the original image output by the X-ray detector to correct the deviation caused by temperature changes, thereby ensuring the imaging quality. Summary of the invention
[0004] The present application provides an image correction method and related device, which can perform temperature compensation on the original image output by the X-ray detector to correct the deviation caused by temperature change. The technical solution is as follows:
[0005] In a first aspect, an image correction method is provided, the method comprising:
[0006] Acquire an original image to be corrected, where the original image is an image generated by an X-ray detector;
[0007] Determining a target pixel value of the target pixel point by a temperature compensation function based on an original pixel value of the target pixel point and an original temperature value corresponding to the target pixel point;
[0008] The target pixel is any pixel in the original image, the original temperature value is the temperature value of the target pixel at the corresponding point on the X-ray detector, and the temperature compensation function is used to indicate the relationship between the original pixel value of each pixel in the original image, the original temperature value corresponding to each pixel, and the target pixel value;
[0009] The original image is corrected based on the target pixel value corresponding to each pixel point in the original image.
[0010] Optionally, before determining the target pixel value of the target pixel point by using a temperature compensation function based on the original pixel value of the target pixel point and the original temperature value corresponding to the target pixel point, the method further includes:
[0011] Acquire a first sample image, a plurality of second sample images, and a polynomial function with unknown polynomial coefficients, wherein the first sample image is an image generated by the X-ray detector at a reference temperature point, the plurality of second sample images are images respectively generated by the X-ray detector at a plurality of temperature sampling points, and the temperature values of the reference temperature point and the plurality of temperature sampling points are different;
[0012] Based on the first sample image and the plurality of second sample images, the polynomial coefficients are determined, and a polynomial function whose polynomial coefficients are known is determined as the temperature compensation function.
[0013] Optionally, the independent variables in the polynomial function are the second sample pixel value and the sample temperature value, the dependent variable in the polynomial function is the first sample pixel value, and the first sample pixel value and the second sample pixel value correspond to the same pixel point;
[0014] The second sample pixel value is the pixel value of any pixel point in the second sample image, the sample temperature value is the temperature value of the temperature sampling point corresponding to the second sample image, and the first sample pixel value is the pixel value of the corresponding pixel point in the first sample image.
[0015] Optionally, determining the polynomial coefficients based on the first sample image and the plurality of second sample images includes:
[0016] The polynomial coefficients are obtained by least square fitting based on the first sample pixel value, the second sample pixel value and the sample temperature value.
[0017] Optionally, the original image includes a plurality of image regions, each image region corresponds to a temperature compensation function;
[0018] The determining the target pixel value of the target pixel point by using a temperature compensation function based on the original pixel value of the target pixel point and the original temperature value corresponding to the target pixel point includes:
[0019] Determine the target area to which the target pixel point belongs in the original image;
[0020] Based on the original pixel value of the target pixel and the original temperature value corresponding to the target pixel, the target pixel value of the target pixel is determined by a temperature compensation function corresponding to the target area.
[0021] Optionally, before determining the target pixel value of the target pixel point by using a temperature compensation function based on the original pixel value of the target pixel point and the original temperature value corresponding to the target pixel point, the method further includes:
[0022] Obtaining a bias correction coefficient corresponding to the X-ray detector;
[0023] The original image is corrected based on the offset correction coefficient.
[0024] Optionally, before determining the target pixel value of the target pixel point by using a temperature compensation function based on the original pixel value of the target pixel point and the original temperature value corresponding to the target pixel point, the method further includes:
[0025] Obtaining a gain correction coefficient corresponding to the X-ray detector;
[0026] The original image is corrected based on the gain correction coefficient.
[0027] In a second aspect, an image correction device is provided, the device comprising:
[0028] An image acquisition module, used to acquire an original image to be corrected, wherein the original image is an image generated by an X-ray detector;
[0029] a pixel value determination module, configured to determine a target pixel value of a target pixel point through a temperature compensation function based on an original pixel value of the target pixel point and an original temperature value corresponding to the target pixel point; wherein the target pixel point is any pixel point in the original image, the original temperature value is a temperature value of the target pixel point at a corresponding point on the X-ray detector, and the temperature compensation function is used to indicate a relationship between an original pixel value of each pixel point in the original image, an original temperature value corresponding to each pixel point, and a target pixel value;
[0030] The image correction module is used to correct the original image based on the target pixel value corresponding to each pixel point in the original image.
[0031] Optionally, the device further comprises:
[0032] a sample acquisition module, configured to acquire a first sample image, a plurality of second sample images, and a polynomial function with unknown polynomial coefficients, wherein the first sample image is an image generated by the X-ray detector at a reference temperature point, the plurality of second sample images are images respectively generated by the X-ray detector at a plurality of temperature sampling points, and the temperature values of the reference temperature point and the plurality of temperature sampling points are different;
[0033] The function determination module is used to determine the polynomial coefficients based on the first sample image and the plurality of second sample images, and determine a polynomial function with known polynomial coefficients as the temperature compensation function.
[0034] Optionally, the independent variables in the polynomial function are the second sample pixel value and the sample temperature value, the dependent variable in the polynomial function is the first sample pixel value, and the first sample pixel value and the second sample pixel value correspond to the same pixel point;
[0035] The second sample pixel value is the pixel value of any pixel point in the second sample image, the sample temperature value is the temperature value of the temperature sampling point corresponding to the second sample image, and the first sample pixel value is the pixel value of the corresponding pixel point in the first sample image.
[0036] Optionally, the coefficient determination module is specifically used to:
[0037] The polynomial coefficients are obtained by least square fitting based on the first sample pixel value, the second sample pixel value and the sample temperature value.
[0038] Optionally, the original image includes a plurality of image regions, each image region corresponds to a temperature compensation function; and the pixel value determination module includes:
[0039] A first determining subunit, configured to determine a target region to which the target pixel point belongs in the original image;
[0040] The second determination subunit is used to determine the target pixel value of the target pixel point through the temperature compensation function corresponding to the target area based on the original pixel value of the target pixel point and the original temperature value corresponding to the target pixel point.
[0041] Optionally, the device further comprises:
[0042] A coefficient acquisition module, used to acquire a bias correction coefficient corresponding to the X-ray detector;
[0043] The image correction module is further used to correct the original image based on the offset correction coefficient.
[0044] Optionally, the device further comprises:
[0045] A coefficient acquisition module, used to obtain a gain correction coefficient corresponding to the X-ray detector;
[0046] The image correction module is further used to correct the original image based on the gain correction coefficient.
[0047] In a third aspect, an X-ray detector is provided, the X-ray detector comprising an image generating device, at least one temperature sensor, a memory and a processor;
[0048] The image generating device is used to convert the received X-rays into electrical signals and generate an original image based on the electrical signals;
[0049] The at least one temperature sensor is used to collect the original temperature value corresponding to each pixel point in the original image, and the original temperature value is the temperature value of each pixel point at the corresponding point on the X-ray detector;
[0050] The memory is used to store a computer program, and the processor is used to execute the computer program to implement the image correction method described in the first aspect above.
[0051] In a fourth aspect, a computer device is provided, the computer device comprising a memory and a processor;
[0052] The memory is used to store computer programs;
[0053] The processor is used to execute the computer program to implement the image correction method described in the first aspect above.
[0054] In a fifth aspect, an image correction system is provided, the system comprising an X-ray detector and an image correction device;
[0055] The X-ray detector includes an image generating device and at least one temperature sensor, wherein the image generating device is used to convert received X-rays into electrical signals and generate an original image based on the electrical signals, and the at least one temperature sensor is used to collect an original temperature value corresponding to each pixel point in the original image, and the original temperature value is a temperature value of each pixel point at a corresponding point on the X-ray detector;
[0056] The image correction device is used to execute the image correction method described in the first aspect above based on the original image and the original temperature value corresponding to each pixel in the original image.
[0057] In a sixth aspect, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the image correction method described in the first aspect is implemented.
[0058] In a seventh aspect, a computer program product is provided, wherein the computer program product stores computer instructions, and when the computer instructions are executed by a processor, the image correction method described in the first aspect is implemented.
[0059] The technical solution provided by this application can at least bring the following beneficial effects:
[0060] For the original image generated by the X-ray detector, for any pixel in the original image, the present application determines the target pixel value of the pixel through a temperature compensation function based on the original pixel value of the pixel and the original temperature value corresponding to the pixel, and then corrects the original image through the target pixel value of each pixel. Since the temperature compensation function is used to indicate the relationship between the original pixel value of each pixel in the original image, the original temperature value corresponding to each pixel, and the target pixel value, the use of the temperature compensation function can correct the deviation caused by temperature changes, thereby ensuring the imaging quality of the X-ray detector; moreover, based on the temperature compensation function, the target pixel value of each pixel can be calculated quickly and effectively, thereby improving the efficiency of image correction. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0062] Figure 1 is a schematic diagram of the structure of an X-ray detector provided in an embodiment of the present application;
[0063] Figure 2 is a distribution diagram of a temperature sensor provided in an embodiment of the present application;
[0064] Figure 3 is a structural schematic diagram of a computer device provided in an embodiment of the present application;
[0065] Figure 4 is a system architecture diagram of an image correction system provided in an embodiment of the present application;
[0066] Figure 5 It is a flowchart of an image correction method provided in an embodiment of the present application;
[0067] Figure 6 It is a structural schematic diagram of an image correction device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0068] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0069] Before explaining in detail the image correction method provided in the embodiment of the present application, the application scenarios and implementation environment involved in the embodiment of the present application are first introduced.
[0070] First, the application scenarios involved in the embodiments of the present application are introduced.
[0071] X-ray detectors are image sensors that can convert X-rays into electrical signals and form image outputs. X-ray detectors usually include an array of photosensitive elements. When using an X-ray detector to scan an object, each photosensitive element works independently to detect the X-rays incident on its surface and convert the received X-ray intensity into measurable electrical signals. These electrical signals are then processed and converted into pixel values in a digital image to form a complete image.
[0072] Among them, the photosensitive element is usually a tiny unit made of semiconductor materials such as silicon (Si) or tellurium (Te). In order to capture the image, these photosensitive elements are organized into a two-dimensional array, namely the photosensitive element array. Each individual photosensitive element corresponds to a "point" or "position" in the image, namely a pixel (pixel), so it can also be said that the array of photosensitive elements constitutes the pixel array in the image.
[0073] For the image generated by scanning, each pixel in the image (i.e. each photosensitive element) corresponds to a specific position of the object being inspected and carries information about the X-ray intensity at that position. Therefore, by arranging these pixels in a specific order and format and combining their brightness (or grayscale) values, a complete digital X-ray image can be constructed. In other words, the collection of these pixels in the image together expresses information such as the internal structure and density distribution of the object being inspected.
[0074] Furthermore, X-ray detectors can be divided into two categories according to their structure: direct X-ray detectors and indirect X-ray detectors.
[0075] Direct X-ray detectors are mainly composed of an amorphous selenium (A-Se) photoelectric conversion layer, a TFT (Thin Film Transistor) array, a driving circuit, and a readout circuit. The amorphous selenium layer is used as a photoelectric conversion layer. When X-rays are directly irradiated onto these materials, the X-ray photons interact with the atoms in the material to generate electron-hole pairs. These electron-hole pairs are separated and moved under the action of the electric field to form electrical signals. In other words, X-rays are directly converted into electrical signals without the need for intermediate conversion steps.
[0076] Among them, the TFT array is a switching device used to control the switching of each pixel to realize line-by-line reading of signals; the driving circuit is responsible for controlling the switching operation of the TFT array and reading the original electrical signal.
[0077] Indirect X-ray detectors are mainly composed of scintillators, amorphous silicon (A-Si) photodiode arrays, TFT arrays, drive circuits, and readout circuits. Scintillators are converters from X-rays to visible light, A-Si photodiode arrays are used to convert visible light into electrical signals, and the functions of TFT arrays and drive circuits are the same as those of direct detectors, which are used to control the switching of pixels and read electrical signals.
[0078] Among them, the scintillator usually uses scintillator materials such as gadolinium oxysulfide (GOS) or cesium iodide (CsI) to convert X-rays into visible light of a fixed wavelength. That is, when X-rays are irradiated on the scintillator, the scintillator absorbs the X-ray energy and emits visible light. Subsequently, these visible lights are absorbed by the A-Si photodiode, which converts the optical signal into an electrical signal.
[0079] The above two types of detectors involve photoelectric conversion devices and TFT switching devices made of semiconductor materials in the signal pickup and conversion process. In addition to the leakage current (i.e. the current under abnormal working conditions) of these two types of devices, the characteristics of semiconductor materials also determine that they are very sensitive to temperature, which not only affects the amount of charge caused by leakage current per unit time, but also causes changes in the bias voltage at both ends of the photoelectric conversion device due to charge leakage. All of these will cause the charge separation ability of the photoelectric conversion device itself to differ with the change of ambient temperature, and its sensitivity will also change accordingly.
[0080] Moreover, during the use of X-ray detectors, as the X-rays are continuously irradiated, the temperature of the X-ray detectors themselves will gradually rise, and the circuit board itself will generate a lot of heat. Compared with medical imaging, the operating temperature range of X-ray detectors used in industrial environments is extremely wide. If the temperature change is not compensated, the image output by the X-ray detector will be abnormal, which is easy to cause misjudgment and even cause loss of life and property.
[0081] As an example, the abnormality of the image may be manifested as a decrease in sensitivity of the photoelectric conversion device and / or the TFT switching device after the temperature changes, which may cause the object under inspection to be unable to be imaged.
[0082] It can be seen that, considering the sensitivity of the X-ray detector's own elements to temperature, in the scenario of using the X-ray detector, the original image output by the X-ray detector needs to be temperature compensated to correct the deviation caused by temperature changes, so as to ensure the imaging quality.
[0083] Based on this, an embodiment of the present application provides an image correction method, for an original image generated by an X-ray detector, for any pixel in the original image, based on the original pixel value of the pixel and the original temperature value corresponding to the pixel, the target pixel value of the pixel is determined by a temperature compensation function, and then the original image is corrected by the target pixel value of each pixel. Since the temperature compensation function is used to indicate the relationship between the original pixel value of each pixel in the original image, the original temperature value corresponding to each pixel, and the target pixel value, the use of the temperature compensation function can correct the deviation caused by temperature change, thereby ensuring the imaging quality of the X-ray detector; moreover, based on the temperature compensation function, the target pixel value of each pixel in the original image can be quickly and effectively determined, thereby improving the efficiency of image correction.
[0084] Secondly, the implementation environment involved in the embodiments of the present application is introduced.
[0085] Regarding the image correction method provided in the embodiment of the present application, its execution subject may be an X-ray detector, a computer device, or an image correction system composed of an X-ray detector and an image correction device. Next, these possible implementation environments are introduced respectively.
[0086] In a first possible implementation environment, the X-ray detector can serve as an execution entity and independently execute the steps of the image correction method provided in the embodiment of the present application.
[0087] See also Figure 1 The X-ray detector includes: an image generating device 101, at least one temperature sensor 102, a memory 103 and a processor 104. The image generating device 101 is used to convert the received X-rays into electrical signals and generate an original image based on the electrical signals; the temperature sensor 102 is used to collect the original temperature value corresponding to each pixel in the original image, and the original temperature value is the temperature value of each pixel at the corresponding point on the X-ray detector; the memory 103 is used to store a computer program (i.e., program code), and the processor 104 is used to execute the computer program to implement the image correction method provided in the embodiment of the present application.
[0088] It should be understood that the image generating device 101, as a functional module, may include one or more physical hardware. For example, when the X-ray detector is a direct X-ray detector, the image generating device 101 may include an A-Se photoelectric conversion layer, a TFT array, a driving circuit, and a readout circuit, etc.; when the X-ray detector is an indirect X-ray detector, the image generating device 101 may include a scintillator, an A-Si photodiode array, a TFT array, a driving circuit, and a readout circuit, etc. The present application embodiment does not limit this.
[0089] It should be noted that, with the development of technology, all devices related to signal pickup and image generation in the X-ray detector can be used as a part of the image generating device 101 and included in the above-mentioned image generating device 101.
[0090] In actual implementation, the image generating device 101 and at least one temperature sensor 102 are respectively connected to the processor 104 to send the original image and the original temperature value corresponding to each pixel to the processor 104. The processor 104 is connected to the memory 103 so that the processor 104 can call and execute the computer program stored in the memory 103. The connection here can be a wired connection, such as a connection via a communication bus.
[0091] In some embodiments, considering that the X-ray detector is affected by the heat source of the surrounding equipment during operation, the temperature changes of different areas in the photosensitive element array on the X-ray detector may be different, and the heat generated by the components on the circuit board of the X-ray detector itself during operation is also different, especially the processor chip, which has the largest heat dissipation. Based on this, multiple temperature sensors can be deployed in different areas on the X-ray detector to monitor the temperature changes of the X-ray detector in different areas.
[0092] In a possible implementation, the X-ray detector may include a plurality of temperature sensors, and the plurality of temperature sensors are arranged in a matrix form so as to be evenly distributed on the X-ray detector.
[0093] As an example, Figure 2 As shown, assuming that the number of temperature sensors is 6, the area where the X-ray detector circuit board is located can be divided into 6 sub-areas, so that a temperature sensor is deployed in each sub-area.
[0094] Optionally, multiple sub-areas may also be determined based on a photosensitive element array on the X-ray detector, which is not limited in the present embodiment of the application.
[0095] In this way, by deploying temperature sensors in partitions, the temperature of each point on the X-ray detector can be accurately measured, thereby improving the accuracy of temperature measurement, and further improving the accuracy of calculating the target pixel value based on the original temperature value of the pixel point in the embodiment of the present application, thereby achieving better image correction effect.
[0096] It should be noted that the at least one temperature sensor may not cover all pixels corresponding to the X-ray detector. Based on this, when determining the original temperature value corresponding to a certain pixel, the temperature value collected by the temperature sensor closest to the pixel can be used as the original temperature value corresponding to the pixel; the temperature value collected by the temperature sensor corresponding to a certain area can also be used as the original temperature value of all pixels corresponding to the area. The embodiment of the present application does not limit the specific implementation method of determining the original temperature value corresponding to the pixel based on the temperature value collected by at least one temperature sensor.
[0097] In a second possible implementation environment, a computer device can serve as an execution subject and independently execute the steps of the image correction method provided in the embodiment of the present application.
[0098] Figure 3 It is a structural schematic diagram of a computer device according to an embodiment of the present application. The computer device can be a terminal device or a server, or it can be other intelligent devices including hardware such as a memory and a processor, such as a wearable device, etc., which are used to execute the image correction method provided in the embodiment of the present application.
[0099] Please refer to Figure 3 The computer device includes at least one processor 301 , a communication bus 302 , a memory 303 and at least one communication interface 304 .
[0100] The processor 301 may be a CPU (Central Processing Unit), a NP (Network Processor), a microprocessor, or may be one or more integrated circuits for implementing the solution of the present application, for example, an ASIC (Application-Specific Integrated Circuit), a PLD (Programmable Logic Device) or a combination thereof. The PLD may be a CPLD (Complex Programmable Logic Device), an FPGA (Field-Programmable Gate Array), a GAL (Generic Array Logic) or any combination thereof.
[0101] As an example, the processor 301 may include one or more CPUs, such as Figure 3 CPU0 and CPU1 are shown in the figure.
[0102] As an example, a computer device may include multiple processors, such as Figure 3 301 and processor 305 shown in FIG. Each of these processors may be a single-core processor or a multi-core processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).
[0103] The communication bus 302 is used to transmit information between the above components. The communication bus 302 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0104] The memory 303 may be a ROM (Read-Only Memory), a RAM (Random Access Memory), an EEPROM (Electrically Erasable Programmable Read-only Memory), an optical disk (including a CD-ROM (Compact Disc Read-Only Memory), a compact disc, a laser disc, a digital versatile disc, a Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0105] Optionally, the memory 303 may exist independently and be connected to the processor 301 via the communication bus 302. The memory 303 may also be integrated with the processor 301.
[0106] The communication interface 304 uses any transceiver-like device for communicating with other devices or communication networks. The communication interface 304 includes a wired communication interface and may also include a wireless communication interface. Among them, the wired communication interface may be, for example, an Ethernet interface. The Ethernet interface may be an optical interface, an electrical interface, or a combination thereof. The wireless communication interface may be a WLAN (Wireless Local Area Networks) interface, a cellular network communication interface, or a combination thereof, etc.
[0107] In some embodiments, the computer device may further include an output device and an input device. The output device communicates with the processor 301 and may display information in a variety of ways. For example, the output device may be an LCD (Liquid Crystal Display), an LED (Light Emitting Diode) display device, a CRT (Cathode Ray Tube) display device, or a projector. The input device communicates with the processor 301 and may receive user input in a variety of ways. For example, the input device may be a mouse, a keyboard, a touch screen device, or a sensor device.
[0108] In some embodiments, the memory 303 is used to store the program code 310 for executing the solution of the present application, and the processor 301 can execute the program code 310 stored in the memory 303. The program code 310 may include one or more software modules, and the computer device can implement the image correction method provided in the embodiment of the present application through the processor 301 and the program code 310 in the memory 303.
[0109] In a third possible implementation environment, the image correction method provided in the embodiment of the present application can be applied to an image correction system, that is, the image correction method provided in the embodiment of the present application is implemented by cooperating with each other through the devices in the image correction system.
[0110] See also Figure 4 The image correction system includes an X-ray detector 100 and an image correction device 200, and the X-ray detector 100 and the image correction device 200 are interconnected and communicated. Among them, the X-ray detector 100 includes an image generating device and at least one temperature sensor, the image generating device is used to convert the received X-rays into electrical signals, and generate an original image based on the electrical signals, and the at least one temperature sensor is used to collect the original temperature value corresponding to each pixel in the original image, and the original temperature value is the temperature value of each pixel at the corresponding point on the X-ray detector. The image correction device 200 is used to perform the image correction method provided in the embodiment of the present application based on the original image and the original temperature value corresponding to each pixel in the original image.
[0111] The X-ray detector 100 may be the above Figure 1 The X-ray detector shown, but in this image correction system, the X-ray detector 100, as an information acquisition device, is only used to output the original image and the original temperature value corresponding to each pixel in the original image, and the image correction device 200 is used to correct the original image.
[0112] Optionally, the image correction device 200 may be Figure 3The computer device shown can correct the input original image by executing a computer program and output a corrected image.
[0113] As an example, the above-mentioned image correction device 200 can be an independent server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, or a cloud server, or a cloud computing service center.
[0114] Those skilled in the art should understand that the above-mentioned image correction device 200 is only an example, and other existing or future-produced intelligent devices such as terminals, servers, etc., if applicable to the embodiments of the present application, should also be included in the protection scope of the embodiments of the present application and are included here by reference.
[0115] It should be noted that the above-mentioned application scenarios and exemplary implementation environments described in the embodiments of the present application are for the purpose of more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. A person of ordinary skill in the art can know that with the emergence of new application scenarios and the evolution of the implementation environment, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0116] After introducing the application scenarios and implementation environment involved in the embodiments of the present application, the image correction method provided in the embodiments of the present application is explained in detail.
[0117] Figure 5 is a flowchart of an image correction method provided in an embodiment of the present application, which can be applied to the above Figure 1 The X-ray detector shown can also be applied to the above Figure 3 The computer device shown can also be applied to the above Figure 4 Please refer to the image correction system shown. Figure 5 , the method comprises the following steps.
[0118] Step 501: Acquire an original image to be corrected, where the original image is an image generated by an X-ray detector.
[0119] As described above, in terms of structure, the X-ray detector can be a direct X-ray detector or an indirect X-ray detector; in terms of type, the X-ray detector can be an X-ray flat panel detector. The embodiment of the present application does not limit the specific type of the X-ray detector, that is, the image correction method provided in the embodiment of the present application is applicable to the original image generated by any type of X-ray detector.
[0120] As an example, the original image is a bright field grayscale image. Based on this, the pixel value of each pixel included in the original image is the grayscale value of the pixel, and its value can be 0 to 255. Of course, for a 16-bit ADC (Analog-to-Digital Converter, analog-to-digital converter or analog-to-digital converter) device, the grayscale value of the pixel of the original image output can be 0 to 65535. The embodiment of the present application does not limit the value range of the grayscale value of the pixel in the original image generated after processing the image signal. In the digital processing of the image signal, the grayscale value range of the image generated by different devices may be different.
[0121] In some embodiments, before executing the following steps 502 and 503, the original image may be preprocessed based on the image correction coefficient, and then temperature compensation may be performed based on the preprocessed original image through steps 502 and 503.
[0122] In a first possible implementation, the image correction coefficient includes a bias (also called offset) correction coefficient. Based on this, based on the original image, the bias correction coefficient corresponding to the X-ray detector is obtained; based on the bias correction coefficient, the original image is corrected.
[0123] In X-ray detectors, even in the absence of X-ray irradiation, due to the inherent characteristics of electronic components, a certain amount of dark current or dark noise will be generated. This noise will be superimposed on the final image as a background signal, affecting the clarity and contrast of the image. Based on this, offset correction is used to remove the influence of the electronic dark noise of each pixel's electronic components and improve the image contrast.
[0124] As an example, assume that the average dark noise of each pixel of the X-ray detector is 10 gray units when there is no X-ray irradiation. When performing offset correction, the dark noise of 10 gray units is subtracted from the original image to obtain a clearer image with higher contrast.
[0125] In addition, before offset correction, sample data needs to be collected in advance to determine the average dark noise. The implementation process can be: first, without exposure, continuously collect multiple dark images, which only contain the dark noise of the X-ray detector itself, but not the X-ray signal. Then, the multiple collected dark images are averaged to obtain an average dark image, which represents the overall dark noise level of the X-ray detector when there is no X-ray irradiation.
[0126] It should be noted that, for the specific implementation process of offset correction, reference can also be made to the introduction in the relevant technology. The embodiment of the present application is intended to illustrate that offset correction can be performed on the original image captured by the X-ray detector before temperature compensation is performed, but no limitation is imposed on the specific implementation method and implementation details of the offset correction.
[0127] In a second possible implementation, the image correction coefficient includes a gain correction coefficient. Based on this, based on the original image, the gain correction coefficient corresponding to the X-ray detector is obtained; based on the gain correction coefficient, the original image is corrected.
[0128] In X-ray detectors, due to differences in manufacturing processes, material properties and other factors, different pixels may have different response sensitivities to X-rays, which can cause uneven brightness in the image. Based on this, gain correction is used to eliminate image uniformity problems caused by inconsistent sensitivity between detector pixels.
[0129] As an example, suppose a pixel of an X-ray detector has a grayscale value of 200 at 100 milliampere-seconds (mas), while another pixel has a grayscale value of 250 at the same mas. Through gain correction, the gain correction coefficients of the two pixels can be calculated and their grayscale values can be adjusted to approach a common standard value (e.g., 225), thereby making the brightness distribution of the entire image more uniform.
[0130] In addition, before gain correction, it is necessary to collect sample data in advance to determine the gain correction coefficient of each pixel. The implementation process can be: under certain dose conditions (such as fixed X-ray intensity and exposure time), change the mas value and obtain multiple correction images under these conditions; for each pixel, according to its response gray value under different mas values, fit a response curve (usually a linear relationship), these curves describe the response characteristics of the pixel to the X-ray dose; stipulate a standard pixel response (for example, take the median or mean of all pixel responses as the standard), and adjust the response of each pixel based on this; calculate the gain correction coefficient of each pixel based on the fitted response curve and the standard pixel response. In practical applications, these gain correction coefficients are applied to the original image to adjust the gray value of each pixel so that the image achieves a uniform brightness distribution.
[0131] It should be noted that, for the specific implementation process of gain correction, reference can also be made to the introduction in the relevant technology. The embodiment of the present application is intended to illustrate that gain correction can be performed on the original image collected by the X-ray detector before temperature compensation is performed, but no limitation is imposed on the specific implementation method and implementation details of the gain correction.
[0132] In a third possible implementation, the image correction coefficient includes a bias correction coefficient and a gain correction coefficient. Based on this, based on the original image, the bias correction coefficient and the gain correction coefficient corresponding to the X-ray detector are obtained; based on the bias correction coefficient and the gain correction coefficient, the original image is corrected.
[0133] As an example, after obtaining the image correction coefficient, the original image is first corrected using the offset correction coefficient to obtain a first image, and then the first image is further corrected using the gain correction coefficient to obtain a second image, and then based on the second image, the following steps 502 and 503 are performed.
[0134] In addition, when the image correction coefficient is used to pre-process the original image, the above-mentioned offset correction and gain correction are both performed on the original image in units of pixels. That is, the pixel value of each pixel is corrected by using the offset correction coefficient and / or the gain correction coefficient, thereby achieving correction of the entire original image.
[0135] Step 502: Based on the original pixel value of the target pixel and the original temperature value corresponding to the target pixel, determine the target pixel value of the target pixel through a temperature compensation function; wherein the target pixel is any pixel in the original image, the original temperature value is the temperature value of the target pixel at the corresponding point on the X-ray detector, and the temperature compensation function is used to indicate the relationship between the original pixel value of each pixel in the original image, the original temperature value corresponding to each pixel, and the target pixel value.
[0136] When the target pixel value of the target pixel is determined by the temperature compensation function, the original pixel value of the target pixel and the original temperature value corresponding to the target pixel are substituted into the temperature compensation function to calculate the target pixel value of the target pixel.
[0137] Based on this, in order to clarify the specific implementation process of the above step 502, the generation process of the temperature compensation function is explained here.
[0138] In some embodiments, the process of generating a temperature compensation function may include the following steps S1-S2.
[0139] S1: Acquire a first sample image, a plurality of second sample images, and a polynomial function with unknown polynomial coefficients.
[0140] The first sample image is an image generated by the X-ray detector at a reference temperature point, and the multiple second sample images are images generated by the X-ray detector at multiple temperature sampling points respectively, and the temperature values of the reference temperature point and the multiple temperature sampling points are different.
[0141] As an example, the temperature value of the reference temperature point may be a temperature value at normal temperature, such as 25°; the temperature values of the plurality of temperature sampling points may include 30°, 40°, 50°, and the like.
[0142] It should be noted that the temperature values of the reference temperature point and the multiple temperature sampling points can be flexibly set and adjusted according to the temperature changes during the actual operation of the X-ray detector, and the embodiments of the present application do not limit this.
[0143] In a possible implementation, the process of the X-ray detector collecting signals and generating the first sample image and multiple second sample images can be: first, based on the temperature value corresponding to the reference temperature point, the first sample image is generated by the X-ray detector; then, the ambient temperature or the temperature of the X-ray detector itself is adjusted, and the second sample image is generated by the X-ray detector based on the temperature values corresponding to each temperature sampling point in turn, thereby obtaining multiple second images generated at multiple temperature sampling points. The multiple temperature sampling points correspond one to one to the multiple second images.
[0144] It should be understood that since the first sample image and the multiple second sample images are acquired through the same X-ray detector, the first sample image and the second sample image both include the same number of pixels, and the pixels included in the first sample image correspond one-to-one to the pixels included in each of the multiple second sample images.
[0145] As an example, the first sample image and the second sample image can also be bright field grayscale images. Similarly, for the sample images (i.e., the first sample image and multiple second sample images), the pixel value of each pixel is the grayscale value of the pixel, and its value can be 0 to 255. Of course, for a 16-bit ADC device, the grayscale value of the pixel of the sample image outputted by it can be 0 to 65535. The embodiment of the present application does not limit the value range of the grayscale value of the pixel in the sample image generated after processing the image signal. In the digital processing of the image signal, the grayscale value range of the image generated by different devices may be different.
[0146] In the polynomial function, the independent variables are the second sample pixel value and the sample temperature value, the dependent variable is the first sample pixel value, and the first sample pixel value and the second sample pixel value in the polynomial function correspond to the same pixel point. The second sample pixel value is the pixel value of any pixel point in the second sample image, the sample temperature value is the temperature value of the temperature sampling point corresponding to the second sample image, and the first sample pixel value is the pixel value of the corresponding pixel point in the first sample image.
[0147] It should be noted that when selecting / setting a polynomial function, in order to avoid complex calculations or overfitting, the degree (also called order) of the polynomial function can be controlled within 3 or 4.
[0148] Taking the polynomial function of degree 3 as an example, the polynomial function in the embodiment of the present application can be expressed by the following formula (1).
[0149] a0=b0+b1·a·T+b2·a 2 ·T 2 +b3·a 3 ·T 3 (1)
[0150] For any pixel point A included in a first sample image, a0 in the above formula is the pixel value of the pixel point A in the first sample image, a is the pixel value of the pixel point A in the second sample image, and T is the temperature value of the temperature sampling point corresponding to the second sample image.
[0151] Optionally, T may be an actually sampled temperature value, or may be a temperature value after normalization of the actually sampled temperature value, which is not limited in this embodiment of the present application.
[0152] It should be understood that, for the above-mentioned polynomial function, before executing the following step S2, only the calculation logic between the dependent variable and the independent variable in the function is determined, but the polynomial coefficients b0, b1, b2 and b3 in the polynomial function are unknown and need to be solved through the sample pixel values of each pixel point in the first sample image and the sample pixel values of each pixel point in multiple second sample images.
[0153] S2: Based on the first sample image and the plurality of second sample images, determine polynomial coefficients, and determine a polynomial function with known polynomial coefficients as a temperature compensation function.
[0154] In the embodiment of the present application, before solving the polynomial coefficients by fitting, it is necessary to construct multiple sample data pairs based on the first sample image and the second sample image, wherein each sample data pair includes a first sample pixel value, a corresponding second sample pixel value and a corresponding sample temperature value.
[0155] As an example, assume that the first sample image includes P10-P19, a total of 10 pixels; for a second sample image among multiple second sample images (denoted as image M), image M includes corresponding 10 pixels, denoted as P20-P29, and the temperature value of the temperature sampling point corresponding to the image M is 30°. Based on this, based on the first sample image and image M, the generated sample data pairs include: (P10, P20, 30°), (P11, P21, 30°), (P12, P22, 30°), (P13, P23, 30°), (P14, P24, 30°), (P15, P25, 30°), (P16, P26, 30°), (P17, P27, 30°), (P18, P28, 30°), and (P19, P29, 30°).
[0156] Based on this, the first sample pixel value of the pixel point in the first sample image is substituted as a0 into the above formula (1), the second sample pixel value of the corresponding pixel point in the second sample image is substituted as a into the above formula (1), and the sample temperature value corresponding to the second sample image (or the temperature value corresponding to the second sample pixel point) is substituted into the above formula (1), and the polynomial coefficients b0, b1, b2 and b3 of the equal sign in the above formula (1) are solved.
[0157] In a possible implementation manner, polynomial coefficients are obtained by least square fitting based on the first sample pixel value, the second sample pixel value and the sample temperature value.
[0158] In practical applications, other methods may also be used to fit the polynomial coefficients. The embodiment of the present application only uses the least squares method as an example, and does not constitute a limitation on the fitting algorithm / method that can be used in the present application.
[0159] Furthermore, after the polynomial coefficients are determined, the polynomial coefficients are substituted into the polynomial function to obtain the temperature compensation function used in the embodiment of the present application.
[0160] As an example, based on the polynomial shown in the above formula (1), if the polynomial coefficients of the fitting solution are b0=0.5, b1=3, b2=1.2 and b3=0.8, the temperature compensation function can be expressed by the following formula (2).
[0161] a0=0.5+3·a·T+1.2·a 2 ·T 2 +0.8·a 3 ·T 3 (2)
[0162] For this temperature compensation function, when calculating the target pixel value of the target pixel point, the original pixel value of the target pixel point is taken as a, and the original temperature value corresponding to the target pixel point is substituted into the above formula (2) as T, and the target pixel value a0 of the target pixel point can be calculated.
[0163] It should be understood that the above formulas (1) and (2) essentially describe the same calculation relationship, the only difference being that the above formula (1) is applied to the sample image, i.e., the stage of solving the polynomial coefficients; while the above formula (2) is applied in the actual correction process after the sample image is acquired and the polynomial coefficients are solved, i.e., the application process of the actual image correction.
[0164] In some embodiments, when generating a temperature compensation function corresponding to an X-ray detector, the corresponding temperature compensation function may be generated by region based on the region where the temperature sensor is deployed. That is, for each region of the X-ray detector circuit board (or the photosensitive element array), the temperature compensation function corresponding to each region is generated by referring to the above-mentioned method of acquiring sample images and fitting polynomial coefficients.
[0165] Based on this, in a possible implementation, the original image includes multiple image areas, each image area corresponds to a temperature compensation function, and the implementation process of the above step 502 can be: determine the target area to which the target pixel point belongs in the original image; based on the original pixel value of the target pixel point and the original temperature value corresponding to the target pixel point, determine the target pixel value of the target pixel point through the temperature compensation function corresponding to the target area.
[0166] The embodiment of the present application does not limit the number of regions where temperature sensors are deployed on the X-ray detector, so the number of image regions corresponding to the original image is also not limited. It should be understood that the multiple image regions included in the original image are determined based on the number of regions divided by the X-ray detector when generating the temperature compensation function, and the two are exactly the same in number.
[0167] In addition, it should be noted that when executing the above step 502, for the original image to be corrected, it may correspond to one temperature compensation function, or it may correspond to multiple temperature compensation functions in different regions. The embodiment of the present application does not limit the number of temperature compensation functions corresponding to an X-ray detector. However, when performing image correction, no matter how many temperature compensation functions the original image corresponds to, the implementation logic of determining the target pixel value of each pixel point in the corresponding area based on each temperature compensation function is similar.
[0168] Step 503: Correct the original image based on the target pixel value corresponding to each pixel point in the original image.
[0169] That is, the original pixel value of each pixel point in the original image is adjusted to the corresponding target pixel value to achieve correction of the original image as a whole, thereby obtaining a corrected image.
[0170] Optionally, when the executor of the image correction method is an X-ray detector, after obtaining the corrected image, the X-ray detector can send the corrected image to a display device for display through the display device, thereby facilitating viewing by a user (such as a doctor).
[0171] Optionally, when the executor of the image correction method is a computer device, after obtaining the corrected image, the computer device can directly display the corrected image, thereby facilitating viewing by a user (eg, a doctor).
[0172] Optionally, after obtaining the corrected image, the execution entity of the above-mentioned image correction method may also store the corrected image in a database, which is not limited in this embodiment of the present application.
[0173] In summary, for the original image generated by the X-ray detector, for any pixel in the original image, the present application determines the target pixel value of the pixel through the temperature compensation function based on the original pixel value of the pixel and the original temperature value corresponding to the pixel, and then corrects the original image through the target pixel value of each pixel. Since the temperature compensation function is used to indicate the relationship between the original pixel value of each pixel in the original image, the original temperature value corresponding to each pixel, and the target pixel value, the use of the temperature compensation function can correct the deviation caused by temperature changes, thereby ensuring the imaging quality of the X-ray detector; moreover, based on the temperature compensation function, the target pixel value of each pixel can be calculated quickly and effectively, thereby improving the efficiency of image correction.
[0174] Figure 6 is a structural diagram of an image correction device provided in an embodiment of the present application. The image correction device can be implemented by software, hardware, or a combination of both to become the above Figure 1 Some or all of the X-ray detectors shown, or Figure 3 Some or all of the computer equipment shown. Please refer to Figure 6 The image correction device includes: an image acquisition module 601, a pixel value determination module 602 and an image correction module 603.
[0175] An image acquisition module 601 is used to acquire an original image to be corrected, where the original image is an image generated by an X-ray detector;
[0176] A pixel value determination module 602 is used to determine a target pixel value of a target pixel point through a temperature compensation function based on an original pixel value of the target pixel point and an original temperature value corresponding to the target pixel point; wherein the target pixel point is any pixel point in the original image, the original temperature value is the temperature value of the target pixel point at a corresponding point on the X-ray detector, and the temperature compensation function is used to indicate the relationship between the original pixel value of each pixel point in the original image, the original temperature value corresponding to each pixel point, and the target pixel value;
[0177] The image correction module 603 is used to correct the original image based on the target pixel value corresponding to each pixel point in the original image.
[0178] Optionally, the image correction device further includes:
[0179] a sample acquisition module, used to acquire a first sample image, a plurality of second sample images, and a polynomial function with unknown polynomial coefficients, wherein the first sample image is an image generated by the X-ray detector at a reference temperature point, and the plurality of second sample images are images respectively generated by the X-ray detector at a plurality of temperature sampling points, and the temperature values of the reference temperature point and the plurality of temperature sampling points are different;
[0180] The function determination module is used to determine polynomial coefficients based on the first sample image and the plurality of second sample images, and determine a polynomial function with known polynomial coefficients as a temperature compensation function.
[0181] Optionally, the independent variables in the polynomial function are the second sample pixel value and the sample temperature value, the dependent variable in the polynomial function is the first sample pixel value, and the first sample pixel value and the second sample pixel value correspond to the same pixel point;
[0182] The second sample pixel value is the pixel value of any pixel point in the second sample image, the sample temperature value is the temperature value of the temperature sampling point corresponding to the second sample image, and the first sample pixel value is the pixel value of the corresponding pixel point in the first sample image.
[0183] Optionally, the coefficient determination module 602 is specifically used for:
[0184] Based on the first sample pixel value, the second sample pixel value and the sample temperature value, the polynomial coefficients are obtained by least square fitting.
[0185] Optionally, the original image includes a plurality of image regions, each image region corresponds to a temperature compensation function; the pixel value determination module includes:
[0186] A first determining subunit is used to determine the target area to which the target pixel point belongs in the original image;
[0187] The second determination subunit is used to determine the target pixel value of the target pixel point through the temperature compensation function corresponding to the target area based on the original pixel value of the target pixel point and the original temperature value corresponding to the target pixel point.
[0188] Optionally, the image correction device further includes:
[0189] A coefficient acquisition module, used to obtain a bias correction coefficient corresponding to the X-ray detector;
[0190] The image correction module 603 is further used to correct the original image based on the offset correction coefficient.
[0191] Optionally, the image correction device further includes:
[0192] A coefficient acquisition module, used to obtain a gain correction coefficient corresponding to the X-ray detector;
[0193] The image correction module 603 is further used to correct the original image based on the gain correction coefficient.
[0194] In summary, in the embodiment of the present application, for the original image generated by the X-ray detector, for any pixel in the original image, the image correction device can determine the target pixel value of the pixel through the temperature compensation function based on the original pixel value of the pixel and the original temperature value corresponding to the pixel, and then correct the original image through the target pixel value of each pixel. Since the temperature compensation function is used to indicate the relationship between the original pixel value of each pixel in the original image, the original temperature value corresponding to each pixel, and the target pixel value, the use of the temperature compensation function can correct the deviation caused by temperature change, thereby ensuring the imaging quality of the X-ray detector; moreover, based on the temperature compensation function, the target pixel value of each pixel can be quickly and effectively calculated, thereby improving the efficiency of image correction.
[0195] It should be noted that: when the image correction device provided in the above embodiment corrects the original image, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the image correction device provided in the above embodiment and the image correction method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0196] In some embodiments, a computer-readable storage medium is also provided, in which a computer program is stored, and when the computer program is executed by a processor, the steps of the image correction method in the above embodiment are implemented. For example, the computer-readable storage medium can be a ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
[0197] It is worth noting that the computer-readable storage medium mentioned in the embodiments of the present application may be a non-volatile storage medium, in other words, a non-transitory storage medium.
[0198] It should be understood that all or part of the steps to implement the above embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions, which may be stored in the above-mentioned computer-readable storage medium.
[0199] That is, in some embodiments, a computer program product including computer instructions is also provided, which, when executed on a processor, enables the processor to execute the steps of the image correction method in the above embodiments.
[0200] It should be understood that the "at least one" mentioned herein refers to one or more, and "multiple" refers to two or more. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and the like are used to distinguish the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not limit them to be necessarily different.
[0201] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in the embodiments of the present application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0202] The above-mentioned embodiments are provided for the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. An image correction device, It is characterized in that The device comprises: An image acquisition module, used to acquire an original image to be corrected, wherein the original image is an image generated by an X-ray detector; A pixel value determination module, used to determine a target pixel value of the target pixel point through a temperature compensation function based on an original pixel value of the target pixel point and an original temperature value corresponding to the target pixel point; The target pixel is any pixel in the original image, the original temperature value is the temperature value of the target pixel at the corresponding point on the X-ray detector, and the temperature compensation function is used to indicate the relationship between the original pixel value of each pixel in the original image, the original temperature value corresponding to each pixel, and the target pixel value; The image correction module is used to correct the original image based on the target pixel value corresponding to each pixel point in the original image.
2. The device according to claim 1, It is characterized in that The device also includes: a sample acquisition module, configured to acquire a first sample image, a plurality of second sample images, and a polynomial function with unknown polynomial coefficients, wherein the first sample image is an image generated by the X-ray detector at a reference temperature point, the plurality of second sample images are images respectively generated by the X-ray detector at a plurality of temperature sampling points, and the temperature values of the reference temperature point and the plurality of temperature sampling points are different; The function determination module is used to determine the polynomial coefficients based on the first sample image and the plurality of second sample images, and determine a polynomial function with known polynomial coefficients as the temperature compensation function.
3. The device as claimed in claim 2, It is characterized in that The independent variables in the polynomial function are the second sample pixel value and the sample temperature value, the dependent variable in the polynomial function is the first sample pixel value, and the first sample pixel value and the second sample pixel value correspond to the same pixel point; The second sample pixel value is the pixel value of any pixel point in the second sample image, the sample temperature value is the temperature value of the temperature sampling point corresponding to the second sample image, and the first sample pixel value is the pixel value of the corresponding pixel point in the first sample image.
4. The device as claimed in claim 3, It is characterized in that The function determination module is further used for: The polynomial coefficients are obtained by least square fitting based on the first sample pixel value, the second sample pixel value and the sample temperature value.
5. The device according to any one of claims 1 to 4, It is characterized in that The original image includes a plurality of image regions, each image region corresponds to a temperature compensation function; The pixel value determination module comprises: A first determining subunit, configured to determine a target region to which the target pixel point belongs in the original image; The second determination subunit is used to determine the target pixel value of the target pixel point through the temperature compensation function corresponding to the target area based on the original pixel value of the target pixel point and the original temperature value corresponding to the target pixel point.
6. The device according to any one of claims 1 to 4, It is characterized in that The device also includes: A coefficient acquisition module, used to acquire a bias correction coefficient corresponding to the X-ray detector; The image correction module is further used to correct the original image based on the offset correction coefficient.
7. The device according to any one of claims 1 to 4, It is characterized in that The device also includes: A coefficient acquisition module, used to obtain a gain correction coefficient corresponding to the X-ray detector; The image correction module is further used to correct the original image based on the gain correction coefficient.
8. An image correction method, It is characterized in that The method comprises: Acquire an original image to be corrected, where the original image is an image generated by an X-ray detector; Determining a target pixel value of the target pixel point by a temperature compensation function based on an original pixel value of the target pixel point and an original temperature value corresponding to the target pixel point; The target pixel is any pixel in the original image, the original temperature value is the temperature value of the target pixel at the corresponding point on the X-ray detector, and the temperature compensation function is used to indicate the relationship between the original pixel value of each pixel in the original image, the original temperature value corresponding to each pixel, and the target pixel value; The original image is corrected based on the target pixel value corresponding to each pixel point in the original image.
9. The method according to claim 8, It is characterized in that Before determining the target pixel value of the target pixel point by using a temperature compensation function based on the original pixel value of the target pixel point and the original temperature value corresponding to the target pixel point, the method further includes: Acquire a first sample image, a plurality of second sample images, and a polynomial function with unknown polynomial coefficients, wherein the first sample image is an image generated by the X-ray detector at a reference temperature point, the plurality of second sample images are images respectively generated by the X-ray detector at a plurality of temperature sampling points, and the temperature values of the reference temperature point and the plurality of temperature sampling points are different; Based on the first sample image and the plurality of second sample images, the polynomial coefficients are determined, and a polynomial function whose polynomial coefficients are known is determined as the temperature compensation function.
10. The method according to claim 8 or 9, It is characterized in that The original image includes a plurality of image regions, each image region corresponds to a temperature compensation function; The determining the target pixel value of the target pixel point by using a temperature compensation function based on the original pixel value of the target pixel point and the original temperature value corresponding to the target pixel point includes: Determine the target area to which the target pixel point belongs in the original image; Based on the original pixel value of the target pixel and the original temperature value corresponding to the target pixel, the target pixel value of the target pixel is determined by a temperature compensation function corresponding to the target area.
11. An X-ray detector, It is characterized in that The X-ray detector includes an image generating device, at least one temperature sensor, a memory and a processor; The image generating device is used to convert the received X-rays into electrical signals and generate an original image based on the electrical signals; The at least one temperature sensor is used to collect the original temperature value corresponding to each pixel point in the original image, and the original temperature value is the temperature value of each pixel point at the corresponding point on the X-ray detector; The memory is used to store a computer program, and the processor is used to execute the computer program to implement the image correction method according to any one of claims 8 to 10.
12. A computer device, It is characterized in that The computer device includes a memory and a processor; The memory is used to store computer programs; The processor is used to execute the computer program to implement the image correction method according to any one of claims 8 to 10.
13. An image correction system, It is characterized in that The system includes an X-ray detector and an image correction device; The X-ray detector includes an image generating device and at least one temperature sensor, wherein the image generating device is used to convert received X-rays into electrical signals and generate an original image based on the electrical signals, and the at least one temperature sensor is used to collect an original temperature value corresponding to each pixel point in the original image, and the original temperature value is a temperature value of each pixel point at a corresponding point on the X-ray detector; The image correction device is used to execute the image correction method according to any one of claims 8 to 10 based on the original image and the original temperature value corresponding to each pixel in the original image.
14. A computer-readable storage medium, It is characterized in that The storage medium stores a computer program, and when the computer program is executed by the processor, the image correction method according to any one of claims 8 to 10 is implemented.
15. A computer program product, It is characterized in that The computer program product stores computer instructions, and when the computer instructions are executed by a processor, the image correction method according to any one of claims 8 to 10 is implemented.
Citation Information
Cited By
Image correction method and related apparatus
WO2026026241A1
