A CT image segmentation method for surgical operations

By setting a preset grayscale threshold in lung CT images and filtering non-smooth segmentation images, determining seed points, and performing regional growth based on non-smooth and uneven feature values, the problem of inaccurate segmentation of lesion areas in lung CT images is solved. problem, achieving more accurate lesion area extraction and surgical assistance.

CN118644509BActive Publication Date: 2024-10-29DALIAN BAISHOU ENTREPRENEUR TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411124611.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-16
Publication Date
2024-10-29
Estimated Expiration
2044-08-16

AI Technical Summary

Technical Problem

It is difficult to accurately segment the lesion area from lung CT images with existing technology, especially because the gray values ​​of blood vessels and the lesion area are close, resulting in poor segmentation results.

Method used

By setting different preset grayscale thresholds to segment the lung CT images, filter out the segmented images with better edge unevenness, determine reasonable seed points, and set the settings based on the uneven feature values ​​and uneven feature values ​​of the growth area. Determine the iteration termination conditions to achieve more accurate segmentation of the lesion area.

Benefits of technology

It improves the ability to accurately segment lung disease areas, can more effectively extract target pathological segmentation images, and enhances the location and evaluation of disease areas during surgery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118644509B_ABST
    Figure CN118644509B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of regional segmentation technology, and in particular to a CT image segmentation method for surgical operations. The method sets each seed point of the lung image to be analyzed according to the uneven edge conditions of all segmented regions in the second segmented image; in the lung image to be analyzed, regional growth is performed according to a preset growth criterion to obtain each growth region after each regional growth; according to the uneven edge conditions of the growth region, the uneven characteristic value of the growth region is obtained; according to the uneven local grayscale distribution of edge pixels of the growth region, the uneven characteristic value of the growth region is obtained; until the uneven characteristic values ​​and uneven characteristic values ​​of all growth regions meet the preset iteration termination conditions, all growth regions will no longer perform the next regional growth, and the target pathological segmentation image is obtained. The present invention improves the accuracy of segmenting the lesion region by fully considering the edge characteristics and grayscale distribution characteristics of the lesion region.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of region segmentation, and in particular to a CT image segmentation method for surgical operations. Background Art

[0002] CT image segmentation can segment target areas from complex CT images, thus assisting doctors in surgical planning. Segmenting lesion areas from lung CT images can assist surgeons in accurately locating lesions, such as tumors and cysts, and assessing their size, shape, distribution range and other characteristics. Segmenting lesion areas from lung CT images is crucial for surgeons to understand the patient's condition.

[0003] The region growing algorithm is a common segmentation method. This algorithm analyzes the similarity between seed points and adjacent points to segment the lesion area from the lung CT image. When using the region growing algorithm to segment the lung CT image, it is difficult to accurately segment the lesion area from the lung CT image due to the fact that the grayscale values ​​of the lesion area and the blood vessels are close. Summary of the invention

[0004] In order to solve the technical problem that it is difficult to accurately segment the lesion area from the lung CT image in the prior art, the purpose of the present invention is to provide a CT image segmentation method for surgical operations, and the technical solution adopted is as follows:

[0005] A CT image segmentation method for surgical operation, the method comprising the following steps:

[0006] Acquiring a lung image to be analyzed;

[0007] Segmenting the lung image to be analyzed according to each preset grayscale threshold, and obtaining a first segmented image corresponding to each preset grayscale threshold; the first segmented image includes each segmented area; selecting a second segmented image from all the first segmented images according to the uneven edges of the segmented areas in all the first segmented images; setting each seed point of the lung image to be analyzed according to the uneven edges of all the segmented areas in the second segmented image;

[0008] In the lung image to be analyzed, the seed point is used as the initial growth area, and the growth area is grown according to the preset growth criterion to obtain each growth area after each regional growth; according to the uneven edge of the growth area, the uneven characteristic value of the growth area is obtained; according to the uneven local grayscale distribution of the edge pixels of the growth area, the uneven characteristic value of the growth area is obtained; until the unsmooth characteristic values ​​and uneven characteristic values ​​of all growth areas meet the preset iteration termination conditions, all growth areas will no longer perform the next regional growth, and the target pathological segmentation image is obtained.

[0009] Furthermore, the method for acquiring the lung image to be analyzed includes:

[0010] According to the grayscale values ​​of all pixels in the medical image, foreground pixels are screened out from the pixels, and the medical image containing only all foreground pixels is used as the lung image to be analyzed.

[0011] Furthermore, the method for acquiring the second segmented image includes:

[0012] According to the rough edge condition of the segmented area, the rough edge parameter of the segmented area is obtained;

[0013] Acquire an image roughness parameter of the first segmented image according to the overall distribution of the edge roughness parameters of all segmented regions in the first segmented image;

[0014] The first segmented image corresponding to the maximum image unsmoothing parameter is used as the second segmented image.

[0015] Furthermore, the method for obtaining the edge roughness parameter includes:

