A lesion recognition and segmentation method and system based on lung CT images
Through layered cutting, feature extraction and edge detection of three-dimensional lung CT images, the problem of difficulty in accurately identifying and segmenting lung lesions in three-dimensional space in the existing technology is solved, and efficient and accurate lesion identification and segmentation are achieved. Split effect.
Patent Information
- Application Number
- CN202411597179.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-11-11
AI Technical Summary
The existing medical imaging-based lesion recognition and segmentation methods have insufficient accuracy and accuracy, and it is particularly difficult to accurately identify and segment lung lesions in three-dimensional space.
By obtaining the patient's three -dimensional lung CT image data, layered cutting treatment, extracting the characteristics of the lesion, and using the image edge detection algorithm for edge detection and division, and finally generated a complete three -dimensional pulmonary lesion image through the image fusion.
It achieves accurate and efficient identification and segmentation of lesions in patients' medical images in three-dimensional space, and improves the accuracy of lesion identification and segmentation.
Smart Images

Figure CN119151960B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of medical image recognition and segmentation, and in particular relates to a lesion recognition and segmentation method and system based on lung CT images. Background Art
[0002] The development of medical imaging can be traced back to the end of the 19th century. The discovery and application of X-rays marked the beginning of medical imaging. Since then, medical imaging has continued to improve. In the 1960s, the invention of CT (computed tomography) enabled doctors to observe the internal structure of the human body more clearly. In the 1970s, MRI (magnetic resonance imaging) technology was born, further improving the diagnostic accuracy of medical imaging2. In the 1980s, technologies such as ultrasound imaging and digital radiography emerged one after another, enriching the diagnostic methods of medical imaging.
[0003] Medical imaging technology has been continuously improving in recent years. The imaging, storage and output processes of medical images have basically been digitized. In the future, it will further develop towards intelligence. Current medical imaging equipment can achieve high-resolution imaging. With the rapid development of medical imaging technology, it is necessary to identify and segment lesions in medical images in order to analyze the medical images of patients taken by medical imaging equipment and analyze the lesions of patients.
[0004] One of the conventional methods for lesion recognition and segmentation based on medical images is based on threshold segmentation. This method sets a threshold based on the gray value of pixels in the image, and separates pixels with gray values higher or lower than the threshold, thereby realizing the recognition and segmentation of lesions. Since the gray values of different lesions in the image vary little, the accuracy of this method is very low.
[0005] Another lesion recognition and segmentation method is based on edge detection, which segments lesions by detecting edges in the image, using intensity changes or gradients in the image to identify edges and separate them from normal tissues. However, due to the presence of image noise or blurred lesion edges, the effect of this method is not obvious.
[0006] There is also a method based on region growing, which selects a seed point and then marks the pixels connected to the seed point as the lesion area through a growth algorithm. The region growing method is suitable for two-dimensional images with clear boundary lesions, and cannot achieve three-dimensional lesion recognition and segmentation of lesions.
[0007] Therefore, how to improve the existing lesion recognition and segmentation methods based on medical images, especially as the number of lung tumor patients is increasing year by year, and to achieve precise and accurate recognition and segmentation of lesions in patients' medical images in three-dimensional space, is a technical problem that urgently needs to be solved. Summary of the invention
[0008] The purpose of the present invention is to provide a lesion recognition and segmentation method and system based on lung CT images, to improve the existing lesion recognition and segmentation method based on medical images, so as to achieve precise and accurate recognition and segmentation of lesions in patients' medical images in three-dimensional space.
[0009] In order to solve the above technical problems, the technical solution adopted by the present invention is as follows:
[0010] In a first aspect, a method for lesion recognition and segmentation based on lung CT images is provided, comprising the following process:
[0011] S1: Acquire the patient's three-dimensional lung CT image data, and perform layered cutting processing on the three-dimensional lung CT image according to a specified interval to cut it into a plurality of two-dimensional lung CT image pictures, and add a serial number to each two-dimensional lung CT image picture;
[0012] S2: performing image preprocessing on the plurality of two-dimensional lung CT image pictures, and performing image feature extraction on the preprocessed images using a specified image feature extraction algorithm to obtain lesion features in the plurality of two-dimensional lung CT image pictures;
[0013] S3: further detecting the edge of the lesion in the two-dimensional lung CT image based on the extracted lesion feature data of the two-dimensional lung CT image based on a specified image edge detection algorithm;
[0014] S4: based on the edge detection result of the two-dimensional lung CT image, segment the lung lesion area and the lung normal tissue area in the two-dimensional lung CT image, and generate a number of two-dimensional lung lesion images with only lesion tissue;
[0015] S5: Based on the serial number added in step S1, a plurality of two-dimensional lung lesion images with only lesion tissue are subjected to image superposition and fusion processing at a specified interval to obtain a complete three-dimensional lung lesion image.
[0016] Preferably, in step S1, the specific process of performing layered cutting processing on the three-dimensional lung CT image according to the specified interval is as follows:
[0017] S11: obtaining a pixel grayscale value range of a normal lung tissue image based on big data, and marking an area in the patient's three-dimensional lung CT image whose pixel grayscale value is not within the pixel grayscale value range of the normal lung tissue image to obtain an initial contour of the lung lesion area;
[0018] S12: based on the acquired initial contour of the lung lesion area, extracting the surface of the initial contour of the lesion area, calculating the curvature of a designated point of the surface of the initial contour of the lesion area, and dividing the initial contour of the lesion area into three curvature areas in a certain direction based on the curvature value;
[0019] S13: setting three corresponding intervals for the three curvature regions, and performing layered cutting processing on the three-dimensional lung CT image according to the corresponding intervals based on the three different curvature regions.
[0020] Preferably, in step S12, the initial contour of the lesion area is divided into three curvature areas in a certain direction based on the curvature value, the first curvature area is an area with a curvature value less than k1, the second curvature area is an area with a curvature value between k1 and k2, and the third curvature area is an area with a curvature value greater than k2, wherein k1 is <k2;
[0021] A first cutting spacing d1 is set for the first curvature area, a second cutting spacing d2 is set for the second curvature area, and a third cutting spacing d3 is set for the third curvature area. Layered cutting is performed at the first cutting spacing d1 in the first curvature area, at the second cutting spacing d2 in the second curvature area, and at the third cutting spacing d3 in the third curvature area.
[0022] Preferably, the specific process of performing image preprocessing on the plurality of two-dimensional lung CT image pictures in step S2, and performing image feature extraction on the preprocessed images using a specified image feature extraction algorithm is as follows:
[0023] S21: Establish a filter and initialize a filter window value in the filter;
[0024] S22: setting a Gaussian function template that matches the filter size, wherein the Gaussian function template is a specified two-dimensional array, and each element in the two-dimensional array is a preset weight of a corresponding window position;
[0025] S23: setting the center of the filter on each pixel of the image, and calculating the weighted average of designated pixels around each pixel;
[0026] S24: assigning a weighted average value of designated pixels around the pixel to the central pixel;
[0027] S25: extracting image features from the preprocessed image using a specified image feature extraction algorithm.
[0028] Preferably, the calculation formula of the weighted average is as follows:
[0029] avg= ( px 1* Gf 1+ px 2* Gf 2+··· pxn * Gf ) / n ;
[0030] in, px 1. px 2. ···, pxn For a specified pixel in the filter, the Gf 1. Gf 2. ···, Gf is the Gaussian function template element corresponding to the specified pixel in the filter, n A positive integer representing the number of specified pixels.
[0031] Preferably, the process of extracting image features in step S25 is:
[0032] S251: Construct a specified feature matrix to generate image interest points. The specified feature matrix is a square matrix composed of second-order partial derivatives of specified multivariate functions, and obtain image stable edge points based on the square matrix composed of second-order partial derivatives of the specified multivariate functions. The specific formula of the square matrix composed of second-order partial derivatives of the multivariate functions is as follows:
[0033] ;
[0034] in, is the second-order partial derivative of the specified multivariate function ∂ 2 z / ∂ x ∂ y exist x In the convolution of the image, is the second-order partial derivative of the specified multivariate function ∂ 2 z / ∂ x ∂ y exist( x , y ) is in the convolution of the image, ( x , y ) is a specified point in the image, Z About x , y A multivariate function of Z=f ( x,y ), is the second-order partial derivative of the specified multivariate function ∂ 2 z / ∂ x ∂ y exist y In the convolution of the image, for scale;
[0035] S252: constructing a scale space and locating image feature points, comparing each pixel point processed by the specified feature matrix with the specified points in the two-dimensional image space and the scale space neighborhood, and preliminarily locating key feature points;
[0036] S253: The key feature points initially located are filtered out to remove the key feature points with energy lower than the specified energy and the key feature points located at a misaligned position, and finally the stable feature points are selected.
[0037] Preferably, the specific process of further detecting the edge of the lesion in the two-dimensional lung CT image based on the specified image edge detection algorithm in step S3 is as follows:
[0038] S31: Performing scale space processing on the lung CT image by using a Gaussian difference function, constructing a Gaussian pyramid of the lung CT image, and obtaining detection extreme points by comparing each pixel point in the lung CT image with its designated neighborhood pixel points and 26 points in the 9x9 neighborhoods of the upper and lower layers;
[0039] S32: accurately locate the acquired extreme value points, obtain the positions and scales of key pixels by fitting the specified number of terms of the Taylor series, and exclude pixels with low contrast and pixels with strong edge response;
[0040] S33: assign one or more directions to each key pixel point obtained, and use the gradient histogram to count the gradient direction and amplitude of the pixels in the neighborhood of the key pixel point;
[0041] S34: In the neighborhood around each key pixel point acquired, the local gradient of the lung CT image is measured, and the gradient direction and amplitude are calculated, the neighborhood is divided into several sub-domains, the gradient histogram is calculated in each sub-domain, and the histograms of all sub-regions are connected to form a high-dimensional vector as a descriptor of the key pixel point.
[0042] In a second aspect, a lesion recognition and segmentation system based on lung CT images is provided, which is used to implement any one of the lesion recognition and segmentation methods based on lung CT images, including: a data acquisition module, an image layered cutting module, a preprocessing module, a feature extraction module, an edge detection module, a lesion generation module and an image fusion module; the data acquisition module is connected to the image layered cutting module, the image layered cutting module is connected to the preprocessing module, the preprocessing module is connected to the feature extraction module, the feature extraction module is connected to the edge detection module, the edge detection module is connected to the lesion generation module, and the lesion generation module is connected to the image fusion module;
[0043] The data acquisition module is used to acquire the patient's three-dimensional lung CT image data;
[0044] The image layered cutting module is used to perform layered cutting processing on the three-dimensional lung CT image according to the specified spacing, cutting it into a plurality of two-dimensional lung CT image pictures, and adding a serial number to each two-dimensional lung CT image picture;
[0045] The preprocessing module is used to perform image preprocessing on the plurality of two-dimensional lung CT image pictures, establish a filter, and initialize a filter window value in the filter; set a Gaussian function template that matches the filter size, the Gaussian function template is a specified two-dimensional array, and each element in the two-dimensional array is a preset weight of a corresponding window position; set the center of the filter on each pixel of the image, and calculate the weighted average of the surrounding specified pixels of each pixel; assign the weighted average of the surrounding specified pixels of the pixel to the center pixel;
[0046] The feature extraction module is used to extract image features from the preprocessed image using a specified image feature extraction algorithm to obtain lesion features in a plurality of two-dimensional lung CT image pictures;
[0047] The edge detection module is used to further detect the edge of the lesion of the two-dimensional lung CT image picture based on the extracted lesion feature data of the two-dimensional lung CT image picture based on the specified image edge detection algorithm;
[0048] The lesion generation module segments the lung lesion area and the lung normal tissue area in the two-dimensional lung CT image based on the edge detection result of the two-dimensional lung CT image, and generates a plurality of two-dimensional lung lesion images with only lesion tissue;
[0049] The image fusion module is used to perform image fusion on a plurality of two-dimensional lung lesion images with only lesion tissues at a specified interval based on the added sequence numbers.
[0050] The beneficial effects of the present invention include:
[0051] The lesion identification and segmentation method and system based on lung CT images provided by the present invention obtain the patient's three-dimensional lung CT image data, cut it into several two-dimensional lung CT image pictures and add serial numbers; perform image preprocessing on several two-dimensional lung CT image pictures, and use a specified image feature extraction algorithm to extract image features from the preprocessed images; further detect the lesion edge of the extracted two-dimensional lung CT image lesion feature data; based on the edge detection results of the two-dimensional lung CT image pictures, segment the lung lesions and normal tissues to generate several two-dimensional lung lesion pictures with only lesion tissues; based on the added serial numbers, perform image fusion on the two-dimensional lung lesion pictures according to the specified spacing, and fill the lesion areas between the specified spacings to obtain a complete three-dimensional lung lesion image. The lesions in the patient's medical images are accurately and efficiently identified and segmented in three-dimensional space.
[0052] First, the initial contour of the lung lesion area is obtained by marking the area in the patient's three-dimensional lung CT image whose pixel grayscale value is not within the pixel grayscale value range of the normal lung tissue image; the surface of the initial contour of the lesion area is extracted, the curvature of the specified point of the initial contour surface of the lesion area is calculated, and the initial contour of the lesion area is divided into three curvature areas in a certain direction based on the curvature value; three corresponding intervals are set for the three curvature areas, and the three-dimensional lung CT image is layered and cut according to the corresponding intervals based on the three different curvature areas. By assigning different cutting intervals to different curvature areas, the area with small curvature is assigned a larger cutting interval, and the area with large curvature is assigned a smaller cutting interval, so that the key features of the image can be more accurately obtained when performing feature extraction later, and the accuracy of lesion recognition and segmentation is improved.
[0053] Secondly, by establishing a filter and initializing a filter window value; setting a Gaussian function template that matches the filter size; setting the center of the filter on each pixel of the image, and calculating the weighted average of the designated pixels around each pixel; assigning the weighted average of the designated pixels around the pixel to the central pixel, the influence of noise data in the image on subsequent feature extraction is removed, the accuracy of the subsequent image feature extraction process is improved, and image feature extraction is performed on the preprocessed image using the designated image feature extraction algorithm.
[0054] Thirdly, by constructing a specified feature matrix, image interest points are generated; a scale space is constructed, and the image feature points are located. Each pixel point processed by the specified feature matrix is compared with the specified points in the two-dimensional image space and the scale space neighborhood to preliminarily locate the key feature points; the preliminarily located key feature points are filtered out by removing key feature points with energy below the specified energy and key feature points with misaligned positioning, and finally stable feature points are screened out, thereby achieving accurate extraction of key features of the entire image and providing image data preparation for subsequent accurate recognition and segmentation of lung CT images.
[0055] Finally, the scale space of the lung CT image is processed by the Gaussian difference function to obtain the detection extreme points; the obtained extreme points are accurately located, and the position and scale of the key pixel points are obtained by fitting the specified number of terms of the Taylor series; one or more directions are assigned to each key pixel point obtained; the local gradient of the lung CT image is measured, the neighborhood is divided into several subdomains, the gradient histogram is calculated in each subdomain, and the histograms of all subregions are connected to form a high-dimensional vector as the descriptor of the key pixel point. Accurate detection of the lesion edge of the two-dimensional lung CT image is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 It is a flowchart of the lesion recognition and segmentation method based on lung CT images of the present invention.
[0057] Figure 2 The figure is a flow chart of detecting the edge of a lesion in a two-dimensional lung CT image using the image edge detection algorithm of the present invention.
[0058] Figure 3 It is a structural schematic diagram of the lesion recognition and segmentation system based on lung CT images of the present invention. DETAILED DESCRIPTION
[0059] The following is combined with Figure 1~Figure 3 The present invention is further described in detail:
[0060] Example 1
[0061] See attached Figure 1 As shown, a lesion recognition and segmentation method based on lung CT images includes the following processes:
[0062] S1: Acquire the patient's three-dimensional lung CT image data, and perform layered cutting processing on the three-dimensional lung CT image according to a specified interval to cut it into a plurality of two-dimensional lung CT image pictures, and add a serial number to each two-dimensional lung CT image picture;
[0063] S2: performing image preprocessing on the plurality of two-dimensional lung CT image pictures, and performing image feature extraction on the preprocessed images using a specified image feature extraction algorithm to obtain lesion features in the plurality of two-dimensional lung CT image pictures;
[0064] S3: further detecting the edge of the lesion in the two-dimensional lung CT image based on the extracted lesion feature data of the two-dimensional lung CT image based on a specified image edge detection algorithm;
[0065] S4: based on the edge detection result of the two-dimensional lung CT image, segment the lung lesion area and the lung normal tissue area in the two-dimensional lung CT image, and generate a number of two-dimensional lung lesion images with only lesion tissue;
[0066] S5: Based on the serial number added in step S1, a plurality of two-dimensional lung lesion images with only lesion tissue are subjected to image superposition and fusion processing at a specified interval to obtain a complete three-dimensional lung lesion image.
[0067] In this embodiment, in step S1, the specific process of performing layered cutting processing on the three-dimensional lung CT image according to the specified interval is as follows:
[0068] S11: obtaining a pixel grayscale value range of a normal lung tissue image based on big data, and marking an area in the patient's three-dimensional lung CT image whose pixel grayscale value is not within the pixel grayscale value range of the normal lung tissue image to obtain an initial contour of the lung lesion area;
[0069] S12: based on the acquired initial contour of the lung lesion area, extracting the surface of the initial contour of the lesion area, calculating the curvature of a designated point of the surface of the initial contour of the lesion area, and dividing the initial contour of the lesion area into three curvature areas in a certain direction based on the curvature value;
[0070] S13: setting three corresponding intervals for the three curvature regions, and performing layered cutting processing on the three-dimensional lung CT image according to the corresponding intervals based on the three different curvature regions.
[0071] The initial contour of the lung lesion area is obtained by marking the area whose pixel grayscale value is not within the pixel grayscale value range of the normal lung tissue image in the patient's three-dimensional lung CT image; the surface of the initial contour of the lesion area is extracted, the curvature of the specified point of the initial contour surface of the lesion area is calculated, and the initial contour of the lesion area is divided into three curvature areas in a certain direction based on the curvature value; three corresponding intervals are set for the three curvature areas, and the three-dimensional lung CT image is layered and cut according to the corresponding intervals based on the three different curvature areas.
[0072] In step S12, the initial contour of the lesion area is divided into three curvature regions in a certain direction based on the curvature value. The first curvature region is the region where the curvature value is less than k1, the second curvature region is the region where the curvature value is between k1 and k2, and the third curvature region is the region where the curvature value is greater than k2, where k1 < k2. A first cutting spacing d1 is set for the first curvature region, a second cutting spacing d2 is set for the second curvature region, and a third cutting spacing d3 is set for the third curvature region. Stratified cutting is performed in the first curvature region with the first cutting spacing d1, in the second curvature region with the second cutting spacing d2, and in the third curvature region with the third cutting spacing d3. By assigning different cutting spacings to different curvature regions, a larger cutting spacing is assigned to the region with a smaller curvature, and a smaller cutting spacing is assigned to the region with a larger curvature, so as to more accurately obtain the key features of the image during subsequent feature extraction and improve the accuracy of lesion recognition and segmentation.
[0073] Embodiment 2
[0074] On the basis of Embodiment 1, the specific process of image preprocessing for the several two-dimensional lung CT image pictures in step S2 and image feature extraction for the preprocessed image using a specified image feature extraction algorithm is as follows:
[0075] S21: Establish a filter and initialize a filter window value in the filter;
[0076] S22: Set a Gaussian function template matching the size of the filter. The Gaussian function template is a specified two-dimensional array, and each element in the two-dimensional array is a preset weight for the corresponding window position;
[0077] S23: Set the center of the filter on each pixel of the image and calculate the weighted average of the specified pixels around each pixel;
[0078] S24: Assign the weighted average of the specified pixels around the pixel to the central pixel;
[0079] S25: Perform image feature extraction on the preprocessed image using a specified image feature extraction algorithm.
[0080] In this embodiment, the calculation formula for the weighted average is as follows:
[0081] avg= ( px 1* Gf 1+ px 2* Gf 2+··· pxn * Gf ) / n ;
[0082] in, px 1. px 2. ···, pxn For a specified pixel in the filter, the Gf 1. Gf 2. ···, Gf is the Gaussian function template element corresponding to the specified pixel in the filter, n A positive integer representing the number of specified pixels.
[0083] By establishing a filter and initializing a filter window value; setting a Gaussian function template that matches the filter size; setting the center of the filter on each pixel of the image, and calculating the weighted average of the designated pixels around each pixel; assigning the weighted average of the designated pixels around the pixel to the central pixel, the influence of noise data in the image on subsequent feature extraction is removed, the accuracy of the subsequent image feature extraction process is improved, and image feature extraction is performed on the preprocessed image using the designated image feature extraction algorithm.
[0084] The process of image feature extraction in step S25 is as follows:
[0085] S251: Construct a specified feature matrix to generate image interest points. The specified feature matrix is a square matrix composed of second-order partial derivatives of specified multivariate functions, and obtain image stable edge points based on the square matrix composed of second-order partial derivatives of the specified multivariate functions. The specific formula of the square matrix composed of second-order partial derivatives of the multivariate functions is as follows:
[0086] ;
[0087] in, is the second-order partial derivative of the specified multivariate function ∂ 2 z / ∂ x ∂ y exist x In the convolution of the image, is the second-order partial derivative of the specified multivariate function ∂ 2 z / ∂ x ∂ y exist( x , y ) is in the convolution of the image, ( x , y ) is a specified point in the image, Z For about x , y A multivariate function of Z=f ( x,y ), is the second-order partial derivative of the specified multivariate function ∂ 2z / ∂ x ∂ y exist y In the convolution of the image, for scale;
[0088] S252: constructing a scale space and locating image feature points, comparing each pixel point processed by the specified feature matrix with the specified points in the two-dimensional image space and the scale space neighborhood, and preliminarily locating key feature points;
[0089] S253: The key feature points initially located are filtered out to remove the key feature points with energy lower than the specified energy and the key feature points located at a misaligned position, and finally the stable feature points are selected.
[0090] After the stable feature points are screened out, the wavelet features in the circular neighborhood of the screened feature points are counted, and the points in the circular neighborhood of the specified radius are calculated with the feature point as the center. x , y The wavelet response value in the direction of x , y The two wavelet response values in the direction are Gaussian weighted, and the weighted wavelet response values are respectively represented in x , y Then take the specified area block around the feature point and count the eight gradient directions of each specified area block. The direction of the obtained rectangular area is along the main direction of the feature point, and each sub-area counts the specified pixel x , y Directional wavelet features.
[0091] By constructing a specified feature matrix, image interest points are generated; a scale space is constructed, and image feature points are located. Each pixel point processed by the specified feature matrix is compared with the specified points in the two-dimensional image space and scale space neighborhood to preliminarily locate the key feature points; the preliminarily located key feature points are filtered out to remove key feature points with energy below the specified energy and key feature points with misaligned positioning, and finally stable feature points are screened out, thereby achieving accurate extraction of key features of the entire image and providing image data preparation for subsequent accurate recognition and segmentation of lung CT images.
[0092] Example 3
[0093] Based on Example 1 or Example 2, see Figure 2 The specific process of further detecting the edge of the lesion in the two-dimensional lung CT image based on the specified image edge detection algorithm in step S3 is as follows:
[0094] S31: Performing scale space processing on the lung CT image by using a Gaussian difference function, constructing a Gaussian pyramid of the lung CT image, and obtaining detection extreme points by comparing each pixel point in the lung CT image with its designated neighborhood pixel points and 26 points in the 9x9 neighborhoods of the upper and lower layers;
[0095] S32: Accurately locate the acquired extreme points, obtain the position and scale of the key pixel points by fitting the specified number of terms of the Taylor series, and exclude low-contrast pixels and pixels with strong edge response. Accurately locate the detected extreme points, accurately determine the position and scale of the key points by fitting the first three terms of the Taylor series, and exclude low-contrast pixels and pixels with strong edge response, so as to improve the stability and reliability of the key pixels.
[0096] S33: Assign one or more directions to each key pixel point obtained, and use the gradient histogram to count the gradient direction and magnitude of the pixels in the neighborhood of the key pixel point. Use the gradient histogram to count the gradient direction and magnitude of the pixels in the neighborhood of the key point, and determine the main direction and one or more auxiliary directions of the key point to ensure rotation invariance.
[0097] S34: In the neighborhood around each acquired key pixel point, measure the local gradient of the lung CT image, and calculate the gradient direction and amplitude, divide the neighborhood into several sub-domains, such as 4x4, calculate the gradient histogram in each sub-domain, and connect the histograms of all sub-regions to form a high-dimensional vector, such as 128 dimensions, as a descriptor of the key pixel point.
[0098] By detecting key points on images of different scales, the features can cope with the scale changes of the image. Direction information is assigned to each key point, making the features rotationally invariant. Since it is calculated based on the local gradient information of the image, it is highly robust to changes in lighting and viewing angle. The descriptor of each key point is unique and can effectively distinguish the image features of different lung CT images.
[0099] A lesion recognition and segmentation system based on lung CT images, used to implement any one of the lesion recognition and segmentation methods based on lung CT images, see Figure 3 , including: a data acquisition module, an image layered cutting module, a preprocessing module, a feature extraction module, an edge detection module, a lesion generation module and an image fusion module; the data acquisition module is connected to the image layered cutting module, the image layered cutting module is connected to the preprocessing module, the preprocessing module is connected to the feature extraction module, the feature extraction module is connected to the edge detection module, the edge detection module is connected to the lesion generation module, and the lesion generation module is connected to the image fusion module.
[0100] The data acquisition module acquires the patient's three-dimensional lung CT image data; the image layered cutting module is used to perform layered cutting processing on the three-dimensional lung CT image according to the specified spacing, cutting it into a number of two-dimensional lung CT image pictures, and adding a serial number to each two-dimensional lung CT image picture. The preprocessing module is used to perform image preprocessing on the several two-dimensional lung CT image pictures, establish a filter, and initialize a filter window value in the filter. Set a Gaussian function template that matches the filter size, the Gaussian function template is a specified two-dimensional array, and each element in the two-dimensional array is a preset weight for the corresponding window position. Set the center of the filter on each pixel of the image, and calculate the weighted average of the specified pixels around each pixel.
[0101] The weighted average value of the designated pixels around the pixel is assigned to the central pixel; the feature extraction module uses the designated image feature extraction algorithm to extract image features from the preprocessed image to obtain the lesion features in several two-dimensional lung CT images. The edge detection module further detects the lesion edges of the two-dimensional lung CT images based on the designated image edge detection algorithm for the extracted lesion feature data of the two-dimensional lung CT images. The lesion generation module, based on the edge detection results of the two-dimensional lung CT images, segments the lung lesion area from the normal lung tissue area in the two-dimensional lung CT images, and generates several two-dimensional lung lesion images of only lesion tissue. The image fusion module is used to fuse several two-dimensional lung lesion images of only lesion tissue at a specified interval based on the added serial number.
[0102] In summary, the initial contour of the lung lesion area is obtained by marking the area in the patient's three-dimensional lung CT image whose pixel grayscale value is not within the pixel grayscale value range of the normal lung tissue image; the surface of the initial contour of the lesion area is extracted, the curvature of the specified point of the initial contour surface of the lesion area is calculated, and the initial contour of the lesion area is divided into three curvature areas in a certain direction based on the curvature value; three corresponding intervals are set for the three curvature areas, and the three-dimensional lung CT image is layered and cut according to the corresponding intervals based on the three different curvature areas. By assigning different cutting intervals to different curvature areas, the area with small curvature is assigned a larger cutting interval, and the area with large curvature is assigned a smaller cutting interval, so that the key features of the image can be more accurately obtained when the feature extraction is performed later, and the accuracy of lesion identification and segmentation is improved. By establishing a filter and initializing a filter window value; setting a Gaussian function template that matches the filter size; setting the center of the filter on each pixel of the image, and calculating the weighted average of the designated pixels around each pixel; assigning the weighted average of the designated pixels around the pixel to the central pixel, the influence of noise data in the image on subsequent feature extraction is removed, the accuracy of the subsequent image feature extraction process is improved, and image feature extraction is performed on the preprocessed image using the designated image feature extraction algorithm.
[0103] By constructing a specified feature matrix, image interest points are generated; a scale space is constructed, and image feature points are located. Each pixel processed by the specified feature matrix is compared with the specified points in the neighborhood of the two-dimensional image space and scale space to preliminarily locate the key feature points; the key feature points that are initially located are filtered out by removing the key feature points with less than the specified energy and the key feature points with misaligned positioning, and finally the stable feature points are screened out, so as to achieve the accurate extraction of the key features of the entire image, and provide image data preparation for the subsequent accurate recognition and segmentation of lung CT images. The scale space of the lung CT image is processed by the Gaussian difference function to obtain the detection extreme points; the obtained extreme points are accurately located, and the position and scale of the key pixel points are obtained by fitting the specified number of items of the Taylor series; one or more directions are assigned to each key pixel point obtained; the local gradient of the lung CT image is measured, the neighborhood is divided into several subdomains, the gradient histogram is calculated in each subdomain, and the histograms of all subregions are connected to form a high-dimensional vector as the descriptor of the key pixel point. Accurate detection of the lesion edge of the two-dimensional lung CT image is achieved.
Claims
1. A method for lesion recognition and segmentation based on lung CT images, characterized in that: The process includes: S1: Obtain a three-dimensional lung CT image of a patient, and perform layered cutting processing on the three-dimensional lung CT image according to a specified interval to cut it into a plurality of two-dimensional lung CT image pictures, and add a serial number to each two-dimensional lung CT image picture; S2: performing image preprocessing on the plurality of two-dimensional lung CT image pictures, and performing image feature extraction on the preprocessed images using a specified image feature extraction algorithm to obtain lesion features in the plurality of two-dimensional lung CT image pictures; S3: further detecting the edge of the lesion in the lesion feature data of the two-dimensional lung CT image based on a preset image edge detection algorithm for the extracted lesion feature data of the two-dimensional lung CT image; S4: based on the edge detection result of the two-dimensional lung CT image, segment the lung lesion area and the lung normal tissue area in the two-dimensional lung CT image, and generate a number of two-dimensional lung lesion images with only lesion tissue; S5: performing image superposition and fusion processing on a plurality of two-dimensional lung lesion images with only lesion tissue according to a specified spacing based on the sequence number added in step S1 to obtain a complete three-dimensional lung lesion image; In step S1, the specific process of performing layered cutting processing on the three-dimensional lung CT image according to the specified interval is as follows: S11: obtaining the pixel grayscale value range of the normal lung tissue image based on the big data, and marking the area in the patient's three-dimensional lung CT image whose pixel grayscale value is not within the pixel grayscale value range of the normal lung tissue image to obtain the initial contour of the lung lesion area; S12: based on the acquired initial contour of the lung lesion area, extracting the surface of the initial contour of the lesion area, calculating the curvature of a designated point of the surface of the initial contour of the lesion area, and dividing the initial contour of the lesion area into three curvature areas in a certain direction based on the curvature value; S13: setting three corresponding intervals for the three curvature regions, and performing layered cutting processing on the three-dimensional lung CT image according to the corresponding intervals based on the three different curvature regions; In step S12, the initial contour of the lesion area is divided into three curvature areas in a certain direction based on the curvature value. The first curvature area is an area with a curvature value less than k1, the second curvature area is an area with a curvature value between k1 and k2, and the third curvature area is an area with a curvature value greater than k2. <k2; A first cutting distance d1 is set for the first curvature region, a second cutting distance d2 is set for the second curvature region, and a third cutting distance d3 is set for the third curvature region. Layered cutting is performed at the first cutting distance d1 in the first curvature region, at the second cutting distance d2 in the second curvature region, and at the third cutting distance d3 in the third curvature region; The specific process of performing image preprocessing on the plurality of two-dimensional lung CT image pictures in step S2 and extracting image features from the preprocessed images using a specified image feature extraction algorithm is as follows: S21: Establish a filter and initialize a filter window value in the filter; S22: setting a Gaussian function template that matches the filter size, wherein the Gaussian function template is a specified two-dimensional array, and each element in the two-dimensional array is a preset weight of a corresponding window position; S23: setting the center of the filter on each pixel of the image, and calculating the weighted average of designated pixels around each pixel; S24: assigning a weighted average value of designated pixels around the pixel to the central pixel; S25: extracting image features from the preprocessed image using a specified image feature extraction algorithm; The process of image feature extraction in step S25 is as follows: S251: Construct a specified feature matrix to generate image interest points. The specified feature matrix is a square matrix composed of second-order partial derivatives of specified multivariate functions, and obtain image stable edge points based on the square matrix composed of second-order partial derivatives of the specified multivariate functions. The specific formula of the square matrix composed of second-order partial derivatives of the multivariate functions is as follows: ; in, is the second-order partial derivative of the specified multivariate function ∂ 2 Z / ∂ x ∂ y exist x The convolution with the image, is the second-order partial derivative of the specified multivariate function ∂ 2 Z / ∂ x ∂ y exist( x , y ) is convolved with the image, ( x , y ) is a specified point in the image, Z About x , y A multivariate function of Z=f ( x,y ), is the second-order partial derivative of the specified multivariate function ∂ 2 Z / ∂ x ∂ y exist y The convolution with the image, for scale; S252: constructing a scale space and locating image feature points, comparing each pixel point processed by the specified feature matrix with the specified points in the two-dimensional image space and the scale space neighborhood, and preliminarily locating key feature points; S253: The key feature points initially located are filtered out to remove the key feature points with energy lower than a preset value and the key feature points located at a misaligned position, and finally stable feature points are selected.
2. The method for lesion recognition and segmentation based on lung CT images according to claim 1, characterized in that: The weighted average is calculated as follows: avg= ( px 1* Gf 1+ px 2* Gf 2+··· pxn * Gf ) / n ; in, px 1. px 2. ···, pxn For a specified pixel in the filter, the Gf 1. Gf 2. ···, Gf is the Gaussian function template element corresponding to the specified pixel in the filter, n A positive integer representing the number of specified pixels.
3. The method for lesion recognition and segmentation based on lung CT images according to claim 1, characterized in that: The specific process of further detecting the lesion edge in the lesion feature data of the two-dimensional lung CT image based on the preset image edge detection algorithm in step S3 is as follows: S31: performing scale space processing on the two-dimensional lung CT image through a Gaussian difference function, constructing a Gaussian pyramid of the two-dimensional lung CT image, and obtaining detection extreme points by comparing each pixel point in the two-dimensional lung CT image with its designated neighborhood pixel points and 26 points in the 9x9 neighborhoods of the upper and lower layers; S32: accurately locate the acquired extreme value points, obtain the positions and scales of key pixels by fitting the specified number of terms of the Taylor series, and exclude pixels with low contrast and pixels with strong edge response; S33: assign one or more directions to each key pixel point obtained, and use the gradient histogram to count the gradient direction and amplitude of the pixels in the neighborhood of the key pixel point; S34: In the neighborhood around each key pixel point obtained, measure the local gradient of the two-dimensional lung CT image, and calculate the gradient direction and amplitude, divide the neighborhood into several sub-domains, calculate the gradient histogram in each sub-domain, and connect the histograms of all sub-regions to form a high-dimensional vector as a descriptor of the key pixel point.
4. A lesion recognition and segmentation system based on lung CT images, used to implement a lesion recognition and segmentation method based on lung CT images as described in any one of claims 1 to 3, characterized in that: include: A data acquisition module, an image layered cutting module, a preprocessing module, a feature extraction module, an edge detection module, a lesion generation module and an image fusion module; the data acquisition module is connected to the image layered cutting module, the image layered cutting module is connected to the preprocessing module, the preprocessing module is connected to the feature extraction module, the feature extraction module is connected to the edge detection module, the edge detection module is connected to the lesion generation module, and the lesion generation module is connected to the image fusion module; The data acquisition module is used to acquire a three-dimensional lung CT image of the patient; The image layered cutting module is used to perform layered cutting processing on the three-dimensional lung CT image according to the specified spacing, cutting it into a plurality of two-dimensional lung CT image pictures, and adding a serial number to each two-dimensional lung CT image picture; The preprocessing module is used to perform image preprocessing on the plurality of two-dimensional lung CT image pictures, establish a filter, and initialize a filter window value in the filter; set a Gaussian function template that matches the filter size, the Gaussian function template is a specified two-dimensional array, and each element in the two-dimensional array is a preset weight of a corresponding window position; set the center of the filter on each pixel of the image, and calculate the weighted average of the surrounding specified pixels of each pixel; assign the weighted average of the surrounding specified pixels of the pixel to the center pixel; The feature extraction module is used to extract image features from the preprocessed image using a specified image feature extraction algorithm to obtain lesion features in a plurality of two-dimensional lung CT image pictures; The edge detection module is used to further detect the extracted lesion feature data of the two-dimensional lung CT image picture based on a preset image edge detection algorithm; The lesion generation module segments the lung lesion area and the lung normal tissue area in the two-dimensional lung CT image based on the edge detection result of the two-dimensional lung CT image, and generates a plurality of two-dimensional lung lesion images with only lesion tissue; The image fusion module is used to perform image fusion on a plurality of two-dimensional lung lesion images with only lesion tissues at a specified interval based on the added sequence numbers.
Citation Information
Patent Citations
Image processing method and image processing apparatus
US20110254845A1
Lung image processing method, apparatus and device
WO2022063198A1