A CT image self-adaptive enhancement method for pneumonia image

By constructing a nonlinear pixel similarity enhancement mechanism and a topology perturbation-guided spatial enhancement module, combined with a structure-aware noise suppression strategy, the problem of insufficient adaptability in existing CT image enhancement methods for pneumonia is solved, achieving precise enhancement and artifact removal of lesion areas and improving diagnostic results.

CN120707428BActive Publication Date: 2025-11-21中国人民解放军总医院第八医学中心
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510859476.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-25
Publication Date
2025-11-21
Estimated Expiration
2045-06-25

AI Technical Summary

Technical Problem

Existing medical image enhancement methods lack structural adaptability and cannot differentiate processing based on the degree of blur in different regions, resulting in over-enhancement of clear structures or edge artifacts. This is especially true in low-dose scans or mild infections, where lesion areas are difficult to distinguish from normal lung tissue, affecting diagnostic results.

Method used

A nonlinear pixel similarity enhancement mechanism, a topology perturbation-guided spatial enhancement module, and a structure-aware noise reduction strategy are constructed. Adaptive enhancement is achieved by calculating the similarity and differences between pixels, combined with sliding window and convolution processing, to realize adaptive enhancement of CT images of pneumonia.

Benefits of technology

It accurately identifies and enhances the blurred structure of lesion areas while maintaining the stability of normal tissues, thereby improving the diagnostic value of images, effectively removing artifacts and texture noise, and enhancing the visibility and diagnostic reliability of lesion areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120707428B_ABST
    Figure CN120707428B_ABST
Patent Text Reader

Abstract

The application provides a CT image self-adaptive enhancement method for pneumonia images, and belongs to the field of image enhancement, and the method comprises the following steps: extracting initial features of a pneumonia CT image, generating a first-order enhancement map based on nonlinear similarity measurement and symmetry disturbance, constructing a topological disturbance guided spatial enhancement module to generate a second-order enhancement map, fusing the first-order and second-order enhancement maps to form a fused feature map, further constructing a structure perception noise suppression mechanism based on local variance to obtain a final enhanced image, the method can effectively improve the structure definition and contrast of the pneumonia lesion area, enhance the diagnostic value of the image, and meanwhile, the integrity of the normal tissue structure is maintained, so that the method has good universality and clinical deployment value.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of image enhancement, and particularly relates to a CT image adaptive enhancement method for pneumonia images. BACKGROUND

[0002] As a common respiratory disease, early screening, diagnosis and efficacy evaluation of pneumonia in the clinic rely on high-resolution chest CT images. The CT image of pneumonia image can directly show the structural changes of the lung lesion area, such as ground glass shadow, consolidation shadow, and cord shadow. It is an important means of medical image auxiliary diagnosis. However, the pneumonia lesion often shows fuzzy gray distribution, unclear structure boundary and low contrast in the CT image. Especially in the case of low-dose scanning or mild infection, the lesion area and normal lung tissue are difficult to distinguish, which seriously affects the judgment of the doctor on the location, range and nature of the lesion.

[0003] The existing medical image enhancement methods mostly rely on convolution filtering, histogram equalization, Retinex enhancement or deep learning models for image enhancement processing. Although certain effects have been achieved in improving the overall contrast, there are still the following shortcomings: the enhancement process lacks structural adaptive ability and cannot differentiate the processing according to the blur degree of different regions, which easily leads to over-enhancement of clear structures or edge artifacts; the enhancement method often does not consider the spatial structure continuity within the image, and the structure modeling ability for fuzzy lesions such as ground glass shadow is weak. Therefore, there is an urgent need for a CT image enhancement method with structure perception ability and capable of adaptive enhancement of pneumonia lesion area to effectively reconstruct the fuzzy structure, protect the boundary of clear area and improve the overall diagnostic value of the image. SUMMARY

[0004] The application provides a CT image adaptive enhancement method for pneumonia images, which aims to realize adaptive enhancement of CT images of pneumonia images by constructing a nonlinear pixel similarity enhancement mechanism, a topological disturbance guided spatial enhancement module and a structure perception noise suppression strategy, including the following steps.

[0005] S1, collect the CT images of pneumonia images, and make a CT image data set of pneumonia images.

[0006] S2, perform preliminary feature extraction on the CT images of pneumonia images to obtain an initial feature map of the CT images of pneumonia images.

[0007] S3, construct a nonlinear adaptive enhancement strategy, including: calculating the similarity measure between pixels of the initial feature map of the CT images of pneumonia images, designing a local symmetry disturbance enhancement coefficient, adopting a nonlinear enhancement relationship, and performing adaptive enhancement through the similarity and difference between pixels to generate a first-order enhanced feature map of the CT images of pneumonia images.

[0008] S4, construct a topology disturbance guided spatial enhancement module, comprising: using a sliding window to segment the regions of the pneumonia image CT first-order enhancement feature map, calculating the topology disturbance degree of each region, constructing a normalized weight tensor and then mapping it to a region-level enhancement coefficient, upsampling the region-level enhancement coefficient to obtain a full image pixel-level enhancement coefficient, and then enhancing to obtain a pneumonia image CT second-order enhancement feature map.

