A method for enhancing X-ray images of scoliosis

By introducing a bone shadow edge intensity modulation factor, an abnormal gravity kernel function, and a multi-scale attention response map, the scoliosis X-ray image enhancement method solves the problem of insufficient detail recovery in existing scoliosis X-ray images, achieving high-precision enhancement of scoliosis X-ray images and improving the clinical readability and diagnostic accuracy of the images.

CN121921174BActive Publication Date: 2026-07-17AIR FORCE MEDICAL CENT PLA

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
AIR FORCE MEDICAL CENT PLA
Filing Date
2026-01-14
Publication Date
2026-07-17

AI Technical Summary

Technical Problem

Existing technologies lack targeted modeling of spinal morphological features in super-resolution enhancement of X-ray images of scoliosis, and fail to effectively restore anatomical prior information such as vertebral curvature, distribution density, and local lesions, resulting in insufficient detail recovery capabilities in scenarios with abrupt curvature changes.

Method used

By introducing a bone shadow edge intensity modulation factor, an abnormal gravity kernel function, and a multi-scale attention response map, and combining grayscale bone shadow dynamic contrast mapping and multi-scale fusion weights, a method for enhancing X-ray images of scoliosis is constructed. Through vertebral body center point sequence and curvature-guided saliency map, the high curvature region is significantly focused and the low curvature region is suppressed. The multi-scale attention response map is fused to enhance image clarity.

Benefits of technology

It improves the distinguishability of spinal contour, scoliosis features and lesion boundaries, enhances the clinical readability and diagnostic accuracy of images, and achieves high-precision enhancement of X-ray images of scoliosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121921174B_ABST
    Figure CN121921174B_ABST
Patent Text Reader

Abstract

This invention provides a method for enhancing X-ray images of scoliosis, relating to the field of image enhancement. It introduces a bone shadow edge intensity modulation factor to construct a grayscale bone shadow dynamic contrast mapping, achieving initial enhancement of the scoliosis X-ray image. The method extracts the vertebral body center point sequence along the spinal centerline, introduces a curvature parameter, and constructs an abnormal gravity kernel function to enhance the scoliosis X-ray image, achieving significant focusing in high-curvature regions and smoothing suppression in low-curvature regions. Furthermore, it establishes a vertebral body distribution density mapping, constructs a multi-scale attention response map, introduces multi-scale fusion weights, and fuses the multi-scale attention response map with the curvature-guided saliency map to obtain the enhanced scoliosis X-ray image. This makes the vertebral body edges, abnormal curvature, and density abrupt change regions clearer, improving clinical readability and diagnostic accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image enhancement, and specifically relates to a method for enhancing X-ray images of scoliosis. Background Technology

[0002] Scoliosis is a common spinal deformity. Diagnosis and treatment decisions for scoliosis heavily rely on X-ray imaging, especially full-spine anteroposterior and lateral images for accurate assessment of key indicators such as vertebral morphology, spinal curvature, and Cobb angle. However, X-ray imaging is limited by radiation dose, equipment resolution, and acquisition conditions, often resulting in image blurring, loss of detail, and high noise levels at low doses, affecting the accuracy of subsequent condition assessment and surgical planning. Therefore, a robust super-resolution enhancement method for scoliosis X-ray images is needed, combining spinal anatomical characteristics, multi-scale feature fusion, and high robustness to achieve high-precision restoration of vertebral details, spinal curvature, and local bony structures, thereby improving image quality and meeting the high standards required for clinical spinal observation and surgical planning.

[0003] Publication No. CN111899880B proposes a method for extracting trabecular bone parameters and assessing fracture risk based on X-ray images. This method involves structural segmentation of lumbar spine images and extraction of features such as trabecular bone thickness, volume fraction, and connectivity. A CNN model is then used to perform lesion risk analysis. Publication No. CN117522682A proposes a resolution reconstruction method for X-ray images. This method employs a super-resolution generation model composed of a target-dense residual network layer, multiple convolutional layers, and upsampling layers. It integrates global attention features and spatial features, and the trained network achieves super-resolution generation of X-ray images under harsh conditions. This method is relatively universal and applicable to the fine-grained reconstruction of various X-ray images.

[0004] Existing technologies still have significant shortcomings in super-resolution enhancement of X-ray images of scoliosis: most methods only process bone structures or general X-ray images, lacking targeted modeling of spinal morphological features and failing to consider prior anatomical information such as vertebral curvature, distribution density, and local lesions; at the same time, most existing image super-resolution models adopt a uniform global feature reconstruction strategy, lacking focused optimization of local salient regions, resulting in insufficient detail recovery capabilities in scenarios with abrupt curvature changes such as scoliosis. Summary of the Invention

