Tumor segmentation method, system and storage medium based on feature extraction

By extracting morphological features from lung CT images and adjusting the height map of the watershed algorithm, the problem of excessive segmentation of lung CT images caused by traditional watershed algorithms is solved, and precise segmentation and diagnostic assistance of lung tumor areas are achieved.

CN118521793BInactive Publication Date: 2024-11-01GENERAL HOSPITAL OF THE NORTHERN WAR ZONE OF THE CHINESE PEOPLES LIBERATION ARMY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410979157.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-22
Publication Date
2024-11-01
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional watershed algorithms can easily lead to excessive segmentation in lung CT image segmentation, resulting in too detailed or messy segmentation results, which increases the difficulty and complexity of analysis.

Method used

By preprocessing the lung CT images, the morphological characteristics of the lung duct area and the lung tumor area are extracted, and the height map of the watershed algorithm is adjusted to optimize the watershed algorithm, fill the valleys in the lung duct area, and then accurately segment the lungs. Tumor area.

Benefits of technology

It improves the segmentation accuracy and reliability of lung tumor areas, provides a more intuitive and accurate diagnostic basis, reduces the complexity of subsequent analysis, and enhances the distinction between the lung duct system and tumor areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118521793B_ABST
    Figure CN118521793B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing technology, and in particular to a tumor segmentation method, system and storage medium based on feature extraction, the method comprising: preprocessing a lung CT image and converting it into a grayscale image; extracting morphological features of a lung duct region and a lung tumor region from the grayscale image; performing a watershed transformation on the grayscale image using a watershed algorithm to obtain valleys formed by the lung duct region and valleys formed by the lung tumor region; adjusting a height map of the watershed algorithm according to the morphological features of the lung duct region and the lung tumor region; using the adjusted height map of the watershed algorithm, re-performing a watershed transformation on the grayscale image to fill the valley formed by the lung duct region, and segmenting to obtain the lung tumor region. The method can improve the over-segmentation phenomenon of lung CT images and improve the accuracy and reliability of segmentation results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a tumor segmentation method, system and storage medium based on feature extraction. Background Art

[0002] In the biological and medical fields, feature extraction is a crucial technical link, which is of great significance for the identification, classification and analysis of biological data. Lung cancer, as a malignant lung tumor, is particularly important in the diagnosis and treatment of computed tomography (CT) imaging technology. CT technology generates CT images by integrating X-rays and computer processing technology, providing doctors with an intuitive display of lung tumor areas. However, when interpreting these CT images, doctors often need to combine rich clinical experience and patient medical history to accurately judge the abnormal areas on the image. In response to this challenge, image feature extraction technology provides doctors with powerful assistance. However, when using the watershed algorithm to segment lung CT images, although this method can generate closed and single-pixel-width segmentation lines, the complex duct system of the lungs often leads to the generation of many valleys in non-tumor areas after the watershed conversion, which in turn causes the problem of over-segmentation. The existence of this problem makes the segmentation results too detailed or messy, increasing the difficulty and complexity of subsequent analysis. It can be seen that although the traditional watershed algorithm provides more accurate, clear and visually enhanced information to a certain extent, its segmentation results still rely on strict manual screening and verification before they can be applied to clinical decision-making. Therefore, how to optimize the watershed algorithm to improve the over-segmentation phenomenon of lung CT images and improve the accuracy and reliability of segmentation results has become one of the urgent problems to be solved in the current biological and medical fields. Summary of the invention

[0003] In order to solve the technical problem that the segmentation results of traditional lung CT image segmentation are too detailed or messy, the purpose of the present invention is to provide a tumor segmentation method, system and storage medium based on feature extraction. The technical solutions adopted are as follows:

[0004] In a first aspect, an embodiment of the present invention provides a tumor segmentation method based on feature extraction, comprising: preprocessing a lung CT image and converting it into a grayscale image; extracting morphological features of a lung duct area and a lung tumor area from the grayscale image; performing a watershed transformation on the grayscale image using a watershed algorithm to obtain valleys formed by the lung duct area and valleys formed by the lung tumor area; adjusting a height map of the watershed algorithm according to the morphological features of the lung duct area and the lung tumor area; using the adjusted height map of the watershed algorithm, re-performing a watershed transformation on the grayscale image to fill the valleys formed by the lung duct area, and segmenting the lung tumor area.

[0005] In a possible implementation, adjusting the height map of the watershed algorithm according to the characteristics of the lung duct region and the morphological characteristics of the lung tumor region includes: performing edge detection on the grayscale image; marking the grayscale image using edge lines detected by the edge, wherein the marked edge lines enclose the grayscale image into different sub-regions;

