An adaptive sampling rate based anti-aliasing processing method for reconstructed images

CN121707861BActive Publication Date: 2026-09-11BEIJING HANGXING MACHINERY MFG CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511910724.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-17
Publication Date
2026-09-11
Estimated Expiration
2045-12-17

AI Technical Summary

Technical Problem

[0006]鉴于上述的分析,本发明实施例旨在提供一种基于自适应采样率的重建图像抗锯齿处理方法,用以解决现有针对CT重建图像的抗锯齿的处理方法效果差的问题

Benefits of technology

[0049] 1. The image to be processed is divided into a replacement image region and a retention image region by using a preset gradient threshold and a preset Sobel operator. The pixel value of each pixel in the replacement image region is updated according to the adaptive sampling rate and the image to be processed, while the pixel value of the pixels in the retention image region remains unchanged. This not only preserves the original image information in non-edge areas, but also accurately eliminates jagged artifacts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121707861B_ABST
    Figure CN121707861B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of based on adaptive sampling rate's reconstruction image anti-jaggy processing method, belong to CT reconstruction image processing technical field, solve the effect of the poor problem of the anti-jaggy processing method for CT reconstruction image.The reconstruction image anti-jaggy processing method includes: the pre-processing of reconstruction image, obtains the image to be processed;Based on preset gradient threshold and preset Sobel operator, the edge extraction of image to be processed is carried out, and image to be processed is divided into image area to be replaced and reserved image area;Based on the horizontal direction edge pixel connection quantity and vertical direction edge pixel connection quantity of all jaggy vertex pixels in image to be processed, determine adaptive sampling rate;Based on adaptive sampling rate and image to be processed, determine the pixel value of each pixel in image area to be replaced, obtain after replacement image area;After replacement image area and reserved image area are combined, obtain after anti-jaggy processing image.The effect of CT reconstruction image anti-jaggy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of CT reconstruction image processing technology, and in particular to an anti-aliasing processing method for reconstructed images based on adaptive sampling rate. Background Technology

[0002] Computed Tomography (CT) technology, with its core advantage of non-invasively acquiring the fine internal structure of objects, has become a key imaging method in fields such as industrial non-destructive testing and medical diagnosis.

[0003] In spiral CT scanning scenarios, excessively fast workpiece movement can easily lead to jagged artifacts in the reconstructed slice images. These jagged artifacts can severely interfere with the identification and analysis of workpiece structural details, hindering subsequent high-precision applications such as defect detection and dimensional measurement.

[0004] Traditional anti-aliasing methods mainly fall into two categories: one is post-processing-based image smoothing techniques, such as Gaussian filtering and bilateral filtering. While these methods can alleviate jagged edges, they often come at the cost of sacrificing edge sharpness and detail. The other is super-resolution-based methods, such as interpolation-based upsampling post-processing, which have high computational complexity and are difficult to adapt to the jagged edge characteristics of different scenarios. In recent years, deep learning-based anti-aliasing methods have gradually emerged, but they rely on large amounts of labeled data and have limited model generalization ability, making them unsuitable for industrial scenarios with high real-time requirements or scarce data.

[0005] Therefore, there is an urgent need for a new technical solution for processing CT reconstructed images with jagged edges. Summary of the Invention

[0006] Based on the above analysis, the present invention aims to provide an anti-aliasing processing method for reconstructed images based on adaptive sampling rate, in order to solve the problem of poor performance of existing anti-aliasing processing methods for CT reconstructed images.

[0007] This invention provides an anti-aliasing method for reconstructed images based on adaptive sampling rate, the method comprising:

[0008] The reconstructed image is preprocessed to obtain the image to be processed;

[0009] Edge extraction is performed on the image to be processed based on a preset gradient threshold and a preset Sobel operator, and the image to be processed is divided into a region to be replaced and a region to be retained.

[0010] The adaptive sampling rate is determined based on the number of horizontal and vertical edge pixel connections of all jagged vertex pixels in the image to be processed.

[0011] The pixel value of each pixel in the image region to be replaced is determined based on the adaptive sampling rate and the image to be processed, and the image region after replacement is obtained.

[0012] The replaced image region and the retained image region are combined to obtain the anti-aliased image.

[0013] A further improvement to the above-mentioned image antialiasing processing method includes determining the adaptive sampling rate based on the number of horizontal and vertical edge pixel connections of all jagged vertex pixels in the image to be processed, comprising:

[0014] The image to be processed is subjected to contrast-limited adaptive histogram equalization and Gaussian blur noise reduction to obtain an image with enhanced edge contrast.

[0015] The image for enhancing edge contrast is segmented into a binary mask image of the workpiece region and the background region based on the maximum inter-class variance method. Multiple first edge pixels in the image for enhancing edge contrast are then determined based on the binary mask image.

[0016] Based on multiple first edge pixels in the enhanced edge contrast image, the broken edge pixels are completed using a morphological closing operation algorithm to obtain multiple second edge pixels;