[0005] This invention provides a method for enhancing X-ray images of scoliosis. First, a bone shadow edge intensity modulation factor is introduced to construct a grayscale bone shadow dynamic contrast mapping, achieving initial enhancement of the scoliosis X-ray image. Next, the vertebral body center point sequence along the spinal centerline is extracted, and a curvature parameter is introduced to construct an abnormal gravity kernel function to enhance the scoliosis X-ray image, achieving significant focusing in high-curvature regions and smooth suppression in low-curvature regions, effectively improving the discriminability of spinal contours, scoliosis features, and lesion boundaries. Finally, a vertebral body distribution density mapping is established, a multi-scale attention response map is constructed, and multi-scale fusion weights are introduced to fuse the multi-scale attention response map and the curvature-guided saliency map, resulting in an enhanced scoliosis X-ray image. This makes the vertebral body edges, abnormal curvature, and density abrupt change regions clearer, improving clinical readability and diagnostic accuracy.

[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for enhancing X-ray images of scoliosis, comprising the following steps.

[0007] S1. Convert the DICOM format file to PNG image format and obtain X-ray images of scoliosis to create a dataset.

[0008] S2. The X-ray image of scoliosis is divided using a sliding window, and a bone shadow edge intensity modulation factor is introduced. The preliminary enhanced X-ray image of scoliosis is obtained through the initial enhancement of gray-scale bone shadow dynamic contrast mapping.

[0009] S3. Extract the vertebral body center point sequence from the preliminary enhanced X-ray image of scoliosis, calculate the curvature of the parameter position, construct the abnormal gravity kernel function through the second derivative of curvature, and obtain the curvature-guided saliency map.

[0010] S4. Construct a vertebral body distribution density mapping based on the vertebral body center point sequence, introduce multi-scale fusion weights, and fuse the multi-scale attention response map and curvature-guided saliency map to obtain the final enhanced X-ray image of scoliosis.

[0011] S5. Construct a super-resolution model for X-ray images of scoliosis, and enhance low-resolution X-ray images of scoliosis by using grayscale bone shadow dynamic contrast mapping, abnormal gravity kernel function, multi-scale fusion weight, and multi-scale attention response map, and output the enhanced X-ray image of scoliosis.

[0012] Preferably, in step S1, scoliosis X-ray images of the spine are acquired in DICOM format, the DICOM format files are converted into PNG format images, large black exposure areas and informationless edge areas in the scoliosis X-ray images are removed, allowing the model to focus on the spine itself, all scoliosis X-ray images are adjusted to a uniform size, non-local mean denoising is used to suppress common noise in X-ray images, and the scoliosis X-ray image dataset is divided into training set, validation set and test set.

[0013] Preferably, scoliosis X-ray images are often affected by factors such as imaging dose, patient posture and equipment performance during actual clinical acquisition, resulting in low overall image contrast, blurred bone shadow edges and strong background tissue interference. In particular, the vertebral structure occupies a small proportion in the image and has weak feature representation, making it easy to be masked by noise or artifacts, which seriously affects the accuracy and stability of subsequent scoliosis X-ray image enhancement and super-resolution reconstruction.

[0014] Preferably, in step S2, the input scoliosis X-ray image H, W, and C represent the height, width, and number of channels of the scoliosis X-ray image, respectively. At each pixel to be processed... Build a fixed-size sliding window around it. , , The sliding window size is ;

[0015] Pixels in X-ray images of scoliosis are obtained using gradient operators. The gradient magnitude is calculated, and the maximum gradient magnitude among all pixels in the scoliosis X-ray image is used as the normalization reference value to calculate the pixel point. The ratio between the gradient magnitude and the reference value forms a local gradient index. A modulation coefficient is applied to this ratio to scale the local gradient index. The adjusted result is then nonlinearly mapped using a logarithmic function to obtain the bone shadow edge intensity modulation factor. .

[0016] Preferably, in step S2, the pixels in the scoliosis X-ray image are... The mean and standard deviation of the grayscale values ​​of the sliding window are calculated respectively. The grayscale value of the current pixel is subtracted from the mean grayscale value of that pixel, and the difference is used as an offset term. The standard deviation and a set constant are used as the denominator term, and the offset term is normalized. A bone shadow edge intensity modulation factor is introduced to scale the normalized result. The scaled result is then superimposed with the mean grayscale value to construct a preliminary enhancement process for the grayscale bone shadow dynamic contrast mapping, resulting in the pixels with preliminary enhancement. ;

[0017] By outputting an enhanced pixel value for each pixel, a preliminary enhanced X-ray image of scoliosis is obtained. .

[0018] Preferably, in step S2, the bone shadow edge intensity modulation factor is used as a structure-sensitive weighting term during the enhancement of scoliosis X-ray images, providing significant enhancement to edge regions and suppressing low-structure regions, thereby achieving precise highlighting of the bone structure and effective suppression of background regions. This method offers advantages such as strong structure selectivity, controllable enhancement response, and good preservation of image naturalness, making it suitable for enhancing regions with complex structures and uneven contrast in medical X-ray images. The preliminary enhancement processing based on grayscale bone shadow dynamic contrast mapping can effectively suppress background regions while improving bone shadow clarity, exhibiting high integration and structural adaptability, and is particularly suitable for scenarios with blurred bone edges and weak structural contrast in spinal X-ray images.

[0019] Preferably, vertebral alignment in scoliosis X-ray images exhibits significant nonlinear curvature changes, particularly in the scoliosis region, where the relative angles, spacing, and curvature between vertebrae show highly abnormalities. This structural distortion is difficult to capture and enhance using traditional convolutional receptive fields. Existing methods often rely on uniform scale or local texture as attention criteria, lacking a saliency modeling mechanism for "abnormal vertebral curvature regions," resulting in insensitivity to processing key distorted regions during super-resolution enhancement.

[0020] Preferably, in step S3, a series of discrete vertebral body center point sequences along the spinal centerline are extracted from the preliminary enhanced X-ray image of scoliosis. The center point sequence obtains the center position of each vertebra by performing edge detection on the spinal region and then extracting the geometric midline between the left and right boundaries of the spine. N represents the number of discrete sampling points along the spinal centerline. The vertebral center point sequence is obtained by interpolation curve fitting. The curve is fitted to a continuous curve, denoted as: s is the normalized curve parameter;

[0021] Based on the continuous curve, the first and second derivatives of the parameter position s on the curve are calculated in the horizontal and vertical directions. The squares of the first derivative values ​​in the horizontal and vertical directions are summed and their square roots are taken. The numerator term is constructed by combining the cross product difference of the first and second derivatives in the horizontal and vertical directions, and a curvature expression term is constructed to obtain the curvature of the parameter position s. And by taking the second derivative with respect to curvature, we obtain ;

[0022] Calculate the current pixel based on the vertebral body center point sequence. The coordinate differences in the horizontal and vertical directions are calculated, and each difference is squared to form an independent axial squared distance term. The squared distance terms in the horizontal and vertical directions are divided by the square of the respective set axial Gaussian gravitational radius to form a normalized distance index with direction awareness. The distance indices in the horizontal and vertical directions are added to form a normalized distance metric term. A curvature adjustment factor is introduced to compress the influence of the distant center point on the current pixel point. The second derivative of curvature is introduced, and the absolute value of the rate of change of curvature is weighted and integrated to dynamically amplify the contribution of local morphological features to the anomalous gravity kernel function. Finally, the contribution values ​​of all cone center points are aggregated to obtain the anomalous gravity kernel function at the current pixel point.

[0023] Calculate the anomalous gravity kernel function for each pixel in the preliminary enhanced X-ray image of scoliosis and construct a curvature-guided saliency map.

[0024] Preferably, in step S3, a continuous curve model is established based on the vertebral body center point sequence. The curvature and its second derivative changes in the curve within the normalized parameter space are calculated. The high-curvature region is nonlinearly weighted and modeled using the constructed two-dimensional abnormal gravity kernel function, thereby achieving adaptive enhancement of local geometric anomalies of the spine. This method uses the spatial radius parameter to constrain the attraction range of the abnormal point at different scales. The weight distribution of different curvature regions is dynamically adjusted by the adjustment factor, thereby achieving significant focusing of high-curvature regions and smooth suppression of low-curvature regions in the enhanced image, effectively improving the discriminability of spinal contours, scoliosis features, and lesion boundaries.

[0025] Preferably, in the enhancement processing of scoliosis X-ray images, in addition to the extraction of structural information and anomaly modeling, the effectiveness of image enhancement also highly depends on the response coordination at different scales of the image and the ability to preserve structure during the reconstruction stage. Traditional methods often adopt fixed-scale feature fusion and image reconstruction strategies, which are difficult to adapt to different regions, such as dense vertebral areas and sparse background areas. The heterogeneity in structural expression can easily cause edge blurring, texture drift, or even vertebral structural distortion. At the same time, in the reconstruction process of scoliosis X-ray images, the prior constraint of the continuity of the overall anatomical structure of the spine is ignored, which means that although the resolution of the enhanced image is improved, there is distortion in the structural consistency and expression of bony boundaries.

[0026] Preferably, in step S4, pixels are used. With vertebral body center point sequence Using the Euclidean distance between points as a basis, an exponential decay term reflecting spatial interval is constructed by squaring this distance value. A Gaussian kernel smoothing factor is introduced into the denominator to adjust the diffusion rate of the exponential decay term. The sum of the exponential weights at all locations is normalized, with the normalization factor being the global maximum of the sum. This is applied to the pixels in the initial enhanced X-ray image of scoliosis. Establish vertebral body distribution density mapping ;

[0027] After obtaining the vertebral body distribution density mapping, the vertebral body density mapping at scale t is obtained by downsampling and smoothing the vertebral body distribution density mapping at scale t, based on the vertebral body morphological features at different spatial scales. A multi-scale attention response map at scale t is constructed by calculating the proportion of the cone density mapping at scale t to the total scale level. .

[0028] Preferably, in step S4, a vertebral body distribution density map is first constructed based on the vertebral body center point sequence. Pixels at different locations are weighted and projected using a Gaussian kernel to obtain a continuous density field that reflects the spatial distribution probability of the vertebral body. Adaptive adjustment for images from different patients is achieved through a smoothing factor. To enhance the detail representation of the vertebral body structure at different scales, vertebral body density maps at different scales are generated under a multi-scale sampling framework. By constructing a multi-scale attention response map, higher weights are assigned to local high-density vertebral body regions while suppressing interference from low-density and non-vertebral body regions. This enhances subtle vertebral body features while maintaining overall structural consistency.

[0029] Preferably, in step S4, the curvature of the i-th vertebra at scale t is obtained using the curvature calculation formula. , ,pass Calculate the mean curvature at scale t Based on the vertebral density mapping With sampling range The spatial aggregation degree corresponding to the calculated scale is obtained. , For the preliminary enhanced X-ray image region of scoliosis corresponding to scale t, a curvature weighting adjustment coefficient is introduced. With density weight adjustment coefficient The average curvature and spatial aggregation degree corresponding to scale t are weighted and integrated, and a nonlinear balance factor is introduced for power transformation. The multi-scale fusion weights for scale t are obtained by standardization adjustment using normalization coefficients. ;

[0030] After obtaining the multi-scale fusion weights at each scale, for any location to be enhanced, a scale-wise multiplication operation is performed between the corresponding multi-scale attention response map and the multi-scale fusion weights to obtain the local enhancement contribution at that scale. The spatial importance of the responses at each scale is adjusted by the curvature-guided saliency map to obtain the enhanced pixel value. ;

[0031] By calculating the enhanced pixel value of each pixel, the final enhanced X-ray image of scoliosis is obtained.

[0032] Preferably, in step S4, by introducing a multi-scale fusion strategy driven by the synergistic effect of vertebral curvature and distribution density, the fusion weights are adaptively allocated at different scales. This enables local enhancement in areas with high curvature and high density abnormalities, while maintaining grayscale stability in smooth areas. Finally, the enhanced scoliosis X-ray image is obtained by integrating the multi-scale responses pixel by pixel, making the vertebral body edges, abnormal curvature, and density mutation areas clearer, while ensuring the overall image smoothness and robustness, and improving clinical readability and diagnostic accuracy.

[0033] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0034] This invention provides a method for enhancing X-ray images of scoliosis. Existing methods mostly use general image denoising or contrast enhancement strategies, which lack modeling of spinal anatomical features. This invention introduces a grayscale bone shadow dynamic contrast mapping mechanism, which combines local grayscale statistics and edge gradient distribution, and uses the features of vertebral arrangement, intervertebral space and scoliosis region for adaptive enhancement, thereby avoiding the indiscriminate processing of details and noise by traditional methods.