[0006] For each sub-region, when the water injection height changes, the edge smoothness of the lung tissue region and the number of edge pixels of each pixel on the edge of each sub-region are calculated; based on the changes in the number of edge pixels and the edge smoothness of the lung tissue region, the morphological structural similarity between the edge shape of each sub-region and the lung duct region at adjacent water injection heights is calculated; based on the structural similarity, the credibility of each sub-region being a lung duct region is calculated; according to the credibility of each sub-region being a lung duct region, the height map of the watershed algorithm is adjusted.

[0007] In a possible implementation, when the water injection height changes, the edge smoothness of the lung tissue area for each pixel point on the edge of each sub-area is calculated, including: when the water injection height changes, calculating the components of the gradient value of each pixel point on the edge of each sub-area in the horizontal and vertical directions; calculating the edge smoothness of the lung tissue area for each pixel point on the edge of each sub-area based on the changes in the components of the grayscale value and gradient value of each pixel point on the edge of each sub-area.

[0008] In a possible implementation, according to the credibility of each sub-region being a lung duct region, the step of adjusting the height map of the watershed algorithm includes: calculating the gradient value of the grayscale image to obtain the gradient amplitude and direction information of the image; searching for seed points of different regions in the grayscale image, and making m straight lines through the seed points, which intersect with the lung lobe region to generate 2m points, where m is a positive integer; each straight line intersects with the lung lobe region to generate two points, and the point with the larger grayscale value of the two points is selected as the target point; according to the credibility of each sub-region being a lung duct region, adjusting the distance between the pixel points in each valley in the height map of the watershed algorithm relative to the target point to highlight the difference between the valley formed by the lung tumor region and the valley formed by the lung tumor region.

[0009] In a possible implementation, searching for seed points in different regions in the grayscale image includes: searching for maximum and minimum grayscale values ​​in different regions in the grayscale image, marking the minimum values ​​in different regions as seed points, and marking the maximum values ​​at this time as partitions.

[0010] According to the changes in the number of edge pixels and the edge smoothness of the lung tissue area, the edge shape of each sub-area at adjacent water injection heights and the morphological structural similarity of the lung duct area are calculated, including: obtaining the centroid point of the line segment composed of 2m points, matching the line segments between two adjacent heights according to the distance between the centroid points, and the line segments with the shortest distance are considered to have a corresponding relationship; for the edge of each sub-area, there is a grouping sequence obtained in order of increasing height; according to the changes in the number of edge pixels and the edge smoothness of the lung tissue area in each grouping sequence, the edge shape of each sub-area at adjacent water injection heights and the morphological structural similarity of the lung duct area are calculated.

[0011] In a possible implementation, when the morphological structural similarity between the edge shape of the sub-region and the pulmonary duct region is greater than a regional pulmonary duct credibility threshold, the sub-region is determined to be a pulmonary duct region.

[0012] In a possible implementation, after the lung tumor region is segmented, the method further includes: transmitting the image after the lung tumor region is segmented to a user terminal to assist in medical diagnosis.

[0013] In a second aspect, an embodiment of the present invention provides a tumor segmentation system based on feature extraction, comprising:

[0014] An image preprocessing module, used for preprocessing lung CT images and converting them into grayscale images;

[0015] An image extraction module, used to extract morphological features of the lung duct area and the lung tumor area from the grayscale image;

[0016] A watershed transformation module, used for performing watershed transformation on the grayscale image using a watershed algorithm to obtain a valley formed by a lung duct area and a valley formed by a lung tumor area;

[0017] A height map adjustment module, used for adjusting the height map of the watershed algorithm according to the morphological characteristics of the lung duct area and the lung tumor area;

[0018] The watershed conversion module is also used to use the adjusted height map of the watershed algorithm to re-perform watershed conversion on the grayscale image to fill the valley formed by the lung duct area and segment the lung tumor area.

[0019] In the third aspect of the invention, a computer-readable storage medium is also provided in an embodiment of the present invention, and the computer-readable storage medium includes a program, and when the program is run on an electronic device, the electronic device executes a method of any possible implementation of the second aspect above.