[0016] Perform edge detection on the segmented area to obtain the edge of the segmented area; perform curve fitting on the edge of the segmented area to obtain the fitted edge of the segmented area; calculate the mean square error between the edge of the segmented area and the fitted edge to obtain the edge unsmoothing parameter of the segmented area.

[0017] Furthermore, the method for setting each seed point of the lung image to be analyzed includes:

[0018] According to the edge roughness parameters of all the segmented areas in the second segmented image, each rough segmented area is screened out;

[0019] Initial seed points are set in each of the non-smooth segmented regions; and the initial seed points in the second segmented image are mapped to the lung image to be analyzed to obtain each seed point of the lung image to be analyzed.

[0020] Furthermore, the method for setting the initial seed point includes:

[0021] The centers of the non-smooth segmentation regions are used as initial seed points.

[0022] Furthermore, the preset growth criteria include:

[0023] If the absolute value of the difference in gradient value between an edge pixel point in the growth area and its adjacent pixel point is greater than a preset gradient difference threshold, the adjacent pixel point is added to the growth area.

[0024] Furthermore, the method for obtaining the non-smooth characteristic value of the growth area includes:

[0025] According to the position distribution relationship between the edge pixels in the growth area, a differential coding value of each edge pixel in the growth area is obtained;

[0026] According to the overall distribution of the differential coding values ​​of all edge pixels in the growth area, the unsmoothed characteristic value of the growth area is obtained.

[0027] Furthermore, the method for obtaining the uneven characteristic value of the growth region includes:

[0028] Obtain a preset neighborhood range of edge pixels; equally divide the preset neighborhood range into a preset number of local neighborhood ranges; use the grayscale value of the edge pixels as the characteristic grayscale value; and use the total number of all pixels whose grayscale values ​​in the local neighborhood range are the characteristic grayscale values ​​as the characteristic number of the local neighborhood range;

[0029] Obtaining a local uneven parameter of the edge pixel point according to the difference in the number of features of all local neighborhood ranges in a preset neighborhood range of the edge pixel point;

[0030] According to the overall distribution of the local uneven parameters of all edge pixels of the growing region, the uneven characteristic value of the growing region is obtained.

[0031] Furthermore, the preset iteration termination condition includes:

[0032] The non-smooth characteristic value of the growth region is less than a preset non-smooth threshold, or when the non-smooth characteristic value of the growth region is greater than the preset non-smooth threshold, the non-uniform characteristic value of the growth region is less than a preset non-uniform degree value.

[0033] The present invention has the following beneficial effects:

[0034] Considering that there are vascular regions and lesion regions in the lung image to be analyzed, it is difficult to accurately segment the suspected lesion region because the grayscale values ​​of the vascular region and the lesion region in the lung image to be analyzed are close; considering that there are significant differences in the morphology and edge features of these two regions, due to the physiological structure and function of the blood vessels, the blood vessels usually present a relatively regular shape in the image, and the edges of the blood vessels are usually smooth. Due to the abnormal proliferation and diffusion of abnormal cells and the loss of control of growth and morphology by abnormal cells, the edge shape of the lesion region is not smooth. By segmenting the lung image to be analyzed with different preset grayscale thresholds, the segmentation effect of the first segmented image on the suspected lesion region under different preset grayscale thresholds can be analyzed, so that the first segmented image with the best segmentation effect of the suspected lesion region is selected as the second segmented image, and the seed point is set in the suspected lesion region, making the seed point setting more reasonable. Considering that in the lung image to be analyzed, the grayscale value of the pixel reflects the degree of absorption of X-rays by different tissues. Because the tissue structure of the normal lung area is relatively uniform, the absorption of X-rays is also relatively uniform, so it is shown as a uniform grayscale value in the lung image to be analyzed. The tissue structure in the lesion area will change, resulting in inconsistent absorption of X-rays, resulting in uneven grayscale values ​​in the lung image to be analyzed. Considering the uneven grayscale and irregular edges of the lesion area, the preset growth criteria and the iterative termination conditions are set. The preset growth criteria and the preset iterative termination conditions are set more reasonably, so as to more accurately segment the lesion area in the lung image to be analyzed, so as to achieve accurate segmentation of the lesion area and obtain a target pathological segmentation image that can more accurately extract the lesion area. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] 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.

[0036] Figure 1 A flow chart of a CT image segmentation method for surgical operation provided by one embodiment of the present invention;

[0037] Figure 2 A structural diagram of a CT image segmentation system for surgical operations provided by one embodiment of the present invention;

[0038] Figure 3 A flow chart of a method for obtaining a second segmented image provided by one embodiment of the present invention;

[0039] Figure 4A flow chart of a method for obtaining a seed point provided by an embodiment of the present invention;

[0040] Figure 5 A flow chart of a method for obtaining a non-smoothed characteristic value provided by an embodiment of the present invention;

[0041] Figure 6 A flow chart of a method for obtaining non-uniform characteristic values ​​provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0042] 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 CT image segmentation method for surgical operations 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.

[0043] 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.

[0044] A specific solution of a CT image segmentation method for surgical operations provided by the present invention will be described in detail below with reference to the accompanying drawings.