[0035] This invention designs an abnormal gravity kernel function that incorporates vertebral curvature, grayscale changes, and morphological priors into a unified modeling framework, enabling dynamic saliency extraction of high-curvature scoliosis regions and obtaining more accurate feature responses under complex spinal morphology.

[0036] This invention introduces a multi-scale attention response map, which is fused with a curvature-guided saliency map. Through cross-scale weighting, saliency adaptation, and spatial structure alignment, it achieves deep coupling between global morphology preservation and local detail restoration. Attached Figure Description

[0037] Figure 1 This is a flowchart of a method for enhancing X-ray images of scoliosis provided by the present invention.

[0038] Figure 2 This is a diagram of the dynamic contrast mapping structure of grayscale bone shadows provided by the present invention.

[0039] Figure 3 This is the structure diagram of the curvature-guided saliency map provided by the present invention.

[0040] Figure 4 This is a comparison of super-resolution X-ray images of scoliosis of the spine provided by the present invention. Detailed Implementation

[0041] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0042] Please see Figures 1 to 4 This invention provides a method for enhancing X-ray images of scoliosis. First, a bone shadow edge intensity modulation factor is introduced to construct a grayscale bone shadow dynamic contrast mapping, achieving initial enhancement of the scoliosis X-ray image. Next, the vertebral body center point sequence along the spinal centerline is extracted, and a parameter curvature is introduced to construct an abnormal gravity kernel function to enhance the scoliosis X-ray image, achieving significant focusing in high-curvature regions and smooth suppression in low-curvature regions, effectively improving the discriminability of spinal contours, scoliosis features, and lesion boundaries. Finally, a vertebral body distribution density mapping is established, a multi-scale attention response map is constructed, and a multi-scale fusion weight is introduced to fuse the multi-scale attention response map and the curvature-guided saliency map, resulting in the enhanced scoliosis X-ray image.