[0017] Determine the mode of the number of horizontal edge pixel connections and the mode of the number of vertical edge pixel connections for all jagged vertex pixels based on multiple second edge pixels;

[0018] The average of the mode of the number of horizontal edge pixel connections and the mode of the number of vertical edge pixel connections of all jagged vertex pixels is used as the adaptive sampling rate.

[0019] A further improvement to the above-mentioned image anti-aliasing processing method includes determining the mode of the number of horizontal edge pixel connections and the mode of the number of vertical edge pixel connections for all jagged vertex pixels based on multiple second edge pixels, comprising:

[0020] Iterate through multiple second edge pixels to determine the number of horizontal and vertical edge pixel connections for each second edge pixel.

[0021] Multiple second edge pixels are filtered based on the number of horizontal and vertical edge pixel connections for each second edge pixel to obtain multiple jagged vertex pixels;

[0022] Determine the mode of the number of horizontal edge pixel connections and the mode of the number of vertical edge pixel connections for all jagged vertex pixels based on multiple jagged vertex pixels.

[0023] Based on the further improvement of the above-mentioned image anti-aliasing processing method, the step of filtering multiple second edge pixels according to the number of horizontal edge pixel connections and the number of vertical edge pixel connections for each second edge pixel includes:

[0024] Determine the ratio of the number of horizontally connected edge pixels to the number of vertically connected edge pixels for each second edge pixel;

[0025] Determine whether the ratio of edge pixel counts is within the preset aliasing ratio range; if the ratio of edge pixel counts is within the aliasing ratio range, then the second edge pixel is taken as the aliasing vertex pixel.

[0026] A further improvement to the above-mentioned image anti-aliasing processing method, the step of determining the pixel value of each pixel in the image region to be replaced based on the adaptive sampling rate and the image to be processed, to obtain the replaced image region, includes:

[0027] The image to be processed is downsampled according to the adaptive sampling rate to obtain a downsampled image;

[0028] The downsampled image is anti-aliased to obtain the anti-aliased downsampled image.

[0029] The replacement image is obtained by upsampling the downsampled image after anti-aliasing based on the adaptive sampling rate;

[0030] Replace the pixel value of each pixel in the image region to be replaced with the pixel value of the same pixel in the replacement image to obtain the replaced image region.

[0031] Based on a further improvement to the above-mentioned anti-aliasing processing method for reconstructed images, the step of performing anti-aliasing processing on the downsampled image to obtain an anti-aliased downsampled image includes:

[0032] Based on the preset filter box and the preset pixel value difference threshold, each pixel in the downsampled image is traversed to determine multiple pixels to be mixed and multiple pixels to be retained in the downsampled image.

[0033] Determine the horizontal and vertical pixel value gradients for each pixel to be blended, and select the direction with the larger pixel value gradient as the blending direction for each pixel to be blended;

[0034] The pixel value of each pixel to be mixed after anti-aliasing is determined based on two pixels in the fusion direction of each pixel to be mixed;

[0035] The multiple retained pixels and the multiple pixels to be mixed after anti-aliasing are combined to obtain the downsampled image after anti-aliasing.

[0036] Based on the further improvement of the above-mentioned reconstructed image antialiasing processing method, the step of traversing each pixel in the downsampled image according to a preset filtering box and a preset pixel value difference threshold to determine multiple pixels to be mixed and multiple pixels to be retained in the downsampled image includes:

[0037] Using each pixel in the downsampled image as the center of a preset filter box, calculate the difference between the maximum and minimum pixel values ​​within the preset filter box;

[0038] Determine if the difference between the maximum and minimum pixel values ​​is greater than a preset pixel value difference threshold; if the difference is greater than the preset pixel value difference threshold, then the pixel is selected as the pixel to be mixed; otherwise, the pixel is selected as the reserved pixel.

[0039] Based on the further improvement of the above-mentioned anti-aliasing processing method for reconstructed images, the pixel value of each pixel to be mixed after anti-aliasing is calculated using the following formula:

[0040]

[0041] Where P represents the pixel value of each pixel to be blended, P' represents the pixel value of each pixel to be blended after anti-aliasing, and P1 and P2 represent two pixels in the fusion direction of each pixel to be blended.

[0042] Based on a further improvement to the above-mentioned anti-aliasing processing method for reconstructed images, the step of upsampling the downsampled image after anti-aliasing according to an adaptive sampling rate to obtain a replacement image includes:

[0043] Determine the replacement pixel for each pixel in the replacement image in the downsampled image after antialiasing;

[0044] The pixel value of each pixel in the replacement image is determined based on the replacement pixel and the four surrounding integer coordinate pixels.

[0045] Based on the further improvement of the above-mentioned image antialiasing processing method, the step of edge extraction of the image to be processed based on a preset gradient threshold and a preset Sobel operator, segmenting the image to be processed into a region to be replaced and a region to be retained, includes:

[0046] The gradient intensity of each pixel in the image to be processed is calculated based on the preset Sobel operator;

[0047] Determine whether the gradient intensity of each pixel in the image to be processed is greater than a preset gradient threshold; if the gradient intensity of each pixel in the image to be processed is greater than the preset gradient threshold, then the pixel is used as a pixel in the image region to be replaced; otherwise, the pixel is used as a pixel in the image region to be retained.

[0048] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects:

[0049] 1. The image to be processed is divided into a replacement image region and a retention image region by using a preset gradient threshold and a preset Sobel operator. The pixel value of each pixel in the replacement image region is updated according to the adaptive sampling rate and the image to be processed, while the pixel value of the pixels in the retention image region remains unchanged. This not only preserves the original image information in non-edge areas, but also accurately eliminates jagged artifacts.

[0050] 2. By determining the adaptive sampling rate based on the image to be processed, large-sized jagged edges can be more accurately converted into pixel-level jagged edges, resulting in a replacement image area with better anti-aliasing effect, and finally obtaining an image with better anti-aliasing effect.

[0051] 3. The image to be processed is downsampled according to the adaptive sampling rate to convert large-sized jagged edges into pixel-level jagged edges to obtain a downsampled image. Anti-aliasing is then performed on the downsampled image to obtain an anti-aliased downsampled image. The anti-aliased downsampled image is then upsampled according to the adaptive sampling rate to obtain a replacement image. This eliminates the need for multiple iterations for large-sized jagged edges, improving processing efficiency several times over compared to traditional iterative schemes. This significantly saves computing resources and time costs, avoiding information loss due to overprocessing and maximizing the preservation of the original image details.

[0052] In this invention, the above-described technical solutions can be combined with each other to achieve more preferred combinations. Other features and advantages of this invention will be set forth in the following description, and some advantages may become apparent from the description or be learned by practicing the invention. The objects and other advantages of this invention can be realized and obtained from what is particularly pointed out in the description and drawings. Attached Figure Description

[0053] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts.

[0054] Figure 1 A flowchart illustrating an anti-aliasing method for reconstructed images based on adaptive sampling rate, provided in an embodiment of the present invention;

[0055] Figure 2 A schematic diagram of a CT reconstruction image provided in an embodiment of the present invention;

[0056] Figure 3 This is a schematic diagram of the image region to be replaced and the image region to be retained, provided in an embodiment of the present invention;

[0057] Figure 4A schematic diagram of a downsampled image provided in an embodiment of the present invention;

[0058] Figure 5 This is a schematic diagram of an image after anti-aliasing processing, provided in an embodiment of the present invention. Detailed Implementation

[0059] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.

[0060] A specific embodiment of the present invention discloses an anti-aliasing processing method for reconstructed images based on adaptive sampling rate, such as... Figure 1 As shown, the reconstructed image anti-aliasing processing method includes:

[0061] Step S1: Preprocess the reconstructed image to obtain the image to be processed;

[0062] Step S2: Based on the preset gradient threshold and the preset Sobel operator, perform edge extraction on the image to be processed, and segment the image to be processed into the image region to be replaced and the image region to be retained;

[0063] Step S3: Determine the adaptive sampling rate based on the number of horizontal and vertical edge pixel connections of all jagged vertex pixels in the image to be processed;

[0064] Step S4: Determine the pixel value of each pixel in the image region to be replaced based on the adaptive sampling rate and the image to be processed, and obtain the replaced image region;

[0065] Step S5: Combine the replaced image region and the retained image region to obtain the anti-aliased image.

[0066] Specifically, in spiral CT scanning scenarios, excessively fast workpiece movement can easily lead to jagged artifacts in the CT reconstructed images, such as... Figure 2 As shown, such CT reconstructed images can severely interfere with the identification and analysis of workpiece structural details, hindering subsequent high-precision applications such as defect detection and dimensional measurement.

[0067] Specifically, the present invention provides an anti-aliasing processing method for reconstructed images based on adaptive sampling rate, used for... Figure 2 The CT reconstructed image shown has been anti-aliased, as follows: Figure 1 As shown, in step S1, the CT reconstructed image is preprocessed to obtain the preprocessed image as the image to be processed.

[0068] Preferably, the preprocessing includes one or more of the following processing methods:

[0069] Normalization;

[0070] Noise reduction;

[0071] Geometric transformations.

[0072] Specifically, normalization can standardize the pixel value range of CT reconstructed images, making them conform to a specific statistical distribution, which is beneficial to the stability and accuracy of numerical calculations.

[0073] Specifically, noise reduction can suppress or eliminate random and unnecessary interference signals introduced during the acquisition and transmission of CT reconstructed images, thereby reducing the impact of noise on subsequent processing.

[0074] Specifically, geometric transformations are used to change the shape, position, and viewpoint of each pixel in the CT reconstructed image.

