Artifact correction method, device and storage medium

Through parallel processing and weight fusion technology, the efficiency of artifact correction is improved, the problem of inefficient artifact correction in the prior art is solved, and faster image processing and diagnostic support is achieved.

CN113936068BActive Publication Date: 2025-03-25SHANGHAI UNITED IMAGING HEALTHCARE
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010672813.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-14
Publication Date
2025-03-25
Estimated Expiration
2040-09-22

AI Technical Summary

Technical Problem

Artifact correction efficiency in the prior art is low, resulting in too long image processing time and it is difficult to meet the needs of film reading diagnosis.

Method used

By calling multiple threads to perform correction operations in parallel, the first corrected image and the error image are fused into a virtual fused image using a preset number of weights, and the target weight is determined based on the information entropy of the neighborhood of each pixel under different weights, and finally the image is fused according to the target weight to obtain the second corrected image.

Benefits of technology

It improves the efficiency of artifact correction, shortens the calculation time, and meets the real-time needs of doctors for film reading and diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113936068B_ABST
    Figure CN113936068B_ABST
Patent Text Reader

Abstract

The present application relates to an artifact correction method, device and storage medium. After a first correction image and an error image are fused into a preset number of virtual fused images by calling multiple threads in parallel to execute using a preset number of weights, the information entropy of the neighborhood of each pixel of each virtual fused image under each weight is obtained, and a target weight is determined for each pixel of the error image according to the information entropy of the neighborhood of each pixel under different weights, and then the first correction image and the error image are fused according to the target weight to obtain a second correction image, and finally the image after the artifact correction of the image to be corrected is obtained through the second correction image; this method realizes the parallel operation of multiple single-threaded data streams in the calculation process, greatly improves the calculation performance, saves calculation time, and thus improves the efficiency of artifact correction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an artifact correction method, device and storage medium. Background Art

[0002] Artifacts refer to various forms of images that appear on the image even though the scanned object does not exist. There are many types of artifacts, such as metal artifacts, motion artifacts, etc.

[0003] The presence of artifacts in the image will affect the quality of the image, so the artifacts in the image need to be corrected. Taking metal artifacts as an example, the Metal Artifact Correction (MAC) algorithm can be used to correct the metal artifacts on the image. The MAC algorithm is a method for eliminating metal artifacts on the image, which can effectively reduce the image noise introduced by metal implants and restore the image content to a certain extent. However, the algorithm involves a complex image processing process and a high degree of computational logic coupling, which results in a long processing time for a single image and is difficult to meet the needs of film reading and diagnosis. Therefore, there is a problem of low efficiency in the artifact correction process. Summary of the invention

[0004] Based on this, it is necessary to provide an artifact correction method, device and storage medium that can improve the efficiency of artifact correction in order to solve the above technical problems.

[0005] In a first aspect, an embodiment of the present application provides an artifact correction method, the method comprising:

[0006] Call multiple threads to perform correction operations in parallel, and one thread processes one or more pixels;

[0007] Correction operations include:

[0008] The first corrected image and the error image are fused into a preset number of virtual fused images using a preset number of weights; the first corrected image represents an image corresponding to the projection data of the image to be corrected after removing part or all of the artifact components caused by the interference source, and the error image represents an image corresponding to the projection data of the image to be corrected minus the projection data of the first corrected image for the first time;

[0009] For each weight, the information entropy of the neighborhood of each pixel of each virtual fusion image is obtained, and a target weight is determined for each pixel of the error image according to the information entropy of the neighborhood of each pixel under different weights; the target weight is one of the preset number of weights;

[0010] The first corrected image and the error image are fused according to the target weight to obtain a second corrected image; the second corrected image is used to obtain an image after the artifact correction of the image to be corrected.

[0011] In one embodiment, the method of fusing the first corrected image and the error image into a preset number of virtual fused images using a preset number of weights includes:

[0012] Using one of the preset number of weights in sequence, the first corrected image and the error image are fused to obtain a preset number of virtual fused images;

[0013] Each time the first corrected image and the error image are fused, each thread in the plurality of threads processes pixels at corresponding positions in the first corrected image and the error image.

[0014] In one embodiment, the obtaining of the information entropy of the neighborhood of each pixel of each virtual fused image and determining the target weight for each pixel of the error image according to the information entropy of the neighborhood of each pixel under different weights include:

[0015] Obtaining a probability distribution function corresponding to the neighborhood of each pixel of each virtual fused image;

[0016] Determine the information entropy of the neighborhood where each pixel of each virtual fused image is located according to the probability distribution function of the neighborhood where each pixel of each virtual fused image is located;

[0017] The corresponding weight of the minimum information entropy in the information entropy of the neighborhood of each pixel under different weights in the preset quantity weights is determined as the target weight.

[0018] In one embodiment, the step of fusing the first corrected image and the error image according to the target weight to obtain the second corrected image includes:

[0019] According to the target weight of each pixel in the error image, a weighted sum of pixels at corresponding positions in the first corrected image and the error image is obtained to obtain a second corrected image.

[0020] In one embodiment, the number of the threads is equal to or greater than the number of pixels included in the error image, and the multiple threads simultaneously determine target weights for corresponding pixels.

[0021] In one embodiment, the number of threads is less than the number of pixels included in the error image, and at least one thread determines target weights for at least two pixels.

[0022] In one embodiment, the method further comprises:

[0023] Segmenting a high-frequency portion image of the image to be corrected and a low-frequency portion image of the second corrected image;

[0024] The high-frequency image and the low-frequency image are fused to obtain a third corrected image, where the third corrected image is an image after artifacts of the image to be corrected are corrected.

[0025] In a second aspect, an embodiment of the present application provides an artifact correction device, the device comprising:

[0026] A calling module, used for calling multiple thread modules to perform correction operations in parallel, and one thread module processes one or more pixels;

[0027] A thread module for performing correction operations;

[0028] The thread module includes: a fusion unit, which is used to fuse the first corrected image and the error image into a preset number of virtual fused images by using a preset number of weights; the first corrected image represents an image corresponding to the projection data of the image to be corrected after removing part or all of the artifact components caused by the interference source, and the error image represents an image corresponding to the projection data of the image to be corrected minus the projection data of the first corrected image for the first time;

[0029] A determination unit, for obtaining, for each weight, information entropy of a neighborhood where each pixel of each virtual fused image is located, and determining a target weight for each pixel of the error image according to the information entropy of the neighborhood where each pixel is located under different weights; the target weight is one of a preset number of weights;

[0030] The correction unit is used to fuse the first corrected image and the error image according to the target weight to obtain a second corrected image; the second corrected image is used to obtain the image after the artifact correction of the image to be corrected.

[0031] In a third aspect, an embodiment of the present application provides an artifact correction method, the method comprising:

[0032] Calling multiple threads to perform correction operations in parallel, and one thread processes one or more projection data;

[0033] Corrective actions include:

[0034] Acquire projection data of CT scans;

[0035] Removing at least a portion of the artifact component caused by the interference source from the projection data of the CT scan to generate first correction projection data; and subtracting the first correction projection data from the projection data of the CT scan to generate projection data of the error image;

[0036] For each data point of the projection data of the error image and the corresponding data point of the first correction projection data, a preset number of weights are applied to obtain a fused data point;

[0037] For each fused data point, the information entropy of the neighborhood where the fused data point is located is calculated respectively;

[0038] Determine a target weight for each data point of the projection data of the error image according to the information entropy of the neighborhood where each fused data point is located;

[0039] The target weight is used to fuse the first correction projection data and the projection data of the error image to obtain a plurality of synthetic data points, and the plurality of synthetic data points constitute the projection data of the second correction image.

[0040] In a fourth aspect, an embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of any method provided in the embodiment of the first aspect are implemented.

[0041] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of any method provided in the embodiments of the first and third aspects are implemented.

[0042] The embodiments of the present application provide an artifact correction method, apparatus, computer equipment and storage medium. The method calls multiple threads to execute in parallel to fuse a first corrected image and an error image into a preset number of virtual fused images using a preset number of weights, obtains the information entropy of the neighborhood of each pixel of each virtual fused image under each weight, and determines a target weight for each pixel of the error image according to the information entropy of the neighborhood of each pixel under different weights, and then fuses the first corrected image and the error image according to the target weight to obtain a second corrected image, and finally obtains the image to be corrected after artifact correction through the second corrected image. In the process of obtaining the image to be corrected after artifact correction, the method is performed in a manner that one thread processes one pixel or multiple adjacent pixels correspondingly, so that multiple single threads in the calculation process are parallelized to run data streams in a single pixel unit through multi-threaded parallel processing, which greatly improves the calculation performance and saves calculation time, thereby improving the efficiency of artifact correction. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 A diagram showing an application environment of an artifact correction method in an embodiment;

[0044] Figure 1a A schematic diagram of the structure of a CT scanning system in one embodiment;

[0045] Figure 2 is a schematic flow chart of an artifact correction method in one embodiment;

[0046] Figure 2a A schematic diagram showing the comparison before and after artifact correction in one embodiment;

[0047] Figure 3 is a schematic flow chart of an artifact correction method in another embodiment;

[0048] Figure 4 is a schematic flow chart of an artifact correction method in another embodiment;

[0049] Figure 4a A schematic diagram of single-pixel single-thread processing in one embodiment;

[0050] Figure 5 is a schematic flow chart of an artifact correction method in another embodiment;

[0051] Figure 6 is a schematic flow chart of an artifact correction method in another embodiment;

[0052] Figure 7 is a schematic diagram of an artifact correction method in one embodiment;

[0053] Figure 8 is a structural block diagram of an artifact correction device in one embodiment;

[0054] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0055] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0056] The present application provides an artifact correction method which can be applied to Figure 1 In the application environment shown in FIG. , the artifact correction method is applied in Figure 1 In the computer device shown, the computer device may be a server, and its internal structure diagram can be seen in Figure 1 . The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store relevant data for artifact correction. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an artifact correction method is implemented.

[0057] The embodiments of the present application provide an artifact correction method, device, computer equipment and storage medium, which can improve the efficiency of artifact correction. The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems will be described in detail below through embodiments and in combination with the accompanying drawings. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. It should be noted that the artifact correction method provided by the present application, Figure 2-Figure 7 The execution subject is a computer device. Figure 2-Figure 7 The execution subject may also be an artifact correction device, which may be implemented as part or all of a computer device through software, hardware, or a combination of software and hardware.

[0058] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments.

[0059] The artifact correction method proposed in the present application can be applied not only in the image domain, but also in the raw data domain (such as the projection data domain) corresponding to the image.

[0060] In one embodiment, the artifact correction method is applied in the projection data domain, and the projection data is CT scan data. The artifact correction process includes the following steps:

[0061] First, obtain the projection data of the CT scan. Specifically, Figure 1a It is a schematic diagram of the composition structure of the CT scanning system, which mainly includes a CT tube, a collimator, a high-voltage generator, a detector, a scanning frame, a scanning bed, a central controller and an image reconstruction system. The CT tube, the collimator, the detector and the preamplifier are located inside the frame. The data acquisition of the CT scanner is mainly completed by the CT tube, the detector, the collimator, the filter, the analog-to-digital conversion module and the interface circuit; the image reconstruction stage is completed by a computer, and the final scanned and reconstructed image is displayed on the display, and stored and recorded on a hard disk or other storable media; the working process of the entire CT scanner is controlled by the central controller. The projection data in the embodiment of the present application can be the original data that has not been reconstructed, and the original data can be directly obtained by the data acquisition of the CT scanner.

[0062] Second, at least a portion of the artifact component caused by the interference source is removed from the projection data of the CT scan to generate the first correction projection data; and the first correction projection data is subtracted from the projection data of the CT scan to generate the projection data of the error image, wherein each data point of the projection data of the error image corresponds to a data point of the first correction projection data.

[0063] Third, for each data point of the projection data of the error image and the corresponding data point of the first correction projection data, a preset number of weights are applied to obtain a fused data point.

[0064] Fourth, for each fused data point, the information entropy of the neighborhood where the fused data point is located is calculated respectively.

[0065] Fifth, according to the information entropy of the neighborhood where each fused data point is located, a target weight is determined for each data point of the projection data of the error image; the target weight is one of a preset number of weights; optionally, in one embodiment, the position of each data point of the projection data of the error image is uniquely determined, and the fused data point is obtained by applying different weights, which is equivalent to that the data point at each position of the projection data of the error image will obtain a preset number of fused data points. Then, for the data point at one of the positions of the projection data of the error image, its target weight can be set to the weight corresponding to the minimum information entropy in the information entropy of the neighborhood where the preset number of fused data points are located; wherein, the target weights finally determined for each data point of the projection data of the error image can be the same or different.

[0066] Sixth, the target weight is used to fuse the first corrected projection data and the projection data of the error image to obtain a plurality of synthetic data points, and the plurality of synthetic data points constitute the projection data of the second corrected image. Specifically, when fusing the first corrected projection data and the projection data of the error image, the target weight of each data point of the projection data of the error image is used, and the data point corresponding to the target weight of the projection data of the error image and the data point at the corresponding position in the first corrected projection data are fused to obtain a plurality of synthetic data points.

[0067] It should be noted that in the above embodiment, for the case where the number of processor threads is large, the acquisition of the target weight of a projection data point can be completed by one thread operation, which significantly shortens the data processing time. Of course, in order to save the number of processor threads, the acquisition of the target weights of multiple adjacent projection data points can be completed by one thread operation. The processor in this embodiment uses a graphics processing unit (GPU), which can process multiple threads at the same time. This parallel multi-threaded processing method significantly improves the data processing speed, reduces the data processing time, and can well meet the doctor's film reading and diagnosis needs and improve the user experience.

