A method and system for enhancing the contrast of cancer images based on deep learning
Through deep learning methods combined with adaptive histogram equalization, multi-scale analysis and wavelet transformation, the problems of cancer image imaging quality differences and blurred lesions in lesions are solved, and the contrast and clarity are significantly enhanced, highlighting the lesion area and suppressing noise, and are suitable for the field of medical image processing.
Patent Information
- Application Number
- CN202510143104.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-10
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-02-10
AI Technical Summary
The prior art is difficult to effectively solve the problems of imaging quality, resolution and contrast differences in cancer images of different types and stages, especially the lesion area is close to the grayscale of surrounding tissues, the boundaries are blurred, and it is difficult to avoid the influence of noise and artifacts during the enhancement process. At the same time, it is necessary to take into account the processing speed and the convenience of doctors to use.
The deep learning-based method is used to pre-process it through an adaptive histogram equalization algorithm, and texture, shape and edge features are extracted in combination with multi-scale analysis. The lesion area is segmented using the regional growth segmentation algorithm, and the contrast of the lesion area is highlighted through adaptive contrast enhancement technology, and noise is suppressed by combining the wavelet transform denoising method.
It significantly enhances the contrast and clarity of cancer images, highlights the lesion area, suppresses noise interference, and improves the readability of the image and the accuracy of doctor analysis.
Smart Images