[0020] The tumor segmentation method, system and storage medium based on feature extraction provided by the embodiments of the present invention have significant advantages in that: by extracting the morphological features of the lung duct area and the lung tumor area, optimizing the watershed algorithm, and adjusting the height map of the watershed algorithm, the difference in valleys formed by different types of areas is expanded, and the distinction between the lung duct system area and the tumor area is further enhanced, and the segmented lung tumor area is more accurate, providing medical experts with a more intuitive and accurate diagnosis basis. The method of the present invention has high versatility and scalability in practical applications. It can not only be applied to image analysis of lung tissue, but also can be adjusted and expanded according to specific needs to adapt to different parts and different types of medical image analysis tasks. In summary, the present invention realizes the accurate identification and analysis of tumor areas in lung tissue images, provides powerful assistance for medical experts, and has significant beneficial effects and application value. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0022] Figure 1 A one-dimensional schematic diagram of a watershed provided by an embodiment of the present invention;

[0023] Figure 2 A flow chart of a tumor segmentation method based on feature extraction provided by one embodiment of the present invention;

[0024] Figure 3 A grayscale image of a lung CT image provided by an embodiment of the present invention;

[0025] Figure 4 A schematic diagram of a tumor segmentation system based on feature extraction provided by an embodiment of the present invention;

[0026] Figure 5 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0027] This article begins by explaining the nouns and terms that appear in the text.

[0028] 1. Lung "tumor" refers to any abnormal tissue in the lung, which may be malignant, benign, or uncertainly malignant. In this article, the term "lesion" can be used interchangeably with the term "tumor".

[0029] 2. The pulmonary duct area generally includes: trachea: connecting the nasal cavity and the throat, it is the passage for air to enter the lungs; bronchi: branching from the trachea, entering the lungs, forming a bronchial tree; alveoli: the main structural unit of the lungs, the site of gas exchange; pulmonary arteries and pulmonary veins: the blood vessels of the lungs, transporting oxygen and nutrients to the lungs, and taking carbon dioxide and other waste out; pleura: the thin membrane that wraps the lungs and the chest cavity, which has the function of protecting the lungs and the chest cavity. These structures together constitute the pulmonary duct area, among which the bronchi, alveoli and pleura play a key role in gas exchange.

[0030] 3. A lobe refers to a part of the lung, usually including the left upper lobe and left lower lobe, the right upper lobe and right lower lobe.

[0031] 4. The traditional watershed algorithm is a morphological segmentation method based on topological theory. The watershed algorithm is a commonly used image segmentation algorithm, which is used to segment different areas in an image. Usually in the morphological segmentation method, the image is regarded as a terrain surface, and each gray level of the image corresponds to the contour line. Therefore, each local minimum value of the image will have an influence zone. The boundaries of these influence zones are called "watersheds" (equivalent to finding the peak line). The advantage of this is that the estimation of the image gradient is very direct, which facilitates the search for the gradient peak of the image for segmentation. Figure 1 The figure shows a one-dimensional schematic diagram of the watershed. To be more intuitive, first, each local minimum point is punctured, and then the water spreads from bottom to top and gradually submerges BV2 and BV3. These affected areas ( Figure 1 (a) in the figure is also called the water absorption basin. Note that the water height in these different water absorption basins is consistent); as the water level continues to rise, the small peak in the middle will also be submerged. In order to prevent the two different impact areas from merging, a dam will be built (i.e. Figure 1 (b) Barrage in the figure), these dams are the watersheds of the "topographic map" and can also be imagined as the edges of the graph.

[0032] 5. The height map of the watershed algorithm refers to a data structure used in image processing technology, which is usually used for image segmentation and feature extraction. The watershed algorithm is an algorithm based on gradient space and sparse features. It generates a height map by calculating the gradient strength and direction of each pixel in the image. Each pixel in the height map represents the gradient strength and direction of the corresponding position in the image. By comparing the relative heights of these pixels, the image can be segmented into different areas, thereby extracting the features of the image. Therefore, the height map of the watershed algorithm is an important data structure that can help us better understand and analyze image data.

[0033] Since the grayscale values ​​of the lung tumor area and the lung duct area are higher than those of the surrounding lung lobe tissue area, the valley formed by the lung duct area will be confused with the valley formed by the lung tumor area after the watershed transformation. Studies have found that the boundaries of the lung duct area are smoother and the distribution of the duct system is more regular. The embodiment of the present invention analyzes the differences in the morphological structures of the shape edges of the lung tissue area reflected in the image of the lung tumor and the lung duct area, clarifies the subtle differences in the valleys formed by them, and then adjusts the height map of the watershed algorithm to expand the subtle differences in the valleys formed by the lung tumor area and the lung duct area. This can achieve accurate extraction of the tumor area by the watershed method, which is convenient for subsequent storage and use.

[0034] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation, structure, features and effects of a tumor segmentation method, system and storage medium based on feature extraction proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0035] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0036] The following is a detailed description of a tumor segmentation method, system and storage medium based on feature extraction provided by the present invention in conjunction with the accompanying drawings.