[0075] Specifically, such as Figure 1 As shown, in step S1, the CT reconstructed image is preprocessed to obtain the image to be processed.

[0076] Specifically, such as Figure 1 As shown, in step S2, a gradient threshold and a Sobel operator are preset, and edge extraction is performed on the image to be processed obtained in step S1 based on the gradient threshold and the Sobel operator, dividing the image to be processed into an image region to be replaced and an image region to be retained.

[0077] Preferably, the step of performing edge extraction on the image to be processed based on a preset gradient threshold and a preset Sobel operator, and segmenting the image to be processed into a region to be replaced and a region to be retained, includes:

[0078] The gradient intensity of each pixel in the image to be processed is calculated based on the preset Sobel operator;

[0079] Determine whether the gradient intensity of each pixel in the image to be processed is greater than a preset gradient threshold; if the gradient intensity of each pixel in the image to be processed is greater than the preset gradient threshold, then the pixel is used as a pixel in the image region to be replaced; otherwise, the pixel is used as a pixel in the image region to be retained.

[0080] Specifically, the default Sobel operator uses a 3x3 horizontal operator and a vertical operator.

[0081] Specifically, the preset gradient threshold range is 0.5-0.8. When the gradient threshold is within the range of 0.5-0.8, the final anti-aliasing image effect is quite good.

[0082] Specifically, if more refined anti-aliasing processing is required for a large number of images to be processed in the same batch, a small portion of the images to be processed can be extracted first and the method provided in this embodiment of the invention can be executed. A gradient threshold can be set according to the anti-aliasing effect, and finally, the set gradient threshold can be used to process all the images to be processed.

[0083] Specifically, the gradient intensity of each pixel in the image to be processed is calculated by using preset horizontal Sobel operators and vertical Sobel operators respectively, and then the gradient intensity of the horizontal direction and the gradient intensity of the vertical direction are combined to obtain the gradient intensity of each pixel in the image to be processed.

[0084] Specifically, the gradient intensity of each pixel in the image to be processed is compared with a pre-set gradient threshold to determine the comparison result of each pixel, and each pixel in the image to be processed is classified according to the comparison result.

[0085] Specifically, if the gradient intensity of a pixel in the image to be processed is greater than a preset gradient threshold, then the pixel is used as a pixel in the image region to be replaced, and the pixel value of the pixel is re-determined in step S4.

[0086] Specifically, if the gradient strength of a pixel in the image to be processed is less than or equal to a preset gradient threshold, then that pixel is retained as a pixel in the image region.

[0087] Specifically, such as Figure 3 As shown, the black area represents the image area to be retained, and the pixel values ​​of the pixels in the black area do not need to be changed; the white area represents the image area to be replaced, and the pixel values ​​of the pixels in the white area are re-determined in step S4.

[0088] Specifically, such as Figure 1 As shown, in step S2, the image region to be replaced and the image region to be retained are obtained, and the pixel value of each pixel in the image region to be replaced is determined in step S4.

[0089] Specifically, such as Figure 1 As shown, in step S3, the adaptive sampling rate is determined based on the number of horizontal edge pixel connections and the number of vertical edge pixel connections of all jagged vertex pixels in the image to be processed.

[0090] It is understandable that the jagged vertex pixels are the pixels at the turning edges in the horizontal and vertical directions of the image to be processed.

[0091] It is worth noting that the size of the jagged edges varies in different images to be processed. In step S3, the number of horizontal edge pixel connections and the number of vertical edge pixel connections of all jagged edge vertex pixels in the image to be processed are used to provide an accurate basis for further converting large jagged edges into pixel-level jagged edges.

[0092] Preferably, determining the adaptive sampling rate based on the number of horizontal and vertical edge pixel connections of all jagged vertex pixels in the image to be processed includes:

[0093] The image to be processed is subjected to contrast-limited adaptive histogram equalization and Gaussian blur noise reduction to obtain an image with enhanced edge contrast.

[0094] The image for enhancing edge contrast is segmented into a binary mask image of the workpiece region and the background region based on the maximum inter-class variance method. Multiple first edge pixels in the image for enhancing edge contrast are then determined based on the binary mask image.

[0095] Based on multiple first edge pixels in the enhanced edge contrast image, the broken edge pixels are completed using a morphological closing operation algorithm to obtain multiple second edge pixels;

[0096] Determine the mode of the number of horizontal edge pixel connections and the mode of the number of vertical edge pixel connections for all jagged vertex pixels based on multiple second edge pixels;

[0097] The average of the mode of the number of horizontal edge pixel connections and the mode of the number of vertical edge pixel connections of all jagged vertex pixels is used as the adaptive sampling rate.

[0098] Specifically, in order to improve the distinction between the workpiece and the background in the image to be processed, the image to be processed is subjected to contrast-limited adaptive histogram equalization to enhance the image contrast. The image after contrast-limited adaptive histogram equalization is then subjected to Gaussian blur noise reduction. Finally, the image after Gaussian blur noise reduction is used as the image with enhanced edge contrast.