[0009] S5, weighting and fusing 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, comprising: 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 a pneumonia image CT image final feature map.

[0011] S7, processing the pneumonia image CT image final feature map through 3x3 convolution to obtain a pneumonia image CT enhancement image.

[0012] Preferably, in S2, the input image is a pneumonia image CT image , wherein H, W and 3 are the height, width and channel number of the pneumonia image CT image, 3x3 convolution is used for preliminary feature extraction of the pneumonia image CT image to obtain a pneumonia image CT image initial feature map , and the specific process is as follows:

[0013] ,

[0014] wherein represents 3x3 convolution, and the obtained pneumonia image CT image initial feature map , H, W and C are the height, width and channel number of the pneumonia image CT image initial feature map.

[0015] Preferably, in S3, the input image is a pneumonia image CT image initial feature map, and a nonlinear adaptive enhancement strategy is constructed, comprising:

[0016] S31, for each pixel in the pneumonia image CT image initial feature map , calculate the similarity measure between pixels in the neighborhood within the 3x3 window , and the specific process is as follows:

[0017] ,

[0018] wherein represents the pixel and the pixel Euclidean distance between two pixels, reflecting the difference between the pixels, is a hyper-parameter to control the sensitivity of similarity, with the value range of [0.5, 2], when is smaller, the pixels are similar and adjacent, is an exponential function;

[0019] S32, since the normal region in the CT image of pneumonia image usually has a certain degree of structural symmetry or gray scale distribution uniformity, while the pneumonia lesion or abnormal region often breaks the local symmetry structure, the local symmetry disturbance enhancement coefficient is designed, when the local is more asymmetric, the local symmetry disturbance enhancement coefficient is larger, for each pixel , the neighborhood in the 3*3 window is selected , the symmetric pixel pair is constructed: , , and , the symmetric pixel pair set is defined , for each symmetric pixel pair , the absolute value of the gray scale difference is calculated and averaged, and then the Sigmoid function is used to smooth map into (0, 1) to obtain the local symmetry disturbance enhancement coefficient

[0020] ,

[0021] where is the Sigmoid function, is a parameter to control the sensitivity of enhancement, with the value range of [0, 10], and respectively represent the pixel values of the initial feature map of the CT image of pneumonia image at the symmetric pixel pair ;

[0022] S33, the local symmetry disturbance enhancement coefficient is introduced, a nonlinear enhancement relationship is adopted, and the similarity and difference between pixels are adaptively enhanced, for each pixel , the generation process of the enhanced result is:

[0023] ,

[0024] The enhanced pixels are composed into the first-order enhanced feature map of the CT image of pneumonia image , and the specific process is:

[0025] ,

[0026] Wherein N represents the total number of pixels in the first enhanced feature map of the CT image of the pneumonia image.

[0027] 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, and the introduction of structural symmetry disturbance degree can model the features of abnormal areas. Pneumonia lesions (such as ground glass shadows and consolidation shadows) often break local symmetry, which is a reliable and intuitive structural diagnostic feature compared to normal lung CT images. Designing a local symmetry disturbance enhancement coefficient can sensitively detect the degree of local symmetry destruction, and can still enhance the partition through structural judgment without explicit lesion segmentation, while the calculation cost is small.

[0028] Preferably, in S4, the input image is the first enhanced feature map of the CT image of the pneumonia image, and the first enhanced feature map of the CT image of the pneumonia image is slid according to a 2x2 sliding window. The region obtained by each window sliding is The coordinates of the upper left corner are The boundary pixel pair set contained by the region is :

[0029] ,

[0030] The topological disturbance degree of each region is calculated , which is the sum of the intensity difference between the boundary pixels. The calculation process is:

[0031] ,

[0032] Wherein represents the Euclidean distance, represents the topological disturbance degree in the region . When the boundaries of the region are consistent and the closed structure is obvious, the topological disturbance degree tends to 0, and when the boundaries are blurred, the topological disturbance degree is a large value.

[0033] Based on the topological disturbance degree of each region, a normalized weight tensor of the region is constructed, and the specific process is:

[0034] ,

[0035] Wherein is a small constant to prevent division by 0, represents the maximum value operation;

[0036] The normalized weight tensor is mapped to a region-level enhancement coefficient , and the specific process is:

[0037] ,

[0038] wherein represents the region-level enhancement coefficient in the region , is a nonlinear degree parameter for controlling the enhancement coefficient, and the value range is [5, 10], is a Tanh function for limiting the value range of to (0, 1);

[0039] upsampling the region-level enhancement coefficient to obtain the full-image pixel-level enhancement coefficient , and the specific process is as follows:

[0040] ,

[0041] wherein represents the upsampling operation, and the obtained full-image pixel-level enhancement coefficient has a value range of (0, 1);