[0068] In one embodiment, Figure 2 As shown, a method for artifact correction is provided, which is applied to Figure 1The computer device in the embodiment is used as an example to illustrate that the present embodiment relates to a specific process in which the computer device executes in parallel a fusion of a first corrected image and an error image into a preset number of virtual fused images by means of a method in which one thread corresponds to one pixel in multiple threads, a target weight is determined according to the information entropy of the neighborhood of each pixel of each virtual fused image, and then the first corrected image and the error image are fused according to the target weight to obtain a second corrected image for obtaining an image after artifact correction of the image to be corrected. The embodiment includes the following steps:

[0069] S101, calling multiple threads to perform correction operations in parallel, and one thread processes one or more pixels.

[0070] The number of threads specifically included in the multiple threads is the same as the number of pixels in the image to be corrected, so that one thread is responsible for processing one pixel during the correction operation, which is equivalent to that in the process of correcting the artifacts in the image to be corrected, all pixels in the image to be corrected are simultaneously subjected to the same operation, with each pixel being run on a single thread in units of pixels, so that all pixels are operated in parallel, thereby improving the efficiency of artifact correction. Alternatively, in the case where the number of threads is limited, the number of threads is less than the number of pixels contained in the error image, and one thread corresponds to two or more pixels.

[0071] Optionally, the multiple threads can be implemented through the multi-threaded concurrent execution technology of the GPU, or through the multi-threaded concurrent execution technology of the field programmable gate array (Field-Programmable Gate Array, FPGA), or through the multi-threaded concurrent execution technology of a customized application-specific integrated circuit (Application Specific Integrated Circuit, ASIC) parallel chip, which is not limited in this embodiment. In this way, by using GPU, FPGA or ASIC chip to implement multi-threaded concurrent execution technology, valuable computing resources on the CPU side of the computer device can be saved, and the computing performance is greatly improved relative to the existing method, thereby also improving the clinical value of the metal artifact correction algorithm. In this embodiment, multiple threads of the GPU are called to perform correction operations in parallel. Taking CT images as an example, the time for processing a single CT image using the GPU is reduced to less than one second. Compared with the prior art of removing artifacts in units of each image, the computing performance can be improved by 50 times, meeting the real-time requirements of doctors' film reading and diagnosis, and improving the user experience.

[0072] S102, the correction operation includes: S1021, using a preset number of weights to fuse the first corrected image and the error image into a preset number of virtual fused images; the first corrected image represents the image corresponding to the projection data of the image to be corrected after removing part or all of the artifact components caused by the interference source, and the error image represents the image corresponding to the projection data of the image to be corrected after the projection data of the first corrected image is initially subtracted.

[0073] Among them, the image to be corrected is the image that currently needs to correct the artifact. For example, the projection data of the CT scan is reconstructed to obtain the image to be corrected. In practical applications, there are often interference sources when the target imaging part is scanned by CT, and the interference sources may be different for different target imaging parts. Optionally, in one embodiment, the target imaging part is water, and calcified tissue, bone, and other materials with high attenuation characteristics relative to water are interference sources. In another embodiment, the target imaging part is a human organ, and metal and other implants and other materials with high attenuation characteristics relative to human organs are interference sources. It can be understood that the interference source has a higher attenuation than the target imaging part. Taking the target imaging part as a human organ and metal as an interference source as an example, if there is a metal artifact in the projection data of the CT scan, the metal artifact needs to be corrected. Of course, the image to be corrected includes but is not limited to X-ray images, CT (computed tomography) images, PET (positron emission computed tomography), MRI (magnetic resonance) images, ultrasound images, etc.

[0074] The first corrected image represents the image corresponding to the projection data of the image to be corrected after removing part or all of the artifact components caused by the interference source, and the error image represents the image corresponding to the projection data of the image to be corrected after the projection data of the first corrected image is subtracted from the projection data of the image to be corrected. For example, the image corresponding to the removal of the metal part from the image to be corrected is the first corrected image, and the image corresponding to the removal of the first corrected image from the image to be corrected is the error image.

[0075] Specifically, taking a CT scanned image as an example, at least a part of the artifact component caused by metal is removed from the captured projection data as the projection data obtained by CT scanning to generate projection data of the first corrected image, and the generated projection data of the first corrected image is subtracted from the captured projection data to generate projection data of the error image. The processing method of the first corrected image may adopt an iteration method, an interpolation method or other types of artifact correction methods, etc., which is not limited in this embodiment.

[0076] In one embodiment, the first corrected image can be determined in the following manner: generating initial image data according to the captured projection data, the processed image data being the image to be corrected; generating tissue classification image data according to the initial image data; forward projecting the tissue classification image data to generate tissue classification projection data; replacing the projection value of the metal transmission area of ​​the captured projection data with the projection value of the metal transmission area of ​​the projection data corresponding to the tissue classification image, to generate the projection data of the first corrected image. Exemplarily, the tissue classification image data can be obtained in the following manner: classifying each pixel of the initial image data into a plurality of predetermined tissues or organs, and replacing each tissue or organ with a predetermined CT value.

[0077] In one embodiment, the first corrected image can be determined by: reconstructing the captured projection data to generate initial image data; extracting the metal area from the initial image data to obtain metal image data; forward projecting the metal image data to generate metal projection data; interpolating the metal penetration area of ​​the captured projection data to generate non-metal projection data. In this embodiment, the metal penetration area can be determined by setting a threshold.

[0078] Among them, the preset number of weights refers to the number of weight types. Optionally, from 0 to 1, with an interval of 0.01, 101 weights can be generated. Then, the first corrected image and the error image are fused respectively using these 101 weights to generate 101 virtual fused images. Of course, in other embodiments, the aforementioned intervals can be adjusted, and the corresponding number of weight types will also change. It can also be set to a smaller precise value such as 0.001, or an interval of 0.1. In this embodiment, there is no specific limitation on the number of weight types.

[0079] For example, let the weight be f Weight =0:0.01:1 (i.e., 101 weights can be generated from 0 to 1 with an interval of 0.01), then any one of the 101 weights is used to fuse the first corrected image I cor1 and error image I err Then generate a virtual fusion image I new , expressed in formula: I new =(1-f Weight )*I cor1 +f Weight *I err , so when the weight f Weight When the number of is 101, the virtual fusion image I new It is also 101, that is, the number of weights is equal to the number of generated virtual fused images.

[0080] When multi-thread parallel execution is adopted, one thread processes a pair of pixels correspondingly, where the pair of pixels refers to the pixel in the first corrected image and the pixel at the corresponding position in the error image. Optionally, in one embodiment, using a preset number of weights to fuse the first corrected image and the error image into a preset number of virtual fused images includes: sequentially using one of the preset number of weights to fuse the first corrected image and the error image to obtain a preset number of virtual fused images; wherein, each time the first corrected image and the error image are fused, each thread in the multiple threads processes the pixels at the corresponding position in the first corrected image and the error image correspondingly.