[0099] Understandably, during the process of limiting contrast adaptive histogram equalization, the contrast limit parameter is set to 2-3. At the same time, 3×3 Gaussian blur is used for noise reduction. The standard deviation range of the Gaussian blur parameter is 0.5-1.0, which can preserve edge details while reducing noise.

[0100] Specifically, the maximum inter-class variance method determines the optimal segmentation threshold by maximizing the inter-class variance between the workpiece and the background. It segments the image with enhanced edge contrast into workpiece region and background region, and performs binarization processing on the workpiece region and background region, where the workpiece region is set as 1 and the background region is set as 0, to obtain the binarized mask image of the workpiece region and background region.

[0101] Specifically, the Sobel operator is used to extract edge pixels from the binarized mask images of the workpiece region and the background region. It can be understood that a fixed gradient intensity threshold of 3 can be set in the binarized image, and pixels with gradient intensities less than 3 are considered edge pixels, resulting in multiple edge pixels, which are then used as multiple first edge pixels.

[0102] It is worth noting that there may be disconnected pixels among the first edge pixels in the enhanced edge contrast image. In order to accurately obtain the edge pixels in the enhanced edge contrast image, a morphological closing operation algorithm is used to complete the image, resulting in more edge pixels in the enhanced edge contrast image, which are then used as multiple second edge pixels in the enhanced edge contrast image.

[0103] Specifically, after identifying multiple second edge pixels in the image with enhanced edge contrast, the mode of the number of horizontal edge pixel connections and the mode of the number of vertical edge pixel connections for all jagged vertex pixels are determined based on the multiple second edge pixels, and the average of the mode of the number of horizontal edge pixel connections and the mode of the number of vertical edge pixel connections for all jagged vertex pixels is used as the adaptive sampling rate.

[0104] Preferably, determining the mode of the number of horizontal edge pixel connections and the mode of the number of vertical edge pixel connections for all jagged vertex pixels based on multiple second edge pixels includes:

[0105] Iterate through multiple second edge pixels to determine the number of horizontal and vertical edge pixel connections for each second edge pixel.

[0106] Multiple second edge pixels are filtered based on the number of horizontal and vertical edge pixel connections for each second edge pixel to obtain multiple jagged vertex pixels;

[0107] Determine the mode of the number of horizontal edge pixel connections and the mode of the number of vertical edge pixel connections for all jagged vertex pixels based on multiple jagged vertex pixels.

[0108] Specifically, the number of horizontal and vertical edge pixel connections for each second edge pixel is counted, and whether the second edge pixel belongs to the jagged vertex pixel is determined based on the number of horizontal and vertical edge pixel connections for each second edge pixel.

[0109] Preferably, the step of filtering multiple second edge pixels based on the number of horizontal edge pixel connections and the number of vertical edge pixel connections for each second edge pixel includes:

[0110] Determine the ratio of the number of horizontally connected edge pixels to the number of vertically connected edge pixels for each second edge pixel;

[0111] Determine whether the ratio of edge pixel counts is within the preset aliasing ratio range; if the ratio of edge pixel counts is within the aliasing ratio range, then the second edge pixel is taken as the aliasing vertex pixel.

[0112] Specifically, the ratio of the number of horizontal edge pixel connections to the number of vertical edge pixel connections for each second edge pixel is calculated.

[0113] It is understood that the adaptive sampling rate in this embodiment of the invention is to convert large-sized jagged edges in the image to be processed into pixel-level jagged edges. The jagged edge ratio is preset to a range of 0.5-2. If the ratio of the number of edge pixels of a second edge pixel is within the range of 0.5-2, then the second edge pixel is used as the vertex pixel of the jagged edge.

[0114] Specifically, such as Figure 1 As shown, in step S4, the pixel value of each pixel in the image region to be replaced is determined based on the determined adaptive sampling rate and the image to be processed.

[0115] Preferably, the step of determining the pixel value of each pixel in the image region to be replaced based on the adaptive sampling rate and the image to be processed, to obtain the replaced image region, includes:

[0116] The image to be processed is downsampled according to the adaptive sampling rate to obtain a downsampled image;

[0117] The downsampled image is anti-aliased to obtain the anti-aliased downsampled image.

[0118] The replacement image is obtained by upsampling the downsampled image after anti-aliasing based on the adaptive sampling rate;

[0119] Replace the pixel value of each pixel in the image region to be replaced with the pixel value of the same pixel in the replacement image to obtain the replaced image region.

[0120] It is worth noting that when processing images from the same batch, since the jagged edges in CT reconstruction images are caused by the excessive speed of the workpiece, the adaptive sampling rate of the images from the same batch can be set to be the same.

[0121] Specifically, by using an adaptive sampling rate to downsample the image to be processed, large-sized jagged edges in the image are converted into pixel-level jagged edges, such as... Figure 4 As shown, this is the low-resolution image after downsampling, which is used as the downsampled image.