[0045] The present invention provides a CT image segmentation method for surgical operation. Figure 1 , which shows a flow chart of a CT image segmentation method for surgical operation provided by an embodiment of the present invention, the method comprising the following steps:

[0046] Step S1: Acquire a lung image to be analyzed.

[0047] In order to accurately segment the lesion area in the lung, the present invention first needs to collect images of the lung.

[0048] According to the needs of the surgical operation, the patient's lung CT image is collected, and the lung CT image is grayed to obtain a grayed image. Due to the influence of the equipment and other external factors, the image will have noise, which affects the subsequent analysis. It is necessary to denoise the grayed image to obtain a medical image. It should be noted that in the embodiment of the present invention, a weighted average graying algorithm is selected for graying, and Gaussian filtering is used for denoising. The specific method is not introduced here, and they are all technical means well known to those skilled in the art. In other embodiments of the present invention, bilateral filtering can also be used for denoising, and a component method graying algorithm can be used for graying. Bilateral filtering and component method graying are technical means well known to those skilled in the art and are not limited here.

[0049] In order to segment the lesion area of ​​the lung, the lung area needs to be segmented first. There are lung areas, bones and background areas in medical images. The lung area has a low grayscale value, while other areas have a higher grayscale value. Therefore, this grayscale difference can be used to segment the lung area. Preferably, in one embodiment of the present invention, the method for acquiring the lung image to be analyzed includes:

[0050] It should be noted that the Otsu threshold algorithm is an existing technology well known to those skilled in the art, and is only briefly described here: using the Otsu threshold algorithm, a threshold for distinguishing between foreground and disease is calculated based on the grayscale values ​​of all pixels in the medical image, and each pixel with a grayscale value less than this threshold is marked as a foreground pixel.

[0051] The medical image containing only all foreground pixels is used as the lung image to be analyzed. By utilizing the grayscale difference between the lung area and other areas, the lung image to be analyzed is obtained, and the lung image to be analyzed only contains the grayscale image of the lung area, and other areas have been removed.

[0052] In order to accurately segment the lesion area from the lung image to be analyzed, the present invention achieves accurate segmentation of the lesion area by improving the selection of seeds, growth criteria and iterative termination conditions of the region growing algorithm. It should be noted that the region growing algorithm is a technical means well known to those skilled in the art. Here, only the brief steps of using the region growing algorithm to obtain the target pathological segmentation image are briefly described:

[0053] (1) Set each seed point in the lung image to be analyzed and use each seed point as the initial growth region; (2) Perform regional growth on each growth region according to the growth criterion to form each updated growth region; (3) Repeat (2) until the growth region meets the iteration termination condition; (4) Until all growth regions meet the iteration termination condition, output the target pathology segmentation image.

[0054] Step S2: Segment the lung image to be analyzed according to each preset grayscale threshold, and obtain the first segmented image corresponding to each preset grayscale threshold; the first segmented image includes each segmented area; according to the rough edges of the segmented areas in all the first segmented images, select the second segmented image from all the first segmented images; according to the rough edges of all the segmented areas in the second segmented image, set each seed point of the lung image to be analyzed.

[0055] Considering that there are vascular areas and lesion areas in the lung image to be analyzed, it is difficult to accurately segment the suspected lesion area because the grayscale values ​​of the vascular area and the lesion area in the lung image to be analyzed are close; considering that there are significant differences in the morphology and edge features of these two areas, due to the physiological structure and function of the blood vessels, the blood vessels usually present a relatively regular shape in the image, and the edges of the blood vessels are usually smooth. Due to the abnormal proliferation and diffusion of abnormal cells and the loss of control of growth and morphology by abnormal cells, the edge shape of the lesion area is not smooth. By segmenting the lung image to be analyzed with different preset grayscale thresholds, the segmentation effect of the first segmented image on the suspected lesion area under different preset grayscale thresholds can be analyzed, so as to select the first segmented image with the best segmentation effect of the suspected lesion area as the second segmented image, so as to set the seed point in the suspected lesion area, so that the seed point setting is more reasonable.

[0056] First, determine all the preset grayscale thresholds used in the invention. The implementer can set them according to the implementation scenario. The present invention uses all preset grayscale thresholds, including: obtaining the grayscale values ​​of all pixels in the lung image to be analyzed, and using all grayscale values ​​as all preset grayscale thresholds. Other embodiments of the present invention use all preset grayscale thresholds, including: in the lung image to be analyzed, obtaining the grayscale values ​​of all pixels in the lung image to be analyzed; sorting these grayscale values ​​in descending order, and selecting the grayscale values ​​at the positions corresponding to each preset ratio from the sorted grayscale values ​​as each preset grayscale threshold. In one embodiment of the present invention, the preset ratio can be: 5%, 10%, 15%, 20%...80%, 85%, 90%, 95%. For example, the preset ratio is 10%, and the total number of all grayscale values ​​is N. Then, from the sorted grayscale values, select the grayscale value at the position of N×10% as the preset grayscale threshold corresponding to the 10% preset ratio. It should be noted that when N×10% is not an integer, it is rounded to the nearest integer.