[0042] based on the full-image pixel-level enhancement coefficient, each pixel is enhanced to obtain the CT second-order enhanced feature map of the pneumonia image , and the specific process is as follows:

[0043] ,

[0044] wherein represents the local neighborhood of the CT first-order enhanced feature map pixel of the pneumonia image, represents the pixel value of the CT first-order enhanced feature map pixel of the pneumonia image, represents the corresponding neighborhood mean enhancement component in the CT first-order enhanced feature map of the pneumonia image.

[0045] Preferably, in the S4, the consistency of the local region boundary is evaluated by a sliding window method, the topological disturbance intensity is constructed as a quantitative indicator of structural ambiguity, the clear structure and the fuzzy lesion in the CT image of the pneumonia image are effectively distinguished, the region-level enhancement coefficient is formed by combining the nonlinear mapping, and the pixel-level is upsampled, and the enhancement process for the CT image of the pneumonia image has spatial continuity and structure perception ability.

[0046] Preferably, in the S5, a fusion weight factor is designed, and the specific process is as follows:

[0047] ,

[0048] wherein is the fusion weight factor at the position of the pixel , For the parameter of controlling the weight response sensitivity, the value range is [2, 5], indicates the feature difference degree between the first-order enhancement feature map and the second-order enhancement feature map of the CT image of the pneumonia image, and finally the value range of the fusion weight factor is limited to (0, 1) through the Sigmoid function;

[0049] The first-order enhancement feature map and the second-order enhancement feature map of the CT image of the pneumonia image are weighted and fused using the fusion weight factor to obtain the CT image fusion enhancement feature map of the pneumonia image , and the specific process is as follows:

[0050] ,

[0051] When the regional enhancement difference is small, the CT image fusion enhancement feature map of the pneumonia image tends to use the first-order enhancement feature map of the CT image of the pneumonia image for feature representation, and when the topological disturbance enhancement brings more new structures, the CT image fusion enhancement feature map of the pneumonia image tends to adopt the second-order enhancement feature map of the CT image of the pneumonia image.

[0052] Preferably, in S5, the construction process of the CT image fusion enhancement feature map of the pneumonia image fully combines the enhancement ability of the first-order enhancement feature map of the CT image of the pneumonia image on image contrast and texture, and the advantages of the second-order enhancement feature map of the CT image of the pneumonia image on structure continuity and fuzzy region repair. Through constructing the pixel-level adaptive fusion weight based on the enhancement difference, the algorithm can tend to retain the topological disturbance enhancement result in the lesion area, and retain the clear first-order enhancement feature in the normal structure area, so as to realize the flexible fusion driven by difference and structure perception, effectively solve the problems of structure blur and unclear boundary in the CT image of the pneumonia image, enhance the visibility of ground glass shadow and consolidation shadow and other lesion areas in the pneumonia image, improve the integrity of the image boundary and the reliability of diagnosis, and have good explainability and medical adaptability.

[0053] Preferably, in S6, for each pixel of the CT image fusion enhancement feature map of the pneumonia image, the noise sensitivity in the 3x3 neighborhood of the pixel is calculated, and the specific process is as follows:

[0054] ,

[0055] wherein and respectively represent the pixel values of the CT image fusion enhancement feature map of the pneumonia image at pixels and , represents the Euclidean distance;

[0056] based on the noise sensitivity Constructing a structure-guided noise suppression coefficient The specific process is as follows:

[0057] ,

[0058] Wherein, is a hyperparameter for controlling the noise suppression amplitude, and the value range is [0.05, 0.2], represents an exponential function.

[0059] Using the structure-guided noise suppression coefficient For the pneumonia image CT image fusion enhanced feature map, weighted average denoising is applied in the noise area, the original value is retained in the structure edge, and the final feature map of the pneumonia image CT image is generated The specific process is as follows:

[0060] .

[0061] Preferably, in the S6, the noise characteristics in the pneumonia image CT image that are susceptible to low-dose imaging, blur enhancement or texture bleaching are combined, the noise sensitivity in the neighborhood of each pixel is based, and the structure-guided noise suppression coefficient is obtained through exponential mapping, the smooth compensation of the blur area and the accurate protection of the clear structure edge are realized, the random noise and the artifact enhancement effect generated in the multi-level enhancement process can be effectively suppressed, the naturalness of the texture in the lesion area and the integrity of the lung parenchyma structure can be maintained, the overall readability and the clinical diagnosis stability of the image can be enhanced, and good adaptability and deployment convenience are obtained.

[0062] Preferably, in the S7, the final feature map of the pneumonia image CT image is obtained Through 3*3 convolution processing, the pneumonia image CT enhanced image is obtained The specific process is as follows:

[0063] ,

[0064] Wherein, is a hyperparameter for controlling the noise suppression amplitude, and the value range is [0.05, 0.2], represents 3*3 convolution.