[0081] For example, the preset number of weights is the above 101 weights, one of which is represented by f n ' Weight (where subscript n corresponds to the thread number, and the value of n can be 2, 5, 10, 20, 100, 200, etc.), a pair of pixels of the first corrected image and the error image are A and A', then thread n uses weight f n ' Weight The result of fusing pixels A and A' is f n ' Weight *A+(1-f n ' Weight )A'; So, for a weight f n ' Weight , each thread uses the weight to fuse the corresponding pixel pairs in the first correction image and the error image, and obtains the fusion results of all pixel pairs to form a virtual fusion image; then switches to the next weight, and similarly, each thread uses the next weight to fuse the corresponding pixel pairs in the first correction image and the error image, and obtains the fusion results of all pixel pairs to form the next virtual fusion image; then switches to the next weight, .... In this way, 101 weights are switched in turn to obtain 101 virtual fusion images. Among them, the order of switching weights can be switched from small to large between 0-1, and there is no restriction on this.

[0082] S1022, for each weight, obtain the information entropy of the neighborhood of each pixel of each virtual fusion image, and determine the target weight for each pixel of the error image according to the information entropy of the neighborhood of each pixel under different weights; the target weight is one of a preset number of weights.

[0083] Information entropy refers to the average amount of information in the neighborhood of each pixel of the virtual fusion image after excluding redundancy. After obtaining the information entropy of the neighborhood of each pixel of each virtual fusion image, by analyzing the information entropy of the neighborhood of each pixel under different weights, a minimum information entropy of each pixel can be determined. That is, when the information entropy of the neighborhood of the pixel is the minimum, it can be considered that the artifact (metal artifact) of the interference source in the neighborhood is the least or there is no artifact. Therefore, the weight used in the above fusion step by the pixel with the smallest information entropy in the neighborhood of the pixel in the virtual fusion image is used as the target weight. That is, the target weight is one of the above-mentioned preset number of weights. For example, if there are 101 weights, the target weight is one of the 101 weights. It should be noted that, since the embodiment of the present application executes all pixels in parallel in a manner in which one thread is responsible for one pixel, each thread is actually responsible for obtaining the information entropy in the neighborhood of each pixel. Similarly, when determining the weight corresponding to the pixel with the smallest information entropy in the neighborhood of the pixel as the target weight in the fusion step, it is also determined by a single thread with a single pixel as a unit.

[0084] Since the final result is that a target weight is determined for each pixel in each virtual fused image, and the virtual fused image is fused by the first corrected image and the error image using different weights, the positions of each pixel in the first corrected image, the error image and the virtual fused image are one-to-one corresponding. Therefore, the target weight of each pixel in the virtual fused image can be determined by using each pixel in the error image as the target weight or by determining the target weight for each pixel in the first corrected image. This is not limited in this embodiment.

[0085] S1023, fusing the first corrected image and the error image according to the target weight to obtain a second corrected image; the second corrected image is used to obtain an image after the artifact correction of the image to be corrected.

[0086] Since the above target weight is determined by the minimum information entropy of the neighborhood where each pixel is located under different weights, after obtaining the target weight of each pixel, it can be considered that the image obtained by fusing each pixel in the first corrected image and each pixel in the error image using the target weight of each pixel has the least or no artifacts. Therefore, the first corrected image and the error image are fused using the target weight to form a virtual fused image as the second corrected image, and the second corrected image can obtain the image after the artifact correction of the image to be corrected. In one embodiment, the image after the artifact correction of the image to be corrected can be obtained by the second corrected image, which may include the following operations: frequency segmentation and fusion of the image to be corrected and the second corrected image to obtain a third corrected image. Exemplarily, the high-frequency part image of the image to be corrected and the low-frequency part image of the second corrected image can be segmented, and the high-frequency part image and the low-frequency part image are fused to obtain the third corrected image. The third corrected image is an image with significantly reduced interference sources.

[0087] Similarly, taking a single pixel as a unit, when the computer device fuses the first corrected image and the error image according to the target weight, one thread processes one pixel accordingly. Optionally, in one embodiment, the computer device fuses the first corrected image and the error image according to the target weight of each pixel in the error image to obtain the second corrected image, including: obtaining the weighted sum of pixels at corresponding positions in the first corrected image and the error image according to the target weight of each pixel, to obtain the second corrected image.

[0088] What is fused is the first corrected image and the error image, and both the first corrected image and the error image are separated from the image to be corrected, and the image sizes are the same, that is, the number of pixels in the first corrected image and the error image is the same as the number of pixels in the image to be corrected. Therefore, when one thread processes one pixel, it is one thread that fuses the corresponding pixel in the first corrected image and the corresponding pixel in the error image together. Combined with the target weight, it is to calculate the weighted sum of the corresponding pixel in the first corrected image and the corresponding pixel in the error image. For example, thread n is responsible for fusing pixel A in the first corrected image and pixel A' in the error image, and the target weight is f. n ' Weight , then f n ' Weight *A+(1-f n ' Weight )A' is the weighted sum obtained by thread n, and the same operation is performed on the pixels responsible for other threads. Finally, the weighted sum of all pixels in the entire image can be obtained, which is the second corrected image.

[0089] In order to make the artifact correction cleaner, the metal part in the image to be corrected can be optionally fused into the second corrected image to obtain the artifact-corrected image of the image to be corrected. That is, based on the second corrected image, the metal part in the image to be corrected is fused (added) into the second corrected image again, and the obtained new image can be determined as the final artifact-corrected image of the image to be corrected. Fusing the metal part in the image to be corrected into the second corrected image for the second time can enhance the display of the metal part in the image, thereby reducing the display of artifacts. See Figure 2a As shown in FIG. 1 , it is a schematic diagram of the original CT image after metal artifact correction. It can be seen from the figure that the image noise and CT mean after metal artifact correction are greatly reduced, and the metal artifact is effectively corrected.

[0090] The artifact correction method provided in the present embodiment calls multiple threads in parallel to execute the fusion of the first corrected image and the error image into a preset number of virtual fused images using a preset number of weights, obtains the information entropy of the neighborhood of each pixel of each virtual fused image under each weight, and determines the target weight for each pixel of the error image according to the information entropy of the neighborhood of each pixel under different weights, and then fuses the first corrected image and the error image according to the target weight to obtain the second corrected image, and finally obtains the image to be corrected after the artifact correction through the second corrected image; in the process of executing the acquisition of the image to be corrected after the artifact correction, the method is carried out in a manner that one thread processes one pixel correspondingly, so that multiple single threads in the calculation process are parallelized to run data streams in a single pixel unit through multi-threaded parallel processing, which greatly improves the calculation performance and saves calculation time, thereby improving the efficiency of artifact correction.