[0057] In order to obtain an image with good segmentation effect on the suspected lesion area, it is necessary to use various preset grayscale thresholds to segment the lung image to be analyzed, obtain the first segmented image corresponding to each preset grayscale threshold, and provide a reference image for subsequent analysis of the image with good segmentation effect on the suspected lesion area.

[0058] Preferably, in one embodiment of the present invention, the method for acquiring the first segmented image includes:

[0059] Based on the threshold segmentation method, the preset gray threshold is used as the threshold to segment the lung image to be analyzed to obtain each first segmented image. It should be noted that the threshold segmentation method is a technical means well known to those skilled in the art and will not be described in detail here.

[0060] In the first segmented image, each connected domain formed by the foreground pixels is used as each segmented area.

[0061] In order to analyze the first segmentation image with the best segmentation effect on the suspected lesion area, please refer to Figure 3 , which shows a flow chart of a method for obtaining a second segmented image in one embodiment of the present invention. Preferably, in one embodiment of the present invention, the method for obtaining the second segmented image includes:

[0062] Step S201: obtaining edge roughness parameters of the segmented region according to the edge roughness of the segmented region.

[0063] Considering that the edge of the lesion area is more uneven than that of the blood vessel area, the edge roughness parameter of the segmented area is obtained. The larger the value of the edge roughness parameter is, the more likely the segmented area is to be a lesion area.

[0064] In one embodiment of the present invention, the method for obtaining the roughness parameter includes: using the canny edge detection algorithm to perform edge detection on the segmented area to obtain the edge of the segmented area; using the least squares method to perform curve fitting on the edge of the segmented area to obtain the fitted edge of the segmented area; calculating the mean square error between the edge of the segmented area and the fitted edge to obtain the edge roughness parameter of the segmented area. It should be noted that the canny edge detection algorithm, the least squares method and the mean square error are prior arts well known to those skilled in the art and will not be described in detail herein.

[0065] Step S202: acquiring image roughness parameters of the first segmented image according to the overall distribution of the edge roughness parameters of all segmented regions in the first segmented image.

[0066] The image unsmoothing parameter integrates the possibility that all segmented areas in the first segmented image are suspected lesion areas. The larger the image unsmoothing parameter is, the better the effect of the first segmented image in segmenting the suspected lesion area is.

[0067] In one embodiment of the present invention, in the first segmented image, the mean of the edge roughness parameters of all segmented regions is calculated to obtain the image roughness parameter of the first segmented image. In other embodiments of the present invention, in the first segmented image, the mode of the edge roughness parameters of all segmented regions is calculated as the image roughness parameter of the first segmented image.

[0068] Step S203: taking the first segmented image corresponding to the maximum image unsmoothing parameter as the second segmented image.

[0069] The first segmented image that best segments the suspected lesion area is used as the second segmented image.

[0070] By determining the suspected lesion area in the second segmented image, the seed point is set in the suspected lesion area, so that the seed point setting is more reasonable.

[0071] See also Figure 4 , which shows a flow chart of a method for acquiring seed points in one embodiment of the present invention. Preferably, in one embodiment of the present invention, the method for acquiring each seed point of the lung image to be analyzed includes:

[0072] Step S211: screening out each non-smooth segmented area according to the non-smooth edge parameters of all segmented areas in the second segmented image;

[0073] Considering that there is a significant difference in the roughness of the edges of the lesion area and the blood vessel area, the roughness parameters of the segmented area are used to screen out various rough segmented areas; the rough segmented areas reflect the suspected lesion areas.

[0074] In one embodiment of the present invention, the K-Means clustering method is used, and K is set to 2 according to the edge roughness parameters of all segmented areas, and all segmented areas are clustered to obtain two cluster clusters. It should be noted that the K-Means clustering method is a prior art well known to those skilled in the art and is not limited here. The mean of the edge roughness parameters of all segmented areas in each cluster cluster is calculated to obtain the cluster roughness value of each cluster cluster. Each segmented area corresponding to the largest cluster roughness value is used as an unsmoothed segmented area; each segmented area corresponding to the smallest cluster roughness value is used as a smoothed segmented area; and the smoothed segmented area reflects the suspected vascular area. In other embodiments of the present invention, considering that the roughness of the edges of the lesion area and the vascular area is significantly different, a preset roughness threshold can be set empirically, and each segmented area with an edge roughness parameter greater than the preset roughness threshold is used as each unsmoothed segmented area.

[0075] Step S212: setting initial seed points in each of the non-smooth segmented regions; mapping the initial seed points in the second segmented image to the lung image to be analyzed to obtain each seed point of the lung image to be analyzed.

[0076] Taking into account that the second segmented image screens out the non-smooth segmentation area, the non-smooth segmentation area reflects the suspected lesion area, and the initial seed point is set in the suspected lesion area. At the same time, considering that the subsequent segmentation is for the lung image to be analyzed, it is necessary to map the initial seed point to the lung image to be analyzed and obtain the various seed points of the lung image to be analyzed. The reasonable setting of the seed point helps to improve the accuracy of the subsequent segmentation of the lesion area.