[0065] Compared with the prior art, the pneumonia image CT image adaptive enhancement method has the following technical effects: the nonlinear similarity enhancement mechanism and the topological disturbance guided spatial enhancement module are constructed, the blur structure of the lesion area is accurately identified and enhanced, and the stability of the normal tissue is maintained; the first-order and second-order enhancement features are fused to improve the naturalness and consistency of detail expression, and the structure-aware noise suppression strategy is introduced to effectively remove artifacts and texture noise. BRIEF DESCRIPTION OF DRAWINGS

[0066] Fig. 1 ​A CT image adaptive enhancement method for pneumonia images provided by the present application is provided.

[0067] Fig. 2 A process diagram for processing pneumonia image CT images in the CT image adaptive enhancement method for pneumonia images provided by the present application.

[0068] Fig. 3 A topological perturbation guided spatial enhancement module structure diagram provided by the present application.

[0069] Fig. 4 A result comparison diagram before and after CT image enhancement for pneumonia images in an embodiment provided by the present application. DETAILED DESCRIPTION

[0070] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.

[0071] Please refer to Figs. 1 to 4 The present application provides a CT image adaptive enhancement method for pneumonia images, which aims to realize adaptive enhancement of CT images for pneumonia images by constructing a nonlinear pixel similarity enhancement mechanism, a topological perturbation guided spatial enhancement module and a structure perception denoising strategy, including the following steps.

[0072] S1, collect pneumonia image CT images, and make a pneumonia image CT image dataset.

[0073] Further, in the S1, a total of 30000 pneumonia image CT images are collected using public or cooperative channels. After quality screening and uniform preprocessing of the obtained images, the pneumonia lesion area is labeled and graded using a medical labeling tool LabelMe, forming a training dataset with structure information and lesion labels, and further constructing corresponding artificial labeling enhancement effect image data. Finally, the training set and the validation set are divided according to the ratio of 7:3, which are used for subsequent model training and performance evaluation.

[0074] S2, perform preliminary feature extraction on the pneumonia image CT images to obtain an initial feature map of the pneumonia image CT images.

[0075] Further, in the S2, the input image is a pneumonia image CT image , where 640, 640 and 3 are height, width and channel number of the pneumonia image CT image, a 3x3 convolution is used to perform preliminary feature extraction on the pneumonia image CT image to obtain an initial feature map of the pneumonia image CT image , and the specific process is as follows:

[0076] ,

[0077] wherein represents a 3x3 convolution, and an initial feature map of the pneumonia image CT image is obtained , H, W and C are height, width and channel number of the initial feature map of the pneumonia image CT image.

[0078] S3, a nonlinear adaptive enhancement strategy is constructed, including: calculating the similarity measure between pixels of the initial feature map of the pneumonia image CT image, designing a local symmetry perturbation enhancement coefficient, using a nonlinear enhancement relationship, and adaptively enhancing through the similarity and difference between pixels to generate a first-order enhanced feature map of the pneumonia image CT.

[0079] Further, in the S3, the input image is the initial feature map of the pneumonia image CT image, and the nonlinear adaptive enhancement strategy is constructed, including:

[0080] S31, for each pixel in the initial feature map of the pneumonia image CT image , the similarity measure between pixels in the neighborhood in the 3x3 window is calculated , and the specific process is as follows:

[0081] ,

[0082] wherein represents the Euclidean distance between pixel and pixel , reflecting the difference between pixels, represents a hyperparameter for controlling the sensitivity of similarity, and the value range is [0.5, 2], and the initial value set in this embodiment is 1.0, and gradient update is performed through a structural similarity loss function SSIM Loss, and when is small, it means that the pixels are similar and adjacent, represents an exponential function;

[0083] S32, since the normal region in the pneumonia image CT image usually has a certain degree of structural symmetry or gray distribution uniformity, while the pneumonia lesion or abnormal region often breaks the local symmetry structure, a local symmetry perturbation enhancement coefficient is designed, and the local symmetry perturbation enhancement coefficient is larger when the local is more asymmetric, and for each pixel , select the neighborhood within the 3x3 window , construct symmetric pixel pairs: , , and , define the set of symmetric pixel pairs , for each symmetric pixel pair , calculate the absolute value of its gray difference and average, then use the Sigmoid function to smooth map into (0,1) to get the local symmetry perturbation enhancement coefficient , the specific process is:

[0084] ,

[0085] where represents the Sigmoid function, is a parameter to control the sensitivity of enhancement, the value range is [0,10], the initial value set in this embodiment is 5, by introducing this parameter into the differentiable function expression in the image enhancement process, and constructing the joint loss function including image reconstruction error, structure similarity preservation loss and parameter regularization term, it is updated by back propagation training, and respectively represent the pixel values of the initial feature map of the pneumonia image CT image at the symmetric pair ;

[0086] S33, introduce the local symmetry perturbation enhancement coefficient , adopt nonlinear enhancement relationship, and adaptively enhance through the similarity and difference between pixels, for each pixel , the generation process of its enhancement result is:

[0087] ,

[0088] compose the enhanced pixel into the first-order enhanced feature map of the pneumonia image CT , the specific process is:

[0089] ,

[0090] where N represents the total number of pixels in the image, and the implementation code is:

[0091] # Local symmetry perturbation enhancement coefficient calculation

[0092] def compute_symmetry_alpha(F0, x, y, lambda_=5.0):

[0093] # 4 group symmetric pixel pairs (coordinates listed manually)

[0094] pairs = [((x - 1, y), (x + 1, y)),

[0095] ((x, y - 1), (x, y + 1)),

[0096] ((x - 1, y - 1), (x + 1, y + 1)),

[0097] ((x - 1, y + 1), (x + 1, y - 1))]

[0098] diff_sum = 0.0

[0099] for (a, b) in pairs:

[0100] if (0<= a[0]<F0.shape[0] and 0<= a[1]<F0.shape[1] and

[0101] 0<= b[0]<F0.shape[0] and 0<= b[1]<F0.shape[1]):

[0102] diff = np.abs(F0[a] - F0[b])

[0103] diff_sum += diff

[0104] avg_diff = diff_sum / 4.0

[0105] alpha = 1 / (1 + np.exp(-lambda_ * avg_diff)) # Sigmoid mapping

[0106] return alpha

[0107] # Single pixel enhancement process

[0108] def enhance_pixel(F0, x, y, sigma=0.2, lambda_=5.0):

[0109] p_i = F0[x, y]

[0110] alpha = compute_symmetry_alpha(F0, x, y, lambda_)

[0111] sum_weight = 0.0

[0112] weighted_sum = 0.0

[0113] H, W = F0.shape

[0114] for dx in [-1, 0, 1]:

[0115] for dy in [-1, 0, 1]:

[0116] xx, yy = x + dx, y + dy

[0117] if 0 <= xx < H and 0 <= yy < W and (xx != x or yy != y):

[0118] p_j = F0[xx, yy]

[0119] s_ij = compute_similarity(p_i, p_j, sigma)

[0120] weighted_sum += s_ij * (p_j - p_i)

[0121] sum_weight += s_ij

[0122] delta = weighted_sum if sum_weight == 0 else weighted_sum / sum_weight

[0123] p_hat = p_i + alpha * delta

[0124] return p_hat

[0125] # Generation of the first-order enhanced feature map of pneumonia CT images

[0126] def enhance_image(F0, sigma = 0.2, lambda_ = 5.0):

[0127] H, W = F0.shape

[0128] F_FE = np.zeros_like(F0)

[0129] for x in range(1, H - 1):

[0130] for y in range(1, W - 1):

[0131] F_FE[x, y] = enhance_pixel(F0, x, y, sigma=sigma, lambda_=lambda_)

[0132] return F_FE.

[0133] S4. Construct a topology-perturbation-guided spatial enhancement module, including: using a sliding window to segment the first-order enhancement feature map of pneumonia image CT, calculating the degree of topology perturbation in each region, constructing a normalized weight tensor and mapping it to a region-level enhancement coefficient, upsampling the region-level enhancement coefficient to obtain the full-image pixel-level enhancement coefficient, and then enhancing it to obtain the second-order enhancement feature map of pneumonia image CT.

[0134] Furthermore, in step S4, the input image is a first-order enhanced CT feature map of pneumonia. The first-order enhanced CT feature map of pneumonia is slid in a 2×2 sliding window, and the area obtained each time the window slides is... The coordinates of the top left corner are The set of boundary pixel pairs contained in the region for:

[0135] ,

[0136] Calculate the degree of topological perturbation in each region Specifically, it is the sum of the intensity differences between boundary pixels, and the calculation process is as follows:

[0137] ,

[0138] in Represents Euclidean distance. Indicates the 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 perturbation when the boundary is blurred. It is a relatively large value;

[0139] The normalized weight tensor for each region is constructed based on the degree of topological perturbation. The specific process is as follows:

[0140] ,

[0141] in To prevent small constants from being divided by zero, the initial value is set to 0.001 in this embodiment. This indicates the operation of retrieving the maximum value;

[0142] mapping the normalized weight tensor to the region-level enhancement coefficient , the specific process is:

[0143] ,

[0144] wherein represents the region-level enhancement coefficient in the region , and is a nonlinear degree parameter for controlling the enhancement coefficient, and the value range is [5, 10], and the initial value is set to 6 in the embodiment, by introducing it into the region enhancement mapping function, the image reconstruction loss and the enhancement smoothness constraint loss are updated reversely, is a Tanh function, used to limit , and the value range of is (0, 1);

[0145] upsampling the region-level enhancement coefficient to obtain the full image pixel-level enhancement coefficient , the specific process is:

[0146]

[0147] wherein represents the upsampling operation, and the obtained full image pixel-level enhancement coefficient , and the value range of is (0, 1);

[0148] based on the full image pixel-level enhancement coefficient, each pixel is enhanced to obtain the CT second-order enhancement feature map of the pneumonia image , the specific process is:

[0149]

[0150] wherein represents the local neighborhood of the pixel of the CT first-order enhancement feature map of the pneumonia image, represents the pixel value of the pixel of the CT first-order enhancement feature map of the pneumonia image, represents the corresponding neighborhood mean enhancement component in the CT first-order enhancement feature map of the pneumonia image, and the implementation code is:

[0151] topological disturbance degree calculation

[0152] def compute_topo_delta(F_FE, x, y):

[0153] H, W = F_FE.shape

[0154] boundary_pairs = [((x, y), (x + 1, y)),

[0155] ((x + 1, y), (x + 1, y + 1)),

[0156] ((x + 1, y + 1), (x, y + 1)),

[0157] ((x, y + 1), (x, y))]

[0158] delta = 0.0

[0159] for (i, j) in boundary_pairs:

[0160] if 0<= i[0]<H and 0<= i[1]<W and 0<= j[0]<H and 0<= j[1]<W:

[0161] delta += np.linalg.norm(F_FE[i] - F_FE[j])

[0162] return delta

[0163] # Regional enhancement coefficient calculation

[0164] def compute_region_enhance_map(F_FE, mu=6.0, eps=1e-3):

[0165] H, W = F_FE.shape

[0166] h_blocks = H / / 2

[0167] w_blocks = W / / 2

[0168] delta_map = np.zeros((h_blocks, w_blocks))

[0169] for i in range(h_blocks):

[0170] for j in range(w_blocks):

[0171] x, y = 2 * i, 2 * j

[0172] delta_map[i, j] = compute_topo_delta(F_FE, x, y)

[0173] Z = np.max(delta_map) + eps

[0174] gamma = np.tanh(mu * (1 - delta_map / Z))

[0175] return gamma

[0176] # Regional enhancement coefficient upsampling

[0177] def upsample_to_pixel_level(gamma, H, W):

[0178] upsampled = zoom(gamma, (H / gamma.shape[0], W / gamma.shape[1]),order=1)

[0179] return np.clip(upsampled, 0, 1)

[0180] # Generation of second-order enhanced feature maps for pneumonia imaging CT scans

[0181] def apply_topo_guided_enhancement(F_FE, Gamma):

[0182] H, W = F_FE.shape

[0183] F_SE = np.zeros_like(F_FE)

[0184] for x in range(H):

[0185] for y in range(W):

[0186] N = []

[0187] for dx in [-1, 0, 1]:

[0188] for dy in [-1, 0, 1]:

[0189] xx, yy = x + dx, y + dy

[0190] if 0 <= xx <H and 0<= yy<W:

[0191] N.append(F_FE[xx, yy])

[0192] if len(N)>0:

[0193] local_mean = np.mean(N)

[0194] F_SE[x, y] = (1 - Gamma[x, y]) * F_FE[x, y] + Gamma[x, y]*local_mean

[0195] return F_SE.

[0196] S5. Weighted fusion of the first-order and second-order enhancement feature maps of pneumonia CT images to generate a fused enhancement feature map of pneumonia CT images.

[0197] Furthermore, in S5, a fusion weighting factor is designed. The specific process is as follows:

[0198] ,

[0199] in For pixels The fusion weight factor at the location, The parameter used to control the sensitivity of the weight response is set to a value in the range of [2, 5]. In this embodiment, the initial value is set to 3.5. Backpropagation optimization is performed by introducing a joint loss function that includes image reconstruction error and regularization constraints. This represents the feature difference between the first-order and second-order enhancement feature maps of pneumonia CT images. Finally, the Sigmoid function is used to limit the range of values ​​of the fusion weight factor to (0,1).

[0200] The first-order and second-order enhancement feature maps of pneumonia CT images were weighted and fused using a fusion weighting factor to obtain the fused enhancement feature map of pneumonia CT images. The specific process is as follows:

[0201] ,

[0202] When the regional enhancement differences are not significant, the fusion enhancement feature map of pneumonia images tends to use the first-order enhancement feature map of pneumonia images for feature representation. When the topological perturbation enhancement brings more new structures, the fusion enhancement feature map of pneumonia images tends to adopt the second-order enhancement feature map of pneumonia images.

[0203] S6, construct an edge-guided nonlinear mean denoising mechanism, comprising: calculating the local noise sensitivity of the pneumonia image CT image fusion enhanced feature map, constructing a structure-guided denoising coefficient for denoising processing to obtain the final feature map of the pneumonia image CT image.

[0204] Further, in the S6, for each pixel of the pneumonia image CT image fusion enhanced feature map , the noise sensitivity in a 3*3 neighborhood is calculated , and the specific process is as follows:

[0205] ,

[0206] wherein and represent the pixel values of the pneumonia image CT image fusion enhanced feature map at pixels and , represents the Euclidean distance;

[0207] Based on the noise sensitivity , a structure-guided denoising coefficient is constructed, and the specific process is as follows:

[0208] ,

[0209] wherein is a hyperparameter for controlling the noise suppression amplitude, and the value range is [0.05, 0.2], and the initial value set in the embodiment is 0.1, and the loss function composed of the joint image reconstruction loss, the smoothness constraint and the regularization term is optimized by back propagation, represents an exponential function;