[0043] Please see Figure 1 As shown in the embodiment of this application, there is a method for enhancing X-ray images of scoliosis.

[0044] S1. Convert the DICOM format file to PNG image format and obtain X-ray images of scoliosis to create a dataset.

[0045] Furthermore, scoliosis X-ray images of the spine were acquired using the DICOM format. The DICOM files were converted to PNG images to remove large black areas of exposure and informationless edge regions from the scoliosis X-ray images, allowing the model to focus on the spine itself. All scoliosis X-ray images were adjusted to a uniform size of 512×640, and nonlocal means denoising was used to suppress common noise in X-ray images. The scoliosis X-ray image dataset was divided into training, validation, and test sets in a 6:2:2 ratio, containing 240, 40, and 40 images respectively.

[0046] S2. The X-ray image of scoliosis is divided using a sliding window, and a bone shadow edge intensity modulation factor is introduced. The preliminary enhanced X-ray image of scoliosis is obtained through the initial enhancement of gray-scale bone shadow dynamic contrast mapping.

[0047] Furthermore, such as Figure 2As shown, the input X-ray image of scoliosis H, W, and C represent the height, width, and number of channels of the scoliosis X-ray image, respectively, and are set to 640, 512, and 3. At each pixel to be processed... Build a fixed-size sliding window around it. , , The sliding window size is The range of values ​​for k is The initial value was set to 12, and then fine-tuned according to the resolution of the scoliosis X-ray image.