[0077] In one embodiment of the present invention, the center of each of the non-smooth segmented areas is obtained in the second segmented image, and the center of each of the non-smooth segmented areas is used as each initial seed point. It should be noted that if the center of the non-smooth segmented area is not in the connected domain, the Euclidean distance between the pixel point in the non-smooth segmented area and the center of the non-smooth segmented area is calculated, and the pixel point corresponding to the minimum Euclidean distance is used as the initial seed point. The initial seed point under the second segmented image is mapped to the lung image to be analyzed to obtain each seed point of the lung image to be analyzed. In other embodiments of the present invention, the initial seed point acquisition method also includes: in the second segmented image, randomly selecting one pixel point from each non-smooth segmented area as each initial seed point.

[0078] The above determination of the suspected lesion area is based on the uneven edge characteristics of the lesion area. The suspected lesion area is preliminarily determined to set the seed point, with the aim of improving the accuracy of segmenting the lesion area using the region growing algorithm.

[0079] Step S3: In the lung image to be analyzed, the seed point is used as the initial growth area, and the growth area is grown according to the preset growth criteria to obtain each growth area after each regional growth; according to the uneven edge of the growth area, the uneven characteristic value of the growth area is obtained; according to the uneven local grayscale distribution of the edge pixels of the growth area, the uneven characteristic value of the growth area is obtained; until the uneven characteristic values ​​and uneven characteristic values ​​of all growth areas meet the preset iteration termination conditions, all growth areas will no longer perform the next regional growth, and the target pathological segmentation image is obtained.

[0080] Considering that in the lung image to be analyzed, the grayscale value of the pixel reflects the degree of absorption of X-rays by different tissues. The normal lung area has a relatively uniform tissue structure, so the absorption of X-rays is also relatively uniform, so the grayscale value is uniform in the lung image to be analyzed. The tissue structure in the lesion area will change, resulting in inconsistent absorption of X-rays, resulting in uneven grayscale values ​​in the lung image to be analyzed. Taking into account the uneven grayscale and irregular edges of the lesion area, the preset growth criterion and the preset iteration termination condition are set. The preset growth criterion and the preset iteration termination condition are set more reasonably, so as to more accurately segment the lesion area in the lung image to be analyzed, to achieve accurate segmentation of the lesion area, and obtain a target pathology segmentation image that can more accurately extract the lesion area.

[0081] In the lung image to be analyzed, seed points are set in the suspected lesion area through the above steps, and the seed points are used as the initial growth area, and then regional growth of the growth area is performed.

[0082] Taking into account the uneven grayscale and irregular edges of the lesion area, in order to make the pixels selected for each regional growth conform to the distribution characteristics of the pixels in the lesion area, the preset growth criteria are set according to the difference in gradient values ​​between the edge pixels and adjacent pixels in the growth area, as the difference between gradient values ​​can reflect the drastic change of grayscale. The more drastic the change, the more it conforms to the characteristics of the pixels in the lesion area.

[0083] Preferably, in one embodiment of the present invention, the preset growth criteria include:

[0084] If the absolute value of the difference in gradient values ​​between the edge pixel point of the growth area and its adjacent pixel point is greater than the preset gradient difference threshold, the adjacent pixel point is added to the growth area. In one embodiment of the present invention, the pixel points within the eight neighborhoods of the edge pixel point are used as the adjacent pixel points of the edge pixel point. It should be noted that the eight neighborhoods are prior art well known to those skilled in the art and will not be described in detail here. In one embodiment of the present invention, the preset gradient difference threshold is 17, and the implementer can set it according to the implementation scenario. For example, if the grayscale value in the lesion area changes more dramatically, the preset gradient difference threshold can be appropriately increased.

[0085] In order to more accurately segment the lesion area, it is necessary to set the preset iteration termination condition of the growing area. Taking into account the uneven grayscale and irregular edges of the lesion area, the growing area stops growing when it meets the characteristics of the lesion area, thereby more accurately extracting the target pathological segmentation image of the lesion area.

[0086] Considering that the lesion area has irregular edges, it is necessary to analyze the regularity of the edges of the growth area. Figure 5, which shows a flow chart of a method for obtaining a non-smooth characteristic value in one embodiment of the present invention. Preferably, in one embodiment of the present invention, the method for obtaining a non-smooth characteristic value of a growth region includes:

[0087] Step S301: obtaining a differential coding value of each edge pixel point in the growth area according to the position distribution relationship between the edge pixel points in the growth area.

[0088] Considering that the smaller the change in the positional relationship of edge pixels is, the more the growth area conforms to the characteristics of the lesion area, the larger the differential coding value is, the greater the difference in the positional relationship between the two pixels is.