[0091] The following is a description of the process of obtaining the information entropy of the neighborhood of each pixel of each virtual fusion image in S1022, and determining the target weight of each pixel of the error image according to the information entropy of the neighborhood of each pixel under different weights, in conjunction with a specific embodiment. Figure 3 As shown, in one embodiment, the above S1022 includes the following steps:

[0092] S201, obtaining a probability distribution function of a neighborhood where each pixel in each virtual fused image is located.

[0093] When obtaining the information entropy of the neighborhood of each pixel of each virtual fusion image, it is necessary to determine it according to the probability distribution function of the neighborhood of each pixel, wherein the probability distribution function represents the probability distribution of each pixel in the neighborhood, wherein the probability distribution function of the neighborhood of each pixel can be obtained by statistically analyzing the pixel distribution histogram or pie chart of the neighborhood matrix where the pixel is located.

[0094] For example, let the information entropy be represented as H, and the probability distribution function of the neighborhood where pixel x is located be represented as P(x). Then the formula for calculating the information entropy based on the probability distribution function is as follows: Wherein, m represents the number of pixels contained in the neighborhood of each pixel, and m is an integer greater than or equal to 3, and m can be any value such as 3, 5, 8, 10, etc. In practical applications, the information entropy of the neighborhood of each pixel can be determined according to the probability distribution function P(x) of the neighborhood of each pixel in the virtual fusion image.

[0095] The process of processing a single pixel through a single thread can be seen in Figure 4 The embodiment shown, as Figure 4 As shown, in one embodiment, the process of obtaining the probability distribution function of the neighborhood where each pixel of each virtual fused image is located includes the following steps:

[0096] S301, for a single pixel of a single virtual fused image, calling a thread corresponding to the position of the pixel to obtain the probability distribution of the pixel in the neighborhood where the pixel is located, and obtaining a probability distribution function of the pixel.

[0097] When a single pixel is used as a unit, the computer device needs to obtain a probability distribution function of a neighborhood where a single pixel in a single virtual fused image is located.

[0098] See also Figure 4a The actual size of the virtual fused image and the number of pixels included can be found in Figure 4a In the range formed by the solid line contour, for the pixels around the solid line contour, some of the pixels in its neighborhood do not exist. So for the convenience of calculation, we expand Figure 4a The outline formed by the dotted lines in the middle and outer parts is filled with 0s in all the extended pixels. This does not affect the calculation results or increase the amount of calculation. It also ensures that each pixel in the virtual fusion image has a neighboring pixel, which facilitates the consistency of the calculation process.

[0099] Specifically, the computer device calls multiple threads to parallelly calculate (one thread executes one pixel) the probability distribution of each pixel in the virtual fusion image in its neighborhood, and the probability distribution function of the neighborhood of each pixel can be obtained.

[0100] S302 , respectively obtaining a probability distribution function of each pixel in each virtual fused image, and obtaining a probability distribution function of a neighborhood where each pixel of each virtual fused image is located.

[0101] When obtaining the probability distribution function of each pixel in each virtual fusion image respectively, the probability distribution of the neighborhood where the pixel is located in each virtual fusion image can be obtained in sequence according to the order in which the virtual fusion images are generated. For example, after determining the probability distribution function of the neighborhood where each pixel is located in a virtual fusion image, the computer device switches to the next virtual fusion image and determines the probability distribution function of the neighborhood where each pixel is located in the next virtual fusion image.

[0102] Among them, when determining the probability distribution function of the neighborhood of each pixel in each virtual fusion image, parallel processing is adopted in a way that one thread corresponds to one pixel in multi-threading. In this way, after calculating one virtual fusion image, the next virtual fusion image is switched until all virtual fusion images are calculated. For example, there are 101 virtual fusion images, and the virtual fusion image is 512*512 pixels, corresponding to 512*512 threads. Then, when parallel processing is performed, the pixels at corresponding positions in the 101 virtual fusion images are executed by the same thread. For example, the pixel in the upper left corner of the 101 virtual fusion images is processed by the same thread, and the pixel in the lower right corner of the 101 virtual fusion images is processed by another thread.

[0103] S202 , determining the information entropy of the neighborhood where each pixel of each virtual fused image is located according to the probability distribution function of the neighborhood where each pixel of each virtual fused image is located.

[0104] After the probability distribution function of the neighborhood where each pixel of each virtual fused image is located is determined as above, it is further necessary to determine the information entropy of the neighborhood where each pixel of each virtual fused image is located according to the probability distribution function of the neighborhood where each pixel of each virtual fused image is located.

[0105] The actual calculation process of determining the information entropy of the virtual fused image according to the probability distribution function is described below based on a single pixel because one thread is executed for one pixel. Figure 5 As shown, according to the probability distribution function of the neighborhood where each pixel of each virtual fused image is located, a feasible method for determining the information entropy of the neighborhood where each pixel of each virtual fused image is located includes the following steps:

[0106] S401, for a single pixel of a single virtual fused image, calling a thread corresponding to the position of the pixel to obtain information entropy of the pixel according to a probability distribution function of the pixel.

[0107] According to the probability distribution function of the neighborhood of each pixel, the formula Where m represents the number of pixels in the neighborhood of the pixel. The information entropy of the neighborhood of the pixel is calculated.

[0108] S402 , obtaining information entropy of each pixel in each virtual fused image, and obtaining information entropy of a neighborhood where each pixel in each virtual fused image is located.

[0109] After determining the information entropy of the neighborhood of all pixels in a virtual fusion image, the computer device switches to the next virtual fusion image, and calculates the information entropy of each pixel in each virtual fusion image in parallel by multi-threading, one thread corresponding to one pixel. In this way, after the information entropy of the neighborhood of each pixel in a virtual fusion image is calculated, the next virtual fusion image is switched until all pixels in all virtual fusion images are calculated.

[0110] S203, determining the corresponding weight of the minimum information entropy in the information entropy of the neighborhood of each pixel under different weights in the preset quantity weights as the target weight.

[0111] After obtaining the information entropy of the neighborhood of each pixel in the virtual fusion image, the minimum information entropy among the information entropies of the neighborhood of each pixel under different weights and the corresponding weight in the preset quantity weights are determined as the target weight.

[0112] Each virtual fusion image is initially obtained by fusion using one of the preset number of weights, so after finding the virtual fusion image with the minimum information entropy, the weight used in the fusion of the virtual fusion image is determined, and the weight must be one of the preset number of weights.

[0113] In one embodiment, the process of determining the target weight for each pixel is as follows: Figure 6 In the embodiment shown, in the above S203, the process of determining the corresponding weight of the minimum information entropy in the information entropy of the neighborhood of each pixel under different weights in the preset number of weights as the target weight includes the following steps:

[0114] S501, when respectively obtaining the information entropy of each pixel in each virtual fusion image, compare the information entropy of each pixel in the previous virtual fusion image with the information entropy of the pixel at the same position in the next virtual fusion image, retain the smaller information entropy as the information entropy of the pixel at that position, and finally obtain the minimum information entropy of each pixel under different weights.

