Method for segmenting a region of an internal cavity from a ct image
Through the local multi-scale convex hull segmentation algorithm and morphological filling, the segmentation problem of incompletely enclosed inner cavity areas in CT images was solved, and the accurate segmentation of incompletely enclosed inner cavity areas was achieved, which improved the accuracy of image processing and the reliability of subsequent analysis.
Patent Information
- Application Number
- CN202311099830.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-29
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2043-08-29
AI Technical Summary
Existing CT image segmentation algorithms have difficulty in accurately segmenting incompletely enclosed lumen areas, especially because the grayscale value is the same as that of air, resulting in loss of edge information or over-segmentation, affecting the accuracy of subsequent analysis.
A local multi-scale convex hull segmentation algorithm is used to judge the surrounding information of each pixel to form a local multi-scale convex hull, which is combined with morphological filling to achieve accurate segmentation of incompletely closed inner cavity areas.
While preserving edge information, accurate segmentation of incompletely enclosed lumen areas is achieved, improving the accuracy of image processing and the reliability of subsequent analysis.
Smart Images

Figure CN117132615B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of image processing and relates to a method for segmenting an incompletely closed inner cavity area of a CT image. Background Art
[0002] Under the influence of stress or the environment, tiny defects may appear on the surface of industrial parts. These defects will gradually expand as the workpiece is in service, seriously affecting the stability of the workpiece's operation and shortening its life. In the field of materials, pores are one of the most common microscopic defects in materials. Due to the inherent reasons of the preparation process, materials that are completely free of pores do not exist. Pores in materials are generally divided into two types: one is closed pores enclosed within the material, and the other is open pores on the surface of the material that are connected to the outside air. The porosity and pore structure of the material will have a serious impact on the material's bulk density, strength and other properties. When the porosity reaches a certain value, the strength of the material will drop sharply. Therefore, quantifying the pore structure is a key issue that needs to be solved urgently to ensure material performance.
[0003] In CT images, surface defects on industrial parts and areas of material contact with the outside air, such as open pores, are referred to as incompletely enclosed cavities. Accurately segmenting incompletely enclosed cavities is a crucial step in industrial CT image processing, and the quality of subsequent image segmentation tasks depends on the quality of the segmentation. Currently, commonly used image segmentation algorithms include global thresholding, local thresholding, edge segmentation, clustering, and deep learning. Because defects such as cracks and pores always have minimum grayscale values, identical to those of the outside air, they are typically addressed using threshold-based segmentation algorithms, such as the iterative optimal thresholding method, the OTSU method, and region growing. However, existing threshold segmentation methods only consider pixel grayscale features, which can easily overestimate or underestimate defect structures. In particular, incompletely enclosed cavities, which have the same grayscale value as air in CT images, cannot be segmented using grayscale-based segmentation algorithms, while convex hull algorithms ignore edge information. With the advancement of artificial intelligence and big data, many deep learning-based segmentation algorithms have been proposed. These algorithms outperform traditional thresholding methods in terms of automation and generalization. However, given the complexity of CT images of certain workpieces and materials, labeling datasets is time-consuming. Therefore, it is of great significance to study the segmentation algorithm of incompletely closed lumen areas.
[0004] Because incompletely enclosed cavities can easily be confused with uneven surfaces on the material or workpiece in CT images, it is difficult to segment defects while preserving edge information. Current segmentation methods suffer from low segmentation accuracy, insufficient ability to segment openings, and over-segmented edges, hindering subsequent image processing and quantitative defect analysis. Summary of the Invention
[0005] In view of this, the purpose of the present invention is to provide a local multi-scale convex hull segmentation algorithm for incompletely closed cavities in CT images, which fully utilizes the pixel distribution information after the image is converted into a binary image, so as to retain the image edge information and accurately segment surface defects.
[0006] In order to achieve the above object, the present invention provides the following technical solutions:
[0007] A method for segmenting an incompletely enclosed lumen region in a CT image comprises the following steps:
[0008] S1: Obtain the industrial CT image to be segmented as a dataset;
[0009] S2: preprocess the image;
[0010] S3: Judge the information around each pixel point, locally connect the outermost points of the incompletely closed inner cavity area such as the opening hole, and form a local multi-scale convex hull.
[0011] Furthermore, the preprocessing in step S2 specifically includes: pre-segmenting the CT image I0 in the data set, segmenting the grayscale image into a binary image I, where the grayscale value of the object is represented as 255 and the grayscale value of air is 0.
[0012] Furthermore, step S3 specifically includes the following steps:
[0013] S31: Traverse the image to find the black pixel I(i,j), obtain a circle with point I(i,j) as the center and a constant r as the radius, where r is a multi-scale parameter; select n diameters at different angles within the circle, and obtain the pixel values at the two end points I(x0,y0) and I(x1,y1);
[0014] S32: Determine the positions of the two end points based on the pixel values. When I(x0, y0) and I(x1, y1) are both inside the material, it is considered that all points on this line segment belong to the incompletely closed cavity area; otherwise, not all points belong to the incompletely closed cavity area.
[0015] S33: While performing step S32, calculate the shortest distance D between the center of the circle I(i, j) and the white edge of the object in the direction perpendicular to the diameter. If the judgment in step S32 is true and the shortest distance is greater than the set initial value λ, execute step S34; otherwise, do not execute step S34.
[0016] S34: assign all pixels on the line segment a value of 255;
[0017] S35: Repeat steps S31-S34 until the traversal of the image is completed.
[0018] Further, after the pre-segmented image is segmented according to step S35, the internal area of the image is filled using morphology to obtain a binary image containing open pores and materials. The pre-segmented image is subtracted from the binary image containing open pores and materials to obtain segmented open pore defects and internal defects.
[0019] Furthermore, before step S31, a step of morphologically filling the internal pores is performed, and the final segmentation result is an open pore area, that is, an incompletely closed inner cavity area.
[0020] The beneficial effects of the present invention are as follows: The present invention addresses the problem that the complexity of industrial CT images makes it difficult for traditional segmentation methods to segment incompletely enclosed lumen regions while preserving edge information. A local multi-scale convex hull image segmentation method is proposed. This method fully utilizes the pixel distribution information of binary images, determines the information surrounding each pixel, and locally connects the outermost points of incompletely enclosed lumen regions, such as openings, to form a local multi-scale convex hull. The method of the present invention can be applied to the segmentation of surface defects or pores in any CT image, achieving accurate segmentation of incompletely enclosed lumen regions in industrial CT images.
[0021] Other advantages, objects, and features of the present invention will be described in part in the following description and, in part, will be apparent to those skilled in the art upon examination of the following description or may be learned from practice of the present invention. The objects and other advantages of the present invention may be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below with reference to the accompanying drawings, in which:
[0023] Figure 1 A flow chart of the local multi-scale convex hull segmentation method provided by an embodiment of the present invention;
[0024] Figure 2 This is an industrial CT image of a composite material according to an embodiment of the present invention;
[0025] Figure 3 is a binary image according to an embodiment of the present invention;
[0026] Figure 4 is a binary image obtained after segmentation according to an embodiment of the present invention;
[0027] Figure 5 This is the segmentation result diagram finally obtained by the present invention. DETAILED DESCRIPTION
[0028] The following describes the embodiments of the present invention by means of specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and the following embodiments and features in the embodiments can be combined with each other without conflict.
[0029] Among them, the accompanying drawings are only for illustrative purposes and represent only schematic diagrams rather than actual pictures, and should not be understood as limiting the present invention. In order to better illustrate the embodiments of the present invention, some parts of the accompanying drawings may be omitted, enlarged or reduced, and do not represent the dimensions of actual products. For those skilled in the art, it is understandable that some well-known structures and their descriptions may be omitted in the accompanying drawings.
[0030] The same or similar numbers in the drawings of the embodiments of the present invention correspond to the same or similar parts; in the description of the present invention, it should be understood that if there are terms such as "upper", "lower", "left", "right", "front", "back", etc. indicating directions or positional relationships, they are based on the directions or positional relationships shown in the drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operate in a specific direction. Therefore, the terms describing the positional relationship in the drawings are only used for illustrative purposes and cannot be understood as limiting the present invention. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.
[0031] Figure 1 This is a flowchart of a local multi-scale convex hull segmentation method for incompletely enclosed inner cavity areas in CT images provided by an embodiment of the present invention. Using a carbon fiber composite industrial CT slice image as an implementation example, the specific segmentation method is as follows:
[0032] Step 1: Obtain the composite material CT image to be segmented as a data set, Figure 2 This is an industrial CT image of a composite material according to an embodiment of the present invention, in which the surface depressions are open holes, i.e., incompletely enclosed inner cavity areas.
[0033] Step 2: Preprocess the image. Preprocess the CT image I0 in the data set and convert the grayscale image into a binary image I, where the grayscale value of the material is 255 (white) and the air is 0 (black). The binary image is obtained as follows: Figure 3 shown.
[0034] Step 3: Traverse the image to find a black pixel point I(i, j), and obtain a circle with the center at the point I(i, j) and a constant r as the radius. The r can be adjusted according to the image size and the size of the defect to be segmented. Select n diameters in different angular directions in the circle, and obtain the pixel values at the two end points I(x0, y0), I(x1, y1) of the diameters;
[0035] Step 4: Determine the positions of the two end points according to the pixel values at the two end points on the diameters in different directions, respectively. When I(x0, y0), I(x1, y1) are both in the material, it is considered that the points on the line segment belong to the open cavity region; otherwise, they do not all belong to the incomplete closed internal cavity region.
[0036] Step 5: At the same time as step 4, find the shortest distance D of the center I(i, j) to the material edge in the direction perpendicular to the diameter. If the result of step 4 is true and the shortest distance is greater than the initial value λ, execute step 6; otherwise, do not execute step 6.
[0037] Step 6: Assign all pixel points on the line segment that meet the conditions to 255 (white);
[0038] Step 7: Repeat steps 3-6 until the traversal of the image is completed.
[0039] After the image is segmented according to the above step 7, the internal region of the image is filled using morphological operations, and a binary image containing open pores and material as shown in Figure 3 is obtained. The pre-segmented Figure 4 is subtracted from Figure 4 , and the segmented open pore defects and internal defects as shown in Figure 3 are obtained. Figure 5 If only the open pores need to be segmented out, a step of morphological filling of the internal pores is performed before step 3, and the other steps remain unchanged. Finally, the segmented open pore region, i.e. the incomplete closed internal cavity region, is obtained.
[0040] Finally, it should be pointed out that the above embodiments are only used to illustrate the technical solutions of the present application and are not limiting. Although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or replaced equivalently without departing from the spirit and scope of the present application, and they should all be included in the scope of the claims of the present application.
Claims
1. A method for segmenting an incompletely enclosed lumen region in a CT image, characterized by: The following steps are involved: S1: Obtain the industrial CT image to be segmented as a dataset; S2: preprocess the image; S3: Determine the information around each pixel point, connect the outermost points of the incompletely closed inner cavity area, and form a local multi-scale convex hull. Step S3 specifically includes the following steps: S31: Traverse the image to find the black pixel I(i,j), obtain a circle with point I(i,j) as the center and a constant r as the radius, where r is a multi-scale parameter; select n diameters at different angles within the circle, and obtain the pixel values at the two end points I(x0,y0) and I(x1,y1); S32: Determine the positions of the two end points based on the pixel values. When I(x0, y0) and I(x1, y1) are both inside the material, it is considered that all points on this line segment belong to the incompletely closed cavity area; otherwise, not all points belong to the incompletely closed cavity area. S33: While performing step S32, calculate the shortest distance D between the center of the circle I(i, j) and the white edge of the object in the direction perpendicular to the diameter; if the judgment in step S32 is true and the shortest distance is greater than the set initial value λ, execute step S34; otherwise, do not execute step S34; S34: assign all pixels on the line segment a value of 255; S35: Repeat steps S31-S34 until the traversal of the image is completed.
2. The method for segmenting an incompletely enclosed lumen region in a CT image according to claim 1, wherein: The preprocessing in step S2 specifically includes: pre-segmenting the CT images in the data set, segmenting the grayscale image into a binary image, where the grayscale value of the object is represented as 255 and the grayscale value of air is 0.
3. The method for segmenting an incompletely enclosed lumen region in a CT image according to claim 1, wherein: After the pre-segmented image is segmented according to step S35, the internal area of the image is filled using morphology to obtain a binary image containing open pores and materials. The pre-segmented image is subtracted from the binary image containing open pores and materials to obtain segmented open pore defects and internal defects.
4. The method for segmenting an incompletely enclosed lumen region in a CT image according to claim 1, wherein: Before step S31, a step of morphologically filling the internal pores is performed, and the final segmentation result is an open pore area, that is, an incompletely closed inner cavity area.
Citation Information
Patent Citations
Solid engines CT image division method
CN101339652A
Strip steel surface defect detection method and system based on image processing
CN115311292A