[0122] Specifically, for Figure 4 The downsampled image in the image is processed with anti-aliasing to obtain the anti-aliased downsampled image.

[0123] Specifically, when performing anti-aliasing processing on downsampled images, the existing mature Fast Approximate Anti-Aliasing (FXAA) algorithm can be used.

[0124] Preferably, the step of performing anti-aliasing processing on the downsampled image to obtain an anti-aliased downsampled image includes:

[0125] Based on the preset filter box and the preset pixel value difference threshold, each pixel in the downsampled image is traversed to determine multiple pixels to be mixed and multiple pixels to be retained in the downsampled image.

[0126] Determine the horizontal and vertical pixel value gradients for each pixel to be blended, and select the direction with the larger pixel value gradient as the blending direction for each pixel to be blended;

[0127] The pixel value of each pixel to be mixed after anti-aliasing is determined based on two pixels in the fusion direction of each pixel to be mixed;

[0128] The multiple retained pixels and the multiple pixels to be mixed after anti-aliasing are combined to obtain the downsampled image after anti-aliasing.

[0129] Specifically, a filter box and a pixel value difference threshold are preset. Each pixel in the downsampled image is processed according to the filter box and the pixel value difference threshold. Each pixel in the downsampled image is classified as a pixel to be mixed or a pixel to be retained. Finally, all pixels to be mixed are treated as multiple pixels to be mixed in the downsampled image, and all pixels to be retained are treated as multiple pixels to be retained in the downsampled image.

[0130] Preferably, the preset filter box is cross-shaped.

[0131] Specifically, the cross-shaped filter box includes the center pixel, as well as the four pixels above, below, left, and right of the center pixel.

[0132] Preferably, the step of traversing each pixel in the downsampled image according to a preset filter box and a preset pixel value difference threshold to determine multiple pixels to be mixed and multiple pixels to be retained in the downsampled image includes:

[0133] Using each pixel in the downsampled image as the center of a preset filter box, calculate the difference between the maximum and minimum pixel values ​​within the preset filter box;

[0134] Determine if the difference between the maximum and minimum pixel values ​​is greater than a preset pixel value difference threshold; if the difference is greater than the preset pixel value difference threshold, then the pixel is selected as the pixel to be mixed; otherwise, the pixel is selected as the reserved pixel.

[0135] Specifically, each pixel in the downsampled image is used as the center pixel of the preset filter box. The center pixel, as well as the maximum and minimum pixel values ​​among the five pixels above, below, left, and right of the center pixel, are found. The difference between the maximum and minimum pixel values ​​is calculated and used as the difference between the maximum and minimum pixel values ​​in the preset filter box.

[0136] For example, the preset pixel value difference threshold is 0.8.

[0137] Determine whether the difference between the maximum and minimum pixel values ​​is greater than a preset pixel value difference threshold, and classify each pixel based on the determination result.

[0138] If the difference between the maximum and minimum pixel values ​​in the preset filter box corresponding to a pixel is greater than the preset pixel value difference threshold, then the pixel is taken as the pixel to be mixed.

[0139] If the difference between the maximum and minimum pixel values ​​in the preset filter box corresponding to a pixel is less than or equal to the preset pixel value difference threshold, then the pixel is retained.

[0140] Specifically, the horizontal and vertical pixel value gradients of each pixel to be mixed are calculated, and then the magnitudes of the horizontal and vertical pixel value gradients are compared. The direction with the larger pixel value gradient is taken as the fusion direction of the pixel to be mixed.

[0141] Specifically, after determining the fusion direction of the mixed pixels, the two adjacent pixels of the mixed pixel are obtained with the mixed pixel as the center in the fusion direction, and the pixel value of the mixed pixel is re-determined based on the two adjacent pixels and the mixed pixel.

[0142] Preferably, the pixel value of each pixel to be blended after anti-aliasing is calculated using the following formula:

[0143]

[0144] Where P represents the pixel value of each pixel to be blended, P' represents the pixel value of each pixel to be blended after anti-aliasing, and P1 and P2 represent two pixels in the fusion direction of each pixel to be blended.

[0145] Specifically, after determining the mean pixel values ​​of multiple mixed pixels, all mixed pixels and all retained pixels are combined to form the downsampled image after anti-aliasing.

[0146] Specifically, the downsampled image after anti-aliasing is upsampled according to the adaptive sampling rate to obtain the replacement image.

[0147] Preferably, the step of upsampling the downsampled image after antialiasing according to an adaptive sampling rate to obtain a replacement image includes:

[0148] Determine the replacement pixel for each pixel in the replacement image in the downsampled image after antialiasing;

[0149] The pixel value of each pixel in the replacement image is determined based on the replacement pixel and the four surrounding integer coordinate pixels.

