Wound Image Enhancement Method Based on Sparse Coding
By combining sparse coding and pixel-level residual enhancement, the shortcomings of existing wound image enhancement technologies in terms of structural restoration and detail preservation are overcome, and high-precision diagnostic results for wound images are achieved.
Patent Information
- Application Number
- CN202511099568.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-07
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-08-07
AI Technical Summary
Existing wound image enhancement technologies have shortcomings in terms of structural restoration capabilities, edge detail preservation, and scab removal area feature recognition. In particular, they are insufficient to meet the needs of high-precision clinical diagnosis, especially in the reconstruction and diagnostic visualization of low-quality images.
A sparse coding-based approach is adopted, which enhances the local details and global structure of wound images by combining block sparse coding and pixel-level residual enhancement with edge awareness mechanism and weighted fusion model.
While maintaining global structural consistency, it accurately reproduces wound boundaries and local texture structures, improving the diagnostic value and visual clarity of images, and avoiding the problems of local over-enhancement or background noise enhancement in traditional methods.
Smart Images

Figure CN120598788B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image enhancement technology, and in particular to a wound image enhancement method based on sparse coding. Background Technology
[0002] With the development of medical image processing technology, wound images are playing an increasingly important role in clinical procedures such as trauma assessment, healing monitoring, and surgical planning. Especially in the treatment of chronic wounds, doctors often rely on wound images to judge the degree of healing and tissue condition in order to formulate treatment plans. However, due to the influence of many factors such as shooting conditions, image acquisition equipment quality, and individual patient differences, the original wound images often have problems such as uneven lighting, blurriness, lack of detail, and low contrast, which significantly interferes with the analysis and interpretation of the images.
[0003] Currently, mainstream wound image enhancement methods mainly include histogram equalization, Retinex models, contrast-limited adaptive histogram equalization, and traditional image processing algorithms, as well as deep learning enhancement models based on convolutional neural networks that have been developed in recent years. Although traditional algorithms are simple to implement and fast to run, their enhancement mechanisms are mainly based on the overall pixel distribution characteristics of the image, making it difficult to adaptively adjust the degree of detail enhancement in local areas. This often leads to overall image overexposure or blurring of local details. Deep learning methods, on the other hand, have made up for the limitations of traditional methods to some extent. They can learn complex nonlinear enhancement mappings, but the training process relies on a large number of labeled samples, consumes a lot of computational resources, and the model output results lack interpretability, making it difficult to perform structural optimization for specific pathological areas in wound images.
[0004] Especially when processing images of desquamated areas with complex edge structures and fine-grained textures, existing technologies generally face the following problems: First, image enhancement algorithms lack a mechanism for targeted attention to local details, failing to effectively highlight the edge features of the desquamated area, resulting in insufficient information for doctors to judge wound cleanliness and tissue necrosis boundaries; Second, algorithms based on whole-image enhancement strategies often lose structural information of key areas while improving the overall brightness or clarity of the image, affecting the accurate restoration of lesion areas; Third, most existing methods only perform single-stage processing on the image as a whole, lacking a multi-stage differential enhancement mechanism, making it difficult to reuse the residual signals of details between the original image and the enhanced image, thus causing underfitting or overfitting of the image enhancement effect.
[0005] In summary, existing wound image enhancement technologies still have significant shortcomings in terms of structural restoration capabilities, edge detail preservation, and scab removal area feature recognition. Especially in the reconstruction and diagnostic visualization of low-quality images, their enhancement effects are difficult to meet the actual needs of high-precision clinical diagnosis. Therefore, there is an urgent need for a wound image enhancement method that can effectively enhance the edge and texture details of the scab removal area while preserving the global anatomical structure, so as to improve the diagnostic value and visual clarity of the images. Summary of the Invention
[0006] One objective of this invention is to propose a wound image enhancement method based on sparse coding, which enables the final reconstructed image to accurately reproduce the wound boundary and local texture structure while maintaining global structural consistency.
[0007] A wound image enhancement method based on sparse coding according to an embodiment of the present invention includes the following steps:
[0008] S1. Obtain the original wound image and perform format conversion, size normalization and grayscale standardization on the original wound image to form a standardized wound image;
[0009] S2. Divide the standardized wound image into multiple fixed-size wound image sub-blocks to form a set of local wound image blocks;
[0010] S3. Using a pre-constructed sparse dictionary, block-based sparse coding is performed on each sub-block of the local wound image patch set to obtain the sparse representation coefficients of each sub-block of the wound image.
[0011] S4. Based on the sparse expression coefficients of each wound image sub-block, each wound image sub-block is locally reconstructed, and the reconstructed wound image sub-blocks are spliced and fused according to their original spatial positions to obtain a preliminary reconstructed wound image;
[0012] S5. Perform pixel-level difference between the preliminary reconstructed wound image and the standardized wound image to generate a pixel residual map. Perform residual enhancement processing on the pixel residual map to generate a residual enhanced wound image.
[0013] S6. The preliminary reconstructed wound image and the residual enhanced wound image are fused using a weighted fusion strategy to generate the final clear wound image. The final clear wound image retains both the overall structure of the wound image and the local details of the scab removal area, and is output as the final clear wound image.
[0014] Optionally, S1 includes the following steps:
[0015] S11. Collect original wound images and construct an original wound image dataset. :
[0016] ;
[0017] in, This represents the original wound image dataset. Indicates the first Image of the original wound. , , They represent the first The pixel matrix of the red, green, and blue channels of the original wound image. This represents the total number of original wound image samples;
[0018] S12. Perform format conversion processing on each original wound image in the original wound image dataset, convert the color wound image into a single-channel grayscale wound image using the weighted average method, and obtain a grayscale wound image dataset. Each grayscale wound image retains the spatial structure information of the original wound image and removes redundant color components.
[0019] S13. Normalize the size of each grayscale wound image in the grayscale wound image dataset, and resample the wound images to a uniform target resolution. This ensures that all wound images have a consistent spatial scale;
[0020] S14. Perform pixel value standardization on the normalized grayscale wound image, mapping the pixel values in the wound image to the interval through a linear transformation. This ensures that pixel intensity values are distributed within a uniform scale and eliminates the impact of contrast differences in wound images on feature extraction.
[0021] S15. The collection of wound images after grayscale conversion, size normalization, and pixel standardization is uniformly constructed into a standardized wound image dataset. .
[0022] Optionally, S2 includes the following steps:
[0023] S21. Standardized wound image dataset Each standardized wound image in Divide the wound images into fixed-size sections. Divided into multiple sizes The image sub-block of the wound, in which This represents the side length (in pixels) of a sub-block in the wound image;
[0024] S22. Standardized wound images for each type of wound The corresponding set of wound image sub-blocks after division for:
[0025] ;
[0026] in, Image of the wound Located in the middle Line number The image sub-blocks of the wound, , Images of the wound are shown below. The number of wound image sub-blocks that can be completely divided in the vertical and horizontal directions;
[0027] S23. All wound image sub-blocks are indexed according to their spatial order in the original standardized wound image to construct a unified set of local wound image blocks. :
[0028] ;
[0029] in, Indicates the first A sub-block of wound image, This indicates the total number of sub-blocks in the wound image.
[0030] Optionally, S3 includes the following steps:
[0031] S31. Sparse dictionary based on fusion of edge features of the scab removal area of the wound. A collection of local wound image patches Each wound image sub-block Perform sparse coding;
[0032] S32. During the sparse coding process, based on the edge response intensity of the scab removal area, the fitting region of interest for sparse reconstruction is adaptively adjusted for different wound image sub-blocks. For each wound image sub-block... Solve its sparse dictionary The optimal sparse representation coefficient vector :
[0033] ;
[0034] in, For wound image sub-blocks The edge-aware weight matrix, This represents element-wise matrix multiplication. Regularization coefficients used to control sparsity;
[0035] S33. Organize the sparse representation results of all wound image sub-blocks into a sparse representation coefficient set. .
[0036] Optionally, S31 includes the following steps:
[0037] S311. From a set of local wound image patches The training sample set is formed by selecting sub-blocks of wound images with edge texture features and detailed structures greater than a preset value. And an edge feature intensity threshold screening strategy is adopted to make the training sample set Characterizing the unique edge details of the scab-shedding area of the wound, among which, Represents the training sample set The number of sub-blocks in the image;
[0038] S312. Based on the training sample set Initialize a sparse dictionary :
[0039] ;
[0040] in, Represents the first in a sparse dictionary Each dictionary base atom has the same spatial dimensions as the wound image sub-block. And the number of dictionary base atoms satisfy ;
[0041] S313. Introduce an edge-aware weight matrix during sparse dictionary optimization. Edge-aware weight matrix The values of each element in the sparse dictionary are positively correlated with the edge gradient intensity at the corresponding position in the wound image sub-block. This strengthens the expression of edge structure and detail features in the wound desquamation region during the training process of the sparse dictionary, while also enhancing the edge-aware weight matrix. The dictionary base atoms are adaptively adjusted based on the local edge strength of the wound shedding area image. To assess the representational ability of edge regions in sub-blocks of wound images, a sparse dictionary is constructed to optimize the objective function.
[0042] ;
[0043] in, Represents the first term used for sparse dictionary training. A sub-block of the wound image with distinct edge texture features. Indicates the first The optimal sparse representation coefficient vector corresponding to each sub-block of the wound image;
[0044] S314. Repeat the sparse dictionary optimization process in step S313 until the sparse dictionary optimization objective function converges to the preset stable threshold, thereby obtaining a sparse dictionary that integrates the edge features of the wound scab removal area. .
[0045] Optionally, S4 includes the following steps:
[0046] S41. Based on the sparse expression coefficient set And a sparse dictionary that integrates the edge features of the wound desquamation area. Each wound image sub-block is reconstructed locally to obtain a set of reconstructed wound image sub-blocks. The local reconstruction process of wound image sub-blocks within the set of wound image sub-blocks is as follows:
[0047] ;
[0048] in, Indicates the first Local reconstruction results of a sub-block of the wound image. For the first The optimal sparse representation coefficient vector corresponding to each wound image sub-block, the sparse dictionary dictionary base atoms It is optimized for the edge and detail features of the scab removal area of the wound, so that each reconstructed wound image sub-block restores the edge and detail structure of the original scab removal area of the wound.
[0049] S42. Set the reconstructed wound image sub-blocks Based on the spatial location of each wound image sub-block within the original standardized wound image, a spatial location index stitching method is used to fuse them, forming a preliminary reconstructed wound image. :
[0050] ;
[0051] in, This indicates a preliminary reconstruction of the wound image. This indicates that the image is stitched and fused together based on the original spatial positions of the sub-blocks of the wound image. The initial reconstruction of the wound image clearly presents the feature details and edge structure of the scab removal area while maintaining the overall spatial consistency.
[0052] Optionally, S5 includes the following steps:
[0053] S51. Initial reconstruction of wound images Corresponding standardized wound images Perform pixel-by-pixel differencing and calculate the pixel residual map. :
[0054] ;
[0055] in, Indicates pixel coordinates The residual signal intensity reflects the detailed structure that was not accurately restored during the sparse reconstruction stage, including the local texture and boundary information of the scab removal area of the wound.
[0056] S52. Introduce an edge-aware mechanism consistent with the sparse coding stage, utilizing the edge-aware weight matrix. Constructing a global edge response graph Global edge response map represents a standardized wound image. The importance of edge structure at corresponding pixel positions is determined by weighting the local edge perception matrix using the maximum gradient superposition method. Synthesize the full-image response weights;
[0057] S53. Based on the global edge response map The response intensity in the pixel residual map The residual signal in the image is subjected to pixel-level weighted amplification to generate a residual enhanced image. When the edge response intensity of a certain pixel location is higher than the preset value, the residual signal corresponding to that pixel location will be enhanced more significantly, highlighting the details and boundary structures that were not fully restored in the sparse reconstruction stage in the wound shedding area;
[0058] S54. Enhance the image with residuals. Compared with the preliminary reconstructed wound image Pixel-by-pixel stacking is performed to obtain a residual-enhanced wound image. The overlay operation adds the corresponding pixel values of the two images at each pixel location, supplementing key details that were missed in the scab removal area of the wound while maintaining the consistency of the initial reconstructed structure.
[0059] Optionally, S6 includes the following steps:
[0060] S61. Based on preliminary reconstructed wound images With residual enhanced wound images A weighted fusion model is constructed, which performs pixel-level weighted fusion on the two images to generate the final clear wound image. :
[0061] ;
[0062] in, Indicates pixel coordinates The final clear image pixel values of the wound. This represents the fusion weight coefficient at that pixel location, used to control the fusion ratio between the residual enhancement result and the sparse reconstruction result;
[0063] S62. Fusion Weighting Coefficient Dynamic adjustments are made based on the structural salience of the scab shedding area of the wound, with structural salience determined by the global edge response map. Provides the fusion weight coefficient for locations with higher edge response strength. The coefficient tends towards 1, enhancing details in the scab removal area and reducing the fusion weight coefficient in areas with weak edge response. The value tends towards 0, preserving global structural information from the initial reconstruction.
[0064] S63. The final sharpened wound image retains both the global anatomical structure from the initial reconstructed wound image and the detailed features reflecting the edges and local textures of the eschar-shedding area in the residual enhanced image, and the final sharpened wound image... Output.
[0065] The beneficial effects of this invention are:
[0066] (1) In the sparse coding process, the present invention introduces the edge structure perception mechanism of the scab removal region. The training sample sub-blocks are screened by the edge gradient intensity, and only image blocks containing rich edge textures are retained for the construction of the sparse dictionary. An edge perception weight matrix is introduced in the dictionary training process to optimize the learning process of the dictionary base atoms, thereby strengthening the sparse dictionary's ability to represent the features of the scab removal region. This effectively improves the edge restoration quality of subsequent local image sub-blocks in the sparse reconstruction process, so that the final reconstructed image can accurately reproduce the wound boundary and local texture structure while maintaining the consistency of the global structure.
[0067] (2) The present invention designs a pixel-level residual enhancement mechanism. By performing differential calculation on the preliminary reconstructed image and the standardized image to generate a pixel residual map, and combining it with the global edge response map for pixel-level weighted amplification, the residual signal of the significant edge region is enhanced, thereby compensating for the details that are not fully restored during the sparse coding process, strengthening the system's response capability to the microstructure of the scab removal area, and effectively avoiding the detail smoothing problem caused by local overfitting.
[0068] (3) This invention constructs a weighted fusion model based on structural saliency. It relies on the edge response map to dynamically calculate the fusion weight at the pixel level, so that the saliency area of the edge structure tends to retain the residual enhancement result, while the non-saliency area is mainly based on the preliminary sparse reconstruction result, realizing the optimal fusion of the structure-detail dual channels of the whole image, effectively alleviating the problem of excessive edge enhancement or background noise increase in traditional linear fusion. Attached Figure Description
[0069] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0070] Figure 1This is a flowchart of a wound image enhancement method based on sparse coding proposed in this invention. Detailed Implementation
[0071] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0072] refer to Figure 1 A wound image enhancement method based on sparse coding includes the following steps:
[0073] S1. Obtain the original wound image and perform format conversion, size normalization and grayscale standardization on the original wound image to form a standardized wound image;
[0074] S2. Divide the standardized wound image into multiple fixed-size wound image sub-blocks to form a set of local wound image blocks;
[0075] S3. Using a pre-constructed sparse dictionary, block-based sparse coding is performed on each sub-block of the local wound image patch set to obtain the sparse representation coefficients of each sub-block of the wound image.
[0076] S4. Based on the sparse expression coefficients of each wound image sub-block, each wound image sub-block is locally reconstructed, and the reconstructed wound image sub-blocks are spliced and fused according to their original spatial positions to obtain a preliminary reconstructed wound image;
[0077] S5. Perform pixel-level difference between the preliminary reconstructed wound image and the standardized wound image to generate a pixel residual map. Perform residual enhancement processing on the pixel residual map to generate a residual enhanced wound image.
[0078] S6. The preliminary reconstructed wound image and the residual enhanced wound image are fused using a weighted fusion strategy to generate the final clear wound image. The final clear wound image retains both the overall structure of the wound image and the local details of the scab removal area, and is output as the final clear wound image.
[0079] In this embodiment, S1 includes the following steps:
[0080] S11. Collect original wound images and construct an original wound image dataset. :
[0081] ;
[0082] in, This represents the original wound image dataset. Indicates the first Image of the original wound. , , They represent the first The pixel matrix of the red, green, and blue channels of the original wound image. This represents the total number of original wound image samples;
[0083] S12. Perform format conversion processing on each original wound image in the original wound image dataset, convert the color wound image into a single-channel grayscale wound image using the weighted average method, and obtain a grayscale wound image dataset. Each grayscale wound image retains the spatial structure information of the original wound image and removes redundant color components.
[0084] S13. Normalize the size of each grayscale wound image in the grayscale wound image dataset, and resample the wound images to a uniform target resolution. This ensures that all wound images have a consistent spatial scale;
[0085] S14. Perform pixel value standardization on the normalized grayscale wound image, mapping the pixel values in the wound image to the interval through a linear transformation. This ensures that pixel intensity values are distributed within a uniform scale and eliminates the impact of contrast differences in wound images on feature extraction.
[0086] S15. The collection of wound images after grayscale conversion, size normalization, and pixel standardization is uniformly constructed into a standardized wound image dataset. .
[0087] In this embodiment, S2 includes the following steps:
[0088] S21. Standardized wound image dataset Each standardized wound image in Divide the wound images into fixed-size sections. Divided into multiple sizes The image sub-block of the wound, in which This represents the side length (in pixels) of a sub-block in the wound image;
[0089] S22. Standardized wound images for each type of wound The corresponding set of wound image sub-blocks after division for:
[0090] ;
[0091] in, Image of the wound Located in the middle Line number The image sub-blocks of the wound, , Images of the wound are shown below. The number of wound image sub-blocks that can be completely divided in the vertical and horizontal directions;
[0092] S23. All wound image sub-blocks are indexed according to their spatial order in the original standardized wound image to construct a unified set of local wound image blocks. :
[0093] ;
[0094] in, Indicates the first A sub-block of wound image, This indicates the total number of sub-blocks in the wound image.
[0095] In this embodiment, S3 includes the following steps:
[0096] S31. Sparse dictionary based on fusion of edge features of the scab removal area of the wound. A collection of local wound image patches Each wound image sub-block Perform sparse coding;
[0097] S32. During the sparse coding process, based on the edge response intensity of the scab removal area, the fitting region of interest for sparse reconstruction is adaptively adjusted for different wound image sub-blocks. For each wound image sub-block... Solve its sparse dictionary The optimal sparse representation coefficient vector :
[0098] ;
[0099] in, For wound image sub-blocks The edge-aware weight matrix, This represents element-wise matrix multiplication. Regularization coefficients used to control sparsity;
[0100] S33. Organize the sparse representation results of all wound image sub-blocks into a sparse representation coefficient set. .
[0101] In this embodiment, S31 includes the following steps:
[0102] S311. From a set of local wound image patches The training sample set is formed by selecting sub-blocks of wound images with edge texture features and detailed structures greater than a preset value. And an edge feature intensity threshold screening strategy is adopted to make the training sample set Characterizing the unique edge details of the scab-shedding area of the wound, among which, Represents the training sample set The number of sub-blocks in the image;
[0103] S312. Based on the training sample set Initialize a sparse dictionary :
[0104] ;
[0105] in, Represents the first in a sparse dictionary Each dictionary base atom has the same spatial dimensions as the wound image sub-block. And the number of dictionary base atoms satisfy ;
[0106] S313. Introduce an edge-aware weight matrix during sparse dictionary optimization. Edge-aware weight matrix The values of each element in the sparse dictionary are positively correlated with the edge gradient intensity at the corresponding position in the wound image sub-block. This strengthens the expression of edge structure and detail features in the wound desquamation region during the training process of the sparse dictionary, while also enhancing the edge-aware weight matrix. The dictionary base atoms are adaptively adjusted based on the local edge strength of the wound shedding area image. To assess the representational ability of edge regions in sub-blocks of wound images, a sparse dictionary is constructed to optimize the objective function.
[0107] ;
[0108] in, Represents the first term used for sparse dictionary training. A sub-block of the wound image with distinct edge texture features. Indicates the first The optimal sparse representation coefficient vector corresponding to each sub-block of the wound image;
[0109] S314. Repeat the sparse dictionary optimization process in step S313 until the sparse dictionary optimization objective function converges to the preset stable threshold, thereby obtaining a sparse dictionary that integrates the edge features of the wound scab removal area. .
[0110] In this embodiment, S4 includes the following steps:
[0111] S41. Based on the sparse expression coefficient set And a sparse dictionary that integrates the edge features of the wound desquamation area. Each wound image sub-block is reconstructed locally to obtain a set of reconstructed wound image sub-blocks. The local reconstruction process of wound image sub-blocks within the set of wound image sub-blocks is as follows:
[0112] ;
[0113] in, Indicates the first Local reconstruction results of a sub-block of the wound image. For the first The optimal sparse representation coefficient vector corresponding to each wound image sub-block, and the sparse dictionary. dictionary base atoms It is optimized for the edge and detail features of the scab removal area of the wound, so that each reconstructed wound image sub-block restores the edge and detail structure of the original scab removal area of the wound.
[0114] S42. Set the reconstructed wound image sub-blocks Based on the spatial location of each wound image sub-block within the original standardized wound image, a spatial location index stitching method is used to fuse them, forming a preliminary reconstructed wound image. :
[0115] ;
[0116] in, This indicates a preliminary reconstruction of the wound image. This indicates that the image is stitched and fused together based on the original spatial positions of the sub-blocks of the wound image. The initial reconstruction of the wound image clearly presents the feature details and edge structure of the scab removal area while maintaining the overall spatial consistency.
[0117] In this embodiment, S5 includes the following steps:
[0118] S51. Initial reconstruction of wound images Corresponding standardized wound images Perform pixel-by-pixel differencing and calculate the pixel residual map. :
[0119] ;
[0120] in, Indicates pixel coordinates The residual signal intensity reflects the detailed structure that was not accurately restored during the sparse reconstruction stage, including the local texture and boundary information of the scab removal area of the wound.
[0121] S52. Introduce an edge-aware mechanism consistent with the sparse coding stage, utilizing the edge-aware weight matrix. Constructing a global edge response graph Global edge response map represents a standardized wound image. The importance of edge structure at corresponding pixel positions is determined by weighting the local edge perception matrix using the maximum gradient superposition method. Synthesize the full-image response weights;
[0122] S53. Based on the global edge response map The response intensity in the pixel residual map The residual signal in the image is subjected to pixel-level weighted amplification to generate a residual enhanced image. When the edge response intensity of a certain pixel location is higher than the preset value, the residual signal corresponding to that pixel location will be enhanced more significantly, highlighting the details and boundary structures that were not fully restored in the sparse reconstruction stage in the wound shedding area;
[0123] S54. Enhance the image with residuals. Compared with the preliminary reconstructed wound image Pixel-by-pixel stacking is performed to obtain a residual-enhanced wound image. The overlay operation adds the corresponding pixel values of the two images at each pixel location, supplementing key details that were missed in the scab removal area of the wound while maintaining the consistency of the initial reconstructed structure.
[0124] In this embodiment, S6 includes the following steps:
[0125] S61. Based on preliminary reconstructed wound images With residual enhanced wound images A weighted fusion model is constructed, which performs pixel-level weighted fusion on the two images to generate the final clear wound image. :
[0126] ;
[0127] in, Indicates pixel coordinates The final clear image pixel values of the wound. This represents the fusion weight coefficient at that pixel location, used to control the fusion ratio between the residual enhancement result and the sparse reconstruction result;
[0128] S62. Fusion Weighting Coefficient Dynamic adjustments are made based on the structural salience of the scab shedding area of the wound, with structural salience determined by the global edge response map. Provides the fusion weight coefficient for locations with higher edge response strength. The coefficient tends towards 1, enhancing details in the scab removal area and reducing the fusion weight coefficient in areas with weak edge response. The value tends towards 0, preserving global structural information from the initial reconstruction.
[0129] S63. The final sharpened wound image retains both the global anatomical structure from the initial reconstructed wound image and the detailed features reflecting the edges and local textures of the eschar-shedding area in the residual enhanced image, and the final sharpened wound image... Output.
[0130] Example 1: The Dermatology and Surgery Department of the People's Hospital of City A admitted a 67-year-old male patient with diabetic foot, whose patient number was DFU-042. Upon admission, the patient had a chronic wound with a diameter of about 3.1 cm on the first metatarsal head of the left foot. The central area of the wound had formed patches of crusting and dried exudate, and the edge tissue was relatively blurred. The doctor initially judged it to be "early necrosis + infection".
[0131] The hospital's wound image acquisition team used a SONY ILCE-7M3 camera to acquire wound images in the outpatient operating room. The image number is IMG-DFU042-20241118-01, the resolution is 6000×4000, and it is stored in JPEG format. Due to the mixed white light in the room at the time, the patient's foot was in the side-lit shadow area, resulting in the following problems after the image was captured:
[0132] The difference in brightness between the edge of the scab removal area and the surrounding skin is small; the details of the exudate area are unclear; the overall image is dark and lacks contrast.
[0133] The imaging technician uploaded the image to the hospital's wound enhancement system for processing. The system received the image and performed the following operations:
[0134] First, perform image format conversion to convert the original JPEG image into a single-channel grayscale image;
[0135] The image was scaled to a standard processing resolution of 512×512 using the Lanczos algorithm.
[0136] The pixel grayscale values are mapped to the [0,1] interval by applying a linear normalization function, thus completing the normalization.
[0137] Next, the system divides the image into 64 image sub-blocks with a unit of 64×64, calculates the edge gradient intensity for each sub-block, and detects an average edge intensity of 87.5 in the 17th sub-block (located in image coordinates [128:192, 256:320]), which is much higher than the average of 38.9 for the whole image. The system automatically selects this sub-block into the sparse dictionary training set.
[0138] The system constructs an initial sparse dictionary based on a total of 7421 high-margin sample sub-blocks from 118 patients in the current cumulative database. The dictionary dimension is 256×4096. The dictionary training process adopts an iterative reweighted sparse coding strategy. The residual is calculated after each round of updates. The system converges by the 14th round, and the final sparse representation error is <0.02.
[0139] Next, the system performed sparse coding and local reconstruction on all sub-blocks of DFU-042. In sub-block 26 (the center of the wound), the number of active coefficients in the sparse coefficients generated after coding was 18, indicating that the region has a rich structure. The reconstructed output image showed a ring-shaped boundary texture, providing key information for doctors to make subsequent judgments.
[0140] The system completes the reconstruction of the entire image sub-blocks, synthesizes them into a preliminary reconstructed image, and performs pixel-level difference with the standardized image to generate a residual map. The maximum residual Δ value of 0.276 is detected at the 34th pixel (coordinates [210, 298]). Based on this, the system generates an enhanced image and superimposes edge-aware weight amplification processing. The edge-aware weight value ω(210, 298) is 0.91, and the contrast at this position in the enhanced image is improved by 21%.
[0141] Subsequently, the system performs fusion processing, outputting the final enhanced image IMG-DFU042-20241118-01-ENH.png, and automatically generates a structural similarity report:
[0142] Original image SSIM: 0.603;
[0143] CLAHE-enhanced SSIM: 0.727;
[0144] The enhanced SSIM of the method of this invention is 0.831;
[0145] ESSIM improvement comparison: CLAHE score is 0.641, and our method score is 0.783.
[0146] The system pushes the enhanced images and assessment reports to the doctor's terminal. The attending physician opens the images, observes the image structure manually, and then manually adds diagnostic notes to the case: "The central area of the wound has clear edges, and the suspected dry necrosis has clear boundaries. Infectious exudation can be ruled out. It is recommended to use silver ion dressing + occlusive dressing. Observe for 3 days and then re-evaluate."
[0147] To further evaluate the stability of the method, we repeated the enhancement procedure of this invention on five images of the same site taken within the next 7 days of the patient, and the results are recorded below:
[0148]
[0149] In the five images enhanced using the method of this invention, the doctor's consistency diagnostic score improved by approximately 19.4%, and all scab removal boundary judgments remained consistent, effectively avoiding misjudgment of two potential infection spreads and indirectly saving approximately 56 yuan per person per day in medication and dressing change costs.
[0150] This invention introduces an edge structure awareness mechanism for the scab removal region during sparse coding. By filtering training sample sub-blocks through edge gradient intensity, only image blocks containing rich edge textures are retained for the construction of the sparse dictionary. Furthermore, an edge-aware weight matrix is introduced during dictionary training to weight and optimize the learning process of dictionary base atoms, thereby enhancing the sparse dictionary's ability to represent the features of the scab removal region. This effectively improves the edge restoration quality of subsequent local image sub-blocks in the sparse reconstruction process, enabling the final reconstructed image to accurately reproduce the wound boundary and local texture structure while maintaining global structural consistency.
[0151] This invention designs a pixel-level residual enhancement mechanism. By performing differential calculation on the preliminary reconstructed image and the standardized image to generate a pixel residual map, and combining it with the global edge response map for pixel-level weighted amplification, the residual signal of the significant edge region is enhanced. This achieves compensation for details that are not fully restored during the sparse coding process, strengthens the system's response capability to the microstructure of the scab removal region, and effectively avoids the detail smoothing problem caused by local overfitting.
[0152] This invention constructs a weighted fusion model based on structural saliency. It relies on the edge response map to dynamically calculate the fusion weight at the pixel level, so that the residual enhancement results are retained in the edge structural salient areas, while the preliminary sparse reconstruction results are mainly used in the non-salient areas. This achieves the optimal fusion of the structure-detail dual channels of the whole image, effectively alleviating the problem of excessive edge enhancement or background noise increase in traditional linear fusion.
[0153] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A wound image enhancement method based on sparse coding, characterized in that, The steps include: S1. Obtain the original wound image and perform format conversion, size normalization and grayscale standardization on the original wound image to form a standardized wound image; S2. Divide the standardized wound image into multiple fixed-size wound image sub-blocks to form a set of local wound image blocks; S3. Using a pre-constructed sparse dictionary, block-based sparse coding is performed on each sub-block of the local wound image patch set to obtain the sparse representation coefficients of each sub-block of the wound image. S4. Based on the sparse expression coefficients of each wound image sub-block, each wound image sub-block is locally reconstructed, and the reconstructed wound image sub-blocks are spliced and fused according to their original spatial positions to obtain a preliminary reconstructed wound image; S5. Perform pixel-level difference between the preliminary reconstructed wound image and the standardized wound image to generate a pixel residual map. Perform residual enhancement processing on the pixel residual map to generate a residual enhanced wound image. S6. The preliminary reconstructed wound image and the residual enhanced wound image are fused using a weighted fusion strategy to generate the final clear wound image; S3 includes the following steps: S31. Sparse dictionary based on fusion of edge features of the scab removal area of the wound. A collection of local wound image patches Each wound image sub-block Perform sparse coding; S32. During the sparse coding process, based on the edge response intensity of the scab removal area, the fitting region of interest for sparse reconstruction is adaptively adjusted for different wound image sub-blocks. For each wound image sub-block... Solve its sparse dictionary The optimal sparse representation coefficient vector : ; in, For wound image sub-blocks The edge-aware weight matrix, This represents element-wise matrix multiplication. Regularization coefficients used to control sparsity; S33. Organize the sparse representation results of all wound image sub-blocks into a sparse representation coefficient set. ; S31 includes the following steps: S311. From a set of local wound image patches The training sample set is formed by selecting sub-blocks of wound images with edge texture features and detailed structures greater than a preset value. And an edge feature intensity threshold screening strategy is adopted to make the training sample set Characterizing the unique edge details of the scab-shedding area of the wound, among which, Represents the training sample set The number of sub-blocks in the image; S312. Based on the training sample set Initialize a sparse dictionary sparse dictionary The dictionary base atoms have the same spatial dimensions as the wound image sub-blocks. And the number of dictionary base atoms satisfy ; S313. Introduce an edge-aware weight matrix during sparse dictionary optimization. Edge-aware weight matrix The values of each element in the sparse dictionary are positively correlated with the edge gradient intensity at the corresponding position in the wound image sub-block. This strengthens the expression of edge structure and detail features in the wound desquamation region during the training process of the sparse dictionary, while also enhancing the edge-aware weight matrix. The dictionary base atoms are adaptively adjusted based on the local edge strength of the wound shedding area image. To assess the representational ability of edge regions in sub-blocks of wound images, a sparse dictionary is constructed to optimize the objective function. ; in, Represents the first term used for sparse dictionary training. A sub-block of the wound image with distinct edge texture features. Indicates the first The optimal sparse representation coefficient vector corresponding to each sub-block of the wound image; S314. Repeat the sparse dictionary optimization process in step S313 until the sparse dictionary optimization objective function converges to the preset stable threshold, thereby obtaining a sparse dictionary that integrates the edge features of the wound scab removal area. .
2. The wound image enhancement method based on sparse coding according to claim 1, characterized in that, S1 includes the following steps: S11. Collect original wound images and construct an original wound image dataset. ; S12. Perform format conversion processing on each original wound image in the original wound image dataset, convert the color wound image into a single-channel grayscale wound image using the weighted average method, and obtain a grayscale wound image dataset. Each grayscale wound image retains the spatial structure information of the original wound image and removes redundant color components. S13. Normalize the size of each grayscale wound image in the grayscale wound image dataset, and resample the wound images to a uniform target resolution. This ensures that all wound images have a consistent spatial scale; S14. Perform pixel value standardization on the normalized grayscale wound image, mapping the pixel values in the wound image to the interval through a linear transformation. This ensures that pixel intensity values are distributed within a uniform scale and eliminates the impact of contrast differences in wound images on feature extraction. S15. The collection of wound images after grayscale conversion, size normalization, and pixel standardization is uniformly constructed into a standardized wound image dataset. .
3. The wound image enhancement method based on sparse coding according to claim 2, characterized in that, S2 includes the following steps: S21. Standardized wound image dataset Each standardized wound image in Divide the wound images into fixed-size sections. Divided into multiple sizes The image sub-block of the wound, in which This represents the side length (in pixels) of a sub-block in the wound image; S22. Standardized wound images for each type of wound The corresponding set of wound image sub-blocks after division for: ; in, Image of the wound Located in the middle Line number The image sub-blocks of the wound, , Images of the wound are shown below. The number of wound image sub-blocks that can be completely divided in the vertical and horizontal directions. This indicates a round-down operation; S23. All wound image sub-blocks are indexed according to their spatial order in the original standardized wound image to construct a unified set of local wound image blocks. : ; in, Indicates the first A sub-block of wound image, This indicates the total number of sub-blocks in the wound image.
4. The wound image enhancement method based on sparse coding according to claim 1, characterized in that, S4 includes the following steps: S41. Based on the sparse expression coefficient set And a sparse dictionary that integrates the edge features of the wound desquamation area. Each wound image sub-block is reconstructed locally to obtain a set of reconstructed wound image sub-blocks. The local reconstruction process of wound image sub-blocks within the set of wound image sub-blocks is as follows: ; in, Indicates the first Local reconstruction results of a sub-block of the wound image. For the first The optimal sparse representation coefficient vector corresponding to each wound image sub-block, the sparse dictionary dictionary base atoms It is optimized for the edge and detail features of the scab removal area of the wound, so that each reconstructed wound image sub-block restores the edge and detail structure of the original scab removal area of the wound. S42. Set the reconstructed wound image sub-blocks Based on the spatial location of each wound image sub-block within the original standardized wound image, a spatial location indexing method is used for fusion. This fusion operation, performed according to the original spatial locations of the wound image sub-blocks, forms a preliminary reconstructed wound image. .
5. The wound image enhancement method based on sparse coding according to claim 4, characterized in that, S5 includes the following steps: S51. Initial reconstruction of wound images Corresponding standardized wound images Perform pixel-by-pixel differencing and calculate the pixel residual map. ; S52. Introduce an edge-aware mechanism consistent with the sparse coding stage, utilizing the edge-aware weight matrix. Constructing a global edge response graph Global edge response map represents a standardized wound image. The importance of edge structure at corresponding pixel positions is determined by weighting the local edge perception matrix using the maximum gradient superposition method. Synthesize the full-image response weights; S53. Based on the global edge response map The response intensity in the pixel residual map The residual signal in the image is subjected to pixel-level weighted amplification to generate a residual enhanced image. When the edge response intensity of a certain pixel location is higher than the preset value, the residual signal corresponding to that pixel location will be enhanced more significantly, highlighting the details and boundary structures that were not fully restored in the sparse reconstruction stage in the wound shedding area; S54. Enhance the image with residuals. Compared with the preliminary reconstructed wound image Pixel-by-pixel stacking is performed to obtain a residual-enhanced wound image. The overlay operation adds the corresponding pixel values of the two images at each pixel location, supplementing key details that were missed in the scab removal area of the wound while maintaining the consistency of the initial reconstructed structure.
6. The wound image enhancement method based on sparse coding according to claim 5, characterized in that, S6 includes the following steps: S61. Based on preliminary reconstructed wound images With residual enhanced wound images A weighted fusion model is constructed, which performs pixel-level weighted fusion on the two images to generate the final clear wound image. : ; in, Indicates pixel coordinates The final clear image pixel values of the wound. This represents the fusion weight coefficient at that pixel location, used to control the fusion ratio between the residual enhancement result and the sparse reconstruction result; S62. Fusion Weighting Coefficient Dynamic adjustments are made based on the structural salience of the scab shedding area of the wound, with structural salience determined by the global edge response map. Provides the fusion weight coefficient for locations with higher edge response strength. The coefficient tends towards 1, enhancing details in the scab removal area and reducing the fusion weight coefficient in areas with weak edge response. The value tends towards 0, preserving global structural information from the initial reconstruction. S63. The final sharpened wound image retains both the global anatomical structure from the initial reconstructed wound image and the detailed features reflecting the edges and local textures of the eschar-shedding area in the residual enhanced image, and the final sharpened wound image... Output.
Citation Information
Patent Citations
Image fusion and super-resolution reconstruction combined implementation method based on multi-component analysis and residual compensation
CN110706156A
Image super-resolution reconstruction method based on two-channel sparse coding
CN113628114A