[0115] Take 101 virtual fusion images, where the virtual fusion images are 512*512 pixels and correspond to 512*512 threads as an example, the pixels at corresponding positions in the 101 virtual fusion images are all executed by the same thread. For example, the pixels in the upper left corner of the 101 virtual fusion images are all processed by the same thread n. Then for a single thread n, it first calculates the information entropy of the neighborhood where the pixel in the upper left corner of the first virtual fusion image is located, then calculates the information entropy of the neighborhood where the pixel in the upper left corner of the second virtual fusion image is located, and then calculates the information entropy of the neighborhood where the pixel in the upper left corner of the third virtual fusion image is located, ..., until the information entropy of the neighborhood where the pixel in the upper left corner of the 101st virtual fusion image is located is calculated. According to this process, it can be naturally determined that thread n knows the information entropy of the neighborhood of the pixel in the upper left corner of each virtual fused image. Based on this, each time thread n calculates the information entropy of the neighborhood of the pixel in the upper left corner of the virtual fused image, it only retains the smaller information entropy through pairwise comparison. After finally calculating the information entropy of the neighborhood of the pixel in the upper left corner of 101 virtual fused images, the minimum information entropy of the neighborhood of the pixel in the upper left corner can be obtained. For example, if the information entropy of the neighborhood where the upper left corner pixel of the first virtual fusion image is located is smaller than the information entropy of the neighborhood where the upper left corner pixel of the second virtual fusion image is located, the information entropy of the neighborhood where the upper left corner pixel of the first virtual fusion image is located is retained, and the retained information entropy is used for comparison next time. If the information entropy of the neighborhood where the upper left corner pixel of the first virtual fusion image is located is larger than the information entropy of the neighborhood where the upper left corner pixel of the third virtual fusion image is located, the information entropy of the neighborhood where the upper left corner pixel of the third virtual fusion image is retained, and this process is repeated until 101 virtual fusion images are calculated. Finally, thread n retains the minimum information entropy of the neighborhood where the upper left corner pixel of the 101 virtual fusion images is located. According to this process, other threads also retain the information entropy of the neighborhood where the pixels at the corresponding positions are located, and finally obtain the minimum information entropy matrix M of each 512*512 pixel, for example, M=argmin(H(x,y)), where argmin represents the minimum function operation.

[0116] S502, determining a virtual fused image where the minimum information entropy of each pixel is located, and determining the corresponding weights of the preset number used by the virtual fused image in the fusion process as target weights of pixels at corresponding positions in the error image.

[0117] Finally, we get an information entropy matrix M of the neighborhood of 512*512 pixels, and the information entropy of the neighborhood of each pixel is the smallest among the information entropy of the neighborhood of the corresponding position pixel of 101 virtual fusion images. For a single pixel, first determine the virtual fusion image where the pixel is located according to the information entropy of the neighborhood where the pixel is located, and then find out the weight used by the virtual fusion image in the fusion process as the target weight of the pixel at the corresponding position in the error image. In this way, after finding out the target weight of the pixel at the corresponding position of each pixel in the 512*512 pixels in the error image, we can finally get the target weight of each pixel in the error image.

[0118] After obtaining the target weight of each pixel in the error image, the weighted sum of each pixel in the error image and the pixel at the corresponding position in the first corrected image can be calculated according to the target weight of each pixel in the error image. The weighted result obtained is the value of the pixel at the same position in the second corrected image.

[0119] For example, I err represents the error image, I cor1 represents the first corrected image, assuming that the target weight of the pixel (x, y) in the error image is f minweight , then for pixel (x, y), the second corrected image I cor2 It can be expressed as: cor2 (x,y)=f minweight I err (x,y)+(1-f minweight )*I cor1 (x,y).

[0120] In this embodiment, after obtaining the target weight of each pixel in the error image, the target weight of each pixel in the error image is used as the basis, and the weighted sum of each pixel in the error image and the pixels at the corresponding position in the first corrected image is obtained to obtain a second corrected image. The second corrected image can be used to obtain an image after the artifacts of the image to be corrected are corrected. Since the target weight corresponds to the minimum information entropy after virtual fusion of each pixel of the error image and the first corrected image, it is equivalent to that the second corrected image formed by taking the weighted sum of each pixel of the error image obtained by using the target weight and the pixels at the corresponding position in the first corrected image contains the minimum artifacts, so that the artifact correction in the image to be corrected is more accurate.

[0121] like Figure 7 As shown, the embodiment of the present application also provides an artifact correction method, which includes:

[0122] S1, calling a thread among multiple threads to process one pixel, sequentially using one of a preset number of weights to fuse the first corrected image and the error image to obtain a preset number of virtual fused images;

[0123] S2, for a single pixel of a single virtual fusion image, the thread corresponding to the pixel obtains the probability distribution of the pixel in the neighborhood where it is located, and obtains the probability distribution function of the neighborhood where the pixel is located;

[0124] S3, respectively obtaining the probability distribution function of the neighborhood where each pixel in each virtual fusion image is located;

[0125] S4, obtaining information entropy of the neighborhood where each pixel in each virtual fused image is located according to the probability distribution function of the neighborhood where each pixel in each virtual fused image is located;

[0126] S5, when respectively obtaining the information entropy of the neighborhood of each pixel in each virtual fusion image, the information entropy of each pixel in the previous virtual fusion image is compared with the information entropy of the pixel at the same position in the next virtual fusion image, and the smaller information entropy is retained as the information entropy of the pixel at the position, and finally the minimum information entropy of each pixel is obtained;

[0127] S6, determining a virtual fused image where the minimum information entropy of each pixel is located, and determining the corresponding weight of the preset number of virtual fused images used in the fusion process as the target weight of the pixel at the corresponding position of each pixel in the error image;

[0128] S7, obtaining a weighted sum of pixels at corresponding positions in the first corrected image and the error image according to target weights of pixels at corresponding positions in the error image, to obtain a second corrected image;

[0129] S8, obtaining an image after artifact correction of the image to be corrected according to the second corrected image.

[0130] The implementation principles and technical effects of each step in the artifact correction method provided in this embodiment are similar to those in the previous artifact correction method embodiments, and will not be repeated here. Figure 7 The implementation method of each step in the embodiment is only an example, and the implementation method is not limited. The order of each step can be adjusted in actual application, as long as the purpose of each step can be achieved. In addition, it should be noted that in the embodiment of the present application, the calculation process of the local information entropy of the image is accelerated by executing each pixel in parallel. Therefore, in practical applications, the artifact correction for ultrasound images, MR images or images taken by ordinary cameras has an acceleration effect. Therefore, in some scenarios, on the basis of the artifact correction method provided in the embodiment of the present application, the maximum information entropy can be calculated by GPU, and then the pixel gray value can be adjusted to produce an image focusing effect, thereby accelerating the image autofocus and improving the autofocus efficiency.