[0048] Because there are significant gray-level abrupt changes in the edge region of the bone shadow in X-ray images of scoliosis, an intensity modulation factor for the bone shadow edge is introduced. Pixels are extracted using the Sobel gradient operator. The gradient magnitude is calculated, and the maximum gradient magnitude among all pixels in the scoliosis X-ray image is used as the normalization reference value to calculate the pixel point. The ratio between the gradient magnitude and the reference value forms a local gradient index. A modulation coefficient is applied to the ratio to scale the local gradient index. The adjusted result is then nonlinearly mapped using a logarithmic function to obtain the bone shadow edge intensity modulation factor. The specific calculation method for the bone shadow edge intensity modulation factor is as follows:

[0049] ;

[0050] In the formula, For X-ray images of scoliosis at pixel points The gradient magnitude at that point is calculated using the Sobel gradient operator. For local gradient indices, These are the modulation coefficients, used to control the enhancement intensity. The initial value was set to 6, and the grayscale value changed abruptly at the edge of the vertebral body and the spinous process. The value is high, and the gradient is small in soft tissue or background. The value tends to 1, suppressing unnecessary amplification.

[0051] Pixels in X-ray images of scoliosis Calculate the average grayscale value of the sliding window containing each pixel. with standard deviation , Given the grayscale value of the i-th pixel within the sliding window, subtract the mean grayscale value of that pixel from its current grayscale value. Use the difference as an offset term. Use the standard deviation and a set constant as the denominator to normalize the offset term. Introduce a bone shadow edge intensity modulation factor to scale the normalized result. Re-superimpose the scaled result with the mean grayscale value to construct a preliminary enhancement process for the grayscale bone shadow dynamic contrast mapping, resulting in the pixels with the preliminary enhancement. The specific calculation formula for the preliminary enhancement processing of grayscale bone shadow dynamic contrast mapping is as follows:

[0052] ;

[0053] In the formula, For pixels grayscale value, For the initial enhanced pixels , To prevent division by zero errors, the stability constant is set to a value of 1. ;

[0054] By outputting a preliminary enhanced pixel value for each pixel, a preliminary enhanced X-ray image of scoliosis is obtained. .

[0055] S3. Extract the vertebral body center point sequence from the preliminary enhanced X-ray image of scoliosis, calculate the curvature of the parameter position, construct the abnormal gravity kernel function through the second derivative of curvature, and obtain the curvature-guided saliency map.

[0056] Furthermore, such as Figure 3 As shown, a series of discrete vertebral body center point sequences along the spinal centerline are extracted from the preliminary enhanced X-ray image of scoliosis. ,in N is the number of discrete sampling points on the spinal centerline. The value of N is 5. The center point sequence is obtained by performing edge detection on the spinal region and then extracting the geometric midline between the left and right boundaries of the spine to obtain the center position of each vertebra.

[0057] The vertebral body center point sequence was obtained by interpolation curve fitting. The curve is fitted to a continuous curve, denoted as: s is the normalized curve parameter. ;

[0058] Based on the continuous curve, the first and second derivatives of the parameter position s on the curve are calculated in the horizontal and vertical directions. The squares of the first derivative values ​​in the horizontal and vertical directions are summed and their square roots are taken. The numerator term is constructed by combining the cross product difference of the first and second derivatives in the horizontal and vertical directions, and a curvature expression term is constructed to obtain the curvature of the parameter position s. And by taking the second derivative with respect to curvature, we obtain The curvature of parameter position s The specific calculation formula is as follows:

[0059] ;

[0060] In the formula, Let be the first derivative of the parameter s on the curve in the horizontal direction. Let be the first derivative of the parameter s on the curve in the vertical direction. Let be the second derivative of the parameter s on the curve in the vertical direction. Let be the second derivative of the parameter s on the curve in the vertical direction, and let be the curvature. This indicates the degree of curvature of the curve at parameter s;

[0061] Calculate the current pixel based on the vertebral body center point sequence. The coordinate differences in the horizontal and vertical directions are calculated, and each difference is squared to form an independent axial squared distance term. These two squared distance terms are then divided by the square of their respective axial Gaussian gravitational radii to form a normalized distance index with direction awareness. The horizontal and vertical distance indices are summed to form a normalized distance metric. A curvature adjustment factor is introduced to compress the influence of distant center points on the current pixel. The second derivative of curvature is introduced, and by weighting and integrating the absolute values ​​of the rate of change of curvature, the contribution of local morphological features to the anomalous gravity kernel function can be dynamically amplified. Finally, the contribution values ​​of all cone center points are aggregated to obtain the anomalous gravity kernel function at the current pixel. The specific calculation formula for the anomalous gravity kernel function is as follows:

[0062] ;

[0063] In the formula, and These represent the squared distance terms in the horizontal and vertical directions, respectively. and These are the normalized distance indices for the horizontal and vertical directions, respectively. For curvature adjustment factor, Used to adjust the magnitude of weight changes in different curvature regions. and These represent the Gaussian gravitational radii in the horizontal and vertical directions, respectively, and are denoted by values ​​[value missing]. , Used to control the spatial decay range of the anomalous gravity kernel function;

[0064] The anomalous gravity kernel function of each pixel in the preliminary enhanced X-ray image of scoliosis is calculated, and the curvature-guided saliency map is obtained from the anomalous gravity kernel function of each pixel. This creates an enhanced focusing effect on areas with high curvature.

[0065] S4. Construct a vertebral body distribution density mapping based on the vertebral body center point sequence, introduce multi-scale fusion weights, and fuse the multi-scale attention response map and curvature-guided saliency map to obtain the final enhanced X-ray image of scoliosis.

[0066] Furthermore, in terms of pixels With vertebral body center point sequence Using the Euclidean distance between points as a basis, an exponential decay term reflecting spatial interval is constructed by squaring this distance value. A Gaussian kernel smoothing factor is introduced into the denominator to adjust the diffusion rate of the exponential decay term. The sum of the exponential weights at all locations is normalized, with the normalization factor being the global maximum of the sum. This is applied to the pixels in the initial enhanced X-ray image of scoliosis. Establish vertebral body distribution density mapping The specific calculation formula for vertebral body distribution density mapping is as follows:

[0067] ;

[0068] In the formula, The normalization constant is , Let j be the coordinates of the center point. This is the Gaussian kernel smoothing factor, used to control the diffusion rate of the exponential decay term, with a value range of [value missing]. The vertebral body distribution density mapping reflects the distribution probability of the vertebral body at different locations;

[0069] After obtaining the vertebral body distribution density mapping, the vertebral body density mapping at scale t is obtained by downsampling and smoothing the vertebral body distribution density mapping at scale t, based on the vertebral body morphological features at different spatial scales. In this example, T=3. A multi-scale attention response map at scale t is constructed by the proportion of the cone density mapping at the total scale level corresponding to the cone density mapping at scale t. The specific calculation formula is as follows:

[0070] ;

[0071] As a vertebral density mapping at scale j, the multi-scale attention response map can enable high-density vertebral regions to obtain higher attention weights at different scales;

[0072] The curvature of the i-th vertebra at scale t is obtained using the curvature calculation formula. , ,pass Calculate the mean curvature at scale t , , The number of vertebral samples at scale t. The initial value is set to 1. The curvature of the i-th vertebra at scale t is represented by the vertebral density mapping based on scale t. With sampling range The spatial aggregation degree at scale t is calculated. , , For the preliminary enhanced X-ray image region of scoliosis at scale t, a curvature weighting adjustment coefficient is introduced. With density weight adjustment coefficient Weighted integration of average curvature and spatial aggregation at scale t. The proportion of curvature information in the fusion is controlled, with an initial value set to 0.5. The proportion of density information in the fusion is controlled, with an initial value set to 0.5, and a power transformation is performed. The power-law adjustment parameter is a nonlinear balance factor. The multi-scale fusion weights at scale t are obtained by standardization adjustment using normalization coefficients. The specific formula for calculating the multi-scale fusion weights at scale t is as follows:

[0073] ;

[0074] In the formula, Let j be the average curvature. For the degree of spatial aggregation at scale j, It is a nonlinear balance factor that controls the degree of enhancement in the high-response region. The initial value is 1.6, when At that time, the weight of high-response regions is amplified, which is suitable for highlighting abnormal vertebral body regions. At the same time, smooth out the weight differences between different scales. These are the normalization coefficients;