[0037] See also Figure 2 , which shows a flow chart of a tumor segmentation method based on feature extraction provided by an embodiment of the present invention, comprising the following steps:

[0038] S201, preprocessing the lung CT image and converting it into a grayscale image;

[0039] S202, extracting morphological features of the lung duct area and the lung tumor area from the grayscale image;

[0040] S203, performing watershed transformation on the grayscale image using a watershed algorithm to obtain valleys formed by the lung duct area and valleys formed by the lung tumor area;

[0041] S204, adjusting the height map of the watershed algorithm according to the morphological features of the lung duct area and the lung tumor area;

[0042] S205, using the adjusted height map of the watershed algorithm, re-perform a watershed transformation on the grayscale image to fill the valley formed by the lung duct area, and segment the lung tumor area.

[0043] In S201, a possible implementation may be to use a Gaussian filter to process the noise in the lung CT image, and grayscale the lung CT image, and increase the contrast and clarity of the image by histogram equalization. Figure 3 Shown is a schematic diagram of a grayscale image of a lung CT image used in the present invention.

[0044] In S203, a possible implementation method may be, step a, edge detection is performed on the grayscale image; edge lines detected by the edge are used to mark the grayscale image, and the marked edge lines enclose the grayscale image into different sub-areas; step b, for each sub-area, when the water injection height changes, the edge smoothness of the lung tissue area and the number of edge pixels of each pixel point on the edge of each sub-area are calculated; according to the changes in the number of edge pixels and the edge smoothness of the lung tissue area, the morphological structural similarity between the edge shape of each sub-area and the lung duct area at adjacent water injection heights is calculated, wherein the more the number of pixels greater than the set threshold, the more similar the edge shape of the sub-area is to the lung duct area in morphology; step c, based on the structural similarity, the credibility of each sub-area as a lung duct area is calculated; step d, according to the credibility of each sub-area as a lung duct area, the height map of the watershed algorithm is adjusted.

[0045] The specific process of the above steps a and b is described as follows:

[0046] First, we construct formula [1] to perform edge detection on the grayscale image. We use the edge lines obtained by edge detection to mark the original grayscale image. The marked edge lines divide the original grayscale image into many sub-regions. We calculate the gradient value of each pixel in the entire lung lobe area. When the water injection height changes, we calculate the horizontal and vertical components of the gradient value of each pixel on the edge of each sub-region. According to the changes in the grayscale value and gradient value components of each pixel on the edge of each sub-region, we select any pixel on the edge of any region and use formula [1] to calculate the edge smoothness of the lung tissue area for each pixel on the edge of each sub-region.

[0047] Formula[1]

[0048]

[0049] in: Indicates the edge smoothness of the lung tissue region at the jth pixel on the edge of the i-th sub-region; () usually refers to the normalization function; It represents the absolute value of the gray value difference between the j-th pixel on the edge of the i-th sub-region and its previous pixel (i.e., the j-1-th pixel), that is, ; It represents the absolute value of the gray value difference between the jth pixel on the edge of the i-th sub-region and the next pixel (i.e., the j+1th pixel), that is, ; , , are the grayscale values ​​of the jth, j-1th, and j+1th pixels on the edge of the i-th sub-region respectively; It represents the absolute value of the gray value difference between the gray value of the t-th pixel on the edge of the ith sub-region and its previous pixel (i.e., the t-1-th pixel), that is, ; It represents the absolute value of the gray value difference between the gray value of the t-th pixel on the edge of the ith sub-region and the gray value of the next pixel (i.e., the t+1-th pixel), that is, ; , , Grayscale values ​​of the tth, t-1th, and t+1th pixels on the edge of the ith subregion. n represents the number of pixels on the edge of the ith subregion; and They respectively represent the x-horizontal component and the y-vertical component of the gradient value of the j-th pixel point on the edge of the ith sub-region.

[0050] The internal logic of formula [1] is explained as follows: the ratio of the change in the grayscale value of the jth pixel on the edge of the i-th sub-region to the average change in the grayscale value of the pixels on the edge of the i-th sub-region multiplied by the smoothness (i.e. the inverse of the sharpness) of the jth pixel on the edge of the i-th sub-region. It represents the sum of the gray value of the jth pixel on the edge of the i-th sub-region and the gray value difference between the two pixels before and after it. represents the average change of edge pixels in the ith sub-region, It represents the difference between the gray value of the jth pixel on the edge of the i-th sub-region and the average change of the gray value of all edge points in the i-th sub-region. The larger the value, the smaller the edge smoothness of the lung tissue area at the jth pixel on the edge of the i-th sub-region. It indicates the sharpness of the jth pixel on the edge of the i-th sub-region, that is, the degree of irregularity of the edge at that point. The larger the value, the smoother the jth pixel on the edge of the i-th sub-region. The smaller the value is, the smaller the edge smoothness of the lung tissue area at the jth pixel on the edge of the i-th sub-area is. ,when The value is greater than the edge smoothness threshold , we believe that the pixel is smooth enough and is more likely to be on the edge of the lung duct area.

