SART algorithm fast image reconstruction method and system based on Blob primary function
By quickly determining the contribution value of Blob to rays in image processing and optimizing the back projection algorithm, combined with GPU acceleration, the problems of low computing efficiency and memory overflow in the prior art are solved, and efficient and real-time image reconstruction is achieved.
Patent Information
- Application Number
- CN202411843368.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-05-06
AI Technical Summary
There is a lack of methods in the prior art to quickly determine the Blob and calculate the contribution value of the Blob to rays, and the backprojection process relies on a lookup table to cause huge data volume, which may lead to memory overflow, and the parallel acceleration of the orthoprojection and backprojection algorithms is not used to use the GPU.
In the orthoprojection algorithm, the blob through which the ray passes through is quickly determined and its contribution value is calculated; in the back projection algorithm, the ray index passing through each pixel is quickly determined, and the projection value in the orthoprojection algorithm is used for correction; the orthoprojection and back projection algorithms are accelerated, and the projection value of each ray and the pixel value of each pixel are calculated simultaneously through multiple threads.
It improves the computing efficiency of orthoprojection and backprojection algorithms, avoids redundant calculations and memory overflows, meets the requirements of real-time image reconstruction, and significantly improves the speed and accuracy of image reconstruction.
Smart Images

Figure CN119941884A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to, but is not limited to, the field of image processing technologies, and particularly relates to a fast image reconstruction method and system for a SART algorithm based on Blob basis functions. Background Art
[0002] In the prior art, there are related acceleration algorithms for the forward projection algorithm, and a lookup table is used for the calculation of the back projection algorithm, and the GPU is not used to perform parallel acceleration on the forward projection algorithm and the back projection algorithm. As Figure 5 shown, in the prior art, after determining the first pixel point, the next pixel point to be traversed is selected by comparing the calculated values of r and q. If r >= q, point Q is selected; if r < q, point R is selected. For Figure 2 the first quadrant, that is, whether to select M1 or M2. Let D1(x1, y1) be the starting point of the ray and D2(x2, y2) be the ending point of the ray, and the following formula can be used for calculation:
[0003]
[0004]
[0005] According to the calculation results of the above formula, the sequence of traversed pixel points can be obtained. By traversing the pixels not exceeding the Blob radius upward and downward for the traversed pixel points respectively, the ray can pass through all Blobs for positioning. Figure 2 is the calculation process when the ray passes through the first quadrant, and the calculations for other quadrants can be performed according to Table 1 below,
[0006] Table 1
[0007]
[0008] Different discrimination criteria are respectively executed according to the calculations of the coordinates of the starting point and the ending point of the ray to complete the entire traversal process. Figure 3 are the advancing directions of M1 and M2 in different quadrants, that is, the directions of traversing pixels.
[0009] As Figure 4As shown, in the prior art, there is no fast algorithm for calculating the distance from the center of the Blob to the ray. Therefore, when determining the contribution value of each Blob to the ray, it is necessary to call the function for calculating the weight to obtain the distance from the center of the Blob to the ray. The specific contribution value can be obtained based on this distance. In the previous technology, there is no fast algorithm for back projection. Instead, a lookup table is used to store the contribution value of each Blob to the ray, as well as the coordinates of the pixels of the Blob that the ray passes through. This has a huge disadvantage, that is, if the amount of pixel data of the image is huge, then the amount of data that needs to be stored is also very large, and memory overflow may occur. Therefore, this solution is not the best solution. In addition, in previous technologies, GPUs were not used to accelerate the forward projection and back projection processes based on the Blob basis function. The characteristics of the SART algorithm make it inherently capable of being accelerated by GPUs. Therefore, it is completely feasible to apply CUDA technology to the Blob basis function. As Figure 4 As shown, each ray will pass through several blobs, that is, circles, when passing through the grid. How to determine these blobs and calculate the contribution value of the blobs to the ray becomes a key issue.
[0010] In view of the above analysis, the technical problems that need to be urgently solved in the prior art are: how to determine the Blob and calculate the contribution value of the Blob to the ray, and how to use the projection value of the ray to quickly correct the pixels it passes through. Summary of the invention
[0011] In view of the problems existing in the prior art, the present invention provides a SART algorithm fast image reconstruction method and system based on Blob basis function.
[0012] The present invention is implemented in this way: a SART algorithm fast image reconstruction method based on Blob basis function, comprising the following steps:
[0013] Step 1: In the forward projection algorithm, quickly determine the Blob that the ray passes through and quickly calculate the contribution of the Blob to the ray;
[0014] Step 2: In the back-projection algorithm, the index of the ray passing through each pixel is quickly determined, and the projection value of the ray calculated in the forward projection algorithm is used to correct the pixel through which the ray passes in the reconstructed image;
[0015] Step three, use GPU to accelerate the forward projection algorithm and the back projection algorithm, and use multi-threading to simultaneously calculate the projection value of each ray and the pixel value of each pixel.
[0016] Furthermore, the method for determining all the pixel points that the outgoing ray passes through in step 1 includes:
[0017] The ray moves step by step along the border of the grid, and each time the intersection time of the ray and the nearest image border is calculated to determine whether the ray passes through the pixel unit horizontally or vertically;
[0018] Using integer indexing (i x ,i y ) to represent the position of the grid cell, and update the pixel index that the ray passes through each time, without calculating the exact intersection coordinates or intersection length;
[0019] Determine the direction of the ray, determine the step size and time increment in each direction, and gradually advance the pixel points that the ray passes through.
[0020] Furthermore, in step 1, the distance from the center of the Blob to the ray is quickly calculated
[0021] According to the point to line distance formula:
[0022]
[0023] make
[0024] The numerator |ax0+by0+c| in the formula is the absolute value of substituting point P (x0, y0) into the line equation ax+by+c=0, which represents the algebraic distance from point P to the line. This is the modulus of the normal vector of the line N = (a, b) represents the length of the normal vector of the line. Where B and C represent the change in distance after the horizontal and vertical coordinates change respectively;
[0025] After calculating the distance from the center of the first Blob to the ray, when calculating the distance from the subsequent Blob to the ray, you only need to use distance±B and distance±C to quickly get the distance from each subsequent Blob to the ray, and then query the weight corresponding to the distance to quickly get the contribution value of each Blob to the ray.
[0026] Furthermore, there are two optimization points in the back-projection algorithm in step 2. The first is to avoid calculating pixels that are not involved by rays, and the second is to avoid calculating rays that do not pass through a pixel when correcting a pixel.
[0027] Furthermore, the method for optimizing the first point is: when performing the forward projection algorithm to calculate the contribution of pixels to the ray, the contributing pixels are recorded, and during the back-projection, the calculation is performed directly on the useful pixels to avoid useless calculations;
[0028] The method to optimize the second point is: by calculating the angle between the line connecting the pixel center and the starting point of the ray and the first ray under a calculated angle, the first ray passing through the pixel can be quickly determined to avoid calculating useless rays. During back projection, the contribution value of the pixel to the ray also needs to be calculated. The above-mentioned method of quickly calculating the distance can be used for calculation to speed up the back projection efficiency.
[0029] Furthermore, the forward projection and back-projection algorithms for image reconstruction using Blob basis functions are accelerated using CUDA of the GPU;
[0030] According to the characteristics of the CUDA model, the process of calculating each ray projection data at an angle can be assigned to different threads (the basic unit of kernel execution) of the GPU through the CUDA program, so that they can perform calculations concurrently to improve the speed of forward projection. Similarly, during back projection, the correction task of each pixel can be assigned to different threads to speed up the back projection. By using the CUDA model, NVIDIA's GPU can be used to accelerate various types of computationally intensive tasks, thereby greatly improving the performance of these tasks.
[0031] Another object of the present invention is to provide a SART algorithm fast image reconstruction system based on a Blob basis function and a SART algorithm fast image reconstruction method based on a Blob basis function, comprising:
[0032] Orthographic projection algorithm module, in the orthographic projection algorithm, quickly determine the Blob that passes through and quickly calculate the contribution value of the Blob to the ray;
[0033] The back-projection algorithm module quickly determines the index of the ray passing through each pixel in the back-projection algorithm, and uses the projection value of the ray calculated in the forward projection algorithm to correct the pixels through which the ray passes in the reconstructed image;
[0034] The GPU acceleration algorithm module uses the GPU to accelerate the forward projection algorithm and the back projection algorithm, and uses multi-threading to simultaneously calculate the projection value of each ray and the pixel value of each pixel.
[0035] Another object of the present invention is to provide a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the SART algorithm fast image reconstruction method based on the Blob basis function.
[0036] Another object of the present invention is to provide a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor executes the steps of the SART algorithm fast image reconstruction method based on the Blob basis function.
[0037] Another object of the present invention is to provide an information data processing terminal, which includes the SART algorithm fast image reconstruction system based on Blob basis function.
[0038] In combination with the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solutions to be protected by the present invention are as follows:
[0039] First, in the forward projection algorithm of the present invention, in addition to quickly determining the Blob that has passed through, the contribution value of the Blob to the ray must also be quickly calculated; in the back-projection algorithm, the back-projection process is not performed by using a lookup table, but the ray index that passes through each pixel is quickly determined, and the projection value of the ray calculated in the forward projection algorithm is used to correct the pixels through which the ray passes in the reconstructed image; this involves the problem of how to quickly determine the pixels through which the ray passes, avoid invalid traversal, and improve the efficiency of the algorithm; in terms of GPU acceleration, CUDA programming is used to further accelerate the forward projection process and the back-projection process, and multi-threading is used to simultaneously calculate the projection value of each ray and the pixel value of each pixel.
[0040] In view of the characteristic of directly using the point-to-distance formula when calculating the distance from the center of the pixel to the ray in the orthographic projection algorithm, the distance from the next pixel to the ray that meets the conditions is inferred using the value obtained from the previous calculation, thereby avoiding the method of repeatedly calculating the distance from the pixel to the ray, which is inefficient and has a large number of redundant calculations.
[0041] For the back-projection algorithm: do not use a lookup table for the back-projection process. The lookup table needs to store a large amount of data. In the case of large amounts of data, memory overflow is very likely to occur. Therefore, a corresponding back-projection algorithm process is required. Avoid correcting useless pixels during the back-projection algorithm process, and avoid redundant calculations caused by traversing rays that do not pass through pixels when correcting pixels.
[0042] The GPU is used to accelerate the entire forward projection and back projection process, accelerate it at the hardware level, and improve the reconstruction efficiency.
[0043] Second, the technical solution of the present invention fills the technical gap in the industry at home and abroad:
[0044] The Blob basis function has very good locality and smoothness. In the image reconstruction process, Blob can capture the local features of the image and can smoothly transition to avoid boundary effects or high-frequency noise. The pixel basis function simply regards each pixel in the image as a basic unit, unlike Blob, which can consider local spatial relationships. However, due to the superposition characteristics of the Blob basis function, compared with the pixel basis function, a ray under the Blob basis function involves many more pixels than the pixel basis function. The specific number will vary depending on factors such as the shape, radius, and selection of the Blob center. Therefore, in order to quickly determine the index of the Blob and the contribution value of the Blob to the ray, the forward projection process needs to be optimized. In the back-projection process, the lookup table can be used in the ART algorithm to correct the pixels, because the ART algorithm stores a small amount of data ray by ray, while the SART algorithm uses a lookup table for each angle, which requires the storage of a large amount of data and will cause memory overflow. Therefore, it is necessary to design a fast back-projection algorithm for the SART algorithm. Among the current acceleration solutions for the Blob-based SART algorithm, the main solution is to use GPU for acceleration, because the characteristics of the SART algorithm make it possible to use GPU for acceleration. However, there is a lack of research on the acceleration of the orthographic projection algorithm. There are algorithms for quickly determining the pixel points involved in the ray, but there is no method for quickly calculating the distance from the Blob center to the ray. Calculating the distance from the Blob center to the ray is a very time-consuming part in the orthographic projection algorithm and has very important research value.
[0045] At the same time, in the back-projection algorithm, the existing solutions are also very scarce, and most of the acceleration solutions are for the forward projection process. Since the GPU can be used to accelerate the back-projection process, the improvement of the efficiency of the back-projection algorithm has little impact on the entire reconstruction process, but it will also have an impact. Therefore, the research on the fast back-projection algorithm is also of great research value.
[0046] Third, the technical solutions of the present invention solve the following existing technical problems in industrial applications:
[0047] 1. The problem of low computational efficiency of traditional projection and back-projection:
[0048] In the traditional SART (Simultaneous Algebraic Reconstruction Technique) algorithm, the calculation of forward projection and back projection mainly relies on pixel-by-pixel and ray-by-ray calculation methods. This calculation method is highly complex, especially in high-resolution images and large-scale data processing, which will cause huge calculation overhead and is difficult to meet the needs of real-time applications.
[0049] 2. The interaction calculation between rays and pixels is complex:
[0050] Traditional algorithms need to accurately calculate the intersection of rays and each pixel to obtain the weight value. Due to the complexity of ray paths and pixel distribution, the intersection calculation process is extremely time-consuming, especially when the rays are dense.
[0051] 3. Computational bottlenecks limit the utilization of hardware resources:
[0052] In the conventional SART algorithm, computing tasks cannot be efficiently parallelized, resulting in a waste of computing power of hardware (such as GPU), especially in the processing of high-resolution images and multi-view projection data, where computing resources are used inefficiently.
[0053] 4. The contradiction between accuracy and speed cannot be taken into account:
[0054] In the traditional SART method, the balance between speed and reconstruction accuracy in the image reconstruction process is a long-standing problem. In existing methods, improving speed usually comes at the expense of accuracy, resulting in poor image reconstruction results.
[0055] Significant technical advancements of the present invention:
[0056] 1. Ray weight calculation method based on Blob basis function:
[0057] The present invention uses the local support of the Blob basis function to quickly calculate the contribution of the Blob that the ray passes through to the ray projection in the orthographic projection stage. This method avoids the high complexity calculation problem of calculating the ray intersection pixel by pixel in the traditional method, and greatly improves the calculation efficiency of the orthographic projection.
[0058] 2. Back-projection optimization based on Blob basis function:
[0059] The present invention uses the Blob basis function to reversely trace the ray path, quickly locate the ray index corresponding to each pixel, and correct the reconstructed image in combination with the ray contribution value in the forward projection stage. This method reduces redundant calculations while ensuring the efficiency and accuracy of the back-projection process.
[0060] 3. GPU parallel acceleration algorithm:
[0061] The present invention distributes the main computing tasks in the forward projection and back-projection processes to the GPU multi-threaded architecture for execution, and simultaneously completes the calculation of the projection values of multiple rays and the back-projection values of multiple pixels. Compared with the traditional single-threaded algorithm, the present invention significantly improves the computing speed and meets the requirements of real-time reconstruction.
[0062] 4. Efficient iterative convergence process:
[0063] The present invention updates the image pixel by pixel in each iteration and uses the localization characteristics of the Blob basis function to quickly adjust the reconstruction error. Combining GPU parallel computing with iterative optimization methods, it can quickly converge to the global optimal solution, reduce the reconstruction error, and improve the quality of the reconstructed image.
[0064] 5. Significantly improve the practicality in industrial and medical fields:
[0065] The method of the present invention can significantly improve the efficiency and accuracy of CT (computed tomography) image reconstruction and industrial non-destructive testing, and meet the real-time requirements. For example:
[0066] In medical imaging, real-time high-precision lesion image reconstruction can be achieved to help doctors make quick diagnoses.
[0067] In industrial CT detection, it can be used to detect the internal structure of complex parts in real time and improve industrial production efficiency.
[0068] 6. Comprehensive performance improvement:
[0069] The present invention takes into account both the speed and accuracy of image reconstruction, and realizes the rapid processing of complex and large-scale data. Compared with the traditional SART method, the efficiency is improved several times, and the details and overall accuracy of the reconstructed image are significantly improved, which greatly promotes the practical application of image reconstruction algorithms in various industries.
[0070] In summary, the present invention breaks through the computational bottleneck and precision limitation of traditional technology by introducing Blob basis functions, optimizing the projection and back-projection processes, and combining GPU parallelization acceleration, solves the key technical problems in image reconstruction, and has significant technological progress and broad industrial application value. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Figure 1 It is a flow chart of a fast image reconstruction method of a SART algorithm based on a Blob basis function provided by an embodiment of the present invention;
[0072] Figure 2 This is a schematic diagram of pixel selection that needs to be traversed provided by the prior art;
[0073] Figure 3 It is a schematic diagram of the entire traversal process provided by the prior art;
[0074] Figure 4 It is a schematic diagram of determining the contribution value of each Blob to the ray provided by the prior art;
[0075] Figure 5 It is a schematic diagram of the forward projection algorithm and the back projection algorithm provided by the prior art;
[0076] Figure 6It is a schematic diagram of different threads assigned to a GPU through a CUDA program provided by an embodiment of the present invention;
[0077] Figure 7 It is a system structure diagram of a fast image reconstruction method of a SART algorithm based on a Blob basis function provided by an embodiment of the present invention;
[0078] Figure 8 is an original image provided by an embodiment of the present invention;
[0079] Fig. 9 This is a reconstructed image diagram provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0080] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0081] like Figure 1 As shown, a SART algorithm fast image reconstruction method based on Blob basis function provided by an embodiment of the present invention comprises the following steps:
[0082] S101, in the orthographic projection algorithm, quickly determine the Blob that passes through and quickly calculate the contribution value of the Blob to the ray;
[0083] S102, in the back-projection algorithm, quickly determine the index of the ray passing through each pixel, and use the projection value of the ray calculated in the forward projection algorithm to correct the pixel through which the ray passes in the reconstructed image;
[0084] S103, using a GPU to accelerate the forward projection algorithm and the back projection algorithm, and using multi-threading to simultaneously calculate the projection value of each ray and the pixel value of each pixel.
[0085] The working principle of the SART algorithm fast image reconstruction method based on Blob basis function.
[0086] 1. Application of Blob basis function in the orthographic projection algorithm
[0087] In the orthographic projection stage, the present invention quickly determines the Blob unit that each ray passes through through the Blob basis function. The Blob basis function is a continuous basis function with local support characteristics, which can be used to represent the pixel distribution in the image reconstruction problem. For each ray, the local support of the Blob basis function is used to quickly calculate the geometric intersection and weight contribution value of the Blob unit that the ray passes through. This method effectively reduces the computational complexity of calculating the interaction area between each ray and the pixel in the traditional method, and greatly improves the efficiency of the orthographic projection calculation.
[0088] 2. Back-projection algorithm for corrected projection values
[0089] In the back-projection stage, for each pixel point, the present invention uses the Blob basis function to reversely trace the path of the ray and quickly determine all the ray indices that pass through the pixel. After obtaining the ray index, the corresponding pixel value in the reconstructed image is corrected in combination with the ray projection value calculated in the forward projection stage. The correction process adjusts the pixel value pixel by pixel according to the principle of the SART (Simultaneous Algebraic Reconstruction Technique) algorithm to minimize the error between the reconstructed image and the projection data. This back-projection method based on the Blob basis function significantly improves the efficiency of ray-pixel matching while ensuring the reconstruction accuracy.
[0090] 3. GPU parallel accelerated computing framework
[0091] In order to further improve the reconstruction speed, the present invention uses the high parallel computing power of the GPU (graphics processing unit) to accelerate the forward projection and back projection algorithms. Specifically, the multi-threaded architecture of the GPU is used to simultaneously calculate the projection value of each ray and the back projection value of each pixel. The projection value of each ray and the value update calculation of each pixel are assigned to independent threads for processing. Through efficient thread allocation and memory management, the overall calculation time of the forward projection and back projection stages is greatly reduced, achieving the goal of real-time image reconstruction.
[0092] 4. Iterative optimization and rapid convergence
[0093] Based on the above-mentioned accelerated forward projection and back projection algorithms, the present invention updates the reconstructed image pixel by pixel in each iteration, and the iterative process is gradually optimized according to the update formula of the SART algorithm, so that the image reconstruction error converges quickly. Utilizing the characteristics of the Blob basis function, the data localization processing in the forward projection and back projection process significantly reduces the redundancy of global data calculation. Combined with GPU parallel computing, the present invention can complete the rapid reconstruction of high-resolution images in a shorter time, while ensuring a lower reconstruction error, meeting the needs of real-time medical image processing and industrial CT detection.
[0094] 1. In the positive projection algorithm:
[0095] (1) Background and application scenarios
[0096] In the fields of ray tracing, computer graphics, medical CT imaging, etc., it is often necessary to determine which pixel units a ray passes through in two-dimensional or three-dimensional space. The traditional Siddon algorithm can accurately calculate the intersection points and intersection lengths of the ray and the pixel, but in some scenarios, we only care about the pixel units that the ray passes through, and do not need to accurately calculate the intersection points or intersection lengths.
[0097] By optimizing the Siddon algorithm, redundant calculation logic can be removed and the focus can be placed on the index of the ray passing through the image unit, which significantly improves the running speed of the algorithm.
[0098] (2) Core Idea
[0099] 1. The ray moves step by step along the boundary of the grid, and each time the intersection time of the ray and the nearest image boundary is calculated to determine whether the ray passes through the pixel unit horizontally or vertically.
[0100] 2. Using integer index (i x ,i y ) to represent the position of the grid cell, and the pixel index that the ray passes through is updated each time, without calculating the exact intersection coordinates or intersection length.
[0101] 3. Determine the direction of the ray, determine the step size and time increment in each direction, and gradually advance the pixel points through which the ray passes.
[0102] (3) Algorithm steps
[0103] 1. Preliminary preparation
[0104] Pixel size: dx (width in pixels), dy (height in pixels)
[0105] Grid range: lower left corner coordinate (x min ,y min ) and the number of grid rows and columns (N x ,N y )
[0106] Ray information: starting point coordinates (x0, y0) and end point coordinates (x1, y1)
[0107] 1) Initialization
[0108] Calculation of the pixel index of the starting point: Calculate the pixel point where the starting point is located by grid division:
[0109]
[0110] 2) Determine the direction of the ray: Determine the step length in each direction by comparing the starting point and end point of the ray: Step length in the horizontal direction:
[0111]
[0112] Vertical step size:
[0113]
[0114] 3) Calculate the time increment:
[0115] The time step that a ray passes through a pixel in the x and y directions:
[0116]
[0117] 4) Initialization time: the time required from the starting point of the ray to the nearest image boundary:
[0118] Horizontal direction:
[0119]
[0120] Vertical direction:
[0121]
[0122] 5) Traverse the pixels:
[0123] Through iterative calculation, determine all the pixel units that the ray passes through:
[0124] Step logic:
[0125] If tmax x <tmax y , the ray first passes through the x-direction boundary:
[0126] Update tmax x =tmax x +tΔ x
[0127] Update x =i x +step x
[0128] Otherwise, the ray first crosses the boundary in the y direction:
[0129] Update tmax y =tmax y +tΔ y
[0130] Update y =i y +step y
[0131] 6) Record results: At each step, record the current pixel index (i x ,i y )
[0132] 7) Check the termination condition: whether the ray leaves the image range:
[0133] or
[0134] 8) Traverse upward and downward the length not exceeding the Blob radius through the determined pixel index, thereby determining all the pixels that meet the conditions.
[0135] 2. Quickly calculate the distance from the Blob center to the ray
[0136] According to the point to line distance formula (a, b, c are the parameters of the line equation):
[0137]
[0138] make
[0139] After calculating the distance from the center of the first Blob to the ray, when calculating the distance from the subsequent Blob to the ray, you only need to use distance±B and distance±C to quickly get the distance from each subsequent Blob to the ray, and then query the weight corresponding to the distance to quickly get the contribution value of each Blob to the ray.
[0140] 3. Fast Back-Projection Algorithm
[0141] There are two optimization points in the back-projection algorithm. The first is to avoid calculating pixels that are not involved by rays. The second is to avoid calculating rays that do not pass through a pixel when correcting it.
[0142] The method to optimize the first point is: when calculating the contribution of pixels to the ray using the forward projection algorithm, record the contributing pixels, and directly calculate the useful pixels during the back projection to avoid useless calculations;
[0143] The method to optimize the second point is: by calculating the angle between the line connecting the center of the pixel point and the starting point of the ray and the first ray at an angle, the first ray passing through the pixel can be quickly determined to avoid calculating useless rays. The contribution value of the pixel point to the ray also needs to be calculated during back projection. The above-mentioned method of quickly calculating the distance can be used for calculation to speed up the back projection efficiency.
[0144] 4. Use GPU to accelerate the forward projection algorithm and the back projection algorithm
[0145] Based on the characteristics of the SART reconstruction algorithm, the back projection is performed after the ray projection value of an angle is calculated. Therefore, the projection values of each ray are calculated independently, and the correction of each pixel during the back projection is also independent. Based on this feature, the GPU can be used to accelerate the entire reconstruction process in parallel. Compared with the CPU, the GPU has more cores and can handle a large number of computing tasks at the same time, which makes the GPU very efficient in handling large-scale parallel computing tasks. The CUDA model allows the use of high-level languages such as C and C++ to write GPU programs. The concurrent execution of the program can be achieved by writing the corresponding kernel function of the program, and the organization and communication of threads can also be controlled to optimize performance and resource utilization.
[0146] According to the characteristics of the CUDA model, the process of calculating the projection data of each ray at an angle can be assigned to different threads (the basic unit for executing kernels) of the GPU through the CUDA program. Figure 6 As shown, the calculations can be performed concurrently to speed up the forward projection. Similarly, during the back-projection, the correction task of each pixel can be assigned to different threads to speed up the back-projection. By using the CUDA model, NVIDIA's GPU can be used to accelerate various types of computationally intensive tasks, thereby greatly improving the performance of these tasks.
[0147] like Figure 7 As shown, an embodiment of the present invention provides a SART algorithm fast image reconstruction method based on a Blob basis function and a SART algorithm fast image reconstruction system based on a Blob basis function, comprising:
[0148] Orthographic projection algorithm module, in the orthographic projection algorithm, quickly determine the Blob that passes through and quickly calculate the contribution value of the Blob to the ray;
[0149] Back-projection algorithm module, in the back-projection algorithm, only the projection value of each ray is saved, and the projection value of each ray is used to correct each pixel in the image;
[0150] The GPU acceleration algorithm module uses the GPU to accelerate the forward projection algorithm and the back projection algorithm, and uses multi-threading to simultaneously calculate the projection value of each ray and the pixel value of each pixel.
[0151] Specific application fields of the present invention are:
[0152] Medical imaging: In medical imaging, especially CT scanning, using Blob basis functions for image reconstruction is a very effective method, especially in the case of high noise or low resolution, it can improve the reconstruction quality;
[0153] Remote sensing image processing: In the reconstruction of remote sensing data, Blob basis functions can be used to describe local features in satellite images and help reconstruct terrain details more accurately.
[0154] Computer Vision: Blob basis functions can also be used for image feature extraction and image restoration. Especially when dealing with natural scenes or complex textures, Blobs can be used for image decomposition and reconstruction.
[0155] In the above scenarios where Blob base functions are used, fast algorithms based on Blob base functions need to be applied.
[0156] The technical effects obtained by the embodiments of the present invention are as follows:
[0157] Computed tomography reconstruction relies on the results of X-ray beam measurements at different angles to form an image. At each angle, the measurement is essentially the same as traditional X-ray measurement. The X-ray beam entering the X-ray detector is recorded separately after being attenuated by the Shepp-Logan head model. Assuming that the X-ray photons are monoenergetic, the X-ray intensity measured on both the incident and exit sides of the homogeneous material can be known that the attenuation of X-rays obeys the Lambert-Beers law
[0158] I=I0e -μ·Δx (2)
[0159] In formula (2), I0 is the intensity of the incident X-ray, I is the intensity of the outgoing X-ray, Δx is the thickness, and μ is the linear attenuation coefficient of the material. Usually μ changes with the energy of the X-ray and varies with the selected material. When the object through which the X-ray passes is non-uniform, that is, the object has multiple different attenuation coefficients. The overall attenuation characteristics can be calculated by dividing the object into small units. When the size is small enough, each unit can be approximately regarded as a uniform object. For this non-uniform object, the intensity of the outgoing X-ray can apply the Lambert-Beers law in a cascade form,
[0160]
[0161] Divide both sides of equation (3) by I0 and take the negative natural logarithm. When Δx approaches 0, the above accumulation becomes the integral over the length of the object,
[0162]
[0163] In CT, p is the projection measurement. Equation (4) shows that the ratio of the incident X-ray intensity to the outgoing X-ray intensity, after logarithmic operation, represents the line integral of the attenuation coefficient along the X-ray path. Therefore, the CT image reconstruction problem can be redefined as how to calculate or estimate the distribution of the attenuation coefficient of an object given the measured line integral of the object.
[0164] When calculating the line integral of X-rays passing through an object, one of the important indicators is the choice of basis function. The choice of basis function will greatly affect the results of the reconstruction algorithm. The common choice of basis function is a function with unit value inside the cube or cube and zero outside. However, the resulting approximate density function has undesirable non-smooth edges (piecewise constant function). Therefore, a better basis function should be a function that smoothly transitions from 1 to 0.
[0165] The generalized Kaiser-Bessel function, namely Blob, has the characteristics of spherical symmetry and smooth transition from 1 to 0. Incorporating this basis function into the iterative image reconstruction algorithm can significantly improve the quality of the reconstructed image, and it shows better reconstruction effect than the voxel basis function when the projection data is noisy.
[0166] When using Blob as a basis function for image reconstruction, since the radius of Blob is larger than voxels or pixels, there will be overlap between the various Blobs. It takes a lot of computing time to determine the intersection of X-rays and Blobs, and it also takes a lot of time to calculate the distance from the center point of the Blob to the ray, which increases the complexity of the calculation. Therefore, the present invention proposes a fast reconstruction method, which improves the reconstruction speed from the algorithm level for forward projection and back projection, and further improves the reconstruction efficiency by combining GPU parallel acceleration technology.
[0167] The experimental results show that the fast algorithm of the present invention is significantly better than the recurrence algorithm in terms of computational efficiency, while maintaining consistency in the accuracy of the reconstruction results. The experiment was tested without and with GPU acceleration, and the performance advantage of the fast algorithm was verified by comparing the time of one iteration and the time of twenty iterations.
[0168] Without GPU acceleration, the single iteration time of the recurrence algorithm is 362.778 seconds, while the single iteration time of the fast algorithm is 181.490 seconds. The computational efficiency of the fast algorithm is twice that of the recurrence algorithm, proving that the fast algorithm has shown significant performance improvements in the traditional CPU computing environment.
[0169] Furthermore, using GPU acceleration, the experiment compared the computational performance of a single iteration and twenty iterations. In a single iteration, the time of the recurrence algorithm was reduced to 14.888 seconds, while the fast algorithm only took 9.719 seconds, with a significant improvement in efficiency. In twenty iterations, the total time of the recurrence algorithm was 295.626 seconds, while the fast algorithm was only 193.974 seconds, further verifying the superiority of the fast algorithm. In the fast algorithm, the calculation process was optimized by introducing the back-projection fast algorithm, and this improvement significantly accelerated the overall calculation speed.
[0170] In addition, although the fast algorithm has greatly improved in speed, the quality of its reconstructed image is consistent with the reproduction algorithm, and both can restore the structural features of the original image with high quality. Figure 8 shows the original input image, Fig. 9 The reconstructed images are shown. From the visual comparison, the reconstruction results of the fast algorithm are completely consistent with the reproduction algorithm, ensuring the accuracy and reliability of the algorithm.
[0171] The present invention greatly improves the computational efficiency without affecting the reconstruction accuracy by optimizing the projection and back-projection calculation processes. The fast algorithm is not only applicable to the traditional CPU environment, but also shows significant advantages in the GPU acceleration scenario, making efficient image reconstruction possible. This improvement provides an efficient solution to the computational bottleneck problem in practical applications and has important practical value and technical significance. Since the fast back-projection algorithm is not provided in the reproduction algorithm, the fast back-projection algorithm is applied therein.
[0172] When GPU acceleration is not used:
[0173] Reproduce the results Fast algorithm results One iteration time 362.778s 181.490s
[0174] After using GPU acceleration:
[0175] Reproduce the results Fast algorithm results One iteration time 14.888s 9.719s Twenty iterations 295.626s 193.974s
[0176] The original image is Figure 8 As shown;
[0177] The reconstructed image is Fig. 9 As shown;
[0178] The reproduction results and the reconstruction results of the fast algorithm remain the same, and the fast algorithm is faster than the reproduction results.
[0179] It should be noted that the embodiments of the present invention can be implemented by hardware, software, or a combination of software and hardware. The hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. It can be understood by a person of ordinary skill in the art that the above-mentioned devices and methods can be implemented using computer executable instructions and / or contained in a processor control code, such as a carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. Such code is provided on the carrier medium. The device and its modules of the present invention can be implemented by hardware circuits such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., can also be implemented by software executed by various types of processors, and can also be implemented by a combination of the above-mentioned hardware circuits and software, such as firmware.
[0180] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principle of the present invention should be covered by the protection scope of the present invention.
Claims
1. A fast image reconstruction method based on the SART algorithm of the Blob basis function, characterized in that: The following steps are involved: Step 1: In the forward projection algorithm, quickly determine the Blob that the ray passes through and quickly calculate the contribution of the Blob to the ray; Step 2: In the back-projection algorithm, the index of the ray passing through each pixel is quickly determined, and the projection value of the ray calculated in the forward projection algorithm is used to correct the pixel through which the ray passes in the reconstructed image; Step three, use GPU to accelerate the forward projection algorithm and the back projection algorithm, and use multi-threading to simultaneously calculate the projection value of each ray and the pixel value of each pixel.
2. The SART algorithm fast image reconstruction method based on Blob basis function as claimed in claim 1, characterized in that: The method for determining all the pixel points through which the ray passes in step 1 includes: The ray moves step by step along the border of the grid, and each time the intersection time of the ray and the nearest image border is calculated to determine whether the ray passes through the pixel unit horizontally or vertically; Using integer indexing (i x ,i y ) to represent the position of the grid cell, and update the pixel index that the ray passes through each time, without calculating the exact intersection coordinates or intersection length; Determine the direction of the ray, determine the step size and time increment in each direction, and gradually advance the pixel points that the ray passes through.
3. The SART algorithm fast image reconstruction method based on Blob basis function as claimed in claim 1, characterized in that: In step 1, quickly calculate the distance from the center of the Blob to the ray According to the point to line distance formula: make The numerator |ax0+by0+c| in the formula is the absolute value of substituting point P (x0, y0) into the line equation ax+by+c=0, which represents the algebraic distance from point P to the line. This is the modulus of the normal vector of the line N = (a, b) represents the length of the normal vector of the line. Where B and C represent the change in distance after the horizontal and vertical coordinates change respectively; After calculating the distance from the center of the first Blob to the ray, when calculating the distance from the subsequent Blob to the ray, you only need to use distance±B and distance±C to quickly get the distance from each subsequent Blob to the ray, and then query the weight corresponding to the distance to quickly get the contribution value of each Blob to the ray, where (x0, y0) is the starting point coordinate.
4. The SART algorithm fast image reconstruction method based on Blob basis function as claimed in claim 1, characterized in that: There are two optimization points in the back-projection algorithm in step 2. The first is to avoid calculating pixels that are not involved by rays, and the second is to avoid calculating rays that do not pass through a pixel when correcting a pixel.
5. The SART algorithm fast image reconstruction method based on Blob basis function as claimed in claim 4, characterized in that: The method to optimize the first point is: when calculating the contribution of pixels to the ray using the forward projection algorithm, record the contributing pixels, and directly calculate the useful pixels during the back projection to avoid useless calculations; The method to optimize the second point is: by calculating the angle between the line connecting the center of the pixel point and the starting point of the ray and the first ray at an angle, the first ray passing through the pixel can be quickly determined to avoid calculating useless rays. The contribution value of the pixel point to the ray also needs to be calculated during back projection. The above-mentioned method of quickly calculating the distance can be used for calculation to speed up the back projection efficiency.
6. The SART algorithm fast image reconstruction method based on Blob basis function as claimed in claim 1, characterized in that: Use CUDA of GPU to accelerate the forward projection and back projection algorithms for image reconstruction using Blob basis functions; According to the characteristics of the CUDA model, the process of calculating each ray projection data at an angle can be assigned to different threads of the GPU (the basic unit for executing the kernel) through the CUDA program as shown in the figure, so that they can perform calculations concurrently to improve the speed of forward projection. Similarly, during back projection, the correction task of each pixel can be assigned to different threads to speed up the back projection. By using the CUDA model, NVIDIA's GPU can be used to accelerate various types of computationally intensive tasks, thereby greatly improving the performance of these tasks.
7. A SART algorithm fast image reconstruction system based on Blob basis function according to any one of claims 1 to 6, characterized in that: include: Orthographic projection algorithm module, in the orthographic projection algorithm, quickly determine the Blob that passes through and quickly calculate the contribution value of the Blob to the ray; Back-projection algorithm module, in the back-projection algorithm, only the projection value of each ray is saved, and the projection value of each ray is used to correct the pixels involved in the image; The GPU acceleration algorithm module uses the GPU to accelerate the forward projection algorithm and the back projection algorithm, and uses multi-threading to simultaneously calculate the projection value of each ray and the pixel value of each pixel.
8. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the SART algorithm fast image reconstruction method based on Blob basis function as described in any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to execute the steps of the SART algorithm fast image reconstruction method based on Blob basis function as claimed in any one of claims 1 to 6.
10. An information data processing terminal, characterized in that: The information data processing terminal includes the SART algorithm fast image reconstruction system based on Blob basis function as described in claim 7.