[0089] It should be noted that the differential coding method is an existing technology well known to those skilled in the art. It is only briefly described here. The differential coding method can record the relative change relationship between edge pixels. For each edge pixel, the differential coding value will record its change relative to the previous edge pixel. If the differential coding value of the edge pixel is larger, it means that the positional relationship between the two pixels is more different. In one embodiment of the present invention, the differential coding method is used to encode all edge pixels in the growth area to obtain the differential coding values ​​of all edge pixels in the growth area. Specifically, on the edge of the growth area, any edge pixel point is selected as the starting point, and all edge pixels are encoded in turn in a counterclockwise direction using the eight-chain code method to obtain a chain code value sequence of the edge of the growth area. For example, the chain code value sequence of the edge of the growth area is 0, 1, 0, 0, 0, 7, 6, 4, 4, 4, 5, 4, 3, 2; using the differential coding method, the differential coding value sequence of the edge of the growth area can be obtained, that is, 6, 1, 7, 0, 0, 7, 7, 6, 0, 0, 1, 7, 7, 7, where each element in the differential coding sequence is a differential coding value corresponding to an edge pixel point, that is, the differential coding value of each edge pixel point is obtained. It should be noted that the pixel point before the starting point is the end point.

[0090] Step S302: Obtain the non-smooth characteristic value of the growth area according to the overall distribution of the differential code values ​​of all edge pixels in the growth area.

[0091] Considering that the larger the differential coding value, the greater the difference in the positional relationship between the two pixels, the differential coding values ​​of all edge pixels are combined to obtain the unsmooth eigenvalue of the growth area. The larger the unsmooth eigenvalue, the more unsmooth the edge of the growth area is, and the more it conforms to the characteristics of the lesion area.

[0092] In one embodiment of the present invention, the mean of the differential chain codes of all edge pixels in the growth region is calculated to obtain the unsmoothed characteristic value of the growth region. In other embodiments of the present invention, the mode of the differential chain codes of all edge pixels in the growth region can also be used as the unsmoothed characteristic value of the growth region.

[0093] In other embodiments of the present invention, the method for obtaining the non-smooth eigenvalue includes: obtaining the chain code value of each edge pixel point, calculating the variance of the chain code values ​​of all edge pixels, and obtaining the non-smooth eigenvalue of the growth area. It should be noted that the chain code value is a prior art well known to those skilled in the art and will not be elaborated here. In other embodiments of the present invention, the method for obtaining the non-smooth eigenvalue includes: using the canny edge detection algorithm to perform edge detection on the growth area to obtain the edge of the growth area; using the least squares method to perform curve fitting on the edge of the growth area to obtain the fitted edge of the growth area; calculating the mean square error between the edge of the growth area and the fitted edge to obtain the non-smooth eigenvalue of the growth area.

[0094] Considering that the lesion area has the characteristic of uneven grayscale, it is necessary to analyze the uneven grayscale around the growth area. According to the uneven local grayscale distribution of the edge pixels of the growth area, the uneven eigenvalue of the growth area is obtained. The larger the uneven eigenvalue, the more uneven the grayscale around the growth area.

[0095] See also Figure 6 , which shows a flow chart of a method for obtaining a non-uniform characteristic value in one embodiment of the present invention. Preferably, in one embodiment of the present invention, the method for obtaining a non-uniform characteristic value of a growth region includes:

[0096] Step S311: obtain a preset neighborhood range of edge pixels; divide the preset neighborhood range equally into a preset number of local neighborhood ranges; use the grayscale value of the edge pixel as the characteristic grayscale value; and use the total number of all pixels in the local neighborhood range whose grayscale value is the characteristic grayscale value as the characteristic number of the local neighborhood range.

[0097] The number of features in the local neighborhood is reflected in the number of pixels with the same grayscale value as the edge pixel in the local neighborhood of the edge pixel. The smaller the value, the smaller the number.

[0098] For the above steps, specifically, in order to reflect the surrounding range of edge pixels, in one embodiment of the invention, the method for obtaining the preset neighborhood range includes: the preset neighborhood range is a rectangular window constructed with the edge pixel as the center of the rectangular window and the preset size as the size of the rectangular window, wherein the preset size is 7*7. In one embodiment of the invention, the preset neighborhood range is evenly divided into a preset number of local neighborhood ranges, and the preset number is set to 8. The specific steps include: based on the image coordinate system, in the preset neighborhood range of the edge pixel, a dividing line is constructed through the center in a direction parallel to the X-axis, and four preset dividing lines are respectively rotated clockwise at preset angles, i.e., 0 degrees, 45 degrees, 90 degrees, and 135 degrees, to obtain four preset dividing lines. The four dividing lines divide the preset neighborhood range equally into 8 local neighborhood ranges, and further, the grayscale value of the edge pixel is used as the characteristic grayscale value; the total number of all pixels whose grayscale value is the characteristic grayscale value in the local neighborhood range is used as the characteristic number of the local neighborhood range.

[0099] Step S312: obtaining a local non-uniform parameter of the edge pixel point according to the difference in the number of features of all local neighborhood ranges in the preset neighborhood range of the edge pixel point.

[0100] Considering that around the edge pixel, the greater the difference in the number of pixels with the same grayscale value as the edge pixel, the more uneven the grayscale value distribution of the edge pixel, and the larger the value of the local uneven parameter, the more uneven the grayscale value distribution of the edge pixel.