[0051] The specific process of step c is described as follows: Analyze the changes in the edge where the water surface intersects the valley during the entire water injection process when the watershed is converted, that is, due to the differences in morphological structure between the lung duct system area and the lung tumor area, the local area changes in the watershed during multiple water injections in their respective areas are different. Determine the structural similarity between the edge shape of the area during the entire water injection process and the lung duct area, as well as the changes in this structural similarity as the water injection process proceeds, thereby determining the credibility of the area as a lung duct system, and providing data basis for subsequent adjustment of the height map.

[0052] First, load the original grayscale image to be watershed transformed, calculate the gradient value of the image through Sobel, and obtain the gradient amplitude and direction information of the image. Then, find the maximum and minimum values ​​of 255 minus the grayscale value in different areas in the image, and mark the minimum value at this time, that is, the point with the highest grayscale value in the tumor or pipeline system area as the seed point, and mark the maximum value at this time, that is, the point with the lowest grayscale value in the tumor or pipeline system area (usually at the junction of the tumor or pipeline system area and the lung lobe area) as the partition. Flood filling starts from the seed point. During this water injection process, the water surface intersects with the valley wall to obtain the edge shape of the area at this moment. For every unit height, the edge shape of the area at this moment is recorded and analyzed, and the gradient value change rate of the edge point obtained at each height is calculated. For example, when the point on the edge of a certain height is greater than the preset gradient change rate threshold of 0.52, the edge of the height is segmented at this point, and the edge of each height is cut into Line segments are obtained, and the centroid of each line segment is found. The line segments between two adjacent heights are matched according to the distance between the centroids. The line segments with the shortest distance are considered to have a corresponding relationship. For each edge, there is a grouping sequence obtained in the order of increasing height, that is, the shapes represented by adjacent elements in the grouping sequence have the same change trend. The constructed formula [2] is used to analyze the jth grouping sequence on the edge of the area displayed by the i-th sub-area when the water injection height is h, and the result is:

[0053] Formula[2]

[0054]

[0055] in, Indicates the structural similarity between the shape of the line segment represented by the jth grouping sequence on the edge of the area displayed by the i-th sub-area when the water injection height is h and the lung duct area; represents the number of pixels on the line segment represented by the jth grouping sequence in the i-th sub-region when the water injection height is h; Represents the edge smoothness of the lung tissue area at the t-th point on the area of ​​the line segment represented by the j-th grouping sequence on the edge of the area displayed by the i-th sub-area when the water injection height is h.

[0056] The explanation of the internal logic of formula [2] is as follows: Indicates the edge smoothness of the lung tissue area at the tth point on the line segment represented by the jth grouping sequence on the edge of the area shown by the i-th sub-area when the water injection height is h, and the line segment on the jth grouping sequence on the edge of the area shown by the i-th sub-area when the water injection height is h is greater than the lung duct possibility threshold The more points there are, the more similar the shape of the line segment represented by the j-th grouping sequence on the edge of the area displayed by the i-th sub-area when the water injection height is h is to the lung duct area.

[0057] It should be understood that as water is continuously injected into the area, the edge of the area presented by the intersection of the water surface and the valley is constantly changing. As water is continuously injected into the area, the area of ​​the area is constantly expanding. The closer the edge of the area is to the actual type of area edge, the closer the shape of the edge is to the actual type of area edge shape. Its smoothness and tortuosity are affected by its area type. The smoother its surface, the greater the possibility that the area belongs to the lobar duct system area. By analyzing the changes in the shape of the area presented during the continuous water injection process, that is, analyzing the change trend of the shape represented by adjacent elements in the grouping sequence, it is finally determined that the credibility of the area as the lobar duct system area satisfies the formula [3]:

[0058] Formula[3]

[0059] in, Indicates the confidence that the i-th sub-region is the lung duct region; represents the number of grouping sequences in the i-th sub-region; and Respectively represent the maximum and minimum grayscale values ​​of the i-th sub-region of the original grayscale image; and They respectively represent the structural similarity between the regional shape structure shown by the area of ​​the line segment represented by the same grouping sequence j and the regional shape structure of the lung duct when the water injection height of the i-th sub-area is h and h+1.