[0075] After obtaining the multi-scale fusion weights at each scale, for any location to be enhanced, a scale-wise multiplication operation is performed between its corresponding multi-scale attention response map and the multi-scale fusion weights to obtain the local enhancement contribution at that scale. The spatial importance of the responses at each scale is adjusted by the curvature-guided saliency map to obtain the enhanced pixel value. The specific calculation formula is as follows:

[0076] ;

[0077] In the formula, and These are the multi-scale fusion weights and multi-scale attention response maps at scale p, respectively.

[0078] By calculating the enhanced pixel value of each pixel, the final enhanced X-ray image of scoliosis is obtained. .

[0079] S5. Construct a super-resolution model for X-ray images of scoliosis, and enhance low-resolution X-ray images of scoliosis by using grayscale bone shadow dynamic contrast mapping, abnormal gravity kernel function, multi-scale fusion weight, and multi-scale attention response map, and output the enhanced X-ray image of scoliosis.

[0080] Further, in step S5, the low-resolution scoliosis X-ray image is input into the scoliosis X-ray image super-resolution model. First, a bone shadow edge intensity modulation factor is introduced to construct a grayscale bone shadow dynamic contrast mapping, achieving preliminary enhancement of the scoliosis X-ray image. Then, the vertebral body center point sequence on the spinal centerline is extracted, and a parameter curvature is introduced to construct an abnormal gravity kernel function to enhance the scoliosis X-ray image, achieving significant focusing in high curvature regions and smooth suppression in low curvature regions, effectively improving the discriminability of spinal contour, scoliosis features, and lesion boundaries. Afterward, a vertebral body distribution density mapping and a multi-scale attention response map are constructed. Finally, by introducing multi-scale fusion weights, the multi-scale attention response map and curvature-guided saliency map are fused to output the enhanced scoliosis X-ray image. The scoliosis X-ray image super-resolution model is based on the PyTorch framework and implemented using the PyCharm application.

[0081] Furthermore, such as Figure 4 As shown, Figure 4 The left half of the image is the original X-ray image of scoliosis. Figure 4 The right half of the image shows an enhanced X-ray image of scoliosis after processing with a super-resolution model, which effectively improves the clarity of vertebral body edges, abnormal curvature, and areas of density abrupt changes, thereby enhancing clinical readability and diagnostic accuracy.

[0082] The above are merely preferred embodiments of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the inventive concept of the present invention, and these modifications and improvements all fall within the protection scope of the present invention.

Claims

1. A method for enhancing X-ray images of scoliosis, characterized in that, Convert DICOM format files to PNG image format to obtain X-ray images of scoliosis and create a dataset. The X-ray image of scoliosis is divided using a sliding window, and a bone shadow edge intensity modulation factor is introduced. The preliminary enhanced X-ray image of scoliosis is obtained through the preliminary enhancement of gray-scale bone shadow dynamic contrast mapping. The sequence of vertebral center points is extracted from the preliminary enhanced X-ray images of scoliosis, the curvature of the parameter positions is calculated, and an abnormal gravity kernel function is constructed by the second derivative of curvature to obtain a curvature-guided saliency map. A vertebral body distribution density mapping is constructed based on the vertebral body center point sequence. Multi-scale fusion weights are introduced, and multi-scale attention response maps and curvature-guided salience maps are fused to obtain the final enhanced X-ray image of scoliosis. A super-resolution model for X-ray images of scoliosis is constructed. Low-resolution X-ray images of scoliosis are enhanced by dynamic contrast mapping of grayscale bone shadows, abnormal gravity kernel function, multi-scale fusion weight, and multi-scale attention response map. The enhanced X-ray images of scoliosis are then output.

2. The method for enhancing X-ray images of scoliosis according to claim 1, characterized in that, Scoliosis X-ray images were acquired using the DICOM format. The DICOM files were converted to PNG format images to remove large black areas of exposure and informationless edge areas from the scoliosis X-ray images. All scoliosis X-ray images were adjusted to a uniform size, and non-local mean denoising was used to suppress common noise in X-ray images. The scoliosis X-ray image dataset was divided into training, validation, and test sets.

3. The method for enhancing X-ray images of scoliosis according to claim 2, characterized in that, Input X-ray image of scoliosis H, W, and C represent the height, width, and number of channels of the scoliosis X-ray image, respectively. At each pixel to be processed... Build a fixed-size sliding window around it. , , ; Pixels in X-ray images of scoliosis are obtained using gradient operators. The gradient magnitude is calculated, and the maximum gradient magnitude among all pixels in the scoliosis X-ray image is used as the normalization reference value to calculate the pixel point. The ratio between the gradient magnitude and the reference value forms a local gradient index. A modulation coefficient is applied to this ratio to scale the local gradient index. The adjusted result is then nonlinearly mapped using a logarithmic function to obtain the bone shadow edge intensity modulation factor. .