[0150] Specifically, the replacement image and the image to be processed are the same size. The downsampled image after anti-aliasing is a low-resolution image. The downsampled image after anti-aliasing is then upsampled to obtain the replacement image.

[0151] Specifically, the replacement pixel in the downsampled image after anti-aliasing is calculated for each pixel in the replacement image.

[0152] Specifically, the replacement pixel in the downsampled image after anti-aliasing is calculated using the following formula:

[0153]

[0154] Where i and j represent the coordinates of each pixel in the replacement image, x and y represent the coordinates of the replacement pixel in the downsampled image after anti-aliasing, and k represents the adaptive sampling rate.

[0155] Specifically, the pixel value of each pixel in the replacement image is determined based on the replacement pixel and the four surrounding integer coordinate pixels.

[0156] Preferably, the pixel value of each pixel in the replacement image is calculated using the following formula:

[0157]

[0158] Where i and j represent the coordinates of each pixel in the replacement image, x and y represent the coordinates of the replacement pixel in the downsampled image after anti-aliasing, and k represents the adaptive sampling rate. This indicates rounding down. This indicates rounding up. p(x,y) represents the pixel value at coordinates x and y in the downsampled image after antialiasing, and p(i,j) represents the pixel value at coordinates i and j in the replacement image.

[0159] Specifically, the pixel values ​​of all pixels in the replaced image are calculated.

[0160] Specifically, at this point, the size of the image formed by the image area to be replaced and the image area to be retained is the same as the size of the replacement image. At this point, the pixel values ​​of all pixels in the image area to be retained remain unchanged. It is only necessary to replace the pixel value of the same pixel in the image area to be replaced with the pixel value of the same pixel in the replacement image.

[0161] Specifically, the pixel value of each pixel in the image region to be replaced is replaced with the pixel value of the same pixel in the replacement image to obtain the replaced image region.

[0162] Specifically, such as Figure 1 As shown, in step S5, the replaced image region and the retained image region are combined to obtain the anti-aliased image.

[0163] Specifically, such as Figure 5 As shown, the anti-aliasing process essentially eliminates all the jagged edges that appeared in the original image.

[0164] It is worth noting that the anti-aliasing processing method for reconstructed images based on adaptive sampling rate provided by the embodiments of the present invention can directly eliminate aliasing in the generated CT reconstructed images, completely solving the pain point that hardware adjustment schemes cannot process existing images, and greatly improving the utilization rate and quality of CT reconstructed image data.

[0165] Compared with existing technologies, the anti-aliasing processing method for reconstructed images based on adaptive sampling rate provided in this invention segments the image to be processed into a replacement image region and a retention image region by using a preset gradient threshold and a preset Sobel operator. The method updates the pixel value of each pixel in the replacement image region according to the adaptive sampling rate and the image to be processed, while keeping the pixel values ​​of the pixels in the retention image region unchanged. This not only preserves the original image information in non-edge areas but also accurately eliminates aliasing artifacts. Furthermore, by determining the adaptive sampling rate based on the image to be processed, it can more accurately convert large-sized aliasing into pixel-level aliasing, resulting in more effective anti-aliasing. The image region with better anti-aliasing effect is replaced, resulting in a better anti-aliased image. At the same time, the image to be processed is downsampled according to the adaptive sampling rate, transforming large-sized jagged edges into pixel-level jagged edges to obtain a downsampled image. Anti-aliasing is then performed on the downsampled image to obtain an anti-aliased downsampled image. Finally, the anti-aliased downsampled image is upsampled according to the adaptive sampling rate to obtain the replacement image. This eliminates the need for multiple iterations for large-sized jagged edges, improving processing efficiency several times over compared to traditional iterative schemes. It significantly saves computing resources and time costs, avoiding information loss due to overprocessing while maximizing the preservation of the original image details.

[0166] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.