[0131] It should be understood that although Figure 2-7The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-7 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.

[0132] In one embodiment, Figure 8 As shown, a device for artifact correction is provided, the device comprising:

[0133] A calling module 10 is used to call multiple thread modules 11 to perform correction operations in parallel, and one thread module 11 processes one or more pixels;

[0134] Thread module 11, used for performing correction operation;

[0135] The thread module 11 includes: a fusion unit 111, which is used to fuse the first corrected image and the error image into a preset number of virtual fused images by using a preset number of weights; the first corrected image represents an image corresponding to the projection data of the image to be corrected after removing part or all of the artifact components caused by the interference source, and the error image represents an image corresponding to the projection data of the image to be corrected minus the projection data of the first corrected image for the first time;

[0136] A determination unit 112 is used to obtain, for each weight, the information entropy of the neighborhood where each pixel of each virtual fusion image is located, and determine a target weight for each pixel of the error image according to the information entropy of the neighborhood where each pixel is located under different weights; the target weight is one of a preset number of weights;

[0137] The correction unit 113 is used to fuse the first corrected image and the error image according to the target weight to obtain a second corrected image; the second corrected image is used to obtain an image after the artifact correction of the image to be corrected.

[0138] In one embodiment, the fusion unit 111 is specifically used to sequentially use one of a preset number of weights to fuse the first corrected image and the error image to obtain a preset number of virtual fused images; wherein, each time the first corrected image and the error image are fused, each thread in the multiple threads processes pixels at corresponding positions in the first corrected image and the error image.

[0139] In one embodiment, the determining unit 112 includes:

[0140] A distribution function acquisition subunit is used to acquire a probability distribution function corresponding to a neighborhood where each pixel of each virtual fused image is located;

[0141] An information entropy determination subunit, used to determine the information entropy of the neighborhood where each pixel of each virtual fused image is located according to the probability distribution function of the neighborhood where each pixel of each virtual fused image is located;

[0142] The weight determination subunit is used to determine the corresponding weight of the minimum information entropy in the information entropy of the neighborhood of each pixel under different weights in the preset number of weights as the target weight.

[0143] In one embodiment, the distribution function acquisition subunit is specifically used to call the thread corresponding to the position of a single pixel of a single virtual fused image to obtain the probability distribution of the pixel in the neighborhood where the pixel is located, and obtain the probability distribution function of the pixel; obtain the probability distribution function of each pixel in each virtual fused image respectively, and obtain the probability distribution function of the neighborhood where each pixel of each virtual fused image is located.

[0144] In one embodiment, the above-mentioned information entropy determination subunit is specifically used to call the thread corresponding to the position of a single pixel of a single virtual fused image according to the probability distribution function of the pixel to obtain the information entropy of the pixel; obtain the information entropy of each pixel in each virtual fused image respectively, and obtain the information entropy of the neighborhood of each pixel in each virtual fused image.

[0145] In one embodiment, the weight determination subunit is specifically used to compare the information entropy of each pixel in the previous virtual fusion image with the information entropy of the pixel at the same position in the next virtual fusion image when respectively obtaining the information entropy of each pixel in each virtual fusion image, retain the smaller information entropy as the information entropy of the pixel at that position, and finally obtain the minimum information entropy of each pixel under different weights; determine the virtual fusion image where the minimum information entropy of each pixel is located, and determine the corresponding weight in the preset number used by the virtual fusion image in the fusion process as the target weight of the pixel at the corresponding position in the error image.

[0146] In one embodiment, the correction unit 113 is specifically configured to obtain a weighted sum of pixels at corresponding positions in the first corrected image and the error image according to a target weight of each pixel in the error image, so as to obtain a second corrected image.

[0147] In one embodiment, the number of the threads is equal to or greater than the number of pixels included in the error image, and the multiple threads simultaneously determine target weights for corresponding pixels.

[0148] In one embodiment, the number of the threads is smaller than the number of pixels included in the error image, and at least one thread determines target weights for at least two pixels.

[0149] In one embodiment, the apparatus further comprises:

[0150] A segmentation module, used for segmenting a high-frequency image portion of the image to be corrected and a low-frequency image portion of the second corrected image;

[0151] The acquisition module is used to fuse the high-frequency image and the low-frequency image to obtain a third corrected image, where the third corrected image is an image after artifacts of the image to be corrected are corrected.

[0152] For the specific definition of the artifact correction device, please refer to the definition of the artifact correction method above, which will not be repeated here. Each module in the above-mentioned artifact correction device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0153] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig. 9 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, an artifact correction method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0154] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0155] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0156] Call multiple threads to perform correction operations in parallel, and one thread processes one or more pixels;

[0157] The correction operation includes: using a preset number of weights to fuse the first correction image and the error image into a preset number of virtual fused images; the first correction image represents an image corresponding to the projection data of the image to be corrected after removing part or all of the artifact components caused by the interference source, and the error image represents an image corresponding to the projection data of the image to be corrected minus the projection data of the first correction image for the first time;

[0158] For each weight, the information entropy of the neighborhood of each pixel of each virtual fusion image is obtained, and a target weight is determined for each pixel of the error image according to the information entropy of the neighborhood of each pixel under different weights; the target weight is one of the preset number of weights;

[0159] The first corrected image and the error image are fused according to the target weight to obtain a second corrected image; the second corrected image is used to obtain an image after the artifact correction of the image to be corrected.

[0160] The above embodiment provides a computer device, whose implementation principle and technical effect are similar to those of the above method embodiment, and will not be repeated here.

[0161] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0162] Call multiple threads to perform correction operations in parallel, and one thread processes one or more pixels;

[0163] The correction operation includes: using a preset number of weights to fuse the first correction image and the error image into a preset number of virtual fused images; the first correction image represents an image corresponding to the projection data of the image to be corrected after removing part or all of the artifact components caused by the interference source, and the error image represents an image corresponding to the projection data of the image to be corrected minus the projection data of the first correction image for the first time;

[0164] For each weight, the information entropy of the neighborhood of each pixel of each virtual fusion image is obtained, and a target weight is determined for each pixel of the error image according to the information entropy of the neighborhood of each pixel under different weights; the target weight is one of the preset number of weights;

[0165] The first corrected image and the error image are fused according to the target weight to obtain a second corrected image; the second corrected image is used to obtain an image after the artifact correction of the image to be corrected.

[0166] The above embodiment provides a computer-readable storage medium, whose implementation principle and technical effect are similar to those of the above method embodiment, and will not be repeated here.