[0210] The structure-guided denoising coefficient is used for denoising processing of the pneumonia image CT image fusion enhanced feature map, weighted average denoising is applied in the noise area, the original value is retained in the structure edge, and the final feature map of the pneumonia image CT image is generated, and the specific process is as follows:

[0211] ,

[0212] The implementation code is as follows:

[0213] # Calculate the local noise sensitivity of a single pixel

[0214] def compute_local_variance(F_fused, x, y, window_size=3):

[0215] H, W = F_fused.shape

[0216] half = window_size / / 2

[0217] values = []

[0218] for dx in range(-half, half + 1):

[0219] for dy in range(-half, half + 1):

[0220] xx, yy = x + dx, y + dy

[0221] if 0 <= xx < H and 0 <= yy < W:

[0222] values.append(F_fused[xx, yy])

[0223] values = np.array(values)

[0224] variance = np.mean((values - F_fused[x, y]) ** 2)

[0225] return variance

[0226] # Calculate the noise suppression coefficient for each pixel

[0227] def compute_beta_map(F_fused, tau = 0.1):

[0228] H, W = F_fused.shape

[0229] beta_map = np.zeros((H, W))

[0230] for x in range(H):

[0231] for y in range(W):

[0232] v_i = compute_local_variance(F_fused, x, y)

[0233] beta_map[x, y] = np.exp(-v_i / (tau ** 2))

[0234] return beta_map

[0235] # Noise Suppression Processing

[0236] def apply_denoising(F_fused, beta_map):

[0237] H, W = F_fused.shape

[0238] F_final = np.zeros_like(F_fused)

[0239] for x in range(H):

[0240] for y in range(W):

[0241] local_values ​​= []

[0242] for dx in [-1, 0, 1]:

[0243] for dy in [-1, 0, 1]:

[0244] xx, yy = x + dx, y + dy

[0245] if 0 <= xx <H and 0<= yy<W:

[0246] local_values.append(F_fused[xx, yy])

[0247] local_mean = np.mean(local_values)

[0248] beta = beta_map[x, y]

[0249] F_final[x, y] = (1 - beta) * F_fused[x, y]+ beta * local_mean

[0250] return F_final.

[0251] S7. The final feature map of the pneumonia CT image is processed by 3×3 convolution to obtain the pneumonia CT enhanced image.

[0252] Furthermore, in step S7, the final feature map of the pneumonia CT image is... Enhanced CT images of pneumonia were obtained through 3×3 convolution processing. The specific process is as follows:

[0253] ,

[0254] wherein represents a 3*3 convolution.

[0255] Further, the method uses the Pycharm application and the Python language to write codes, uses a Pytorch framework, trains a pneumonia image CT image with an input resolution of 640*640*3, and freezes 50 epochs in model training of 300 epochs.

[0256] The above merely describes the preferred embodiments of the present application, and it should be noted that, for those skilled in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application.

Claims

1. An adaptive enhancement method for CT images of pneumonia, characterized in that, Includes the following steps: S1. Collect CT images of pneumonia and create a dataset of CT images of pneumonia. S2. Perform preliminary feature extraction on the CT images of pneumonia to obtain the initial feature map of the CT images of pneumonia; S3. Construct a nonlinear adaptive enhancement strategy, including: calculating the similarity measure between pixels in the initial feature map of pneumonia CT image, designing local symmetry perturbation enhancement coefficients, adopting nonlinear enhancement relationships, and performing adaptive enhancement through the similarity and difference between pixels to generate a first-order enhanced feature map of pneumonia CT image. S31. For each pixel in the initial feature map of the pneumonia CT image, calculate the similarity measure between pixels in the neighborhood within a 3×3 window; S32. For each pixel, select its neighborhood within a 3×3 window to construct a symmetrical pixel pair. For each symmetrical 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. S4. Construct a topology-perturbation-guided spatial enhancement module, including: using a sliding window to segment the first-order enhancement feature map of pneumonia image CT, calculating the degree of topology perturbation in each region, constructing a normalized weight tensor and mapping it to a region-level enhancement coefficient, upsampling the region-level enhancement coefficient to obtain the full-image pixel-level enhancement coefficient, and then enhancing it to obtain the second-order enhancement feature map of pneumonia image CT. The first-order enhancement feature map of pneumonia CT is slid in a 2×2 sliding window. For each region obtained by sliding the window, the degree of topological perturbation is calculated. Based on the degree of topological perturbation of each region, a normalized weight tensor for that region is constructed. The normalized weight tensor is then mapped to a region-level enhancement coefficient. S5. Weighted fusion of the first-order enhancement feature map and the second-order enhancement feature map of pneumonia CT image to generate a fused enhancement feature map of pneumonia CT image. S6. Construct an edge-guided nonlinear mean denoising mechanism, including: calculating the local noise sensitivity of the fused enhanced feature map of pneumonia CT images, constructing a structure-guided denoising coefficient for denoising processing, and obtaining the final feature map of pneumonia CT images. For each pixel of the fusion enhancement feature map of pneumonia CT image, calculate its noise sensitivity in a 3×3 neighborhood, construct a structure-guided noise reduction coefficient based on the noise sensitivity, and use the structure-guided noise reduction coefficient to perform noise reduction processing on the fusion enhancement feature map of pneumonia CT image to generate the final feature map of pneumonia CT image. S7. The final feature map of the pneumonia CT image is processed by 3×3 convolution to obtain the pneumonia CT enhanced image.