[0060] The explanation of the internal logic of formula [3] is as follows: It represents the ratio of the structural similarity between the regional edge shape presented by the area of ​​the line segment represented by the same grouping sequence j of the i-th sub-area and the pulmonary duct area. The larger the difference between this ratio and 1, the greater the structural similarity between the regional edge shape presented by the area and the pulmonary duct area as the water injection process proceeds. If the difference between this ratio and 1 remains large throughout the water injection process, it means that as the water injection process proceeds, the structural similarity between the water surface shape and the pulmonary duct area becomes greater and greater, and the area is more likely to be the pulmonary duct area, that is, the structural similarity between this area and the lobe duct system area is greater. When the structural similarity between the edge shape of the sub-region and the pulmonary duct region in morphology is greater than the regional pulmonary duct credibility threshold, the sub-region is determined to be a pulmonary duct region. Exemplarily, according to the preset regional pulmonary duct credibility threshold ,when The value is greater than the regional lung pipeline credibility threshold We believe that this area is more likely to be in the pulmonary duct system.

[0061] The specific process of step d is described as follows: Through the above operation, it is possible to confirm which valleys correspond to the areas of the lung duct area, and then find the seed point of the lung duct area (i.e., the point with the maximum grayscale value) from the lung grayscale image, which is recorded as , draw m straight lines through this point, intersecting with the lung lobe area at 2m points, m is a positive integer, and any straight line intersects with the lung lobe area at two points, and the point with the larger gray value is recorded as the target point By analyzing the possibility that each sub-region is a lung duct region, a new height map is generated, making the difference between the valleys formed by the original lung tumor region and the lung duct system region obvious. The construction formula [4] is as follows:

[0062] Formula[4]

[0063] in: Indicates the pth point in the ith valley relative to the height map after reconstruction distance; Indicates the pth point in the ith valley of the original height map relative to distance; Indicates the confidence that the i-th sub-region is a lung duct region.

[0064] The explanation of the internal logic of formula [4] is as follows: Indicates the credibility of the ith sub-region being a tumor region. The larger its value, the greater the possibility that it is a tumor region. The smaller the distance adjustment is, the smaller the value is, indicating that it is more likely to be a pipeline system area, and the pixel points in the valley are relative to The larger the distance adjustment.

[0065] In summary, the tumor segmentation method based on feature extraction provided by the embodiment of the present invention has significant innovation and practicality in the field of medical image processing. The core of this method is to accurately extract the morphological features of the lung duct area and the lung tumor area, and then optimize the watershed algorithm to achieve accurate segmentation of the lung tumor area. The optimized watershed algorithm can more accurately segment the lung tumor area. The segmented lung tumor area image is transmitted to the user end, providing medical experts with an intuitive and accurate basis for diagnosis. This not only helps doctors to more accurately determine the location, size and morphological characteristics of the tumor, but also helps doctors to formulate more appropriate treatment plans and improve the treatment effect and quality of life of patients.

[0066] In addition, the method of the present invention has high versatility and scalability in practical applications. Since the segmentation method based on feature extraction is adopted, it can be flexibly adjusted for different parts and different types of medical images. It is only necessary to extract the corresponding morphological features according to specific needs and optimize the watershed algorithm accordingly to achieve accurate segmentation of different medical images. This feature makes the method of the present invention have a wide range of application prospects in the field of medical image processing.

[0067] In summary, the present invention realizes accurate identification and analysis of tumor areas in lung tissue images, providing powerful assistance to medical experts. This method not only improves the accuracy and efficiency of medical diagnosis, but also helps to promote the further development and application of medical image processing technology. Therefore, the present invention has significant beneficial effects and application value, and is expected to have a wide and far-reaching impact in the medical field.

[0068] like Figure 4 As shown, the embodiment of the present application also provides a tumor segmentation system based on feature extraction, including: an image preprocessing module 401, an image extraction module 402, a watershed conversion module 403, and a height map adjustment module 404.

[0069] An image preprocessing module 401 is used to preprocess the lung CT image and convert it into a grayscale image;

[0070] An image extraction module 402 is used to extract morphological features of the lung duct area and the lung tumor area from the grayscale image;

[0071] A watershed transformation module 403 is used to perform a watershed transformation on the grayscale image using a watershed algorithm to obtain a valley formed by the lung duct area and a valley formed by the lung tumor area;

[0072] A height map adjustment module 404 is used to adjust the height map of the watershed algorithm according to the morphological characteristics of the lung duct area and the lung tumor area;

