CT image adaptive enhancement method for pneumonia image
By constructing a nonlinear pixel similarity enhancement mechanism and a topological perturbation-guided spatial enhancement module, combined with a structure-aware noise suppression strategy, the problem of adaptive enhancement of lesion areas in pneumonia CT images was solved, achieving clear display of lesion areas and protection of normal tissues, thereby improving the diagnostic value.
Patent Information
- Application Number
- CN202510859476.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2045-06-25
AI Technical Summary
Existing medical image enhancement methods lack structural adaptability in pneumonia CT images and cannot effectively distinguish lesion areas from normal lung tissue, resulting in over-enhancement of clear structures or edge artifacts, and fail to effectively improve diagnostic value.
A nonlinear pixel similarity enhancement mechanism, a topological perturbation-guided spatial enhancement module, and a structure-aware noise suppression strategy were constructed to adaptively enhance pneumonia CT images, restore the details of the lesion area and maintain the stability of normal tissue, combining first-order and second-order enhancement feature fusion and noise suppression processing.
Accurately identify and enhance the fuzzy structure of the lesion area while maintaining the stability of normal tissue, improving the diagnostic reliability and overall readability of the image, and effectively removing artifacts and texture noise.
Smart Images

Figure CN120707428A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of image enhancement, and in particular relates to a CT image adaptive enhancement method for pneumonia images. Background Art
[0002] Pneumonia is a common respiratory disease, and its early screening, diagnosis and efficacy evaluation clinically rely on high-resolution chest CT images. Pneumonia CT images can intuitively present structural changes in the lung lesion area, such as ground-glass shadows, consolidation shadows, and linear shadows, and are an important means of medical image-assisted diagnosis. However, pneumonia lesions often appear in CT images with fuzzy grayscale distribution, unclear structural boundaries, and low contrast. Especially in low-dose scans or mild infections, the lesion area is difficult to distinguish from normal lung tissue, seriously affecting doctors' judgment of the location, extent, and nature of the lesions.
[0003] Existing medical image enhancement methods mostly rely on convolution filtering, histogram equalization, Retinex enhancement, or deep learning models for image enhancement. Although they have achieved certain results in improving overall contrast, they still have the following shortcomings: the enhancement process lacks structural adaptability and cannot perform differentiated processing based on the degree of blur in different regions, which can easily lead to over-enhancement of clear structures or the generation of edge artifacts; enhancement methods often fail to consider the spatial structural coherence within the image and have weak structural modeling capabilities for blurred lesions such as ground-glass shadows. Therefore, there is an urgent need for a CT image enhancement method with structural perception that can adaptively enhance pneumonia lesion areas to achieve effective reconstruction of blurred structures, protect the boundaries of clear areas, and improve the diagnostic value of the overall image. Summary of the Invention
[0004] The present invention provides a CT image adaptive enhancement method for pneumonia images, which aims to achieve adaptive enhancement of pneumonia CT images by constructing a nonlinear pixel similarity enhancement mechanism, a topological perturbation-guided spatial enhancement module, and a structure-aware noise suppression strategy. The method includes the following steps.
[0005] S1. Collect pneumonia CT images and create a pneumonia CT image dataset.
[0006] S2. Perform preliminary feature extraction on the pneumonia image CT image to obtain an initial feature map of the pneumonia image CT image.
[0007] S3. Construct a nonlinear adaptive enhancement strategy, including: calculating the similarity measure between pixels of the initial feature map of the pneumonia CT image, designing the local symmetry perturbation enhancement coefficient, using the nonlinear enhancement relationship, adaptively enhancing through the similarity and difference between pixels, and generating the first-order enhanced feature map of the pneumonia CT image.
[0008] S4. Construct a topological perturbation-guided spatial enhancement module, including: using a sliding window to segment the first-order enhanced feature map of pneumonia CT images, calculating the degree of topological perturbation in each region, constructing a normalized weight tensor and mapping it into a regional enhancement coefficient, upsampling the regional enhancement coefficient to obtain the full-image pixel-level enhancement coefficient, and then enhancing it to obtain the second-order enhanced feature map of pneumonia CT images.
[0009] S5. Perform weighted fusion on the pneumonia image CT first-order enhancement feature map and the second-order enhancement feature map to generate a pneumonia image CT fusion enhancement feature map.
[0010] S6. Construct an edge-guided nonlinear mean noise suppression mechanism, including: calculating the local noise sensitivity of the pneumonia image CT image fusion enhancement feature map, constructing a structure-guided noise suppression coefficient for noise suppression processing, and obtaining the final feature map of the pneumonia image CT image.
[0011] S7. Process the final feature map of the pneumonia image CT image through 3×3 convolution to obtain a pneumonia image CT enhanced image.
[0012] Preferably, in said S2, the input image is a CT image of pneumonia , where H, W and 3 are the height, width and number of channels of the pneumonia image CT image respectively. 3×3 convolution is used to perform preliminary feature extraction on the pneumonia image CT image to obtain the initial feature map of the pneumonia image CT image The specific process is: , in Represents the initial feature map of the pneumonia CT image obtained by 3×3 convolution , H, W, and C are the height, width, and number of channels of the initial feature map of the pneumonia CT image, respectively.
[0013] Preferably, in S3, the input image is an initial feature map of a pneumonia CT image, and a nonlinear adaptive enhancement strategy is constructed, including: S31. Initial feature map of pneumonia CT image Each pixel in , the neighborhood within the 3×3 window Calculate the similarity measure between pixels in The specific process is: , in Represents pixels and pixels The Euclidean distance between the pixels reflects the difference between them. Represents a hyperparameter that controls similarity sensitivity, with a value range of [0.5, 2]. When it is smaller, it means similar pixels and they are nearby. represents the exponential function; S32. Since the normal area in the pneumonia CT image usually has a certain degree of structural symmetry or grayscale distribution balance, while the pneumonia lesions or abnormal areas often break the local symmetric structure, the local symmetry perturbation enhancement coefficient is designed. , when the local asymmetry is greater, the local symmetry perturbation enhancement coefficient is greater, for each pixel , select the neighborhood within its 3×3 window , construct symmetric pixel pairs: , , and , define a set of symmetric pixel pairs , for each symmetric pixel pair , calculate the absolute value of its grayscale difference and average it, then use the Sigmoid function to smoothly map it to (0,1) to obtain the local symmetry perturbation enhancement coefficient The specific process is: , in represents the Sigmoid function, To control the parameter of enhanced sensitivity, the value range is [0,10]. and They represent the initial feature maps of the pneumonia CT image in the symmetrical pixel pairs The pixel value at ; S33, introduce local symmetry perturbation enhancement coefficient , using nonlinear enhancement relationship, adaptive enhancement is performed through similarity and difference between pixels, for each pixel , and its enhanced results The generation process is: , The enhanced pixels Composition of pneumonia CT first-order enhancement feature map The specific process is: , Where N represents the total number of pixels in the first-order enhanced feature map of pneumonia CT images.
[0014] Preferably, in S3, the image features are enhanced by similarity measurement and nonlinear enhancement, which can better restore the details of the missing area and maintain the natural structure of the image. The structural symmetry perturbation degree is introduced to model the features of the abnormal area. Pneumonia lesions (such as ground-glass shadows, consolidation shadows, etc.) often break the local symmetry, which is a reliable and intuitive structural diagnostic feature compared to normal lung CT images. The design of the local symmetry perturbation enhancement coefficient can sensitively detect the degree of local symmetry destruction. In the case of unclear lesion segmentation, enhanced partitioning can still be performed through structural judgment, and the computational cost is relatively low.
[0015] Preferably, in said S4, the input image is a pneumonia image CT first-order enhanced feature map, the pneumonia image CT first-order enhanced feature map is slid by a 2×2 sliding window, and the area obtained each time the window slides is The coordinates of the upper left corner are , the set of boundary pixel pairs contained in the region for: , Calculate the degree of topological disturbance in each region , specifically the sum of the intensity differences between boundary pixels, and the calculation process is: , in represents the Euclidean distance, Indicates area The degree of topological perturbation in the region When the boundaries are consistent and the closed structure is obvious, the degree of topological perturbation Approaching 0, the degree of topological disturbance when the boundary is blurred is a larger value; The normalized weight tensor of each region is constructed based on the degree of topological perturbation of the region. The specific process is: , in To prevent division by 0 for small constants, Indicates the maximum value operation; Mapping normalized weight tensors to region-level enhancement coefficients The specific process is: , in Indicates area The regional enhancement coefficient in To control the nonlinear degree parameter of the enhancement coefficient, the value range is [5,10]. is the Tanh function, used to limit The value range is (0,1); Regional enhancement factor Upsample to obtain the full-image pixel-level enhancement coefficient The specific process is: , in Represents the upsampling operation, and the obtained full-image pixel-level enhancement coefficient The value range is (0,1); Based on the pixel-level enhancement coefficient of the whole image, each pixel is enhanced to obtain the second-order enhanced feature map of the pneumonia image CT The specific process is: , in Represents the first-order enhanced feature map pixel of pneumonia image CT The local neighborhood of Represents the first-order enhanced feature map pixel of pneumonia image CT The pixel value of It represents the corresponding neighborhood mean enhancement component in the first-order enhancement feature map of pneumonia CT images.
[0016] Preferably, in S4, the consistency of the local region boundary is evaluated by a sliding window method, and the topological perturbation intensity is constructed as a quantitative indicator of structural fuzziness, which effectively distinguishes the clear structure and the blurred lesions in the pneumonia image CT image. The regional enhancement coefficient is formed by combining nonlinear mapping and up-sampled to the pixel level, so that the enhancement process of the pneumonia image CT image has spatial continuity and structural perception capabilities.
[0017] Preferably, in said S5, the fusion weight factor is designed The specific process is: , in Pixels The fusion weight factor at position, is a parameter that controls the sensitivity of weight response, and its value range is [2,5]. It represents the feature difference between the first-order enhanced feature map and the second-order enhanced feature map of pneumonia CT images. Finally, the value range of the fusion weight factor is limited to (0, 1) through the Sigmoid function. The fusion weight factor is used to perform weighted fusion of the first-order enhanced feature map and the second-order enhanced feature map of the pneumonia image CT to obtain the fusion enhanced feature map of the pneumonia image CT. The specific process is: , When the regional enhancement difference is not large, the pneumonia image CT fusion enhancement feature map tends to use the pneumonia image CT first-order enhancement feature map for feature representation. When the topological perturbation enhancement brings more new structures, the pneumonia image CT fusion enhancement feature map tends to adopt the pneumonia image CT second-order enhancement feature map.
[0018] Preferably, in the S5, the construction process of the pneumonia image CT fusion enhancement feature map fully combines the ability of the pneumonia image CT first-order enhancement feature map to enhance image contrast and texture, and the advantages of the pneumonia image CT second-order enhancement feature map for structural continuity and fuzzy area repair. By constructing a pixel-level adaptive fusion weight based on enhanced differences, the algorithm can tend to retain the topological perturbation enhancement results in the lesion area and retain clear first-order enhancement features in the normal structure area, thereby realizing a flexible fusion of difference-driven and structure-aware, which can effectively solve the common problems of structural blur and unclear boundaries in pneumonia image CT images, enhance the visibility of lesion areas such as ground-glass shadows and consolidation shadows in pneumonia images, improve the integrity of image boundaries and diagnostic reliability, and have good interpretability and medical adaptability.
[0019] Preferably, in said S6, for each pixel of the pneumonia image CT image fusion enhancement feature map Calculate its 3×3 neighborhood Noise sensitivity within The specific process is: , in and They represent the fusion enhancement feature map of pneumonia image CT image in pixels and The pixel value at represents the Euclidean distance; Based on noise sensitivity Structural structure guided noise suppression coefficient The specific process is: , in is a hyperparameter that controls the noise suppression amplitude, and its value range is [0.05, 0.2]. represents the exponential function; Using structure-guided noise suppression coefficient The noise reduction process is performed on the fusion enhanced feature map of the pneumonia image CT image, and the weighted average noise reduction is applied in the noise area, and the original value is retained at the edge of the structure to generate the final feature map of the pneumonia image CT image. The specific process is: .
[0020] Preferably, in the S6, combined with the noise characteristics of pneumonia image CT images that are susceptible to low-dose imaging, blur enhancement or texture bleaching, based on the noise sensitivity in each pixel neighborhood, and through exponential mapping as a structure-guided noise suppression coefficient, smooth compensation of blurred areas and precise protection of clear structure edges are achieved, which can effectively suppress the random noise and artifact enhancement effects generated in the multi-level enhancement process, maintain the natural texture of the lesion area and the integrity of the lung parenchyma structure, enhance the overall readability of the image and the stability of clinical diagnosis, and have good adaptability and deployment convenience.
[0021] Preferably, in said S7, the final feature map of the pneumonia CT image is Through 3×3 convolution processing, the pneumonia image CT enhanced image is obtained The specific process is: , in Represents a 3×3 convolution.
[0022] Compared with the existing technology, the present invention has the following technical effects: the proposed adaptive enhancement method for pneumonia CT images accurately identifies and enhances the fuzzy structure of the lesion area by constructing a nonlinear similarity enhancement mechanism and a spatial enhancement module guided by topological perturbation, while maintaining the stability of normal tissue; it integrates first-order and second-order enhancement features to improve the naturalness and consistency of detail expression, and introduces a structure-aware noise suppression strategy to effectively remove artifacts and texture noise. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 This is a flow chart of a CT image adaptive enhancement method for pneumonia images provided by the present invention.
[0024] Figure 2 This is a process diagram for processing pneumonia images in a CT image adaptive enhancement method for pneumonia images provided by the present invention.
[0025] Figure 3 This is a structural diagram of the topological perturbation-guided spatial enhancement module provided by the present invention.
[0026] Figure 4 This is a comparison chart of the results before and after enhancement of pneumonia CT images in an embodiment provided by the present invention. DETAILED DESCRIPTION
[0027] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0028] See also Figures 1 to 4 The present invention provides a CT image adaptive enhancement method for pneumonia images, which aims to achieve adaptive enhancement of pneumonia CT images by constructing a nonlinear pixel similarity enhancement mechanism, a topological perturbation-guided spatial enhancement module, and a structure-aware noise suppression strategy, including the following steps.
[0029] S1. Collect pneumonia CT images and create a pneumonia CT image dataset.
[0030] Furthermore, in S1, a total of 30,000 pneumonia CT images were collected using public or cooperative channels. After quality screening and unified preprocessing of the acquired images, the medical annotation tool LabelMe was used to annotate and grade the pneumonia lesion areas to form a training data set with structural information and lesion labels, and further construct the corresponding manually annotated enhanced effect image data. Finally, it was divided into training set and validation set in a ratio of 7:3 for subsequent model training and performance evaluation.
[0031] S2. Perform preliminary feature extraction on the pneumonia image CT image to obtain an initial feature map of the pneumonia image CT image.
[0032] Furthermore, in said S2, the input image is a CT image of pneumonia , where 640, 640 and 3 are the height, width and number of channels of the pneumonia image CT image respectively. 3×3 convolution is used to perform preliminary feature extraction on the pneumonia image CT image to obtain the initial feature map of the pneumonia image CT image. The specific process is: , in Represents the initial feature map of the pneumonia CT image obtained by 3×3 convolution , H, W, and C are the height, width, and number of channels of the initial feature map of the pneumonia CT image, respectively.
[0033] S3. Construct a nonlinear adaptive enhancement strategy, including: calculating the similarity measure between pixels of the initial feature map of the pneumonia CT image, designing the local symmetry perturbation enhancement coefficient, using the nonlinear enhancement relationship, adaptively enhancing through the similarity and difference between pixels, and generating the first-order enhanced feature map of the pneumonia CT image.
[0034] Furthermore, in S3, the input image is the initial feature map of the pneumonia CT image, and a nonlinear adaptive enhancement strategy is constructed, including: S31. Initial feature map of pneumonia CT image Each pixel in , the neighborhood within the 3×3 window Calculate the similarity measure between pixels in The specific process is: , in Represents pixels and pixels The Euclidean distance between the two pixels reflects the difference between the pixels. It represents the hyperparameter that controls the similarity sensitivity, and its value range is [0.5, 2]. In this embodiment, the initial value is set to 1.0. The gradient is updated by the structural similarity loss function SSIM Loss. When it is smaller, it means similar pixels and they are nearby. represents the exponential function; S32. Since the normal area in the pneumonia CT image usually has a certain degree of structural symmetry or grayscale distribution balance, while the pneumonia lesions or abnormal areas often break the local symmetric structure, the local symmetry perturbation enhancement coefficient is designed. , when the local asymmetry is greater, the local symmetry perturbation enhancement coefficient is greater, for each pixel , select the neighborhood within its 3×3 window , construct symmetric pixel pairs: , , and , define a set of symmetric pixel pairs , for each symmetric pixel pair , calculate the absolute value of its grayscale difference and average it, then use the Sigmoid function to smoothly map it to (0,1) to obtain the local symmetry perturbation enhancement coefficient The specific process is: , in represents the Sigmoid function, The parameter for controlling the enhancement sensitivity has a value range of [0, 10]. In this embodiment, the initial value is set to 5. By introducing this parameter into the differentiable function expression in the image enhancement process and constructing a joint loss function including image reconstruction error, structural similarity preservation loss and parameter regularization term, the back-propagation training and update are performed on it. and They represent the initial feature maps of pneumonia CT images in the symmetrical pairs The pixel value at ; S33, introduce local symmetry perturbation enhancement coefficient , using nonlinear enhancement relationship, adaptive enhancement is performed through similarity and difference between pixels, for each pixel , and its enhanced results The generation process is: , The enhanced pixels Composition of pneumonia CT first-order enhancement feature map The specific process is: , Where N represents the total number of pixels in the image, the implementation code is: # Calculation of local symmetry perturbation enhancement coefficient def compute_symmetry_alpha(F0, x, y, lambda_=5.0): # 4 sets of symmetrical pixel pairs (manually list coordinates) pairs = [((x - 1, y), (x + 1, y)), ((x, y - 1), (x, y + 1)), ((x - 1, y - 1), (x + 1, y + 1)), ((x - 1, y + 1), (x + 1, y - 1))] diff_sum = 0.0 for (a, b) in pairs: if (0<= a[0] <F0.shape[0] and 0<= a[1]<F0.shape[1] and 0<= b[0] <F0.shape[0] and 0<= b[1]<F0.shape[1]): diff = np.abs(F0[a] - F0[b]) diff_sum += diff avg_diff = diff_sum / 4.0 alpha = 1 / (1 + np.exp(-lambda_ * avg_diff)) # Sigmoid mapping return alpha # Introduce the snowflake def enhance_pixel(F0, x, y, sigma=0.2, lambda_=5.0): p_i = F0[x, y] alpha = compute_symmetry_alpha(F0, x, y, lambda_) sum_weight = 0.0 weighted_sum = 0.0 H, W = F0.shape for dx in [-1, 0, 1]: for d in [-1, 0, 1]: xx, yy = x + dx, y + dy if 0 <= xx <H and 0<= yy<W and (xx != x or yy != y): p_j = F0[xx, yy] s_ij = compute_similarity(p_i, p_j, sigma); weighted_sum += s_ij * (p_j - p_i) sum_weight += s_ij delta = weighted_sum if sum_weight == 0 else weighted_sum / sum_weight p_hat = p_i + alpha * delta return p_hat # Remove the CT from the snowflake def enhance_image(F0, sigma=0.2, lambda_=5.0): H, W = F0.shape F_FE = np.zeros_like(F0) for x in range(1,H-1): for y in range(1,W-1): F_FE[x, y] = enhance_pixel(F0, x, y, sigma=sigma, lambda_=lambda_) return F_FE.
[0035] S4. Construct a topological perturbation-guided spatial enhancement module, including: using a sliding window to segment the first-order enhanced feature map of pneumonia CT images, calculating the degree of topological perturbation in each region, constructing a normalized weight tensor and mapping it into a regional enhancement coefficient, upsampling the regional enhancement coefficient to obtain the full-image pixel-level enhancement coefficient, and then enhancing it to obtain the second-order enhanced feature map of pneumonia CT images.
[0036] Furthermore, in said S4, the input image is a pneumonia image CT first-order enhanced feature map, and the pneumonia image CT first-order enhanced feature map is slid by a 2×2 sliding window, and the area obtained each time the window slides is The coordinates of the upper left corner are , the set of boundary pixel pairs contained in the region for: , Calculate the degree of topological disturbance in each region , specifically the sum of the intensity differences between boundary pixels, and the calculation process is: , in represents the Euclidean distance, Indicates area The degree of topological perturbation in the region When the boundaries are consistent and the closed structure is obvious, the degree of topological perturbation Approaching 0, the degree of topological disturbance when the boundary is blurred is a larger value; The normalized weight tensor of each region is constructed based on the degree of topological perturbation of the region. The specific process is: , in To prevent the small constant from being divided by 0, the initial value set in this embodiment is 0.001. Indicates the maximum value operation; Mapping normalized weight tensors to region-level enhancement coefficients The specific process is: , in Indicates area The regional enhancement coefficient in To control the nonlinear degree parameter of the enhancement coefficient, the value range is [5,10]. In this embodiment, the initial value is set to 6. By introducing it into the regional enhancement mapping function, the image reconstruction loss and the enhancement smoothness constraint loss are combined for back propagation update. is the Tanh function, used to limit The value range is (0,1); Regional enhancement factor Upsample to obtain the full-image pixel-level enhancement coefficient The specific process is: , in Represents the upsampling operation, and the obtained full-image pixel-level enhancement coefficient The value range is (0,1); Based on the pixel-level enhancement coefficient of the whole image, each pixel is enhanced to obtain the second-order enhanced feature map of the pneumonia image CT The specific process is: , in Represents the first-order enhanced feature map pixel of pneumonia image CT The local neighborhood of Represents the first-order enhanced feature map pixel of pneumonia image CT The pixel value of It represents the neighborhood mean enhancement component corresponding to the first-order enhancement feature map of pneumonia CT images. The implementation code is: # Calculation of topological perturbation degree def compute_topo_delta(F_FE, x, y): H, W = F_FE.shape boundary_pairs = [((x, y), (x + 1, y)), ((x + 1, y), (x + 1, y + 1)), ((x + 1, y + 1), (x, y + 1)), ((x, y + 1), (x, y))] delta = 0.0 for (i, j) in boundary_pairs: if 0<= i[0] <H and 0<= i[1]<W and 0<= j[0]<H and 0<= j[1]<W: delta += np.linalg.norm(F_FE[i] - F_FE[j]) return delta # Regional enhancement coefficient calculation def compute_region_enhance_map(F_FE, mu=6.0, eps=1e-3): H, W = F_FE.shape h_blocks = H / / 2 w_blocks = W / / 2 delta_map = np.zeros((h_blocks, w_blocks)) for i in range(h_blocks): for j in range(w_blocks): x, y = 2 * i, 2 * j delta_map[i, j] = compute_topo_delta(F_FE, x, y) Z = np.max(delta_map) + eps gamma = np.tanh(mu * (1 - delta_map / Z)) return gamma # Region-level enhancement coefficient upsampling def upsample_to_pixel_level(gamma, H, W): upsampled = zoom(gamma, (H / gamma.shape[0], W / gamma.shape[1]),order=1) return np.clip(upsampled, 0, 1) # Generation of second-order enhanced feature maps of pneumonia CT images def apply_topo_guided_enhancement(F_FE, Gamma): H, W = F_FE.shape F_SE = np.zeros_like(F_FE) for x in range(H): for y in range(W): N = [] for dx in [-1, 0, 1]: for dy in [-1, 0, 1]: xx, yy = x + dx, y + dy if 0<= xx <H and 0<= yy<W: N.append(F_FE[xx, yy]) if len(N)>0: local_mean = np.mean(N) F_SE[x, y] = (1 - Gamma[x, y]) * F_FE[x, y] + Gamma[x, y]* local_mean return F_SE.
[0037] S5. Perform weighted fusion on the pneumonia image CT first-order enhancement feature map and the second-order enhancement feature map to generate a pneumonia image CT fusion enhancement feature map.
[0038] Furthermore, in S5, the fusion weight factor is designed The specific process is: , in Pixels The fusion weight factor at position, The parameter for controlling the weight response sensitivity has a value range of [2,5]. In this embodiment, the initial value is set to 3.5. Back propagation optimization is performed by introducing a joint loss function that includes image reconstruction error and regularization constraint. It represents the feature difference between the first-order enhanced feature map and the second-order enhanced feature map of pneumonia CT images. Finally, the value range of the fusion weight factor is limited to (0, 1) through the Sigmoid function. The fusion weight factor is used to perform weighted fusion of the first-order enhanced feature map and the second-order enhanced feature map of the pneumonia image CT to obtain the fusion enhanced feature map of the pneumonia image CT. The specific process is: , When the regional enhancement difference is not large, the pneumonia image CT fusion enhancement feature map tends to use the pneumonia image CT first-order enhancement feature map for feature representation. When the topological perturbation enhancement brings more new structures, the pneumonia image CT fusion enhancement feature map tends to adopt the pneumonia image CT second-order enhancement feature map.
[0039] S6. Construct an edge-guided nonlinear mean noise suppression mechanism, including: calculating the local noise sensitivity of the pneumonia image CT image fusion enhancement feature map, constructing a structure-guided noise suppression coefficient for noise suppression processing, and obtaining the final feature map of the pneumonia image CT image.
[0040] Furthermore, in said S6, for each pixel of the pneumonia image CT image fusion enhancement feature map Calculate its 3×3 neighborhood Noise sensitivity within The specific process is: , in and They represent the fusion enhancement feature map of pneumonia image CT image in pixels and The pixel value at represents the Euclidean distance; Based on noise sensitivity Structural structure guided noise suppression coefficient The specific process is: , in The hyperparameter for controlling the noise suppression amplitude has a value range of [0.05, 0.2]. In this embodiment, the initial value is set to 0.1. Back propagation optimization is performed through the loss function composed of the joint image reconstruction loss, smoothness constraint and regularization term. represents the exponential function; Using structure-guided noise suppression coefficient The noise reduction process is performed on the fusion enhanced feature map of the pneumonia image CT image, and the weighted average noise reduction is applied in the noise area, and the original value is retained at the edge of the structure to generate the final feature map of the pneumonia image CT image. The specific process is: , The implementation code is: # Calculate the local noise sensitivity of a single pixel def compute_local_variance(F_fused, x, y, window_size=3): H, W = F_fused.shape half = window_size / / 2 values = [] for dx in range(-half, half + 1): for dy in range(-half, half + 1): xx, yy = x + dx, y + dy if 0<= xx<H and 0<= yy<W: values.append(F_fused[xx, yy]) values = np.array(values) variance = np.mean((values - F_fused[x, y]) ** 2) return variance # Calculate the noise suppression coefficient for each pixel def compute_beta_map(F_fused, tau=0.1): H, W = F_fused.shape beta_map = np.zeros((H, W)) for x in range(H): for y in range(W): v_i = compute_local_variance(F_fused, x, y) beta_map[x, y] = np.exp(-v_i / (tau ** 2)) return beta_map[[ID=No.32]] # Denoising process def apply_denoising(F_fused, beta_map): H, W = F_fused.shape F_final = np.zeros_like(F_fused) for x in range(H): for y in range(W): local_values = [] for dx in [-1, 0, 1]: for dy in [-1, 0, 1]: xx, yy = x + dx, y + dy if 0<= xx <H and 0<= yy<W: local_values.append(F_fused[xx, yy]) local_mean = np.mean(local_values) beta = beta_map[x, y] F_final[x, y] = (1 - beta) * F_fused[x, y]+ beta * local_mean return F_final.
[0041] S7. Process the final feature map of the pneumonia image CT image through 3×3 convolution to obtain a pneumonia image CT enhanced image.
[0042] Furthermore, in said S7, the final feature map of the pneumonia CT image is Through 3×3 convolution processing, the pneumonia image CT enhanced image is obtained The specific process is: , in Represents a 3×3 convolution.
[0043] Furthermore, this method uses the Pycharm application and Python language to write the code, uses the Pytorch framework, and inputs pneumonia imaging CT images with a resolution of 640×640×3 for training. The model is trained for 300 epochs, of which 50 epochs are frozen.
[0044] The above are only preferred embodiments of the present invention. It should be pointed out that those skilled in the art can make several modifications and improvements without departing from the inventive concept of the present invention, and these all fall within the scope of protection of the present invention.
Claims
1. A CT image adaptive enhancement method for pneumonia images, characterized in that: The following steps are involved: S1. Collect CT images of pneumonia and create a CT image dataset of pneumonia; S2. performing preliminary feature extraction on the pneumonia CT image to obtain an initial feature map of the pneumonia CT image; S3. Constructing a nonlinear adaptive enhancement strategy, including: calculating the similarity measure between pixels of the initial feature map of the pneumonia CT image, designing a local symmetry perturbation enhancement coefficient, using a nonlinear enhancement relationship, performing adaptive enhancement based on the similarity and difference between pixels, and generating a first-order enhanced feature map of the pneumonia CT image; S4. Constructing a topological perturbation-guided spatial enhancement module, including: using a sliding window to segment the first-order enhanced feature map of the pneumonia CT image, calculating the topological perturbation degree of each region, constructing a normalized weight tensor and mapping it into a regional enhancement coefficient, upsampling the regional enhancement coefficient to obtain the full-image pixel-level enhancement coefficient, and then enhancing it to obtain the second-order enhanced feature map of the pneumonia CT image; S5, performing weighted fusion on the pneumonia image CT first-order enhancement feature map and the second-order enhancement feature map to generate a pneumonia image CT fusion enhancement feature map; S6. Constructing an edge-guided nonlinear mean noise suppression mechanism, including: calculating the local noise sensitivity of the fused enhanced feature map of the pneumonia image CT image, constructing a structure-guided noise suppression coefficient to perform noise suppression processing, and obtaining the final feature map of the pneumonia image CT image; S7. Process the final feature map of the pneumonia image CT image through 3×3 convolution to obtain a pneumonia image CT enhanced image.
2. The method for adaptive CT image enhancement of pneumonia images according to claim 1, characterized in that: In S3, the process of constructing the local symmetry perturbation enhancement coefficient includes: S31. Initial feature map of pneumonia CT image Each pixel in , the neighborhood within the 3×3 window Calculate the similarity measure between pixels in ; S32. For each pixel , select the neighborhood within its 3×3 window , construct symmetric pixel pairs: , , and , define a set of symmetric pixel pairs , for each symmetric pixel pair , calculate the absolute value of its grayscale difference and average it, then use the Sigmoid function to smoothly map it to (0,1) to obtain the local symmetry perturbation enhancement coefficient The specific process is: , in represents the Sigmoid function, To control the parameters of enhanced sensitivity, and They represent the initial feature maps of the pneumonia CT image in the symmetrical pixel pairs The pixel value at .
3. The method for adaptively enhancing CT images for pneumonia images according to claim 2, characterized in that: In S3, the local symmetry perturbation enhancement coefficient is introduced , using nonlinear enhancement relationship, adaptive enhancement is performed through similarity and difference between pixels, for each pixel , and its enhanced results The generation process is: , The enhanced pixels Composition of pneumonia CT first-order enhancement feature map The specific process is: , Where N represents the total number of pixels in the first-order enhanced feature map of pneumonia CT images.
4. The method for adaptively enhancing CT images for pneumonia images according to claim 3, characterized in that: In the above S4, the input image is the pneumonia image CT first-order enhanced feature map, and the pneumonia image CT first-order enhanced feature map is slid according to a 2×2 sliding window, and the area obtained each time the window slides is The coordinates of the upper left corner are , the set of boundary pixel pairs contained in the region for: , Calculate the degree of topological disturbance in each region , the calculation process is: , in represents the Euclidean distance, Indicates area the degree of topological perturbation in ; The normalized weight tensor of each region is constructed based on the degree of topological perturbation of the region. The specific process is: , in To prevent division by small constants, Indicates the maximum value operation; Mapping normalized weight tensors to region-level enhancement coefficients The specific process is: , in Indicates area The regional enhancement coefficient in To control the nonlinear degree parameter of the enhancement coefficient, is the Tanh function.
5. The method for adaptively enhancing CT images for pneumonia images according to claim 4, characterized in that: In S4, the process of generating the second-order enhanced feature map of the pneumonia image CT is as follows: The regional enhancement factor Upsample to obtain the full-image pixel-level enhancement coefficient The specific process is: , in Represents an upsampling operation; Based on the pixel-level enhancement coefficient of the whole image, each pixel is enhanced to obtain the second-order enhanced feature map of pneumonia image CT The specific process is: , in Represents the first-order enhanced feature map pixel of pneumonia image CT The local neighborhood of Represents the first-order enhanced feature map pixel of pneumonia image CT The pixel value of It represents the corresponding neighborhood mean enhancement component in the first-order enhancement feature map of pneumonia CT images.
6. The method for adaptive CT image enhancement of pneumonia images according to claim 5, characterized in that: In S5, the fusion weight factor is designed The specific process is: , in Pixels The fusion weight factor at position, is a parameter that controls the sensitivity of weight response. Indicates the feature difference between the first-order enhancement feature map and the second-order enhancement feature map of pneumonia CT images; The fusion weight factor is used to perform weighted fusion of the first-order enhanced feature map and the second-order enhanced feature map of the pneumonia image CT to obtain the fusion enhanced feature map of the pneumonia image CT. The specific process is: 。 7. The method for adaptive CT image enhancement of pneumonia images according to claim 6, characterized in that: In the above S6, for each pixel of the pneumonia image CT image fusion enhancement feature map Calculate its 3×3 neighborhood Noise sensitivity within The specific process is: , in and They represent the fusion enhancement feature map of pneumonia image CT image in pixels and The pixel value at represents the Euclidean distance; Based on noise sensitivity Structural structure guided noise suppression coefficient The specific process is: , in is a hyperparameter that controls the magnitude of noise suppression, represents the exponential function; Using structure-guided noise suppression coefficient The fusion enhanced feature map of the pneumonia image CT image is subjected to noise suppression processing to generate the final feature map of the pneumonia image CT image The specific process is: 。
Citation Information
Patent Citations
Noise suppression method based on spatial transformation and adaptive clustering
CN115205567A
Pneumonia CT (Computed Tomography) image segmentation method fusing prior graph convolution and Transform
CN117315259A
3D ultra-high-definition fluorescent medical endoscope blood vessel image enhancement method, system and device and storage medium
CN118781172A
Pelvic floor rehabilitation effect image contrast enhancement method
CN119273607A
Galvanized aluminum-magnesium steel strip surface coating image enhancement method
CN119904400A