2. The adaptive enhancement method for CT images of pneumonia according to claim 1, characterized in that, In step S3, the process of constructing the local symmetry perturbation enhancement coefficient includes: S31. Initial feature map of pneumonia CT images Each pixel in The neighborhood within a 3x3 window Calculate the similarity measure between pixels ; S32, For each pixel Select the neighborhood within its 3×3 window. Construct symmetrical pixel pairs: , , and Define a set of symmetric pixel pairs For each symmetrical pixel pair The absolute value of the grayscale difference is calculated and averaged, and then the Sigmoid function is used to smooth the mapping to (0,1) to obtain the local symmetry perturbation enhancement coefficient. The specific process is as follows: , in This represents the Sigmoid function. To control the parameters that enhance sensitivity, and These represent the initial feature maps of pneumonia CT images, respectively, at symmetrical pixel pairs. The pixel value at that location.

3. The adaptive enhancement method for CT images of pneumonia according to claim 2, characterized in that, In S3, the local symmetry perturbation enhancement coefficient is introduced. It employs a non-linear enhancement relationship, performing adaptive enhancement based on the similarity and differences between pixels. For each pixel... Its enhancement results The generation process is as follows: , Enhanced pixels First-order enhancement feature map of pneumonia imaging CT The specific process is as follows: , Where N represents the total number of pixels in the first-order enhanced feature map of pneumonia images on CT.

4. The adaptive enhancement method for CT images of pneumonia according to claim 3, characterized in that, In step S4, the input image is a first-order enhanced CT feature map of pneumonia. The first-order enhanced CT feature map of pneumonia is slid in a 2×2 sliding window, and the area obtained each time the window slides is... The coordinates of the top left corner are The set of boundary pixel pairs contained in the region for: , Calculate the degree of topological perturbation in each region The calculation process is as follows: , in Represents Euclidean distance. Indicates the area The degree of topological perturbation in and These represent the first-order enhancement feature maps of pneumonia images on CT at pixel levels. and pixels Pixel value at; The normalized weight tensor for each region is constructed based on the degree of topological perturbation. The specific process is as follows: , in To prevent small constants from being divided by zero, This indicates the operation of retrieving the maximum value; Map the normalized weight tensor to region-level enhancement coefficients. The specific process is as follows: , in Indicates the area The regional enhancement coefficient in the middle, To control the nonlinearity parameter of the enhancement coefficient, This refers to the Tanh function.

5. The adaptive enhancement method for CT images of pneumonia according to claim 4, characterized in that, In step S4, the process of generating the second-order enhanced CT feature map of the pneumonia image is as follows: For the region-level enhancement coefficient Upsampling is performed to obtain the pixel-level enhancement coefficients for the entire image. The specific process is as follows: , in Indicates an upsampling operation; The second-order enhancement feature map of pneumonia images is obtained by enhancing each pixel based on the full-image pixel-level enhancement coefficient. The specific process is as follows: , in Pixels representing the first-order enhancement feature map of pneumonia images on CT. The local neighborhood, Pixels representing the first-order enhancement feature map of pneumonia images on CT. pixel values, This represents the mean enhancement component of the corresponding neighborhood in the first-order enhancement feature map of pneumonia images on CT.

6. The adaptive enhancement method for CT images of pneumonia according to claim 5, characterized in that, In S5, a fusion weighting factor is designed. The specific process is as follows: , in For pixels The fusion weight factor at the location, The parameters used to control the sensitivity of the weighted response, This indicates the feature difference between the first-order and second-order enhancement feature maps of pneumonia CT images. The first-order and second-order enhancement feature maps of pneumonia CT images were weighted and fused using a fusion weighting factor to obtain the fused enhancement feature map of pneumonia CT images. The specific process is as follows: 。 7. The adaptive CT image enhancement method for pneumonia imaging according to claim 6, characterized in that, In step S6, for each pixel of the fusion enhancement feature map of the pneumonia CT image... Calculate its 3×3 neighborhood Internal noise sensitivity The specific process is as follows: , in and These represent the fusion enhancement feature maps of pneumonia CT images at the pixel level. and Pixel value at that location, Represents Euclidean distance; Based on noise sensitivity Construction structure guides noise suppression coefficient The specific process is as follows: , in To control the hyperparameters of noise suppression amplitude, Represents an exponential function; Using structure-guided noise suppression coefficients Noise reduction processing is performed on the enhanced feature maps of fused CT images of pneumonia to generate the final feature maps of CT images of pneumonia. The specific process is as follows: 。

Citation Information

Patent Citations

  • 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