Pulmonary nodule CT image processing method and system
By adjusting the window width and window position of the CT image, image preprocessing and segmentation are performed, combined with high and low frequency decomposition and edge detection, the accuracy of lung nodules recognition and judgment in CT images is solved, and efficient judgment of benign and malignant lung nodules is achieved.
Patent Information
- Application Number
- CN202510350250.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-07-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing CT imaging technology is difficult to accurately identify lung nodules, resulting in low accuracy in nodule judgment classification, especially when the size of lung nodules in CT scanning images is small.
By adjusting the window width and window position of the CT image, image preprocessing and segmentation are performed, combining high and low frequency decomposition and edge detection, image contrast is enhanced, and the shape, diameter and volume characteristics of the nodules are judged through edge feature analysis.
It improves the recognition efficiency of lung nodules and the accuracy of benign and malignant judgments, reduces the amount of data calculation, and is suitable for large-scale promotion and application.
Smart Images

Figure CN120278968A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image recognition, and particularly relates to a method and system for processing CT images of lung nodules. Background Art
[0002] Early screening for lung cancer based on the concept of early detection and early treatment can greatly improve the survival rate of lung cancer patients. The early form of lung cancer usually presents as lung nodules. The proliferation of lung cells or foreign objects can lead to the formation of lung nodules. Detecting and removing lung nodules at an early stage, especially malignant lung nodules, is a key preventive method to effectively prevent lung nodules from turning into lung cancer.
[0003] In clinical practice of lung cancer, common medical imaging methods include isotope imaging, magnetic resonance imaging, isotope imaging, and computed tomography (CT), etc. CT has become the most effective and popular imaging method for nodule detection and diagnosis due to its competitive advantages of low cost, wide application, and non-invasiveness. The widespread use of CT has led to a sharp increase in the workload of doctors in reading images. The work of reading images requires relatively high professional ability of doctors. However, since CT scan images are generated by emitting X-rays through the human body, and there are various tissues in the human body, different tissues have different absorption of X-rays, which will cause mutual influence of multiple tissue images and low image contrast. Compared with the scanned CT images, the size of lung nodule points is relatively small. Directly observing the scanned CT images is difficult to accurately identify the nodule points in the images, which greatly affects the accuracy of judging and classifying the nodule points. Summary of the Invention
[0004] Based on this, the purpose of the present invention is to provide a method and system for processing CT images of lung nodules to solve the technical problems existing in the prior art.
[0005] The present invention provides a method for processing CT images of lung nodules, including:
[0006] Adjusting the window width and window level of the CT image display based on the absorption coefficients of different tissues for X-rays, and obtaining a number of scanned CT images of the chest according to the determined window width and window level;
[0007] Preprocessing a number of the CT images according to the basic features of the CT images, and performing image segmentation on the preprocessed CT images to obtain lung images;
[0008] Performing contrast enhancement processing on the lung images based on high and low frequency decomposition operations, performing binarization processing on the enhanced images, and retaining the target area where lung nodules exist in the lung images according to the binarization processing results, where the range of the target area is larger than the range of the lung nodule points;
[0009] Perform edge detection on the target region to obtain the edge features of the knot nodes in the target region, and determine the shape features, diameter features, and volume features of the knot nodes based on the obtained edge features of the knot nodes, so as to judge the knot nodes in the lung nodule CT image.
[0010] Optionally, the step of preprocessing several CT images according to the basic features of the CT images and performing image segmentation on the preprocessed CT images to obtain lung images includes:
[0011] Obtain the slice intervals corresponding to several CT images, sequentially select several slice CT images adjacent to the current CT image before and after, and merge the selected CT images in the channel dimension;
[0012] Perform pixel value conversion on the merged CT image, convert the pixel values in the CT image to Hounsfield density representation, and perform normalization processing on the converted image to obtain the CT image to be analyzed;
[0013] Obtain the superpixel image corresponding to the CT image to be analyzed, and perform clustering and membership degree iterative update on the superpixel image to complete the segmentation of the CT image.
[0014] Optionally, the step of obtaining the superpixel image corresponding to the CT image to be analyzed, and performing clustering and membership degree iterative update on the superpixel image to complete the segmentation of the CT image includes:
[0015] Obtain the morphological features of the CT image to be analyzed, perform gradient reconstruction on the CT image to be analyzed based on the morphological features in the CT image to be analyzed, and fuse the reconstructed gradient images to obtain the target gradient image;
[0016] Perform segmentation on the target gradient image based on the watershed transformation to obtain a superpixel image corresponding to the target gradient image with the contour of the lung parenchyma;
[0017] Randomly initialize the membership degree partition matrix of the superpixel image, and incorporate local spatial information into the fuzzy clustering algorithm for membership degree iterative update;
[0018] If the difference between the two membership degrees before and after is less than the preset error threshold, complete one iteration and increase the iteration count by 1;
[0019] Perform the next clustering and membership degree iteration until the iteration count meets the preset requirements.
[0020] Optionally, the expression of the target gradient image is:
[0021]
[0022] Wherein, R(t, r1, r2) represents the fused target gradient image, represents the fusion operation, represents several gradient images after gradient reconstruction based on structural features, GC represents morphological features, and r1 and r2 respectively represent the minimum and maximum radii of the equivalent disks of the morphological features;
[0023] The update expression of the membership degree is:
[0024]
[0025] Wherein, L i represents the membership degree matrix corresponding to the i-th region in the superpixel image, λ represents the Lagrangian factor of the Euclidean distance, q represents the weighting exponent, and S i represents the number of pixels in the i-th region of the superpixel image; n represents the number of regions in the superpixel image, m represents the number of clustering centers, and J j represents the j-th clustering center of the fuzzy group in the superpixel image;
[0026] The conditional expression for the increase in the number of iterations is:
[0027] Max(L i -L i+1 ) < ξ
[0028] Wherein, ξ represents the preset error threshold.
[0029] Optionally, the steps of performing contrast enhancement processing on the lung image based on high-low frequency decomposition operation, performing binarization processing on the enhanced image, and retaining the target region where the lung nodules exist in the lung image according to the binarization processing result include:
[0030] Performing high-low frequency decomposition operation on the lung image by using the wavelet algorithm to obtain the high-frequency component image and the low-frequency component image of the lung image;
[0031] Based on gray-scale mathematical morphology, performing dilation operation on the low-frequency component image and the lung image first and then performing erosion operation, and performing erosion operation on the high-frequency component image and the lung image first and then performing dilation operation;
[0032] Performing inverse decomposition processing on the processed low-frequency component image and the high-frequency component image to obtain the image after fusion of the low-frequency component and the high-frequency component, so as to complete the contrast enhancement processing;
[0033] Performing binarization processing on the contrast-enhanced processing, and retaining the target region with a gray value of 1 in the binary image.
[0034] Optionally, the step of performing edge detection on the target area to obtain the edge features of the knot nodes in the target area includes:
[0035] Perform bilateral filtering on the image of the target area based on the spatial domain and the pixel domain to remove the noise data in the target area while retaining the contour of the knot nodes;
[0036] Calculate the first direction operator and the second direction operator in the filtered image based on the edge detection operator, where the first direction and the second direction are perpendicular;
[0037] Perform convolution calculations on the first direction operator and the second direction operator with the filtered image respectively to obtain the weighted average pixels of the pixels in the image in the first direction and the second direction;
[0038] Calculate the gradient magnitude and gradient direction of the pixel points in the image according to the weighted average pixels in the first direction and the second direction, and superimpose the gradient magnitudes of the two gradient directions to obtain the edge information of the filtered image;
[0039] Perform connectivity coding on the edge information to divide the edge information into several directions, correspond the gradient direction to the divided directions of the edge information, and perform non-maximum suppression on the gradient magnitude to refine the edges of the knot nodes;
[0040] Connect the refined discrete edges to obtain the complete edge features of the knot nodes.
[0041] Optionally, the expression of the weighted average pixel is:
[0042]
[0043]
[0044] In the formula, Weight1(i,j) represents the weighted average pixel in the first direction, which is used to detect the edge information in the first direction, Image(i,j) represents the filtered image, (i,j) represents the position of the pixel point in the filtered image, LBP1(i,j) represents the first direction operator, Weight2(i,j) represents the weighted average pixel in the second direction, which is used to detect the edge information in the second direction, and LBP2(i,j) represents the second direction operator;
[0045] The expression of the gradient magnitude is:
[0046]
[0047] In the formula, Grad(i,j) represents the gradient of the pixel point (i,j).
[0048] The present invention also provides a CT image processing system for pulmonary nodules, including:
[0049] An acquisition module, configured to adjust the window width and window level of the CT image display based on the absorption coefficients of different tissues for X-rays, and obtain a plurality of scanned CT images of the chest according to the determined window width and window level;
[0050] A segmentation module, configured to preprocess a plurality of the CT images according to the basic features of the CT images, and perform image segmentation on the preprocessed CT images to obtain lung images;
[0051] A retention module, configured to perform contrast enhancement processing on the lung images based on high-low frequency decomposition operations, perform binarization processing on the enhanced images, and retain the target regions where pulmonary nodules exist in the lung images according to the binarization processing results, wherein the range of the target regions is larger than the range of the pulmonary nodule points;
[0052] A judgment module, configured to perform edge detection on the target regions, obtain the edge features of the nodule points in the target regions, determine the shape features, diameter features, and volume features of the nodule points according to the obtained edge features of the nodule points, and further judge the nodule points in the CT images of pulmonary nodules.
[0053] The beneficial effects of the present invention compared with the prior art are as follows: The CT image processing method for pulmonary nodules provided by this application first adjusts the window width and window level of the CT image display according to the absorption coefficients of different tissues for X-rays, and then obtains the scanned CT images of the chest to improve the contrast of the images; preprocesses a plurality of CT images according to the basic features of the CT images, and performs image segmentation on the preprocessed CT images to obtain lung images. By segmenting the chest CT images, the lung images where pulmonary nodules are located are obtained, reducing the data operation amount and improving the processing efficiency; performs contrast enhancement processing on the lung images based on high-low frequency decomposition operations, performs binarization processing on the enhanced images, and retains the target regions where pulmonary nodules exist in the lung images according to the binarization processing results; further improves the contrast and brightness of the images through high-low frequency decomposition operations, improving the recognition efficiency of subsequent nodule points; finally performs edge detection on the target regions, obtains the edge features of the nodule points in the target regions, determines the shape features, diameter features, and volume features of the nodule points according to the obtained edge features of the nodule points, and further judges the nodule points in the CT images of pulmonary nodules; determines the edge shape, volume, diameter and other features of the nodule points by performing edge recognition on the target images, and further judges the benign and malignant nature of the nodule points; the CT image processing method for pulmonary nodules provided by this application has good edge recognition effect for pulmonary nodules, effectively improves the accuracy of judging the benign and malignant nature of pulmonary nodules, and is suitable for large-scale promotion.
[0054] Additional aspects and advantages of the present invention will be given in part in the following description, become apparent in part from the following description, or be learned by practice of the present invention. Description of the Drawings
[0055] Figure 1 It is a flowchart of the CT image processing method for pulmonary nodules in the first embodiment of the present invention;
[0056] Figure 2 It is a structural block diagram of a computer in the fourth embodiment of the present invention.
[0057] The following specific embodiments will further illustrate the present invention in conjunction with the above-mentioned drawings. Specific Embodiments
[0058] For ease of understanding the present invention, the present invention will be described more comprehensively below with reference to the relevant drawings. Several embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, these embodiments are provided so that the disclosure of the present invention is thorough and complete.
[0059] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which the present invention belongs. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0060] Embodiment 1
[0061] Please refer to Figure 1 , which shows the CT image processing method for pulmonary nodules in the first embodiment of the present invention, specifically including steps S10 to S40:
[0062] S10, adjust the window width and window level displayed by the CT image based on the absorption coefficients of different tissues for X-rays, and obtain a number of scanned CT images of the chest according to the determined window width and window level;
[0063] In specific implementation, CT is short for X-ray computed tomography. Different tissues and organs in the human body have different absorptions of X-rays, which will present different gray values in the CT image. Human tissues can present thousands of different gray levels on the CT image. Therefore, first, it is necessary to adjust the window width and window position displayed in the CT image according to the absorption coefficients of different tissues for X-rays. The window width is understood as the range of CT values, and the window position is the middle value of the window width. By adjusting the window width and window position, the contrast of the CT image can be adjusted, enabling people to observe the tissue structure more clearly. In this application, the object of concern is the lung CT. Therefore, first, it is necessary to adjust the window position displayed in the CT image to correspond to the lung tissue and set an appropriate window width. After adjusting the window width and window position, several scanned CT images of the lungs are obtained.
[0064] S20, preprocess several of the CT images according to the basic features of the CT images, and perform image segmentation on the preprocessed CT images to obtain lung images;
[0065] In some optional embodiments, the step of preprocessing several of the CT images according to the basic features of the CT images, and performing image segmentation on the preprocessed CT images to obtain lung images includes:
[0066] Obtain the slice intervals corresponding to several CT images, sequentially select several slice CT images adjacent to the current CT image before and after, and merge the selected CT images in the channel dimension;
[0067] Perform pixel value conversion on the merged CT image, convert the pixel values in the CT image to Hounsfield density representation, and perform normalization processing on the converted image to obtain the CT image to be analyzed;
[0068] Obtain the superpixel image corresponding to the CT image to be analyzed, and perform clustering and membership degree iterative update on the superpixel image to complete the segmentation of the CT image.
[0069] In specific implementation, when collecting lung CT images, a scanning device emits a specific amount of X-rays through the human chest, converts the signals into digital signals and processes them by a computer to obtain diagnostic images. The obtained chest CT images may include structures such as extracorporeal background, thoracic tissues, lung organs, blood vessels, internal organs, etc. It can be understood that lung nodules are mainly located in the lung region of the chest CT image. Therefore, in this application, it is necessary to segment the chest CT image to obtain lung images, reduce the influence brought by other parts, and reduce the data operation amount. Before segmentation, it is first necessary to preprocess the CT image. The preprocessing is mainly gray level transformation to improve the contrast and brightness of the image, which is beneficial to subsequent visual observation.
[0070] The steps of obtaining a superpixel image corresponding to the CT image to be analyzed and performing clustering and membership degree iterative update on the superpixel image to complete the segmentation of the CT image include:
[0071] Obtain the morphological features of the CT image to be analyzed, perform gradient reconstruction on the CT image to be analyzed based on the morphological features in the CT image to be analyzed, and fuse the reconstructed gradient images to obtain a target gradient image;
[0072] Segment the target gradient image based on the watershed transform to obtain a superpixel image corresponding to the target gradient image with the contour of the lung parenchyma;
[0073] Randomly initialize the membership degree partition matrix of the superpixel image, incorporate local spatial information into the fuzzy clustering algorithm, and perform membership degree iterative update;
[0074] If the difference between the two consecutive membership degrees is less than the preset error threshold, complete one iteration and increment the iteration count by 1;
[0075] Perform the next clustering and membership degree iteration again until the iteration count meets the preset requirements.
[0076] In specific implementation, gradient images corresponding to the morphological features can be obtained by reconstructing the gradient image according to the morphological features of different tissues in the chest CT image. Fusing the obtained several gradient images can reduce the influence of the segmentation result on the morphological features; the membership degree iteration is related to the value of the clustering center. When performing one membership degree iteration, calculate the membership degrees corresponding to several clustering centers in sequence. When the difference between the consecutive membership degrees is less than the preset error threshold, complete one membership degree iteration, increment the membership degree iteration loop count by one, until the iteration count meets the preset requirements; in some optional embodiments, the number of clustering centers can be determined according to the density-based clustering algorithm, and the clustering algorithm can be optimized by the genetic algorithm to reduce the influence of the clustering shape on the clustering center data.
[0077] The expression of the target gradient image is:
[0078]
[0079] In the formula, R(t,r1,r2) represents the fused target gradient image, represents the fusion operation, represents several gradient images after gradient reconstruction based on structural features, GC represents the morphological feature, and r1 and r2 respectively represent the minimum and maximum radii of the equivalent disk of the morphological feature;
[0080] The update expression of the membership degree is:
[0081]
[0082] In the formula, L i represents the membership matrix corresponding to the i-th region in the superpixel image, λ represents the Lagrangian factor of the Euclidean distance, q represents the weighting exponent, and S i represents the number of pixels in the i-th region of the superpixel image; n represents the number of regions in the superpixel image, m represents the number of cluster centers, and J j represents the j-th cluster center of the fuzzy group in the superpixel image;
[0083] The conditional expression for the increase in the number of iterations is:
[0084] Max(L i -L i+1 ) < ξ
[0085] In the formula, ξ represents a preset error threshold.
[0086] S30. Perform contrast enhancement processing on the lung image based on high and low frequency decomposition operations, perform binarization processing on the enhanced image, and retain the target region where there are pulmonary nodules in the lung image according to the binarization processing result, where the range of the target region is larger than the range of the pulmonary nodule points;
[0087] The steps of performing contrast enhancement processing on the lung image based on high and low frequency decomposition operations, performing binarization processing on the enhanced image, and retaining the target region where there are pulmonary nodules in the lung image according to the binarization processing result include:
[0088] Perform high and low frequency decomposition operations on the lung image using the wavelet algorithm to obtain the high frequency component image and the low frequency component image of the lung image;
[0089] Based on gray-scale mathematical morphology, perform dilation operations on the low frequency component image and the lung image first and then erosion operations, and perform erosion operations on the high frequency component image and the lung image first and then dilation operations;
[0090] Perform inverse decomposition processing on the processed low frequency component image and high frequency component image to obtain an image after fusing the low frequency component and the high frequency component to complete the contrast enhancement processing;
[0091] Perform binarization processing on the contrast-enhanced processing, and retain the target region with a gray value of 1 in the binary image.
[0092] After obtaining the lung image, it is also necessary to further perform contrast processing on the obtained lung image, adjust the brightness and darkness of the grayscale image, and enhance the image quality to provide an accurate basis for subsequent nodule judgment; perform dilation operations on the low-frequency component image and the original lung image first and then erosion operations, which can ensure that the edges of the detected images are smooth without shrinking the graphic range and enhance the grayscale image; perform erosion operations on the high-frequency component image and the original lung image first and then dilation operations, which can remove the noise in the image, and finally perform inverse decomposition processing and fusion to improve the brightness and grayscale contrast of the image; after specifically extracting the lung image, perform binarization processing, and retain the area with a grayscale value of 1. It can be understood that the enveloped target area should completely contain the nodules to be analyzed. Therefore, the target area can be appropriately enlarged along the edge of the nodules so that the range of the target area is larger than the range of the lung nodules.
[0093] S40. Perform edge detection on the target area to obtain the edge features of the nodules in the target area, and determine the shape features, diameter features, and volume features of the nodules according to the obtained edge features of the nodules, so as to judge the nodules in the lung nodule CT image.
[0094] In some optional embodiments, the step of performing edge detection on the target area to obtain the edge features of the nodules in the target area includes:
[0095] Perform bilateral filtering on the image of the target area based on the spatial domain and pixel domain to remove the noise data in the target area while retaining the contour of the nodules;
[0096] Calculate the first direction operator and the second direction operator in the filtered image based on the edge detection operator, where the first direction and the second direction are perpendicular;
[0097] Perform convolution calculations on the first direction operator and the second direction operator with the filtered image respectively to obtain the weighted average pixels of the pixels in the image in the first direction and the second direction;
[0098] Calculate the gradient magnitude and gradient direction of the pixel points in the image according to the weighted average pixels in the first direction and the second direction, and superimpose the gradient magnitudes of the two gradient directions to obtain the edge information of the filtered image;
[0099] Perform connected coding on the edge information to divide the edge information into several directions, correspond the gradient direction to the divided directions of the edge information, and perform non-maximum suppression on the gradient magnitude to refine the edge of the nodules;
[0100] Connect the refined discrete edges to obtain the complete edge features of the nodules.
[0101] In specific implementation, by performing bilateral filtering on the image of the target area, it is possible to preserve the edge contour information according to the change of the brightness value in different areas of the image, and perform filtering by combining the neighborhood in space and the similarity in pixels, so as to remove the image noise while completely preserving the edge information of the knot points; it can be understood that the edge of the knot point image has an obvious gray value change compared with the pixels of non-knot points in the target area. Therefore, edge detection can be performed by calculating the magnitude of the gray value gradient of each pixel point in the image, and the complete edge information of the image can be obtained by superimposing the operators in two perpendicular directions; convolve the operator in the first direction with the original image to obtain a weighted average pixel to replace the original pixel value, traverse all pixel points, and then convolve the operator in the second direction with the original image; then perform gradient magnitude solution.
[0102] The expression for the weighted average pixel is:
[0103]
[0104]
[0105] In the formula, Weight1(i,j) represents the weighted average pixel in the first direction, which is used to detect the edge information in the first direction, Image(i,j) represents the image after filtering processing, (i,j) represents the position of the pixel point in the image after filtering processing, LBP1(i,j) represents the operator in the first direction, Weight2(i,j) represents the weighted average pixel in the second direction, which is used to detect the edge information in the second direction, and LBP2(i,j) represents the operator in the second direction;
[0106] The expression for the gradient magnitude is:
[0107]
[0108] In the formula, Grad(i,j) represents the gradient of the pixel point (i,j).
[0109] Perform connected coding on the edge information. According to the number of directions close to the central pixel point, it can be divided into eight-connected, twelve-connected, etc. Eight-connected means that eight rays are emitted from the central pixel point to represent directions, and each direction differs by 45°. Twelve-connected means that twelve rays are emitted from the central pixel point to represent directions, and each direction differs by 30°. And so on; in this application, since the pixel points are arranged in a horizontal and vertical array, choosing eight-connected can perform all-round detection of pixel points and mark the complete image information. Perform non-maximum suppression on the gradient magnitude according to the divided eight-connected to refine the edge of the knot point; finally, if the discrete edges are connected, the complete edge feature of the knot point can be obtained.
[0110] After obtaining the edge features of the knot node, it is necessary to further perform feature analysis, because the size and shape of the knot node are important criteria for judging benign and malignant; most benign nodules have relatively smooth edges, no burrs, and a relatively slow growth rate; on the contrary, malignant nodules have irregular edges or are accompanied by needle-point burrs, etc., and can grow exponentially; the diameter and volume are also relatively intuitive information of lung nodules. The volume of the nodule can be calculated by multiplying the number of pixels contained in the nodule area by the voxel, and the voxel can be calculated including the interval distance of multiple slice images or the physical distance between pixel centers; the diameter of the nodule can be equivalently replaced by calculating the diameter of a sphere with the same volume as the nodule; the larger the nodule diameter and volume, the greater the possibility of becoming a malignant nodule. Therefore, in this application, it is necessary to comprehensively consider factors such as the shape, diameter, and volume of the nodule to make a benign and malignant judgment.
[0111] In some alternative embodiments, the method for judging the benign and malignant of the knot node according to the edge of the knot node includes:
[0112] Use two different feature functions to perform product calculation on each edge position of the knot node image, and take the product result as the bilinear feature corresponding to each edge position;
[0113] According to the summation pooling function, fuse the bilinear features of all edge positions of the knot node image to obtain the bilinear feature corresponding to the knot node image;
[0114] Perform square root calculation of the sign on the bilinear feature and normalize the calculation result by L2 norm to obtain the bilinear feature matrix corresponding to the bilinear feature, where the dimension of the bilinear feature matrix is the product of the dimensions of the two different feature functions;
[0115] Use the SVM algorithm as a classifier to classify the bilinear feature matrix to obtain the benign and malignant judgment classification of the knot node.
[0116] Among them, the expression of the product calculation is:
[0117]
[0118] In the formula, t a 、t b represent two different feature functions, t a is used to characterize the position feature, t b is used to characterize the appearance feature, represents the product operation, (i,Image) represents the i-th edge position of the knot node image Image;
[0119] The expression of bilinear feature fusion is:
[0120]
[0121] Let \(I\) denote the set of all edge positions of the node image Image.
[0122] By combining different features represented by two different feature functions respectively, more detailed sub - category division can be performed on the node images of the same basic category in this application. In this application, the dimensions of the two different feature functions are the same. The dimension of the combined bilinear feature matrix is larger, making the feature space and discrimination degree larger, and having a better classification effect compared with the conventional linear model.
[0123] In summary, the lung nodule CT image processing method provided in this application first adjusts the window width and window level of the CT image display according to the absorption coefficients of different tissues for X - rays, and then obtains the scanned CT images of the chest to improve the image contrast; pre - processes several CT images according to the basic features of the CT images, and performs image segmentation on the pre - processed CT images to obtain lung images. By segmenting the chest CT image, the lung image where the lung nodule is located is obtained, reducing the data operation amount and improving the processing efficiency; performs contrast enhancement processing on the lung image based on high - and low - frequency decomposition operations, performs binarization processing on the enhanced image, and retains the target area where the lung nodule exists in the lung image according to the binarization processing result; further improves the image contrast and brightness through high - and low - frequency decomposition operations to improve the recognition efficiency of subsequent nodes; finally, performs edge detection on the target area to obtain the edge features of the nodes in the target area, and determines the shape features, diameter features, and volume features of the nodes according to the obtained edge features of the nodes, and then judges the nodes in the lung nodule CT image; by performing edge recognition on the target image, determines the edge shape, volume, diameter and other features of the nodes, and then judges the benign and malignant nature of the nodes; the lung nodule CT image processing method provided in this application has good lung nodule edge recognition effect, effectively improves the accuracy of judging the benign and malignant nature of lung nodules, and is suitable for large - scale promotion.
[0124] Embodiment 2
[0125] This embodiment provides a lung nodule CT image processing system, including:
[0126] An acquisition module, configured to adjust the window width and window level of the CT image display based on the absorption coefficients of different tissues for X - rays, and obtain several scanned CT images of the chest according to the determined window width and window level;
[0127] A segmentation module, configured to pre - process several of the CT images according to the basic features of the CT images, and perform image segmentation on the pre - processed CT images to obtain lung images;
[0128] A retention module is used to perform contrast enhancement processing on the lung image based on high-low frequency decomposition operations, perform binarization processing on the enhanced image, and retain the target region where lung nodules exist in the lung image according to the binarization processing result, where the range of the target region is larger than the range of the lung nodule points;
[0129] A judgment module is used to perform edge detection on the target region, obtain the edge features of the nodule points in the target region, determine the shape features, diameter features, and volume features of the nodule points according to the obtained edge features of the nodule points, and then judge the nodule points in the lung nodule CT image.
[0130] Optionally, the step of preprocessing a plurality of the CT images according to the basic features of the CT images and performing image segmentation on the preprocessed CT images to obtain lung images includes:
[0131] Obtain the slice intervals corresponding to a plurality of CT images, sequentially select several slice CT images adjacent to the current CT image before and after, and merge the selected CT images in the channel dimension;
[0132] Perform pixel value conversion on the merged CT image, convert the pixel values in the CT image into Hounsfield density representation, and perform normalization processing on the converted image to obtain the CT image to be analyzed;
[0133] Obtain the superpixel image corresponding to the CT image to be analyzed, and perform clustering and membership degree iterative update on the superpixel image to complete the segmentation of the CT image.
[0134] Optionally, the step of obtaining the superpixel image corresponding to the CT image to be analyzed, performing clustering and membership degree iterative update on the superpixel image to complete the segmentation of the CT image includes:
[0135] Obtain the morphological features of the CT image to be analyzed, perform gradient reconstruction on the CT image to be analyzed based on the morphological features in the CT image to be analyzed, and fuse the reconstructed gradient images to obtain the target gradient image;
[0136] Perform segmentation on the target gradient image based on the watershed transformation to obtain a superpixel image corresponding to the target gradient image with the contour of the lung parenchyma;
[0137] Randomly initialize the membership degree partition matrix of the superpixel image, and perform membership degree iterative update after integrating the local spatial information into the fuzzy clustering algorithm;
[0138] If the difference between the two membership degrees before and after is less than the preset error threshold, complete one iteration and increase the iteration count by 1;
[0139] Perform the next clustering and membership degree iteration until the number of iterations meets the preset requirements.
[0140] Optionally, the expression of the target gradient image is:
[0141]
[0142] Wherein, R(t, r1, r2) represents the fused target gradient image, represents the fusion operation, represents several gradient images after gradient reconstruction based on structural features, GC represents morphological features, and r1, r2 respectively represent the minimum and maximum radii of the equivalent disks of the morphological features;
[0143] The update expression of the membership degree is:
[0144]
[0145] Wherein, L i represents the membership degree matrix corresponding to the i-th region in the superpixel image, λ represents the Lagrange factor of the Euclidean distance, q represents the weighting exponent, S i represents the number of pixels in the i-th region of the superpixel image; n represents the number of regions in the superpixel image, m represents the number of clustering centers, and J j represents the j-th clustering center of the fuzzy group in the superpixel image;
[0146] The conditional expression for increasing the number of iterations is:
[0147] Max(L i -L i+1 ) < ξ
[0148] Wherein, ξ represents the preset error threshold.
[0149] Optionally, the steps of performing contrast enhancement processing on the lung image based on high-low frequency decomposition operation, performing binarization processing on the enhanced image, and retaining the target region where lung nodules exist in the lung image according to the binarization processing result include:
[0150] Perform high-low frequency decomposition operation on the lung image using the wavelet algorithm to obtain the high-frequency component image and the low-frequency component image of the lung image;
[0151] Based on gray-scale mathematical morphology, perform dilation operation on the low-frequency component image and the lung image first and then erosion operation, and perform erosion operation on the high-frequency component image and the lung image first and then dilation operation;
[0152] Perform inverse decomposition on the low-frequency component image and the high-frequency component image after arithmetic processing to obtain an image after fusing the low-frequency component and the high-frequency component, so as to complete the contrast enhancement processing;
[0153] Perform binarization on the contrast enhancement processing and retain the target area with a gray value of 1 in the binary image.
[0154] Optionally, the step of performing edge detection on the target area to obtain the edge features of the knot points in the target area includes:
[0155] Perform bilateral filtering on the image of the target area based on the spatial domain and the pixel domain to remove the noise data in the target area while retaining the contour of the knot points;
[0156] Calculate the first direction operator and the second direction operator in the filtered image based on the edge detection operator, where the first direction and the second direction are perpendicular;
[0157] Perform convolution calculations on the first direction operator and the second direction operator with the filtered image respectively to obtain the weighted average pixels of the pixels in the image in the first direction and the second direction;
[0158] Calculate the gradient magnitude and gradient direction of the pixel points in the image according to the weighted average pixels in the first direction and the second direction, and superimpose the gradient magnitudes in the two gradient directions to obtain the edge information of the filtered image;
[0159] Perform connected coding on the edge information to divide the edge information into several directions, correspond the gradient direction to the divided directions of the edge information, and perform non-maximum suppression on the gradient magnitude to refine the edges of the knot points;
[0160] Connect the refined discrete edges to obtain the complete edge features of the knot points.
[0161] Optionally, the expression of the weighted average pixel is:
[0162]
[0163]
[0164] In the formula, Weight1(i,j) represents the weighted average pixel in the first direction, which is used to detect the edge information in the first direction, Image(i,j) represents the filtered image, (i,j) represents the position of the pixel point in the filtered image, LBP1(i,j) represents the first direction operator, Weight2(i,j) represents the weighted average pixel in the second direction, which is used to detect the edge information in the second direction, and LBP2(i,j) represents the second direction operator;
[0165] The expression of the gradient magnitude is as follows:
[0166]
[0167] In the formula, Grad(i,j) represents the gradient of the pixel point (i,j).
[0168] It can be understood that the specific implementation process of the system item in this embodiment is similar to that of the method item in Embodiment 1, and will not be elaborated here.
[0169] Embodiment 3
[0170] This embodiment proposes a storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the above-mentioned lung nodule CT image processing method.
[0171] Embodiment 4
[0172] The present invention also proposes a computer. Please refer to Figure 2 , which shows the computer in the embodiment of the present invention, including a memory 10, a processor 20, and a computer program 30 stored on the memory 10 and operable on the processor 20. When the processor 20 executes the computer program 30, it implements the above-mentioned lung nodule CT image processing method.
[0173] Among them, the memory 10 includes at least one type of storage medium, and the storage medium includes flash memory, hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 10 can be an internal storage unit of the computer in some embodiments, such as the hard disk of the computer. The memory 10 can also be an external storage device in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Further, the memory 10 can also include both the internal storage unit and the external storage device of the computer. The memory 10 can be used not only to store application software installed on the computer and various types of data, but also to temporarily store data that has been output or will be output.
[0174] Among them, the processor 20 can be an Electronic Control Unit (ECU, also known as a vehicle computer), a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments, and is used to run the program code stored in the memory 10 or process data, such as executing an access restriction program, etc.
[0175] It should be noted that Figure 2 the structures shown do not constitute a limitation on the computer. In other embodiments, the computer may include fewer or more components than those shown, or combine certain components, or have a different component arrangement.
[0176] Those skilled in the art will understand that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a definite sequence list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or used in conjunction with these instruction execution systems, apparatus, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0177] More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection portion having one or more wirings (electronic device), a portable computer diskette (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpretation, or other suitable processing as necessary, and then stored in a computer memory.
[0178] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGA), field programmable gate arrays (FPGA), etc.
[0179] The technical features of the above-described embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the various technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as falling within the scope described in this specification.
[0180] The embodiments described above only represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the appended claims.
Claims
1. A CT image processing method for pulmonary nodules, characterized in that, Including: Adjust the window width and window level displayed in the CT image based on the X-ray absorption coefficients of different tissues, and obtain a number of scanned CT images of the chest according to the determined window width and window level; Preprocess a number of the CT images according to the basic features of the CT images, and perform image segmentation on the preprocessed CT images to obtain lung images; Perform contrast enhancement processing on the lung images based on high-low frequency decomposition operations, perform binarization processing on the enhanced images, and retain the target area where lung nodules exist in the lung images according to the binarization processing results, where the range of the target area is larger than the range of the lung nodule points; Perform edge detection on the target area to obtain the edge features of the nodule points in the target area, and determine the shape features, diameter features, and volume features of the nodule points according to the obtained edge features of the nodule points, and then judge the nodule points in the lung nodule CT images.
2. The CT image processing method for pulmonary nodules according to claim 1, wherein, The step of preprocessing a number of the CT images according to the basic features of the CT images, and performing image segmentation on the preprocessed CT images to obtain lung images includes: Obtain the slice intervals corresponding to a number of CT images, sequentially select several slice CT images adjacent to the current CT image before and after, and merge the selected CT images in the channel dimension; Perform pixel value conversion on the merged CT images, convert the pixel values in the CT images into Hounsfield density representation, and perform normalization processing on the converted images to obtain the CT images to be analyzed; Obtain the superpixel image corresponding to the CT image to be analyzed, perform clustering and membership degree iterative update on the superpixel image to complete the segmentation of the CT image.
3. The CT image processing method for pulmonary nodules according to claim 2, wherein The step of obtaining the superpixel image corresponding to the CT image to be analyzed, performing clustering and membership degree iterative update on the superpixel image to complete the segmentation of the CT image includes: Obtain the morphological features of the CT image to be analyzed, perform gradient reconstruction on the CT image to be analyzed based on the morphological features in the CT image to be analyzed, and fuse the reconstructed gradient images to obtain the target gradient image; Perform segmentation on the target gradient image based on the watershed transformation to obtain the superpixel image corresponding to the target gradient image with the contour of the lung parenchyma; Randomly initialize the membership degree partition matrix of the superpixel image, incorporate local spatial information into the fuzzy clustering algorithm and then perform membership degree iterative update; If the difference between the two membership degrees before and after is less than the preset error threshold, complete one iteration and increase the iteration count by 1; Perform the next clustering and membership degree iteration again until the iteration count meets the preset requirements.
4. The method for processing lung nodule CT images according to claim 3, wherein The expression of the target gradient image is: Wherein, R(t, r1, r2) represents the fused target gradient image, represents the fusion operation, represents several gradient images after gradient reconstruction based on structural features, GC represents morphological features, and r1 and r2 respectively represent the minimum and maximum radii of the equivalent disks of the morphological features; The update expression of the membership degree is: where L i represents the membership matrix corresponding to the i-th region in the superpixel image, λ represents the Lagrangian factor of the Euclidean distance, q represents the weighting exponent, S i represents the number of pixels in the i-th region of the superpixel image; n represents the number of regions in the superpixel image, m represents the number of cluster centers, and J j represents the j-th cluster center of the fuzzy group in the superpixel image; The conditional expression for increasing the iteration count is: Max(L i -L i+1 ) < ξ In the formula, ξ represents the preset error threshold.
5. The CT image processing method for pulmonary nodules according to claim 1, wherein The step of performing contrast enhancement processing on the lung images based on high-low frequency decomposition operations, performing binarization processing on the enhanced images, and retaining the target area where lung nodules exist in the lung images according to the binarization processing results includes: Perform high - frequency and low - frequency decomposition operations on the lung image using the wavelet algorithm to obtain the high - frequency component image and the low - frequency component image of the lung image; Based on gray - scale mathematical morphology, perform dilation operations on the low - frequency component image and the lung image first and then erosion operations, and perform erosion operations on the high - frequency component image and the lung image first and then dilation operations; Perform inverse decomposition processing on the processed low - frequency component image and the high - frequency component image to obtain an image after fusing the low - frequency component and the high - frequency component, so as to complete the contrast enhancement processing; Perform binarization processing on the contrast - enhanced processing, and retain the target area with a gray - scale value of 1 in the binary image.
6. The CT image processing method for pulmonary nodules according to claim 5, wherein The step of performing edge detection on the target area to obtain the edge features of the nodes in the target area includes: Perform bilateral filtering processing on the image of the target area based on the spatial domain and the pixel domain to remove the noise data in the target area while retaining the contour of the nodes; Calculate the first - direction operator and the second - direction operator in the filtered image based on the edge detection operator, where the first direction and the second direction are perpendicular; Perform convolution calculations on the first - direction operator and the second - direction operator with the filtered image respectively to obtain the weighted average pixels of the pixels in the image in the first direction and the second direction; Calculate the gradient magnitude and the gradient direction of the pixel points in the image according to the weighted average pixels in the first direction and the second direction, and superimpose the gradient magnitudes of the two gradient directions to obtain the edge information of the filtered image; Perform connected coding on the edge information to divide the edge information into several directions, correspond the gradient direction to the divided direction of the edge information, and perform non - maximum suppression on the gradient magnitude to refine the edge of the nodes; Connect the refined discrete edges to obtain the complete edge features of the nodes.
7. The method for processing CT images of pulmonary nodules according to claim 6, wherein, The expression of the weighted average pixel is: In the formula, Weight1(i,j) represents the weighted average pixel in the first direction, which is used to detect the edge information in the first direction, Image(i,j) represents the filtered image, (i,j) represents the position of the pixel point in the filtered image, LBP1(i,j) represents the first - direction operator, Weight2(i,j) represents the weighted average pixel in the second direction, which is used to detect the edge information in the second direction, and LBP2(i,j) represents the second - direction operator; The expression of the gradient magnitude is: In the formula, Grad(i,j) represents the gradient of the pixel point (i,j).
8. A CT image processing system for pulmonary nodules, characterized in that, Including; An acquisition module, configured to adjust the window width and window level of the CT image display based on the absorption coefficients of different tissues for X - rays, and acquire a plurality of scanned CT images of the chest according to the determined window width and window level; A segmentation module, configured to pre - process the plurality of CT images according to the basic features of the CT images, and perform image segmentation on the pre - processed CT images to obtain lung images; A retention module is used to perform contrast enhancement processing on the lung image based on high-low frequency decomposition operations, perform binarization processing on the enhanced image, and retain the target region where lung nodules exist in the lung image according to the binarization processing result, where the range of the target region is larger than the range of the lung nodule points; A judgment module is used to perform edge detection on the target region, obtain the edge features of the nodule points in the target region, determine the shape features, diameter features, and volume features of the nodule points according to the obtained edge features of the nodule points, and further judge the nodule points in the lung nodule CT image.