[0167] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0168] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0169] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A method for artifact correction, characterized in that: The method comprises: Call multiple threads to perform correction operations in parallel, and one thread processes one or more pixels; The correction operation includes: Use the preset number of weights through the formula (1-f Weight )*I cor1 +f Weight *I err The first corrected image and the error image are fused into the preset number of virtual fused images, where f Weight represents each weight in the preset number of weights, I cor1 represents the first corrected image, I err represents the error image; the first corrected image represents the image corresponding to the projection data of the image to be corrected after removing part or all of the artifact components caused by the interference source, and the error image represents the image corresponding to the projection data of the image to be corrected minus the projection data of the first corrected image for the first time; For each weight, the information entropy of the neighborhood of each pixel of each virtual fused image is obtained, and for each pixel, the corresponding weight of the minimum information entropy in the neighborhood of the pixel under different weights in the preset number of weights is determined as the target weight of the pixel; According to the target weight, formula I cor2 (x,y)=f minweight I err (x,y)+(1-f minweight )*I cor1 (x, y) The first corrected image and the error image are fused to obtain a second corrected image; wherein, I err (x, y) represents the value of the pixel (x, y) in the error image, I cor1 (x, y) represents the value of the pixel (x, y) in the first corrected image, and f minweight represents the target weight of the pixel (x, y) in the error image, I cor2 (x, y) represents the value of the pixel (x, y) in the second corrected image; the second corrected image is used to obtain the image after the artifact correction of the image to be corrected; The preset number of weights is obtained by dividing 0 to 1 at preset intervals.

2. The method according to claim 1, characterized in that The preset number of weights is used by formula (1-f Weight )*I cor1 +f Weight *I err Fusing the first corrected image and the error image into the preset number of virtual fused images, comprising: One of the preset number of weights is used in turn, and the formula (1-f Weight )*I cor1 +f Weight *I err Fusing the first corrected image and the error image to obtain the preset number of virtual fused images; Wherein, each time the first corrected image and the error image are fused, each thread in the multiple threads processes pixels at corresponding positions in the first corrected image and the error image.

3. The method according to claim 2, characterized in that The obtaining of information entropy of a neighborhood of each pixel of each virtual fused image includes: Obtaining a probability distribution function corresponding to a neighborhood where each pixel of each virtual fused image is located; The information entropy of the neighborhood where each pixel of each virtual fused image is located is determined according to the probability distribution function of the neighborhood where each pixel of each virtual fused image is located.

4. The method according to claim 1, characterized in that The target weight is calculated by formula I cor2 (x,y)=f minweight I err (x,y)+(1-f minweight )*I cor1 (x, y) fusing the first corrected image and the error image to obtain a second corrected image, comprising: According to the target weight of each pixel in the error image, the formula I cor2 (x,y)=f minweight I err (x,y)+(1-f minweight )*I cor1 (x, y) obtains the weighted sum of pixels at corresponding positions in the first corrected image and the error image to obtain the second corrected image.

5. The method according to claim 1, characterized in that: The number of the threads is equal to or greater than the number of pixels included in the error image, and the plurality of threads simultaneously determine target weights for corresponding pixels.

6. The method according to claim 1, characterized in that The number of the threads is smaller than the number of pixels included in the error image, and at least one thread determines target weights for at least two pixels.

7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: Segmenting a high-frequency portion image of the image to be corrected and a low-frequency portion image of the second corrected image; The high-frequency partial image and the low-frequency partial image are fused to obtain a third corrected image, where the third corrected image is an image after artifacts of the image to be corrected are corrected.

8. An artifact correction device, characterized in that: The device comprises: A calling module, used for calling multiple thread modules to perform correction operations in parallel, and one thread module processes one or more pixels; The thread module is used to perform the correction operation; The thread module includes: The fusion unit is used to combine the preset number of weights through the formula (1-f Weight )*I cor1 +f Weight *I err The first corrected image and the error image are fused into the preset number of virtual fused images, where f Weight represents each weight in the preset number of weights, I cor1 represents the first corrected image, I err represents the error image; the first corrected image represents the image corresponding to the projection data of the image to be corrected after removing part or all of the artifact components caused by the interference source, and the error image represents the image corresponding to the projection data of the image to be corrected minus the projection data of the first corrected image for the first time; A determination unit, configured to obtain, for each weight, the information entropy of the neighborhood of each pixel of each virtual fused image, and, for each pixel, determine the corresponding weight of the minimum information entropy in the preset number of weights among the information entropies of the neighborhood of the pixel under different weights as the target weight of the pixel; A correction unit is used to correct the target weight by formula I cor2 (x,y)=f minweight I err (x,y)+(1-f minweight )*I cor1 (x, y) The first corrected image and the error image are fused to obtain a second corrected image; wherein, I err (x, y) represents the value of the pixel (x, y) in the error image, I cor1 (x, y) represents the value of the pixel (x, y) in the first corrected image, and f minweight represents the target weight of the pixel (x, y) in the error image, I cor2 (x, y) represents the value of the pixel (x, y) in the second corrected image; the second corrected image is used to obtain the image after the artifact correction of the image to be corrected; The preset number of weights is obtained by dividing 0 to 1 at preset intervals.

9. A method for artifact correction, characterized in that: The method comprises: Calling multiple threads to perform correction operations in parallel, and one thread processes one or more projection data; The correction operation includes: Acquire projection data of CT scans; Removing at least a portion of the artifact component caused by the interference source from the projection data of the CT scan to generate first correction projection data; and subtracting the first correction projection data from the projection data of the CT scan to generate projection data of an error image; For each data point of the projection data of the error image and the data point at the corresponding position in the first correction projection data, a preset number of weights are applied, and the formula f weight I err (x,y)+(1-f weight )*I cor1 (x, y) to obtain the preset number of fusion data points; where f weight represents each weight in the preset number of weights, I cor1 (x, y) is the data point at position (x, y) in the first correction projection data, I err (x, y) is the data point at position (x, y) in the projection data of the error image; For each fused data point, respectively calculate the information entropy of the neighborhood where the fused data point is located; According to the information entropy of the neighborhood where each fused data point is located, a target weight is determined for each data point of the projection data of the error image; the target weight of each data point of the projection data of the error image is the corresponding weight in the preset number of weights of the minimum information entropy among the information entropies of the neighborhood where the fused data point is located at the position of the data point under different weights; Using the target weight through formula I cor2 (x,y)=f minweight I err (x,y)+(1-f minweight )*I cor1 (x, y) The first correction projection data and the projection data of the error image are fused to obtain a plurality of synthetic data points, and the plurality of synthetic data points constitute the projection data of the second correction image, wherein I cor2 (x,y) is the synthetic data point at position (x,y), f minweight represents the target weight of the data point at position (x, y) in the projection data of the error image, I cor1 (x, y) is the data point at position (x, y) in the first correction projection data, I err (x, y) is the data point at position (x, y) in the projection data of the error image; The preset number of weights is obtained by dividing 0 to 1 at preset intervals.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 or 9 are implemented.

Citation Information

Patent Citations

  • Computer tomography (CT) parallel reconstructing system and imaging method thereof

    CN101596113A

  • Computer tomography imaging pseudo shadow correction method and device

    CN105528800A