4. The method for enhancing X-ray images of scoliosis according to claim 3, characterized in that, Pixels in X-ray images of scoliosis The mean and standard deviation of the grayscale values ​​of the sliding window are calculated respectively. The grayscale value of the current pixel is subtracted from the mean grayscale value of that pixel, and the difference is used as an offset term. The standard deviation and a set constant are used as the denominator term, and the offset term is normalized. A bone shadow edge intensity modulation factor is introduced to scale the normalized result. The scaled result is then superimposed with the mean grayscale value to construct a preliminary enhancement process for the grayscale bone shadow dynamic contrast mapping, resulting in the pixels with preliminary enhancement. ; By outputting an enhanced pixel value for each pixel, a preliminary enhanced X-ray image of scoliosis is obtained. .

5. The method for enhancing X-ray images of scoliosis according to claim 4, characterized in that, A series of discrete vertebral body center points were extracted from the preliminary enhanced X-ray images of scoliosis. The center point sequence obtains the center position of each vertebra by performing edge detection on the spinal region and then extracting the geometric midline between the left and right boundaries of the spine. N represents the number of discrete sampling points along the spinal centerline. The vertebral center point sequence is obtained by interpolation curve fitting. The curve is fitted to a continuous curve, denoted as: s is the normalized curve parameter; Based on the continuous curve, the first and second derivatives of the parameter position s on the curve are calculated in the horizontal and vertical directions. The squares of the first derivative values ​​in the horizontal and vertical directions are summed and their square roots are taken. The numerator term is constructed by combining the cross product difference of the first and second derivatives in the horizontal and vertical directions, and a curvature expression term is constructed to obtain the curvature of the parameter position s. And by taking the second derivative with respect to curvature, we obtain ; Calculate the current pixel based on the vertebral body center point sequence. The coordinate differences in the horizontal and vertical directions are calculated, and each difference is squared to form an independent axial squared distance term. The squared distance terms in the horizontal and vertical directions are divided by the square of the respective set axial Gaussian gravitational radius to form a normalized distance index with direction awareness. The distance indices in the horizontal and vertical directions are added to form a normalized distance metric term. A curvature adjustment factor is introduced to compress the influence of the distant center point on the current pixel point. The second derivative of curvature is introduced, and the absolute value of the rate of change of curvature is weighted and integrated to dynamically amplify the contribution of local morphological features to the anomalous gravity kernel function. Finally, the contribution values ​​of all cone center points are aggregated to obtain the anomalous gravity kernel function at the current pixel point. Calculate the anomalous gravity kernel function for each pixel in the preliminary enhanced X-ray image of scoliosis and construct a curvature-guided saliency map.

6. The method for enhancing X-ray images of scoliosis according to claim 5, characterized in that, In pixels With vertebral body center point sequence Using the Euclidean distance between points as a basis, an exponential decay term reflecting spatial interval is constructed by squaring this distance value. A Gaussian kernel smoothing factor is introduced into the denominator to adjust the diffusion rate of the exponential decay term. The sum of the exponential weights at all locations is normalized, with the normalization factor being the global maximum of the sum. This is applied to the pixels in the initial enhanced X-ray image of scoliosis. Establish vertebral body distribution density mapping ; After obtaining the vertebral body distribution density mapping, the vertebral body density mapping at scale t is obtained by downsampling and smoothing the vertebral body distribution density mapping at scale t, based on the vertebral body morphological features at different spatial scales. A multi-scale attention response map at scale t is constructed by calculating the proportion of the cone density mapping at scale t to the total scale level. .

7. The method for enhancing X-ray images of scoliosis according to claim 6, characterized in that, The curvature of the i-th vertebra at scale t is obtained using the curvature calculation formula. , ,pass Calculate the mean curvature at scale t Based on the vertebral density mapping With sampling range The degree of spatial aggregation corresponding to scale t is calculated. , For the preliminary enhanced X-ray image region of scoliosis corresponding to scale t, a curvature weighting adjustment coefficient is introduced. With density weight adjustment coefficient The average curvature and spatial aggregation degree corresponding to scale t are weighted and integrated, and a nonlinear balance factor is introduced for power transformation. The multi-scale fusion weights for scale t are obtained by standardization adjustment using normalization coefficients. ; After obtaining the multi-scale fusion weights at each scale, for any location to be enhanced, a scale-wise multiplication operation is performed between its corresponding multi-scale attention response map and the multi-scale fusion weights to obtain the local enhancement contribution at that scale. The spatial importance of the responses at each scale is adjusted by the curvature-guided saliency map to obtain the enhanced pixel value. ; By calculating the enhanced pixel value of each pixel, the final enhanced X-ray image of scoliosis is obtained.