[0073] The watershed transformation module 403 is further used to use the adjusted height map of the watershed algorithm to re-perform watershed transformation on the grayscale image to fill the valley formed by the lung duct area and segment the lung tumor area.

[0074] Through the description of the above implementation methods, technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0075] Next, an electronic device provided by an embodiment of the present application is introduced. Figure 5 , Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 500 can be specifically a mobile phone, a tablet, a laptop computer, a smart wearable device, etc., which is not limited here. Figure 2 Functions of the corresponding method embodiments. Specifically, the electronic device 500 includes: a receiver 501, a transmitter 502, a processor 503 and a memory 504 (wherein the number of processors 503 in the electronic device 500 can be one or more), wherein the processor 503 may include an application processor 5051 and a communication processor 5052. In some embodiments of the present application, the receiver 501, the transmitter 502, the processor 503 and the memory 504 may be connected via a bus or other means.

[0076] The memory 504 may include a read-only memory and a random access memory, and provides instructions and data to the processor 503. A portion of the memory 504 may also include a non-volatile random access memory (NVRAM). The memory 504 stores processor and operation instructions, executable modules or data structures, or subsets thereof, or extended sets thereof, wherein the operation instructions may include various operation instructions for implementing various operations.

[0077] The processor 503 controls the operation of the electronic device. In a specific application, the various components of the electronic device are coupled together through a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus, and a status signal bus, etc. However, for the sake of clarity, various buses are referred to as bus systems in the figure.

[0078] The method disclosed in the above embodiment of the present application can be applied to the processor 503, or implemented by the processor 503. The processor 503 can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 503 or an instruction in the form of software. The above processor 503 can be a general-purpose processor, a digital signal processor (digital signal processing, DSP), a microprocessor or a microcontroller, and a vision processor (vision processing unit, VPU), a tensor processor (tensorprocessing unit, TPU) and other processors suitable for AI computing, and can further include an application specific integrated circuit (application specific integrated circuit, ASIC), a field programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The processor 503 can implement or execute the disclosed methods, steps and logic block diagrams in the embodiments of the present application. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 504, and the processor 503 reads the information in the memory 504, and completes the steps in the above method embodiment in combination with its hardware.

[0079] The receiver 501 can be used to receive input digital or character information and generate signal input related to the relevant settings and function control of the electronic device. The transmitter 502 can be used to output digital or character information through the first interface; the transmitter 502 can also be used to send instructions to the disk group through the first interface to modify the data in the disk group; the transmitter 502 can also include a display device such as a display screen.

[0080] The present invention also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a computer, the method described in the above method embodiment is implemented. Specific beneficial effects can be found in the above method embodiment.

[0081] The present invention also provides a computer program product, which implements the method described in the above method embodiment when executed by a computer. Specific beneficial effects can be found in the above method embodiment.

[0082] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0083] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

Claims

1. A tumor segmentation method based on feature extraction, It is characterized in that The method comprises: Preprocess the lung CT images and convert them into grayscale images; extracting morphological features of the lung duct area and the lung tumor area from the grayscale image; Performing watershed transformation on the grayscale image using a watershed algorithm to obtain valleys formed by the lung duct area and valleys formed by the lung tumor area; According to the morphological features of the lung duct area and the lung tumor area, the height map of the watershed algorithm is adjusted; using the adjusted height map of the watershed algorithm, the grayscale image is re-performed with a watershed transformation to fill the valley formed by the lung duct area, and the lung tumor area is segmented; According to the characteristics of the lung duct area and the morphological characteristics of the lung tumor area, adjusting the height map of the watershed algorithm includes: Performing edge detection on the grayscale image; Using edge lines detected by the edge, marking is performed on the grayscale image, and the marked edge lines enclose the grayscale image into different sub-areas; For each sub-region, when the water injection height changes, the edge smoothness of the lung tissue area and the number of edge pixels of each pixel on the edge of each sub-region are calculated; According to the change in the number of edge pixels and the edge smoothness of the lung tissue region, the structural similarity between the edge shape of each sub-region and the pulmonary duct region at adjacent water injection heights is calculated; Based on the structural similarity, calculating the credibility of each sub-region being a lung duct region; adjusting the height map of the watershed algorithm according to the confidence that each sub-region is a lung duct region; When the water injection height changes, the edge smoothness of the lung tissue area at each pixel point on the edge of each sub-area is calculated, including: When the water injection height changes, the components of the gradient value of each pixel point on the edge of each sub-region in the horizontal and vertical directions are calculated; According to the component changes of the grayscale value and gradient value of each pixel point on the edge of each sub-region, the edge smoothness of the lung tissue region of each pixel point on the edge of each sub-region is calculated.