[0167] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for anti-aliasing reconstructed images based on adaptive sampling rate, characterized in that, The reconstructed image antialiasing processing method includes: The reconstructed image is preprocessed to obtain the image to be processed; Edge extraction is performed on the image to be processed based on a preset gradient threshold and a preset Sobel operator, and the image to be processed is divided into a region to be replaced and a region to be retained. The adaptive sampling rate is determined based on the number of horizontal and vertical edge pixel connections of all jagged vertex pixels in the image to be processed. The pixel value of each pixel in the image region to be replaced is determined based on the adaptive sampling rate and the image to be processed, and the image region after replacement is obtained. The replaced image region and the retained image region are combined to obtain the anti-aliased image; The process of determining the adaptive sampling rate based on the number of horizontal and vertical edge pixel connections of all jagged vertex pixels in the image to be processed includes: The image to be processed is subjected to contrast-limited adaptive histogram equalization and Gaussian blur noise reduction to obtain an image with enhanced edge contrast. The image for enhancing edge contrast is segmented into a binary mask image of the workpiece region and the background region based on the maximum inter-class variance method. Multiple first edge pixels in the image for enhancing edge contrast are then determined based on the binary mask image. Based on multiple first edge pixels in the enhanced edge contrast image, the broken edge pixels are completed using a morphological closing operation algorithm to obtain multiple second edge pixels; Determining the mode of the number of horizontal and vertical edge pixel connections for all jagged vertex pixels based on multiple second edge pixels specifically includes: traversing multiple second edge pixels to determine the number of horizontal and vertical edge pixel connections for each second edge pixel; filtering the multiple second edge pixels based on the number of horizontal and vertical edge pixel connections for each second edge pixel to obtain multiple jagged vertex pixels; and determining the mode of the number of horizontal and vertical edge pixel connections for all jagged vertex pixels based on the multiple jagged vertex pixels. The filtering of the multiple second edge pixels based on the number of horizontal and vertical edge pixel connections for each second edge pixel includes: determining the ratio of the number of horizontal edge pixel connections to the number of vertical edge pixel connections for each second edge pixel; determining whether the edge pixel ratio is within a preset jaggedness ratio range; and if the edge pixel ratio is within the jaggedness ratio range, then the second edge pixel is considered a jagged vertex pixel. The average of the mode of the number of horizontal edge pixel connections and the mode of the number of vertical edge pixel connections of all jagged vertex pixels is used as the adaptive sampling rate.

2. The method for anti-aliasing of reconstructed images according to claim 1, characterized in that, The process of determining the pixel value of each pixel in the image region to be replaced based on the adaptive sampling rate and the image to be processed, to obtain the replaced image region, includes: The image to be processed is downsampled according to the adaptive sampling rate to obtain a downsampled image; The downsampled image is anti-aliased to obtain the anti-aliased downsampled image. The replacement image is obtained by upsampling the downsampled image after anti-aliasing based on the adaptive sampling rate; Replace the pixel value of each pixel in the image region to be replaced with the pixel value of the same pixel in the replacement image to obtain the replaced image region.

3. The method for anti-aliasing of reconstructed images according to claim 2, characterized in that, The process of performing anti-aliasing processing on the downsampled image to obtain an anti-aliased downsampled image includes: Based on the preset filter box and the preset pixel value difference threshold, each pixel in the downsampled image is traversed to determine multiple pixels to be mixed and multiple pixels to be retained in the downsampled image. Determine the horizontal and vertical pixel value gradients for each pixel to be blended, and select the direction with the larger pixel value gradient as the blending direction for each pixel to be blended; The pixel value of each pixel to be mixed after anti-aliasing is determined based on two pixels in the fusion direction of each pixel to be mixed; The multiple retained pixels and the multiple pixels to be mixed after anti-aliasing are combined to obtain the downsampled image after anti-aliasing.

4. The method for anti-aliasing of reconstructed images according to claim 3, characterized in that, The step of traversing each pixel in the downsampled image according to a preset filter box and a preset pixel value difference threshold to determine multiple pixels to be mixed and multiple pixels to be retained in the downsampled image includes: Using each pixel in the downsampled image as the center of a preset filter box, calculate the difference between the maximum and minimum pixel values ​​within the preset filter box; Determine if the difference between the maximum and minimum pixel values ​​is greater than a preset pixel value difference threshold; if the difference is greater than the preset pixel value difference threshold, then the pixel is selected as the pixel to be mixed; otherwise, the pixel is selected as the reserved pixel.

5. The method for anti-aliasing of reconstructed images according to claim 3, characterized in that, The pixel value of each pixel to be blended after anti-aliasing is calculated using the following formula: ; in, This represents the pixel value of each pixel to be blended. This represents the pixel value of each pixel to be blended after anti-aliasing. and This represents the two pixels in the fusion direction of each pixel to be mixed.

6. The method for anti-aliasing of reconstructed images according to claim 2, characterized in that, The step of upsampling the anti-aliased downsampled image according to the adaptive sampling rate to obtain the replacement image includes: Determine the replacement pixel for each pixel in the replacement image in the downsampled image after antialiasing; The pixel value of each pixel in the replacement image is determined based on the replacement pixel and the four surrounding integer coordinate pixels.

7. The method for anti-aliasing of reconstructed images according to claim 1, characterized in that, The process of edge extraction of the image to be processed based on a preset gradient threshold and a preset Sobel operator, dividing the image to be processed into a region to be replaced and a region to be retained, includes: The gradient intensity of each pixel in the image to be processed is calculated based on the preset Sobel operator; Determine whether the gradient intensity of each pixel in the image to be processed is greater than a preset gradient threshold; if the gradient intensity of each pixel in the image to be processed is greater than the preset gradient threshold, then the pixel is used as a pixel in the image region to be replaced; otherwise, the pixel is used as a pixel in the image region to be retained.

Citation Information

Patent Citations

  • CS (compressed sensing) distributed type based video coding transmission method in WMSN (wireless multimedia sensor network)

    CN104796718A

  • Image processing method and system, and storage medium

    CN111179285A