[0101] In one embodiment of the present invention, the variance of the number of features of all local neighborhood ranges is calculated in the preset neighborhood range of the edge pixel point to obtain the local non-uniform parameter of the edge pixel point. In other embodiments of the present invention, taking any local neighborhood range as the starting point, all local neighborhood ranges are sorted in a clockwise direction to obtain the differential value of the number of features of each local neighborhood range; the second-order differential value of the number of features of each local neighborhood range is obtained; the mean of the absolute value of the differential value of all local neighborhood ranges is calculated to obtain the non-uniform first parameter of the edge pixel point; the mean of the absolute value of the second-order differential value of all local neighborhood ranges is calculated to obtain the non-uniform second parameter of the edge pixel point; according to the order of the local neighborhood range, the number of positive and negative sign changes of the differential value is counted to obtain the non-uniform third parameter of the edge pixel point; the product of the non-uniform first parameter, the non-uniform second parameter and the non-uniform third parameter is calculated to obtain the local non-uniform parameter of the edge pixel point. It should be noted that the present invention adopts backward difference to calculate the differential value, that is, the latter data is subtracted from the current data.

[0102] Step S313: Obtain the uneven characteristic value of the growth area according to the overall distribution of the local uneven parameters of all edge pixels.

[0103] The more uneven the grayscale value distribution of all edge pixels in the comprehensive growth area is, the more uneven the characteristic value of the growth area is obtained. The larger the value is, the more uneven the grayscale value distribution of the growth area is, and the more consistent it is with the distribution characteristics of the pixels in the lesion area.

[0104] In one embodiment of the present invention, the average value of the local non-uniform parameters of all edge pixels is calculated to obtain the non-uniform characteristic value of the growth area.

[0105] In order to accurately segment the lesion area, it is necessary to set the preset iteration termination condition of the growth area, so that the growth will be carried out when the edge of the growth area is smooth, and the growth will be stopped when the growth area is sufficiently uneven and meets the uneven edge characteristics of the lesion area; when the growth area is smooth, it is also necessary to pay attention to the grayscale uniformity of the growth area. When the grayscale is sufficiently uneven, which means that the growth area meets the grayscale unevenness characteristics of the lesion area, the growth will be stopped, otherwise it will continue to grow.

[0106] In one embodiment of the present invention, the preset iteration termination condition includes:

[0107] The unsmooth characteristic value of the growth area is less than a preset unsmooth threshold, or when the unsmooth characteristic value of the growth area is greater than the preset unsmooth threshold, the uneven characteristic value of the growth area is less than a preset uneven degree value. In one embodiment of the present invention, the preset unsmooth threshold is 50, and the preset uneven degree is 20, which can be set by the implementer according to the implementation scenario.

[0108] Until the non-smooth eigenvalues ​​and non-uniform eigenvalues ​​of all growing regions meet the preset iteration termination conditions, all growing regions will no longer perform the next region growth, and the target pathology segmentation image is obtained. The target pathology segmentation image includes each final growth region, and each final growth region can more accurately reflect the lesion region, so that the target pathology segmentation image can accurately reflect the segmentation of the lesion region.

[0109] In summary, the embodiment of the present invention provides a CT image segmentation method for surgical operations. First, according to the edge unevenness of all segmented areas in the second segmented image, the seed points of the lung image to be analyzed are set; in the lung image to be analyzed, the seed points are used as the initial growth area, and the growth area is regionally grown according to the preset growth criteria to obtain each growth area after each regional growth; according to the edge unevenness of the growth area, the uneven characteristic value of the growth area is obtained; according to the local grayscale distribution unevenness of the edge pixel points of the growth area, the uneven characteristic value of the growth area is obtained; until the uneven characteristic values ​​and uneven characteristic values ​​of all growth areas meet the preset iteration termination conditions, all growth areas will no longer perform the next regional growth, and the target pathological segmentation image is obtained. In the present invention, the edge characteristics and grayscale distribution characteristics of the lesion area are fully considered to improve the accuracy of segmenting the lesion area.

[0110] The present invention also proposes a CT image segmentation system for surgical operations, see Figure 2 , which shows a structural diagram of a CT image segmentation system for surgical operations provided by an embodiment of the present invention. The system includes: an image acquisition module 101, a seed point setting module 102, and an image segmentation module 103.

[0111] The image acquisition module 101 is used to acquire the lung image to be analyzed.

[0112] The seed point setting module 102 is used to segment the lung image to be analyzed according to each preset grayscale threshold, and obtain the first segmented image corresponding to each preset grayscale threshold; the first segmented image includes each segmented area; according to the rough edges of the segmented areas in all the first segmented images, the second segmented image is screened out from all the first segmented images; according to the rough edges of all the segmented areas in the second segmented image, each seed point of the lung image to be analyzed is set.