2. The tumor segmentation method based on feature extraction according to claim 1, It is characterized in that The steps to adjust the height map of the watershed algorithm based on the confidence that each sub-region is a lung duct region include: Calculating the gradient value of the grayscale image to obtain the gradient amplitude and direction information of the image; Searching for seed points in different regions in the grayscale image, and drawing m straight lines through the seed points to intersect with the lung lobe region to generate 2m points, where m is a positive integer; each straight line intersects with the lung lobe region to generate two points, and selecting the point with the larger grayscale value of the two points as the target point; According to the credibility of each sub-region being a lung duct region, the distance between the pixel points in each valley in the height map of the watershed algorithm relative to the target point is adjusted to highlight the difference between the valley formed by the lung tumor region and the valley formed by the lung tumor region.

3. The tumor segmentation method based on feature extraction according to claim 2, It is characterized in that Searching for seed points in different regions in the grayscale image includes: In the grayscale image, the maximum and minimum values ​​of the grayscale values ​​in different regions are found, the minimum values ​​in different regions are marked as seed points, and the maximum values ​​at this time are marked as partitions.

4. The tumor segmentation method based on feature extraction according to claim 2, It is characterized in that According to the change in the number of edge pixels and the edge smoothness of the lung tissue region, the structural similarity between the edge shape of each sub-region and the lung duct region at adjacent water injection heights is calculated, including: Get the centroid of the line segment composed of 2m points, match the line segments between two adjacent heights according to the distance between the centroid points, and the line segments with the shortest distance are considered to have a corresponding relationship; For each sub-region edge there is a grouping sequence obtained in order of increasing height; According to the changes in the number of edge pixels in each grouping sequence and the edge smoothness of the lung tissue area, the morphological structural similarity between the edge shape of each sub-area at adjacent water injection heights and the lung duct area was calculated.

5. The tumor segmentation method based on feature extraction according to claim 4, It is characterized in that When the morphological structural similarity between the edge shape of the sub-region and the pulmonary duct region is greater than the regional pulmonary duct credibility threshold, the sub-region is determined to be a pulmonary duct region.

6. A tumor segmentation method based on feature extraction according to any one of claims 1 to 5, It is characterized in that After segmenting the lung tumor area, it also includes: The image after segmentation of the lung tumor area is transmitted to the user end to assist in medical diagnosis.

7. A tumor segmentation system based on feature extraction, It is characterized in that include: An image preprocessing module, used for preprocessing lung CT images and converting them into grayscale images; An image extraction module, used to extract morphological features of the lung duct area and the lung tumor area from the grayscale image; A watershed transformation module, used for performing watershed transformation on the grayscale image using a watershed algorithm to obtain a valley formed by a lung duct area and a valley formed by a lung tumor area; A height map adjustment module, used for adjusting the height map of the watershed algorithm according to the morphological characteristics of the lung duct area and the lung tumor area; The watershed conversion module is further used to use the adjusted height map of the watershed algorithm to re-perform watershed conversion on the grayscale image to fill the valley formed by the lung duct area and segment the lung tumor area; According to the characteristics of the lung duct area and the morphological characteristics of the lung tumor area, adjusting the height map of the watershed algorithm includes: Performing edge detection on the grayscale image; Using edge lines detected by the edge, marking is performed on the grayscale image, and the marked edge lines enclose the grayscale image into different sub-areas; For each sub-region, when the water injection height changes, the edge smoothness of the lung tissue area and the number of edge pixels of each pixel on the edge of each sub-region are calculated; According to the change in the number of edge pixels and the edge smoothness of the lung tissue region, the structural similarity between the edge shape of each sub-region and the pulmonary duct region at adjacent water injection heights is calculated; Based on the structural similarity, calculating the credibility of each sub-region being a lung duct region; adjusting the height map of the watershed algorithm according to the confidence that each sub-region is a lung duct region; When the water injection height changes, the edge smoothness of the lung tissue area at each pixel point on the edge of each sub-area is calculated, including: When the water injection height changes, the components of the gradient value of each pixel point on the edge of each sub-region in the horizontal and vertical directions are calculated; According to the component changes of the grayscale value and gradient value of each pixel point on the edge of each sub-region, the edge smoothness of the lung tissue region of each pixel point on the edge of each sub-region is calculated.

8. A computer-readable storage medium, wherein a program is stored in the computer-readable storage medium. It is characterized in that When the program is executed by a processor, a tumor segmentation method based on feature extraction as described in any one of claims 1 to 6 is implemented.