Figure CN119599925B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of medical image processing, and particularly relates to a method and system for enhancing the contrast of cancer images based on deep learning. Background Art
[0002] Enhancing the contrast of cancer images is a challenging task that requires considering multiple factors. First, there are significant differences in imaging quality, resolution, and contrast among cancer images of different types and stages, which poses difficulties for image preprocessing and feature extraction. Second, the lesion areas in cancer images often have similar gray values to the surrounding tissues, with blurred boundaries and low contrast. During the enhancement process, it is necessary to avoid introducing excessive noise and artifacts that may affect image clarity. Third, the complexity and diversity of cancer images make it difficult for general image enhancement methods to achieve ideal results, and targeted algorithms and models need to be designed. Finally, in practical applications, the cancer image contrast enhancement system needs to balance processing speed and performance to achieve fast, accurate, and stable enhancement effects. At the same time, it should be closely integrated with the medical workflow to facilitate doctors' use. Therefore, how to weigh various factors and develop efficient and reliable methods and systems for enhancing the contrast of cancer images is an urgent technical problem to be solved. Summary of the Invention
[0003] To solve the above technical problems, the present invention proposes a method and system for enhancing the contrast of cancer images based on deep learning to solve the problems existing in the above prior art.
[0004] In the first aspect, to achieve the above object, the present invention provides a method for enhancing the contrast of cancer images based on deep learning, including the following steps:
[0005] Obtain a cancer image and preprocess the cancer image based on the adaptive histogram equalization algorithm;
[0006] For the preprocessed cancer image, based on the multi-scale analysis method, extract features at different scales, and construct a feature descriptor by fusing multi-scale features, where the features include texture features, shape features, and edge features;
[0007] Based on the feature descriptor, use the region growing segmentation algorithm to segment the cancer image, with the gray and texture features of the lesion area as the growth criterion, adaptively expand the segmentation area, and eliminate segmentation noise and artifacts through morphological processing;
[0008] For the segmented lesion area, based on the adaptive contrast enhancement technology, automatically adjust the enhancement parameters according to the gray statistical characteristics of the lesion area to enhance the contrast of the lesion area;
[0009] For the enhanced image, a denoising method based on wavelet transform is adopted. Through multi-scale wavelet decomposition, soft threshold processing is performed on the wavelet coefficients in the high-frequency subbands to suppress high-frequency noise. At the same time, the original coefficients are retained in the low-frequency subbands, and the image is reconstructed through inverse transformation to obtain the final image with enhanced contrast.
[0010] Optionally, the process of preprocessing the cancer image using the adaptive histogram equalization algorithm includes:
[0011] Obtain a cancer image dataset and perform grayscale processing on the images;
[0012] Perform block processing on the grayscale image, divide the image into several local regions, and calculate the grayscale histogram of each region;
[0013] For regions with small grayscale differences, use the adaptive histogram equalization algorithm to adjust the grayscale distribution and enhance the local contrast;
[0014] Combine all local regions to obtain the complete preprocessed cancer image.
[0015] Optionally, the multi-scale analysis method includes: using wavelet transform to perform multi-scale decomposition on the preprocessed cancer image, and extracting texture features, shape features, and edge features;
[0016] Fuse the texture features, shape features, and edge features extracted at different scales, construct a feature descriptor through feature fusion, and use the Fisher discriminant criterion to perform feature screening on the feature descriptor to obtain the screened feature descriptor.
[0017] Optionally, the process of segmenting the cancer image includes:
[0018] The region growing segmentation algorithm expands the segmentation region by dynamically adjusting the thresholds of grayscale and texture features, and combines morphological processing to optimize the segmentation result to obtain the boundary of the lesion region.
[0019] Optionally, based on the adaptive contrast enhancement technology, the process of automatically adjusting the enhancement parameters according to the grayscale statistical characteristics of the lesion region to enhance the contrast of the lesion region includes:
[0020] Obtain the image data of the segmented lesion region, perform grayscale statistical analysis on the lesion region image to obtain the grayscale statistical characteristic parameters of the lesion region;
[0021] Determine the target parameter range of adaptive contrast enhancement according to the obtained grayscale statistical characteristic parameters of the lesion region;
[0022] An adaptive threshold segmentation algorithm is adopted to divide the lesion area image into multiple sub-regions. For each sub-region, according to its gray-scale statistical characteristics, the contrast enhancement parameters are automatically adjusted within the target parameter range.
[0023] The contrast enhancement process is performed on each sub-region image, and all the enhanced sub-region images are fused to obtain the overall enhanced lesion area image.
[0024] Optionally, the wavelet transform-based denoising method suppresses noise by performing soft threshold processing on the wavelet coefficients of the high-frequency sub-bands, while retaining the original coefficients of the low-frequency sub-bands to preserve the image details, and obtains the denoised image through inverse transformation.
[0025] In a second aspect, the present invention also provides a deep learning-based cancer image contrast enhancement system for implementing a deep learning-based cancer image contrast enhancement method. The system includes:
[0026] A preprocessing module for acquiring a cancer image and preprocessing the cancer image based on the adaptive histogram equalization algorithm.
[0027] A multi-scale feature extraction module for extracting features of the preprocessed cancer image at different scales based on the multi-scale analysis method and constructing a feature descriptor by fusing the multi-scale features, where the features include texture features, shape features, and edge features.
[0028] A region growing segmentation module for segmenting the cancer image based on the feature descriptor by using the region growing segmentation algorithm, taking the gray-scale and texture features of the lesion area as the growth criteria, adaptively expanding the segmentation region, and eliminating segmentation noise and artifacts through morphological processing.
[0029] A contrast enhancement module for automatically adjusting the enhancement parameters based on the adaptive contrast enhancement technology according to the gray-scale statistical characteristics of the segmented lesion area to enhance the contrast of the lesion area.
[0030] A wavelet denoising module for performing wavelet transform-based denoising on the enhanced image, suppressing high-frequency noise by performing soft threshold processing on the wavelet coefficients in the high-frequency sub-bands through multi-scale wavelet decomposition, while retaining the original coefficients in the low-frequency sub-bands, and reconstructing the image through inverse transformation to obtain the final image with enhanced contrast.
[0031] Optionally, the region growing segmentation module adopts a combination of dynamically adjusting the threshold and morphological processing to optimize the contour of the segmentation region.
[0032] In a third aspect, the present invention also provides a computer terminal device, including:
[0033] One or more processors;
[0034] A memory, coupled to the processor, for storing one or more programs;
[0035] When the one or more programs are executed by the one or more processors, the one or more processors implement the steps of a method for enhancing the contrast of cancer images based on deep learning.
[0036] In a fourth aspect, the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of a method for enhancing the contrast of cancer images based on deep learning are implemented.
[0037] Compared with the prior art, the present invention has the following advantages and technical effects:
[0038] A method and system for enhancing the contrast of cancer images based on deep learning provided by the present invention, aiming at the problem of insufficient contrast of cancer images, uses an adaptive histogram equalization algorithm for preprocessing to enhance the local area contrast. Texture, shape, and edge features are extracted through multi-scale analysis to construct feature descriptors. Based on the feature descriptors, a region growing segmentation algorithm is used to segment the image to obtain the boundary of the lesion area. An adaptive contrast enhancement technique is adopted for the segmented lesion area to highlight the display effect of the lesion. Considering noise interference, a denoising method based on wavelet transform is introduced to suppress noise in the high-frequency subbands and retain details in the low-frequency subbands. Through the organic combination of the above technical solutions, the present invention can effectively enhance the contrast and clarity of cancer images, highlight the display of the lesion area, and at the same time suppress noise interference. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The drawings forming a part of this application are used to provide a further understanding of this application. The schematic embodiments of this application and their descriptions are used to explain this application and do not constitute an improper limitation to this application. In the drawings:
[0040] Figure 1 Is a flowchart of a method for enhancing the contrast of cancer images based on deep learning according to an embodiment of the present invention;
[0041] Figure 2 Is a system schematic diagram of a system for enhancing the contrast of cancer images based on deep learning according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0042] It should be noted that, without conflict, the embodiments in this application and the features in the embodiments can be combined with each other. The following will refer to the drawings and combine the embodiments to detail this application.
[0043] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0044] Embodiment 1
[0045] As Figure 1 shown, this embodiment provides a method for enhancing the contrast of cancer images based on deep learning, including:
[0046] Obtain cancer images and preprocess the cancer images based on the adaptive histogram equalization algorithm;
[0047] For the preprocessed cancer images, based on the multi-scale analysis method, extract features at different scales, and construct a feature descriptor by fusing multi-scale features, where the features include texture features, shape features, and edge features;
[0048] Based on the feature descriptor, use the region growing segmentation algorithm to segment the cancer images, take the gray level and texture features of the lesion area as the growth criterion, adaptively expand the segmentation area, and eliminate segmentation noise and artifacts through morphological processing;
[0049] For the segmented lesion area, based on the adaptive contrast enhancement technology, automatically adjust the enhancement parameters according to the gray level statistical characteristics of the lesion area to enhance the contrast of the lesion area;
[0050] For the enhanced image, use the denoising method based on wavelet transform. Through multi-scale wavelet decomposition, perform soft threshold processing on the wavelet coefficients in the high-frequency subbands to suppress high-frequency noise. At the same time, retain the original coefficients in the low-frequency subbands, and reconstruct the image through inverse transformation to obtain the final image with enhanced contrast.
[0051] As an implementation manner in this embodiment, the process of preprocessing the cancer images using the adaptive histogram equalization algorithm includes:
[0052] Obtain a cancer image dataset and perform grayscale processing on the images;
[0053] Perform block processing on the grayscale images, divide the images into several local regions, and calculate the grayscale histogram of each region;
[0054] For regions with small gray level differences, use the adaptive histogram equalization algorithm to adjust the gray level distribution and enhance the local contrast;
[0055] Combine all local regions to obtain the complete preprocessed cancer image.
[0056] As an alternative implementation in this embodiment, for the contrast feature of cancer images, an adaptive histogram equalization algorithm is used for preprocessing. By adjusting the gray-scale distribution of cancer images, the local contrast is enhanced, making the gray-scale difference between the lesion area and the surrounding tissues more obvious.
[0057] As an additional implementation in this embodiment, a cancer image dataset is obtained. The images are grayscale processed to convert color images into grayscale images, reducing the computational complexity. The grayscale images are divided into blocks, and the image is divided into multiple local regions. Each region performs an independent histogram equalization operation. For each local region, the histogram distribution of the pixel gray-scale values within the region is calculated to obtain a gray-scale histogram. Based on the gray-scale histogram, the gray-scale distribution within the region is determined to judge whether histogram equalization processing is required. If the gray-scale distribution within the region is uneven and the gray-scale difference is small, the adaptive histogram equalization algorithm is used to process this region. By the adaptive histogram equalization algorithm, the gray-scale distribution within the region is adjusted to enhance the local contrast, making the gray-scale difference between the lesion area and the surrounding tissues more obvious. After performing adaptive histogram equalization processing on all local regions, the processed local regions are recombined into a complete cancer image to obtain a cancer image with enhanced contrast, highlighting the characteristics of the lesion area and providing clearer image data.
[0058] Specifically, obtaining a cancer image dataset is an important starting point for medical image processing. Taking breast cancer X-ray images as an example, the original images usually contain complex tissue structures and tiny calcification points. Converting color images to grayscale images can reduce the computational complexity while retaining the key structural information. For example, a color breast X-ray image of 1024x1024 pixels may have a color depth of 24 bits. After being converted to an 8-bit grayscale image, the data volume is reduced by two-thirds, but the key information of tissue density and calcification points is still retained. Block processing is an effective method to improve the image enhancement effect. Taking a grayscale breast X-ray image of 512x512 pixels as an example, it can be divided into 64 sub-blocks of 64x64 pixels. Each sub-block is independently subjected to histogram analysis and equalization, so as to better adapt to the gray-level characteristics of the local area. For example, in the area containing microcalcifications, the improvement of local contrast can make these tiny lesions more obvious. Calculating the grayscale histogram is a key step in evaluating image contrast. Taking a sub-block of 64x64 pixels as an example, assuming its gray level is 256 levels. Statistical analysis shows that the gray values of this sub-block are mainly concentrated between 100 and 150, indicating that the contrast of this area is low. In this case, applying histogram equalization can significantly improve the readability of the image. Adaptive histogram equalization (AHE) is an efficient method for local contrast enhancement. For the aforementioned low-contrast sub-block, the AHE algorithm will redistribute the gray values so that they are more evenly distributed within the range of 0-255. This can highlight the details that were originally difficult to distinguish. For example, two adjacent pixels with original gray values of 120 and 125 may become 100 and 150 after AHE processing, greatly increasing the contrast between them. Recombining the processed sub-blocks into a complete image is the final key step. To avoid the abrupt transition at the sub-block boundaries, the method of overlapping regions and smooth transition is usually adopted. For example, adjacent sub-blocks can have an 8-pixel overlap, and the gray values are fused in the overlapping region by weighted averaging to ensure the overall continuity of the image. The advantage of this block-based adaptive histogram equalization method is that it can flexibly adjust the contrast according to local features. For breast cancer X-ray images, it can enhance both the overall contrast of large-area tissues and the visibility of local tiny calcification points at the same time.
[0059] As an implementation manner in this embodiment, the multi-scale analysis method includes: performing multi-scale decomposition on the preprocessed cancer image using wavelet transform to extract texture features, shape features, and edge features;
[0060] Fusing the texture features, shape features, and edge features extracted at different scales, constructing a feature descriptor through feature fusion, and using the Fisher discriminant criterion to perform feature screening on the feature descriptor to obtain the screened feature descriptor.
[0061] As an alternative implementation in this embodiment, obtain the preprocessed cancer image, adopt a multi-scale analysis method, extract the texture, shape, and edge features of the cancer image at different scales, and construct a feature descriptor by fusing multi-scale features to improve the discriminative ability of feature representation.
[0062] As an additional implementation in this embodiment, according to the preprocessed cancer image, adopt the wavelet transform method to perform multi-scale decomposition on the image to obtain sub-images at different scales. For each sub-image at each scale, extract texture features, and use the gray-level co-occurrence matrix method to calculate texture feature parameters such as contrast, correlation, energy, and entropy of the image. For each sub-image at each scale, extract shape features, obtain the contour of the image through a contour extraction algorithm, and calculate shape feature parameters such as the perimeter, area, and circularity of the contour. For each sub-image at each scale, extract edge features, use the Canny operator to detect the edges of the image, and calculate edge feature parameters such as the direction and intensity of the edges. Fuse the texture features, shape features, and edge features extracted at different scales to construct a multi-scale feature descriptor, and use a concatenation method to combine each feature parameter into a feature vector. Adopt the Fisher discriminant criterion to perform feature selection on the multi-scale feature descriptor, screen out a feature subset with strong discriminative ability, and reduce the feature dimension. Input the screened multi-scale feature descriptor into a support vector machine classifier for training and testing to obtain the classification result of the cancer image.
[0063] Specifically, wavelet transform is a multi-scale analysis method that can decompose an image into sub-images with different frequencies and spatial resolutions. For example, for a 512x512 pixel cancer image, 10 sub-images can be obtained through 3-level wavelet decomposition, including 1 low-frequency approximation sub-image and 9 high-frequency detail sub-images. This multi-scale decomposition helps capture the features of the image at different scales. The gray-level co-occurrence matrix is an effective method for describing texture features. Taking the contrast feature as an example, it reflects the clarity of the image and the depth of the texture grooves. For a 4x4 image block, the gray-level co-occurrence matrix in the 0-degree direction can be calculated, and then the contrast value can be obtained. A higher contrast value usually indicates obvious gray-level changes in the image, which may be related to the boundary of the cancer lesion. Shape features are very important for describing the geometric characteristics of cancer lesions. Taking roundness as an example, it measures the similarity between the target shape and a circle. Suppose the contour of a cancer lesion is extracted, with a perimeter of 100 pixels and an area of 500 square pixels, then its roundness can be calculated. A roundness close to 1 indicates that the lesion shape is relatively regular, which may be a benign tumor; while a roundness much less than 1 may imply the irregular growth of a malignant tumor. The Canny edge detection operator can effectively extract the edge information in the image. For cancer images, the edge features can reflect the boundary between the lesion and the surrounding normal tissues. For example, after processing with the Canny operator, a series of edge pixel points can be obtained, and each point has its direction and intensity information. The area with a higher edge intensity may correspond to the boundary of the cancer lesion, and the sudden change in the edge direction may imply the irregular growth of the lesion. Feature fusion is to combine different types of features together to obtain a more comprehensive image description. For example, the texture, shape, and edge features extracted from 10 sub-images can be concatenated into a high-dimensional vector. Suppose 20 feature parameters are extracted from each sub-image, then the dimension of the final feature vector will reach 200 dimensions. This high-dimensional feature vector contains multi-scale and multi-angle information of the image. The Fisher discriminant criterion is an effective feature selection method that selects the most discriminative features by maximizing the between-class distance and minimizing the within-class distance. For a 200-dimensional feature vector, perhaps only 50 of them are truly useful for cancer analysis. Through the Fisher discriminant criterion, these key features can be screened out, which not only reduces the computational complexity but also improves the classification accuracy. The support vector machine is a powerful classifier, especially suitable for dealing with high-dimensional feature spaces. In cancer analysis, the 50-dimensional feature vector after feature selection can be used as the input to train a binary classification support vector machine model for distinguishing between benign and malignant tumors. By training and validating on a large amount of labeled data, the support vector machine can learn an optimal classification hyperplane to achieve accurate classification of new cancer images.
[0064] As an implementation manner in this embodiment, the process of segmenting a cancer image includes:
[0065] The regional growth segmentation algorithm expands the segmentation region by dynamically adjusting the thresholds of the grayscale and texture features, and combines morphological processing to optimize the segmentation result, obtaining the boundary of the lesion region.
[0066] As an optional implementation manner in this embodiment, according to the extracted feature descriptors, the regional growth segmentation algorithm is used to segment the cancer image. Taking the grayscale and texture features of the lesion region as the growth criterion, the segmentation region is adaptively expanded, and morphological processing is introduced to eliminate the noise and artifacts generated during the segmentation process, obtaining the boundary of the lesion region.
[0067] As an additional implementation manner in this embodiment, according to the extracted feature descriptors, the cancer image is preprocessed to enhance the contrast and clarity of the image and highlight the grayscale and texture features of the lesion region. The regional growth segmentation algorithm is adopted. Taking the grayscale and texture features of the lesion region as the growth criterion, starting from the seed points, the pixel points with similar grayscale and texture features are classified into the same region. During the regional growth process, according to the changes in the grayscale and texture features of the lesion region, the thresholds of the growth criterion are adaptively adjusted to dynamically expand the range of the segmentation region. Morphological processing is performed on the segmentation result. Through erosion and dilation operations, the noise and artifacts generated during the segmentation process are eliminated, and the edges of the lesion region are smoothed. According to the segmentation result after morphological processing, the boundary of the lesion region is extracted to obtain an accurate contour of the lesion region. Feature analysis is performed on the extracted boundary of the lesion region to calculate the morphological features such as the area, perimeter, and circularity of the lesion region, quantifying the size and shape of the lesion region.
[0068] Specifically, cancer image preprocessing is a crucial step in enhancing image clarity. By enhancing contrast and sharpness, the characteristics of the lesion area can be highlighted. For example, performing histogram equalization on lung CT images can make the gray-scale distribution of lung nodules more uniform and the edges clearer. This is helpful for subsequent segmentation and feature extraction. The region growing segmentation algorithm is a commonly used medical image segmentation method. Taking breast cancer ultrasound images as an example, the center point of the mass can be selected as the seed point, and the gray-scale value and texture features can be used as the growth criteria. Suppose the gray-scale value of the seed point is 150 and the texture feature is roughness 0.8, then the pixels with gray-scale values between 140 - 160 and roughness between 0.7 - 0.9 among the adjacent pixels are classified into the same region. Adaptive adjustment of the growth criterion threshold can improve the accuracy of segmentation. For example, when segmenting tumors in liver CT images, as the region expands, an edge area with gradually changing gray-scale values may be encountered. At this time, the threshold range can be dynamically adjusted according to the average gray-scale value of the segmented region, so that the threshold changes with the growth of the region, thereby more accurately capturing the tumor boundary. Morphological processing can optimize the segmentation results. Taking brain MRI image segmentation as an example, performing an erosion operation on the preliminarily segmented brain tumor region can remove some misclassified small regions; then performing a dilation operation can fill the holes inside the tumor to obtain a more smooth and continuous tumor contour. Extracting the boundary of the lesion area is the basis for quantitative analysis. For skin cancer images, an edge tracking algorithm can be used to extract the contour of melanoma. By calculating features such as the perimeter and area of the contour, the following quantitative indicators can be obtained: the area is 500 square millimeters, the perimeter is 80 millimeters, and the roundness is 0.75. These indicators can help doctors evaluate the size and irregularity of the tumor. Morphological feature analysis provides an important basis for enhancing image clarity. For example, in thyroid nodule ultrasound images, benign nodules usually appear round or oval with regular boundaries; while malignant nodules tend to have irregular shapes and blurred edges. By calculating features such as the roundness and edge sharpness of the nodules, an objective basis can be provided for the differentiation between benign and malignant nodules. Suppose the roundness of a certain nodule is 0.9 and the edge sharpness is 0.8, which indicates that this nodule is more likely to be benign. Using the segmentation results and morphological features as auxiliary decision-making bases can significantly improve image clarity. For example, during the analysis of breast cancer images, by combining multiple indicators such as the size, shape, and edge features of the mass, a scoring system can be constructed. Suppose the area of a certain patient's mass is 200 square millimeters, the roundness is 0.6, and the edge irregularity is 0.7. The total score obtained according to the scoring system is 8 points, exceeding the threshold of 6 points for benign and malignant differentiation, indicating that this mass may be malignant. Performing quantitative analysis on the images with enhanced clarity can provide strong support for doctors' analysis and decision-making, improving the accuracy and consistency of the analysis.
[0069] As an implementation manner in this embodiment, based on the adaptive contrast enhancement technology, according to the gray-scale statistical characteristics of the lesion area, the process of automatically adjusting the enhancement parameters and enhancing the contrast of the lesion area includes:
[0070] Obtain the image data of the segmented lesion area, perform gray-scale statistical analysis on the lesion area image, and obtain the gray-scale statistical characteristic parameters of the lesion area;
[0071] According to the obtained gray-scale statistical characteristic parameters of the lesion area, determine the target parameter range of the adaptive contrast enhancement;
[0072] Adopt the adaptive threshold segmentation algorithm to divide the lesion area image into multiple sub-regions. For each sub-region, automatically adjust the contrast enhancement parameters within the target parameter range according to its gray-scale statistical characteristics;
[0073] Perform contrast enhancement processing on each sub-region image, and fuse all the enhanced sub-region images to obtain the overall enhanced lesion area image.
[0074] As an optional implementation manner in this embodiment, for the segmented lesion area, adopt the adaptive contrast enhancement technology, automatically adjust the enhancement parameters according to the gray-scale statistical characteristics of the lesion area, and specifically enhance the contrast of the lesion area to highlight the display effect of the lesion.
[0075] As an additional implementation manner in this embodiment, obtain the image data of the segmented lesion area, perform gray-scale statistical analysis on the lesion area image, and obtain the gray-scale statistical characteristic parameters of the lesion area; according to the obtained gray-scale statistical characteristic parameters of the lesion area, determine the target parameter range of the adaptive contrast enhancement; adopt the adaptive threshold segmentation algorithm to divide the lesion area image into multiple sub-regions. For each sub-region, automatically adjust the contrast enhancement parameters within the target parameter range according to its gray-scale statistical characteristics; perform contrast enhancement processing on each sub-region image, and the gray-scale difference of the enhanced sub-region images is greater, and the local contrast is improved; fuse all the enhanced sub-region images to obtain the overall enhanced lesion area image. Compared with the original lesion area image, the contrast between the lesion and the surrounding tissues is significantly improved; perform smoothing and denoising on the overall enhanced lesion area image through the morphological processing algorithm to eliminate possible noise and small holes, and make the contour of the lesion area clearer; fuse the processed lesion area image with the original medical image, and highlight the lesion area in color or high brightness for the convenience of doctors' analysis.
[0076] Specifically, after obtaining the image data of the segmented lesion area, gray-scale statistical analysis is first performed. The purpose of this step is to understand the gray-scale distribution characteristics of the lesion area and provide a basis for subsequent processing. For example, by calculating statistical quantities such as the average gray-scale value, standard deviation, and gray-scale histogram of the lesion area, the gray-scale range, central tendency, and dispersion degree of this area can be obtained. Suppose the analysis result shows that the average gray-scale value of the lesion area is 120 and the standard deviation is 30. These data reflect the overall brightness level and gray-scale variation degree of the lesion area. According to the gray-scale statistical characteristic parameters, determine the target parameter range for adaptive contrast enhancement. This step aims to set reasonable targets for subsequent contrast enhancement processing to avoid over-enhancement or under-enhancement. For example, the target parameter range can be set to ±20% of the average gray-scale value, that is, between 96 and 144. Such a setting can not only improve the contrast of the lesion area but also maintain the naturalness of the image. Use an adaptive threshold segmentation algorithm to divide the lesion area into multiple sub-regions. This method can better adapt to local gray-scale changes. For example, the Otsu algorithm or local adaptive threshold method can be used for segmentation. Suppose the lesion area is divided into a 5×5 grid, and an independent threshold is used for segmentation within each grid, so that the structural differences within the lesion area can be captured more precisely. For each sub-region, automatically adjust the contrast enhancement parameters within the target parameter range according to its gray-scale statistical characteristics. This adaptive method can better handle the characteristics of different sub-regions. For example, for sub-regions with lower gray-scale values, larger enhancement parameters can be used; while for sub-regions with higher gray-scale values, smaller enhancement parameters are used. Suppose the average gray-scale value of a certain sub-region is 80, which is lower than the overall average value, then its enhancement parameter can be set to 1.5 times the reference value. Perform contrast enhancement processing on each sub-region image. Common methods include histogram equalization, gamma correction, etc. For example, for the above-mentioned sub-region with an average gray-scale value of 80, gamma correction can be applied, and the gamma value of 0.7 can be used for enhancement, which can effectively improve the visibility of dark details. Fuse all the enhanced sub-region images to obtain the overall enhanced lesion area image. During the fusion process, attention should be paid to the smooth transition of the boundaries to avoid obvious stitching marks. Weighted average or gradient-based fusion methods can be used to ensure the continuous and natural gray-scale change between adjacent sub-regions. Perform smoothing and denoising on the overall enhanced lesion area image through morphological processing algorithms. Common morphological operations include opening and closing operations. For example, first perform an erosion operation with a radius of 2 pixels to remove small noise points, then perform a dilation operation with a radius of 2 pixels to fill small holes, and finally perform a median filter again to further smooth the image. These operations can effectively eliminate the noise that may be introduced during the contrast enhancement process while maintaining the integrity of the lesion area contour.Finally, fuse the processed lesion area image with the original medical image, and highlight the lesion area in color or with high brightness. For example, the enhanced lesion area can be marked in red and superimposed on the original grayscale image. Or use the pseudo-color technology to map the grayscale values of the lesion area to the heat map color space, making the lesion area more prominent visually. This visualization method can help doctors quickly locate and evaluate the lesions. Through the above steps, the lesion features that may not be easily detectable originally are enhanced and highlighted, providing doctors with clearer and more valuable image information. This adaptive image enhancement and visualization method not only improves the sensitivity of lesion detection but also maintains the overall naturalness of the image, avoiding the artifacts that may be caused by overprocessing.
[0077] Smooth and denoise the overall enhanced lesion area image through the morphological processing algorithm to eliminate possible noise points and small holes, making the contour of the lesion area clearer.
[0078] Obtain the enhanced lesion area image and use it as the input image of the morphological processing algorithm. For the input image, perform morphological opening operation. By eroding and dilating the image, eliminate the noise points and small holes in the image. For the image processed by the opening operation, further perform morphological closing operation. By dilating and eroding the image, smooth the contour of the lesion area. According to the preset size and shape parameters of the structural element, adaptively adjust the parameters of the morphological operation to obtain the optimal smoothing and denoising effect. Through edge detection on the processed image, extract the contour of the lesion area. Further perform morphological processing on the extracted lesion area contour, such as contour smoothing and contour thinning, to make the contour lines clearer and smoother. Take the lesion area image after a series of morphological processing as the output to obtain a lesion area image with smoothed denoising and clear contour, preparing for subsequent feature extraction and analysis.
[0079] Specifically, morphological processing is an image processing method based on the theory of mathematical morphology, mainly used for image smoothing, denoising, and contour extraction, etc. In the image processing of the lesion area, morphological operations can effectively eliminate noise, fill holes, and smooth contours. First, perform an opening operation on the enhanced lesion area image. The opening operation consists of an erosion operation followed by a dilation operation. The erosion operation can remove small objects and protruding parts in the image, while the dilation operation can fill small holes and connect disconnected areas. For example, for a lung nodule image containing noise, select a circular structuring element of an appropriate size (such as a radius of 3 pixels), first perform the erosion operation to remove noise smaller than the structuring element, and then perform the dilation operation to restore the main structure, thereby achieving the denoising effect. Next, perform a closing operation on the image after the opening operation. The closing operation consists of a dilation operation followed by an erosion operation, which can fill small holes inside the object and smooth the contour. For example, for a liver tumor image with an uneven contour, use a square structuring element of size 5×5 pixels to perform the closing operation, which can effectively fill the depressions at the edge of the tumor and make the contour smoother. The parameter selection of morphological operations is crucial for the processing effect. The size and shape of the structuring element should be adaptively adjusted according to the characteristics of the lesion. For example, for lung nodules of different sizes, an adaptive algorithm can be designed to dynamically adjust the radius of the structuring element according to the area of the nodule to achieve more accurate morphological processing. After morphological processing, it is necessary to extract the contour of the lesion area. Commonly used edge detection algorithms include Sobel, Canny, etc. Taking the Canny algorithm as an example, through steps such as Gaussian filtering, gradient calculation, non-maximum suppression, and double-threshold detection, it can effectively extract the edge contour of the lesion. For a breast mass image after morphological processing, using the Canny algorithm can accurately depict the boundary of the mass. The extracted contour may still have some irregularities and needs further processing. Contour smoothing can use methods such as B-spline curve fitting to connect discrete contour points into a smooth curve. Contour thinning can adopt a skeleton extraction algorithm, such as the Zhang-Suen thinning algorithm, to thin the rough contour lines into single-pixel-width lines. Through this series of morphological processing, an image of the lesion area with reduced noise and clear contours can be obtained. This processing not only improves the visual quality of the image but also lays a foundation for subsequent feature extraction and analysis. For example, in lung nodule detection, the nodule image after morphological processing can more accurately calculate morphological features such as diameter and perimeter, which helps in the judgment of benign and malignant. In brain tumor segmentation, a clear tumor contour can improve the accuracy of volume measurement and provide a reliable basis for treatment plan formulation.
[0080] As an implementation manner in this embodiment, the wavelet transform-based denoising method suppresses noise by performing soft threshold processing on the wavelet coefficients of the high-frequency subbands, while retaining the original coefficients of the low-frequency subbands to preserve image details, and obtains the denoised image through inverse transformation.
[0081] As an alternative implementation in this embodiment, considering the noise interference in cancer images, a denoising method based on wavelet transform is introduced to the enhanced image. Through multi-scale wavelet decomposition, soft threshold processing is performed on the wavelet coefficients in the high-frequency subbands to suppress high-frequency noise. At the same time, the original coefficients are retained in the low-frequency subbands to retain the detailed information of the lesion area. The image is reconstructed through inverse transformation to improve the signal-to-noise ratio and clarity of the image.
[0082] As an additional implementation in this embodiment, Step 1: Obtain a cancer image and process it using a denoising method based on wavelet transform for the noise interference present in the image. Step 2: Perform multi-scale wavelet decomposition on the cancer image to obtain wavelet coefficients at different frequency scales. Step 3: According to a preset soft threshold, perform soft threshold processing on the wavelet coefficients in the high-frequency subbands. If the absolute value of a wavelet coefficient is less than the soft threshold, set the coefficient to zero; otherwise, retain the coefficient. Through this step, high-frequency noise can be effectively suppressed. Step 4: In the low-frequency subbands, retain the original wavelet coefficients without any processing. The low-frequency subbands contain the main energy and detailed information of the image, and retaining this information helps to retain the detailed features of the lesion area. Step 5: According to the processed high-frequency subband wavelet coefficients and the original low-frequency subband coefficients, reconstruct the image through wavelet inverse transformation to obtain the denoised cancer image. Step 6: Calculate the signal-to-noise ratio of the cancer image before and after denoising, and judge the denoising effect by comparing the improvement degree of the signal-to-noise ratio. If the signal-to-noise ratio improves significantly, it indicates that the denoising method is effective; otherwise, adjust the soft threshold and re-execute Steps 3-5. Step 7: Evaluate the clarity of the denoised cancer image by calculating the gradient information of the image. If the clarity meets the preset conditions, output the final denoised and enhanced cancer image; otherwise, return to Step 1 to re-obtain the image and process it.
[0083] Specifically, after obtaining a cancer image, the first problem to be solved is the possible noise problem in the image. This is like listening to someone speaking in a noisy environment, where background noise needs to be excluded first to clearly hear the content. The denoising method based on wavelet transform is similar to an intelligent "noise-canceling headset" and can effectively remove the noise in the image. Here, wavelet transform can be understood as a special "filter" that can decompose the image into components of different frequencies, just like decomposing a song into high, medium, and low frequencies. For example, suppose there is a lung CT image containing fine noise particles. These noise particles are like "noise dots" on a photo and will affect doctors' observation of the lesion. Performing multi-scale wavelet decomposition is like using sieves of different specifications to sieve sand. Components of different frequencies are like sand grains of different sizes and will be separated into different "sieves". For example, the image can be decomposed into four parts: the low-frequency part, similar to the overall contour of the image, like a blurred thumbnail; and three high-frequency parts, representing details in the horizontal, vertical, and diagonal directions respectively, similar to the edges and textures of the image. The preset soft threshold can be understood as the noise reduction intensity of the "noise-canceling headset". Processing the wavelet coefficients of the high-frequency subbands with the soft threshold is like removing high-frequency noise in a song. If the intensity (the absolute value of the wavelet coefficient) of a certain high-frequency component is lower than the preset "noise standard" (soft threshold), then it is considered noise and will be eliminated (set to zero); if it is higher than this standard, it is considered the real detail of the image and needs to be retained. For example, a soft threshold of 0.2 can be set. If the absolute value of a certain wavelet coefficient is 0.15, less than 0.2, it will be set to zero; if the absolute value of another wavelet coefficient is 0.3, greater than 0.2, the coefficient will be retained. The advantage of this is that it can effectively remove noise while retaining the details of the image as much as possible. The low-frequency subband, like the main melody in a song, contains the main information of the image. Without processing, it is to avoid damaging the main structure of the image and retain the main information and detailed features of the lesion area, such as important information like the shape and size of the lesion. This is like when listening to a song, both removing noise and ensuring that the main melody is clearly distinguishable. Wavelet inverse transform can be understood as recombining components of different frequencies into the original image, just like recombining high, medium, and low frequencies into a complete song. Through wavelet inverse transform, the processed wavelet coefficients of the high-frequency subbands and the original coefficients of the low-frequency subbands can be recombined into a complete image, which is the denoised cancer image. Signal-to-noise ratio is an important indicator for evaluating the denoising effect, just like using a "clarity score" to measure the effect of a noise-canceling headset. The higher the signal-to-noise ratio, the less noise there is in the image and the clearer the image. For example, if the signal-to-noise ratio of the image before denoising is 20 and it is increased to 30 after denoising, it shows that the denoising method is effective. If the improvement in the signal-to-noise ratio is not obvious, the soft threshold needs to be adjusted and the processing needs to be carried out again.Adjusting the soft threshold is like adjusting the noise reduction intensity of noise-canceling headphones, which needs to be finely tuned according to the actual situation to achieve the best noise reduction effect. The clarity evaluation is achieved by calculating the gradient information of the image. The gradient can be understood as the change rate of pixel values in the image. The larger the gradient, the clearer the image. For example, the difference between each pixel point in the image and its surrounding pixel points can be calculated, and then these differences are statistically analyzed to obtain the clarity index of the image. If the clarity meets the preset conditions, such as the clarity index being greater than 0.8, it is considered that the denoised image is clear enough for subsequent analysis. Otherwise, the image needs to be re-acquired and processed until an image with a qualified clarity is obtained. In this way, step by step and closely linked, a high-quality denoised and enhanced cancer image is finally obtained, providing a reliable basis for doctors' analysis.
[0084] According to the processed wavelet coefficients of the high-frequency subband and the original coefficients of the low-frequency subband, the image is reconstructed by inverse wavelet transform to obtain the denoised cancer image.
[0085] Obtain the cancer image data to be processed, and preprocess the image data, including operations such as image format conversion and image size adjustment, to obtain standardized cancer image data. Select a suitable wavelet basis function, perform wavelet transform on the standardized cancer image data, decompose the image into a high-frequency subband and a low-frequency subband, and obtain the wavelet coefficients of the high-frequency subband and the original coefficients of the low-frequency subband. According to the statistical characteristics of the wavelet coefficients of the high-frequency subband, design a suitable threshold function, perform threshold processing on the wavelet coefficients of the high-frequency subband to remove high-frequency noise, and obtain the processed wavelet coefficients of the high-frequency subband. Integrate the processed wavelet coefficients of the high-frequency subband with the original coefficients of the low-frequency subband, reconstruct the image by inverse wavelet transform, and obtain the denoised cancer image. Evaluate the quality of the denoised cancer image, calculate indicators such as the signal-to-noise ratio and peak signal-to-noise ratio of the image, and judge whether the image denoising effect meets the requirements. If it does not meet the requirements, adjust the wavelet basis function or threshold function parameters and re-perform the image denoising process. Compare the denoised cancer image with the original cancer image, analyze the differences before and after image denoising, evaluate the performance of the denoising algorithm, and optimize and improve the algorithm according to the evaluation results. Output and save the denoised cancer image for subsequent cancer analysis, and record the parameter settings and processing results of image denoising to provide a reference for subsequent denoising of similar images.
[0086] Specifically, the first step in cancer image processing is to acquire and preprocess the image data. For example, for breast cancer X-ray mammography images, it may be necessary to convert the DICOM format to a common PNG or JPEG format and uniformly adjust the image size to 1024x1024 pixels for subsequent processing. Wavelet transform is a multi-resolution analysis method that can effectively separate different frequency components of an image. In cancer image denoising, commonly used wavelet basis functions include Haar, Daubechies, and Symlets, etc. Taking Daubechies4 (db4) as an example, it can better balance time and frequency localization and is suitable for medical image processing. After performing wavelet transform on the image, the high-frequency subbands contain the detail and noise information of the image, while the low-frequency subbands retain the main structure of the image. For the wavelet coefficients in the high-frequency subbands, soft threshold or hard threshold functions can be designed for processing. Soft threshold functions are usually smoother and can reduce the pseudo-Gibbs phenomenon in the image. For example, the threshold can be set to 3 times the standard deviation of the high-frequency subband coefficients. Coefficients with absolute values less than the threshold are shrunk, while coefficients greater than the threshold remain unchanged. When reconstructing the image, the processed high-frequency subband coefficients are combined with the retained low-frequency subband coefficients, and the denoised image is obtained through inverse wavelet transform. This method can effectively remove high-frequency noise while retaining important structural information in the image, such as key features like tumor edges. The evaluation of the denoising effect usually adopts a method combining objective indicators and subjective evaluation. Objective indicators include signal-to-noise ratio (SNR) and peak signal-to-noise ratio (PSNR), etc. For example, if the PSNR of the denoised image increases by more than 3 dB, the denoising effect is usually considered significant. If the indicators do not meet the standard, one can try to adjust the wavelet basis function (such as changing from db4 to db6) or modify the threshold function parameters. By comparing the images before and after denoising, the algorithm performance can be visually evaluated. For example, in lung cancer CT images, after denoising, the edges and internal structures of lung nodules should be clearly shown without overly smoothing out important key information. This comparative analysis helps to optimize algorithm parameters, such as adjusting the form or parameter values of the threshold function. Finally, the processed image is saved in a standard format (such as 16-bit TIFF) to retain sufficient gray-level information. At the same time, parameters such as the wavelet basis function used, the decomposition level, and the threshold function are recorded for subsequent research reference. These processed images can be used in a computer-aided diagnosis (CAD) system to improve the accuracy of early cancer detection. The purpose of the entire denoising process is to improve the quality of cancer images so that doctors can more accurately identify and locate the lesion areas. By removing interfering noise, the key features in the image are enhanced, such as the clarity of the tumor boundary, which in turn helps to improve the accuracy and timeliness of analysis. However, the key point of this embodiment lies in improving the clarity of the image, and it is a reasonable speculation to improve the accuracy of analysis.This image preprocessing technology plays an important role in the early screening and precise diagnosis and treatment of cancer, laying a foundation for subsequent tasks such as image segmentation, feature extraction, and lesion classification.
[0087] As an implementation method in this embodiment, a parallel computing framework based on a graphics processing unit is adopted to allocate computing tasks such as image preprocessing, feature extraction, segmentation, contrast enhancement, and denoising to the graphics processing unit for execution. Corresponding parallelization strategies are designed for each algorithm step to make full use of the parallel computing power of the graphics processing unit and improve the execution efficiency of the algorithm.
[0088] As an alternative implementation method in this embodiment, according to the computing tasks of image processing, a parallel computing framework is adopted to make full use of the parallel computing power of the graphics processing unit and design corresponding parallelization strategies. For the image preprocessing task, by dividing the image into blocks and allocating the sub-images after division to different threads of the graphics processing unit for parallel processing, the efficiency of image preprocessing is improved. For the feature extraction task, a parallelization algorithm based on the graphics processing unit is adopted to allocate the computing tasks of feature extraction to multiple threads of the graphics processing unit for parallel execution to accelerate the feature extraction process. For the image segmentation task, by dividing the image into multiple sub-regions and allocating the sub-regions to different threads of the graphics processing unit for parallel segmentation, the efficiency of image segmentation is improved. For the contrast enhancement task, a parallel algorithm based on histogram equalization is adopted, and by allocating the histogram calculation and pixel mapping to multiple threads of the graphics processing unit for parallel execution, the contrast enhancement process is accelerated. For the image denoising task, a parallel denoising algorithm based on wavelet transform is adopted, and by allocating the computing tasks of wavelet decomposition and reconstruction to multiple threads of the graphics processing unit for parallel execution, the efficiency of image denoising is improved. According to different image processing tasks, the parallelization strategy and task allocation method are dynamically adjusted to make full use of the parallel computing resources of the graphics processing unit and maximize the execution efficiency of the algorithm.
[0089] As an additional implementation method in this embodiment, specifically, in image processing tasks, using a parallel computing framework can significantly improve processing efficiency. Taking image preprocessing as an example, a 4K-resolution image can be divided into 16 1080p sub-images, and each sub-image is assigned to a thread of the graphics processor for processing. This method can shorten the processing time from the original 1 minute to about 4 seconds, greatly improving the efficiency. In the feature extraction task, a parallelization algorithm based on the graphics processor can be adopted. For example, when extracting SIFT features, the image can be divided into multiple overlapping local regions, and each region is assigned to a thread for feature point detection and descriptor calculation. This parallel strategy can shorten the feature extraction time from the traditional 10 seconds to less than 1 second, with an acceleration ratio of more than 10 times. The image segmentation task can be parallelized by dividing the image into multiple sub-regions. Taking superpixel segmentation as an example, a 4K image can be divided into 16 sub-regions, and each sub-region is independently subjected to superpixel segmentation by a thread. This method can reduce the segmentation time from the original 30 seconds to about 2 seconds, significantly improving the segmentation efficiency. The contrast enhancement task can adopt a parallel algorithm based on histogram equalization. First, the image is divided into multiple blocks, and each block is calculated for the local histogram by a thread. Then, all local histograms are merged to obtain the global histogram. Finally, multiple threads perform pixel mapping in parallel. This parallel strategy can shorten the processing time from the original 5 seconds to less than 0.5 seconds, improving the efficiency by 10 times. The image denoising task can adopt a parallel denoising algorithm based on wavelet transform. For example, for an 8K-resolution image, it can be divided into 64 1080p sub-images. Each sub-image is independently subjected to wavelet decomposition, threshold processing, and reconstruction by a thread. This parallel method can shorten the denoising time from the original 2 minutes to about 5 seconds, greatly improving the processing efficiency. Dynamically adjusting the parallelization strategy is crucial for making full use of the graphics processor resources. For example, when processing low-resolution images, the number of sub-regions can be reduced and the workload of each thread can be increased to avoid excessive thread scheduling overhead. On the contrary, for high-resolution images, the number of sub-regions can be increased to make full use of the parallel computing power of the graphics processor. Through this dynamic adjustment, the best performance can be obtained in image processing tasks of different scales. Generally speaking, using a parallel computing framework can significantly improve the efficiency of image processing. By reasonable task allocation and parallelization strategy, the computing resources of the graphics processor can be fully utilized, and the processing time can be greatly shortened. This not only improves the speed of image processing but also provides the possibility for real-time image processing and large-scale image data analysis.
[0090] Based on this, an enhanced method for cancer image contrast based on deep learning provided by an embodiment of the present invention addresses the problem of insufficient contrast in cancer images. The method uses an adaptive histogram equalization algorithm for preprocessing to enhance the local area contrast. Texture, shape, and edge features are extracted through multi-scale analysis to construct feature descriptors. Based on the feature descriptors, a region growing segmentation algorithm is used to segment the image to obtain the boundary of the lesion area. An adaptive contrast enhancement technique is applied to the segmented lesion area to highlight the display effect of the lesion. Considering noise interference, a denoising method based on wavelet transform is introduced to suppress noise in the high-frequency sub-bands and retain details in the low-frequency sub-bands. The present invention also adopts a parallel computing framework based on a graphics processing unit to allocate each computing task to the graphics processing unit for execution, improving the algorithm efficiency. Through the organic combination of the above technical solutions, the present invention can effectively enhance the contrast and clarity of cancer images, highlight the display of the lesion area, and at the same time suppress noise interference.
[0091] Embodiment 2
[0092] In this embodiment, an electronic device is provided, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the method in the above embodiment.
[0093] The above program can run in the processor or can also be stored in the memory (or referred to as a computer-readable medium). The computer-readable medium includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible by a computing device.
[0094] These computer programs can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate computer-implemented processing. Thus, the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 corresponding to different steps can be implemented by different modules.
[0095] As shown Figure 2 in the figure, this embodiment provides such a system, which is called a cancer image contrast enhancement system based on deep learning, including:
[0096] A preprocessing module for obtaining a cancer image and preprocessing the cancer image based on an adaptive histogram equalization algorithm;
[0097] A multi-scale feature extraction module for extracting features of the preprocessed cancer image at different scales based on a multi-scale analysis method and constructing a feature descriptor by fusing multi-scale features, where the features include texture features, shape features, and edge features;
[0098] A region growing segmentation module for segmenting the cancer image based on the feature descriptor using a region growing segmentation algorithm, taking the gray level and texture features of the lesion area as the growth criterion, adaptively expanding the segmentation area, and eliminating segmentation noise and artifacts through morphological processing;
[0099] A contrast enhancement module for automatically adjusting enhancement parameters based on the gray level statistical characteristics of the segmented lesion area and enhancing the contrast of the lesion area for the segmented lesion area based on an adaptive contrast enhancement technique;
[0100] A wavelet denoising module for performing a denoising method based on wavelet transform on the enhanced image, performing soft threshold processing on wavelet coefficients in the high-frequency subbands through multi-scale wavelet decomposition, suppressing high-frequency noise, retaining the original coefficients in the low-frequency subbands, and reconstructing the image through inverse transformation to obtain the final image with enhanced contrast.
[0101] As an implementation manner in this embodiment, the region growing segmentation module optimizes the contour of the segmentation area by combining dynamic threshold adjustment and morphological processing.
[0102] As an implementation manner in this embodiment, it further includes a parallel computing module for using a parallel computing framework based on a graphics processor to allocate computing tasks such as image preprocessing, feature extraction, segmentation, contrast enhancement, and denoising to the graphics processor for execution, designing corresponding parallelization strategies for each algorithm step, and making full use of the parallel computing power of the graphics processor to improve the execution efficiency of the algorithm.
[0103] This system or device is used to implement the functions of the method in the above embodiment. Each module in this system or device corresponds to each step in the method, and those that have been described in the method will not be elaborated here.
[0104] Through the above embodiments, problems such as differences in imaging quality and low contrast in lesion areas in the related art are solved, so that the contrast and clarity of cancer images can be effectively enhanced, the lesion areas can be highlighted, and noise interference can be suppressed at the same time.
[0105] The present invention also provides a computer terminal device, including:
[0106] One or more processors;
[0107] A memory, coupled to the processor, for storing one or more programs;
[0108] When the one or more programs are executed by the one or more processors, the one or more processors implement the steps of a method for enhancing the contrast of cancer images based on deep learning.
[0109] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of a method for enhancing the contrast of cancer images based on deep learning are implemented.
[0110] The above are only the preferred specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed in the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for enhancing the contrast of cancer images based on deep learning, characterized in that, Including the following steps: Obtain a cancer image, and preprocess the cancer image based on the adaptive histogram equalization algorithm; For the preprocessed cancer image, based on the multi-scale analysis method, extract features at different scales, and construct a feature descriptor by fusing multi-scale features, where the features include texture features, shape features, and edge features; Based on the feature descriptor, use the region growing segmentation algorithm to segment the cancer image, take the gray level and texture features of the lesion area as the growth criterion, adaptively expand the segmentation area, and eliminate segmentation noise and artifacts through morphological processing; For the segmented lesion area, based on the adaptive contrast enhancement technology, automatically adjust the enhancement parameters according to the gray level statistical characteristics of the lesion area to enhance the contrast of the lesion area; For the enhanced image, use the denoising method based on wavelet transform, perform multi-scale wavelet decomposition, perform soft threshold processing on the wavelet coefficients in the high-frequency subbands to suppress high-frequency noise, while retain the original coefficients in the low-frequency subbands, and reconstruct the image through inverse transformation to obtain the final image with enhanced contrast; The process of automatically adjusting the enhancement parameters according to the gray level statistical characteristics of the lesion area based on the adaptive contrast enhancement technology to enhance the contrast of the lesion area includes: Obtain the image data of the segmented lesion area, perform gray level statistical analysis on the lesion area image to obtain the gray level statistical characteristic parameters of the lesion area; According to the obtained gray level statistical characteristic parameters of the lesion area, determine the target parameter range for adaptive contrast enhancement; Use the adaptive threshold segmentation algorithm to divide the lesion area image into multiple sub-regions. For each sub-region, automatically adjust the contrast enhancement parameters within the target parameter range according to its gray level statistical characteristics; Perform contrast enhancement processing on each sub-region image, and fuse all the enhanced sub-region images to obtain the overall enhanced lesion area image.
2. The method according to claim 1, wherein The process of preprocessing the cancer image using the adaptive histogram equalization algorithm includes: Obtain a cancer image dataset and perform gray scale processing on the image; Perform block processing on the gray scale image, divide the image into several local regions, and calculate the gray level histogram of each region; For regions with small gray level differences, use the adaptive histogram equalization algorithm to adjust the gray level distribution and enhance the local contrast; Combine all local regions to obtain the preprocessed complete cancer image.
3. The method according to claim 1, wherein The multi-scale analysis method includes: using wavelet transform to perform multi-scale decomposition on the preprocessed cancer image, and extracting texture features, shape features, and edge features; Fuse the texture features, shape features, and edge features extracted at different scales, construct a feature descriptor through feature fusion, and use the Fisher discriminant criterion to perform feature screening on the feature descriptor to obtain the screened feature descriptor.
4. The method according to claim 1, wherein The process of segmenting the cancer image includes: The region growing segmentation algorithm expands the segmentation area by dynamically adjusting the thresholds of gray level and texture features, and combines morphological processing to optimize the segmentation result to obtain the boundary of the lesion area.
5. The method according to claim 1, wherein The denoising method based on wavelet transform suppresses noise by performing soft threshold processing on the wavelet coefficients of the high-frequency subbands, while retaining the original coefficients of the low-frequency subbands to preserve image details, and obtains the denoised image through inverse transformation.
6. A cancer image contrast enhancement system based on deep learning, characterized in that, The system includes: A preprocessing module for acquiring a cancer image and preprocessing the cancer image based on an adaptive histogram equalization algorithm; A multi-scale feature extraction module for extracting features at different scales based on a multi-scale analysis method for the preprocessed cancer image, and constructing a feature descriptor by fusing multi-scale features, where the features include texture features, shape features, and edge features; A region growing segmentation module for segmenting the cancer image using a region growing segmentation algorithm based on the feature descriptor, with the gray level and texture features of the lesion region as the growth criterion, adaptively expanding the segmentation region, and eliminating segmentation noise and artifacts through morphological processing; A contrast enhancement module for automatically adjusting enhancement parameters based on an adaptive contrast enhancement technique according to the gray level statistical characteristics of the segmented lesion region to enhance the contrast of the lesion region; A wavelet denoising module for performing a denoising method based on wavelet transform on the enhanced image, suppressing high-frequency noise by performing soft threshold processing on the wavelet coefficients in the high-frequency subbands through multi-scale wavelet decomposition, while retaining the original coefficients in the low-frequency subbands, and reconstructing the image through inverse transformation to obtain the final image with enhanced contrast; In the contrast enhancement module, the process of automatically adjusting enhancement parameters based on an adaptive contrast enhancement technique according to the gray level statistical characteristics of the lesion region to enhance the contrast of the lesion region includes: Acquiring the image data of the segmented lesion region, performing gray level statistical analysis on the lesion region image, and obtaining the gray level statistical characteristic parameters of the lesion region; Determining the target parameter range for adaptive contrast enhancement according to the obtained gray level statistical characteristic parameters of the lesion region; Using an adaptive threshold segmentation algorithm to divide the lesion region image into multiple sub-regions, and automatically adjusting the contrast enhancement parameters within the target parameter range according to the gray level statistical characteristics of each sub-region; Performing contrast enhancement processing on each sub-region image, and fusing all the enhanced sub-region images to obtain the overall enhanced lesion region image.
7. The system according to claim 6, wherein The region growing segmentation module optimizes the contour of the segmentation region by combining dynamic threshold adjustment and morphological processing.
8. A computer terminal device, characterized in that, Including: One or more processors; A memory coupled to the processor for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement each step of the deep learning-based cancer image contrast enhancement method according to any one of claims 1-5.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements each step of the deep learning-based cancer image contrast enhancement method according to any one of claims 1-5.
Citation Information
Patent Citations
Blood vessel plaque identification and analysis method based on image processing
CN118469936A
Lung CT image correlation analysis method
CN119313921A