[0113] The image segmentation module 103 is used to use the seed point as the initial growth area in the lung image to be analyzed, and the growth area is grown according to the preset growth criteria to obtain each growth area after each regional growth; according to the uneven edge of the growth area, the uneven characteristic value of the growth area is obtained; according to the uneven local grayscale distribution of the edge pixels of the growth area, the uneven characteristic value of the growth area is obtained; until the uneven characteristic values ​​and uneven characteristic values ​​of all growth areas meet the preset iteration termination conditions, all growth areas will no longer perform the next regional growth, and the target pathological segmentation image is obtained.

[0114] It should be noted that: the system provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device is divided into different functional modules to complete all or part of the functions described above. In addition, the CT image segmentation system for surgical operations and the CT image segmentation method embodiment for surgical operations provided in the above embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0115] 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.

[0116] 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 CT image segmentation method for surgical operation, characterized in that: The method comprises the following steps: Acquiring a lung image to be analyzed; Segmenting the lung image to be analyzed according to each preset grayscale threshold, and obtaining a first segmented image corresponding to each preset grayscale threshold; the first segmented image includes each segmented area; selecting a second segmented image from all the first segmented images according to the uneven edges of the segmented areas in all the first segmented images; setting each seed point of the lung image to be analyzed according to the uneven edges of all the segmented areas in the second segmented image; In the lung image to be analyzed, the seed point is used as the initial growth region, and the growth region is regionally grown according to a preset growth criterion to obtain each growth region after each regional growth; according to the uneven edge of the growth region, the uneven characteristic value of the growth region is obtained; according to the uneven local grayscale distribution of the edge pixels of the growth region, the uneven characteristic value of the growth region is obtained; until the uneven characteristic values ​​and the uneven characteristic values ​​of all the growth regions meet the preset iteration termination condition, all the growth regions will no longer perform the next regional growth, and the target pathological segmentation image is obtained; The method for acquiring the second segmented image includes: According to the rough edge condition of the segmented area, obtaining the rough edge parameter of the segmented area; Acquire an image roughness parameter of the first segmented image according to the overall distribution of the edge roughness parameters of all the segmented regions in the first segmented image; Using the first segmented image corresponding to the maximum image unsmoothing parameter as the second segmented image; The method for obtaining the edge roughness parameter includes: Perform edge detection on the segmented area to obtain the edge of the segmented area; perform curve fitting on the edge of the segmented area to obtain the fitted edge of the segmented area; calculate the mean square error between the edge of the segmented area and the fitted edge to obtain the edge unsmoothing parameter of the segmented area; The method for obtaining the non-smooth characteristic value of the growth area includes: According to the position distribution relationship between the edge pixels in the growth area, a differential coding value of each edge pixel in the growth area is obtained; Obtaining the unsmoothed characteristic value of the growth area according to the overall distribution of the differential coding values ​​of all edge pixels in the growth area; The method for obtaining the uneven characteristic value of the growth region comprises: Obtain a preset neighborhood range of edge pixels; equally divide the preset neighborhood range into a preset number of local neighborhood ranges; use the grayscale value of the edge pixels as the characteristic grayscale value; and use the total number of all pixels whose grayscale values ​​in the local neighborhood range are the characteristic grayscale values ​​as the characteristic number of the local neighborhood range; Obtaining a local uneven parameter of the edge pixel point according to the difference in the number of features of all local neighborhood ranges in a preset neighborhood range of the edge pixel point; The uneven characteristic value of the growing region is obtained according to the overall distribution of the local uneven parameters of all edge pixels of the growing region.

2. A CT image segmentation method for surgical operation according to claim 1, characterized in that: The method for acquiring the lung image to be analyzed includes: According to the grayscale values ​​of all pixels in the medical image, foreground pixels are screened out from the pixels, and the medical image containing only all foreground pixels is used as the lung image to be analyzed.

3. The CT image segmentation method for surgical operation according to claim 1, characterized in that: The method for setting each seed point of the lung image to be analyzed includes: According to the rough edge parameters of all segmented areas in the second segmented image, screening out each rough segmented area; Initial seed points are set in each of the non-smooth segmented regions; and the initial seed points in the second segmented image are mapped to the lung image to be analyzed to obtain each seed point of the lung image to be analyzed.

4. A CT image segmentation method for surgical operation according to claim 3, characterized in that: The method for setting the initial seed point includes: The centers of the non-smooth segmentation regions are used as initial seed points.

5. The CT image segmentation method for surgical operation according to claim 1, characterized in that: The preset growth criteria include: If the absolute value of the difference in gradient value between an edge pixel point in the growth area and its adjacent pixel point is greater than a preset gradient difference threshold, the adjacent pixel point is added to the growth area.

6. The CT image segmentation method for surgical operation according to claim 1, characterized in that: The preset iteration termination condition includes: The non-smooth characteristic value of the growth region is less than a preset non-smooth threshold, or when the non-smooth characteristic value of the growth region is greater than the preset non-smooth threshold, the non-uniform characteristic value of the growth region is less than a preset non-uniform degree value.

Citation Information

Patent Citations

  • Preprocessing method and preprocessing system used for extracting breast regions in mammographic images

    CN102956035A

  • Fragmentation contour point extraction method based on point cloud data

    CN118334367A