Artificial intelligence-based endotracheal wall segmentation method
By using an AI-based tracheal wall segmentation method, a weighted undirected graph structure is generated using the porosity index and anisotropic diffusion tensor field. This solves the problem of over-segmentation or under-segmentation in tracheal wall segmentation and achieves high-precision tracheal wall segmentation results.
Patent Information
- Application Number
- CN202611389027.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-08
- Publication Date
- 2026-11-24
AI Technical Summary
Existing image classification techniques are ill-suited to targets with strong directionality and low contrast, such as the tracheal wall, leading to oversegmentation or undersegmentation in CT imaging. Furthermore, conventional algorithms are prone to producing holes or discontinuous gaps when dealing with discontinuous or weak edges.
An AI-based tracheal wall segmentation method is adopted. By receiving tracheal scan images, a sliding window is set to calculate the pixel porosity index, generate a porosity superpixel feature map, calculate the gray-level gradient vector and anisotropic diffusion tensor field, establish a weighted undirected graph structure, set seed points and calculate the minimum cut energy path, and extract the segmented region of the tracheal wall.
It effectively suppresses high-frequency noise interference in medical images, preserves key tissue texture features, enhances boundary continuity, prevents edge blurring, ensures that the segmented region is topologically closed and has smooth edges, and improves the accuracy of low-contrast soft tissue segmentation.
Smart Images

Figure CN123160887A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image classification technology, and in particular to an artificial intelligence-based method for segmenting the tracheal inner wall. Background Technology
[0002] Image classification uses computer algorithms to automatically analyze input images. By extracting low-level or high-level semantic features such as texture, shape, color, and spatial structure, it maps the image or specific units in the image to predefined category labels.
[0003] Existing image classification techniques, typically based on isotropic filters or thresholding mechanisms, struggle to adapt to targets like the tracheal wall, which exhibits strong directionality and low contrast. In practice, due to volumetric effects and respiratory motion artifacts during CT imaging, the grayscale boundary between air within the tracheal lumen and the soft tissue of the tracheal wall often appears blurred and gradual. This makes it difficult for conventional algorithms to pinpoint the true boundary, easily leading to oversegmentation or undersegmentation in areas with similar grayscale values. Furthermore, existing techniques, when constructing inter-pixel relationships, usually only consider brightness and spatial distance, neglecting the geometric orientation information of local anatomical structures. This results in holes or discontinuous gaps in the segmented contour when processing discontinuous or weak edges. Therefore, improvements are needed. Summary of the Invention
[0004] The purpose of this invention is to address the shortcomings of existing technologies by proposing an artificial intelligence-based method for tracheal inner wall segmentation.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: a tracheal inner wall segmentation method based on artificial intelligence, comprising the following steps: Receive a tracheal scan image, set a sliding window to traverse the image pixel matrix, calculate the pixel porosity index, aggregate image pixels into superpixel blocks based on spatial proximity and brightness similarity, map the pixel porosity index into the corresponding superpixel blocks, and generate a porosity superpixel feature map. Based on the porosity superpixel feature map, calculate the gray-level gradient vectors of the superpixel block in the horizontal and vertical directions, obtain the local structural feature values and the corresponding principal feature vectors, calculate the anisotropic diffusion coefficients along the tangent and normal directions of the tracheal wall based on the local structural feature values, and generate anisotropic diffusion tensor fields. Based on the anisotropic diffusion tensor field, each superpixel block is defined as a graph node, connecting edges are established between adjacent graph nodes, the projection magnitude of the connecting edge vector in the anisotropic diffusion tensor field is calculated, the connection weight value between nodes is obtained based on the projection magnitude, and the connection weight value between nodes is loaded onto the corresponding connecting edge to generate a weighted undirected graph structure. Based on the weighted undirected graph structure, seed points for the air region and cartilage ring tissue region in the trachea are set. The maximum flow rate between the seed points through the graph network is calculated. The minimum cut energy path is obtained. The connecting edges on the minimum cut energy path are disconnected and the graph nodes are divided into two independent node sets. The boundary trajectory at the intersection of the node sets is extracted to generate the segmented region of the trachea inner wall.
[0006] Preferably, the step of obtaining the porosity superpixel feature map is as follows: The pixel matrix of the tracheal scan image is received and a fixed-size sliding window is set to traverse the entire image row by row and column by column. The average value and standard deviation of the pixel gray level are calculated in each sliding window. The center pixel coordinates and gray level distribution characteristics of each window are recorded. Sliding windows with a gray level average value lower than the set background threshold are removed to obtain the gray level statistics of the sliding window. Calculate the pixel porosity index based on the grayscale statistics of the sliding window; Based on the pixel porosity index of each pixel, pixels are aggregated by combining spatial proximity and brightness similarity. The calculated pixel porosity index is mapped to the corresponding superpixel block, and the mean value of the pixel porosity index is calculated in each superpixel block to generate a porosity superpixel feature map.
[0007] Preferably, the steps for obtaining the local structural feature values and the corresponding principal feature vectors are as follows: Based on the aforementioned gap density superpixel feature map, for each superpixel block, extract the gray-level difference sequence of adjacent pixels in the horizontal direction and the gray-level difference sequence of adjacent pixels in the vertical direction according to the pixel coordinates. Calculate the average absolute difference between the gray-level difference sequences of adjacent pixels in the horizontal direction and the gray-level difference sequences of adjacent pixels in the vertical direction, and represent the gray-level gradient of each superpixel block with ordered binary components to obtain the set of gray-level gradient vectors of the superpixel block. Based on the set of gray-level gradient vectors of the superpixel blocks, the squares of the horizontal components, the squares of the vertical components, and the product of the two components are averaged for each superpixel block to construct the structure tensor matrix of each superpixel block. The eigenvalue decomposition process of the structure tensor matrix is called and the direction information is recorded according to the vector corresponding to the largest eigenvalue to generate local structural eigenvalues and the corresponding main eigenvectors.
[0008] Preferably, the steps for obtaining the anisotropic diffusion tensor field are as follows: Based on the local structural eigenvalues and the corresponding principal eigenvectors, linear stretching is performed according to the eigenvalue range to obtain the tangential diffusion coefficient and the normal diffusion coefficient is obtained according to the same rule. The two diffusion coefficients are decomposed along the principal eigenvectors and tensor entries are combined between adjacent superpixel blocks to generate an anisotropic diffusion tensor field.
[0009] Preferably, the step of obtaining the connection weight values between nodes is as follows: Based on the anisotropic diffusion tensor field, each superpixel block is defined as a graph node. Candidate adjacent superpixel block pairs are generated according to the pixel four-connection and eight-connection relationships. The number of common boundary pixels of each pair of superpixel blocks is counted and the combination with zero common boundary pixels is filtered out. A connection edge vector is generated by connecting the center coordinates of each pair of superpixel blocks and the endpoint index is recorded to form a set of adjacent graph node connection edges. Based on the set of adjacent graph node connection edges, sampling points are selected at equal intervals along each connection edge vector on the anisotropic diffusion tensor field, and the principal feature vector at the sampling point is read. The absolute value of the direction cosine of the connection edge vector and the principal feature vector at each sampling point is calculated, and the average of the sampling sequence is taken to obtain the projection magnitude of the connection edge. Based on the distribution of the projection magnitude of the connection edge, the tangent direction threshold and the normal direction threshold are extracted. Connection edges whose projection magnitude is not less than the tangent direction threshold are marked as tangent direction connections and assigned an upper weight bound. Connection edges whose projection magnitude is not greater than the normal direction threshold are marked as normal direction connections and assigned a lower weight bound. Connection edges between the two thresholds are assigned a value between the lower weight bound and the upper weight bound by linear interpolation, generating the connection weight value between nodes.
[0010] Preferably, the steps for obtaining the weighted undirected graph structure are as follows: Based on the connection weight values between nodes, the connection weight values between nodes are written into the weight attribute of the corresponding connection edge, and the bidirectional records of the same node pair are merged into an undirected single record. The index consistency between the graph node set and the connection edge set is maintained, and a weighted undirected graph structure is generated.
[0011] Preferably, the step of obtaining the minimum cut energy path is as follows: Based on the weighted undirected graph structure, extract all graph nodes and connection edge information, label the seed point of the air region in the tracheal lumen as the source node and label the seed point of the cartilage ring tissue region as the sink node, establish a capacity mapping table for all connection edges and record the connection direction, and generate a capacity view. Calculate the maximum flow rate based on the capacity view; Based on the convergence state of the maximum flow, a reachability search is performed on the residual graph starting from the source node. All reachable nodes are divided into a source-side node set, and the remaining nodes form a sink-side node set. All edges connecting the source-side node set and the sink-side node set are extracted and identified as the minimum cut edge set, generating a minimum cut energy path.
[0012] Preferably, the step of obtaining the segmented region of the tracheal inner wall is as follows: Based on the minimum cut energy path, in the weighted undirected graph structure, the connecting edges on the minimum cut energy path are deleted one by one in the order of the minimum cut energy path. The remaining connecting edges are used to perform a connectivity search on all graph nodes and divide them into two independent node sets according to reachability. The geometric positions corresponding to the deleted connecting edges are collected along the boundary of the two independent node sets and rearranged in adjacency order to obtain a continuous boundary trajectory. The continuous boundary trajectory is mapped into a closed curve according to the pixel index of the connecting edge, and the region is filled with the inside of the closed curve to generate the segmented region of the tracheal inner wall.
[0013] Compared with the prior art, the advantages and positive effects of the present invention are as follows: In this invention, a tracheal scan image is received, and a sliding window is used to traverse the pixel matrix. The pixel porosity index is calculated, and pixels are aggregated into superpixel blocks by combining spatial proximity and brightness similarity. The porosity index is then mapped to generate a feature map. This process suppresses high-frequency noise interference commonly found in medical images while preserving key tissue texture features. Dimensionality reduction reduces subsequent computational complexity. Based on the porosity feature map, the gradient vector and structure tensor matrix of the superpixel blocks are calculated. Principal feature vectors are then obtained, and an anisotropic diffusion tensor field is generated. This tensor field describes the local geometric direction of the tracheal wall, allowing features to diffuse smoothly along the tangent direction while remaining blocked along the normal direction. This enhances boundary continuity while preventing edge blurring. A weighted undirected graph is constructed based on this tensor field, and the graph is then processed by... The connection weights between nodes are determined by calculating the projection magnitude of the edge vectors in the tensor field. The tangential direction of the tracheal wall is assigned a high weight and the normal direction a low weight. This construction method successfully embeds the geometric constraints of the anatomical structure into the graph topology, ensuring that the graph model can perceive the directionality of the tissue. By setting seed points for the tracheal lumen and cartilage rings and calculating the maximum flow rate, the saturated bottleneck edges in the flow network are identified. The minimum cut energy path is obtained and the connection edges are broken, realizing the independent set partitioning of graph nodes and the extraction of boundary trajectories. This segmentation strategy based on global optimization can overcome the boundary breakage problem caused by local gray-level inhomogeneity or artifacts, ensuring that the final segmented region is topologically closed and has smooth edges, restoring the true anatomical morphology of the tracheal inner wall and improving the accuracy of segmentation for low-contrast soft tissue. Attached Figure Description
[0014] Figure 1 This is a schematic diagram of the steps of the present invention. Detailed Implementation
[0015] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0016] Please see Figure 1This invention provides a technical solution: a method for segmenting the tracheal inner wall based on artificial intelligence, comprising the following steps: Receive tracheal scan images, set a sliding window to traverse the image pixel matrix, calculate the pixel porosity index, aggregate image pixels into superpixel blocks based on spatial proximity and brightness similarity, map the pixel porosity index to the corresponding superpixel blocks, and generate a porosity superpixel feature map. Based on the porosity superpixel feature map, calculate the gray-level gradient vectors of the superpixel block in the horizontal and vertical directions, obtain the local structural feature values and the corresponding principal feature vectors, calculate the anisotropic diffusion coefficients along the tangent and normal directions of the tracheal wall based on the local structural feature values, and generate anisotropic diffusion tensor fields. Based on the anisotropic diffusion tensor field, each superpixel block is defined as a graph node, connecting edges are established between adjacent graph nodes, the projection magnitude of the connecting edge vector in the anisotropic diffusion tensor field is calculated, the connection weight value between nodes is obtained based on the projection magnitude, and the connection weight value between nodes is loaded onto the corresponding connecting edge to generate a weighted undirected graph structure. Based on the weighted undirected graph structure, seed points for the air region and cartilage ring tissue region in the trachea are set. The maximum flow rate between the seed points through the graph network is calculated, the minimum cut energy path is obtained, the connecting edges on the minimum cut energy path are disconnected, and the graph nodes are divided into two independent node sets. The boundary trajectory at the intersection of the node sets is extracted to generate the segmented region of the trachea inner wall.
[0017] The steps for obtaining the porosity superpixel feature map are as follows: The pixel matrix of the tracheal scan image is received and a fixed-size sliding window is set to traverse the entire image row by row and column by column. The average value and standard deviation of the pixel gray level are calculated in each sliding window. The center pixel coordinates and gray level distribution characteristics of each window are recorded. Sliding windows with a gray level average value lower than the set background threshold are removed to obtain the gray level statistics of the sliding window. Based on the grayscale statistics of the sliding window, the pixel porosity index is calculated using the following formula: ; in, Located at pixel coordinates The pixel porosity index at that location In pixels The standard deviation of pixel grayscale within the centered sliding window. This represents the average grayscale value of the pixels within the sliding window. As a texture sensitivity adjustment factor, To prevent extremely small positive numbers with a denominator of zero, The prior average gray value of the target tissue represents the typical gray value of the tracheal wall or cartilage rings. The prior standard deviation of the target grayscale is used to control the tolerance for the target grayscale range; Based on the pixel porosity index of each pixel, pixels are aggregated by combining spatial proximity and brightness similarity. The calculated pixel porosity index is mapped to the corresponding superpixel block, and the mean value of the pixel porosity index is calculated in each superpixel block to generate a porosity superpixel feature map.
[0018] Specifically, the two-dimensional pixel matrix data of the tracheal scan image is read. This matrix is typically 512x512 or larger high-resolution single-channel grayscale data. The size parameters of the sliding window are set, for example, a 5x5 pixel rectangular area is used as the local observation window. The size is determined based on the ratio of the average thickness of the tracheal wall to the image resolution to ensure that the window can cover local texture details without introducing too much background noise. The sliding window is controlled to move pixel by pixel on the image matrix in a left-to-right, top-to-bottom order, with each movement step set to 1 pixel to ensure coverage of all possible pixel neighborhoods. Within each currently occupied sliding window, the grayscale values of all 25 pixels are extracted and used... Statistical methods are used to calculate the average grayscale values within the window, serving as an indicator of the local brightness level. Simultaneously, the standard deviation of the grayscale values within the window is calculated. This is achieved by taking the square root of the sum of squares of the sum of the squares of the average and the total number of pixels minus one, then dividing by the total number of pixels. This square root yields an indicator of local texture roughness. The calculated mean and standard deviation are correlated and stored in a feature matrix indexed by the center pixel coordinates of the window. To exclude irrelevant atmospheric background areas and reduce subsequent computation, a background threshold needs to be determined. This threshold is determined by statistically analyzing the grayscale histogram of the entire image, identifying low grayscale peaks representing air and higher grayscale peaks representing soft tissue, and finding the grayscale values corresponding to the valleys between these two peaks. For example, this can be achieved by searching the histogram... Figure 1 The zero point where the first derivative turns from negative to positive is set as the background threshold. For example, if the calculated threshold is -900HU, the mean gray value of the current window is read in real time during the traversal and compared with the set background threshold. If the mean is less than the threshold, the center pixel of the window is determined to be in the air background and is directly marked as invalid or zero. If the mean is greater than or equal to the threshold, the center coordinates of the window and the calculated gray distribution characteristics are retained. Finally, all the retained valid data are summarized to obtain the gray statistics of the sliding window.
[0019] In the pixel porosity index calculation formula, the feature response of the tracheal inner wall region is specifically enhanced by combining the non-uniformity of local texture with the brightness similarity of the target tissue. The first term utilizes the relationship between the inverse exponential function and local variance, so that boundary regions with complex textures and large variances receive higher weights, while smooth regions receive weights close to zero. In this term, the numerator and denominator are both squared gray values, and the exponent is dimensionless after division. The second term utilizes the characteristics of the Gaussian function, so that pixels with gray values close to the prior mean of the target tissue receive weights close to 1, while the weights of pixels far from the target decay rapidly.
[0020] Represented in pixels The standard deviation of pixel grayscale within the central sliding window, in HU (Hounsfield Units), is used to quantify the texture complexity or grayscale fluctuation of a local region. It is obtained by: during image preprocessing, using the current pixel... Build a center (For example Extract all local neighborhood windows within that window. For a sequence of gray values of pixels, first calculate the average value of the sequence, then calculate the square of the difference between the gray value of each pixel and the average value, sum all the squares of the differences and divide by the total number of pixels (or the total number of pixels minus one), and finally take the square root of the result to obtain the standard deviation. For example, in a certain calculation, the distribution of pixel gray values within the window is relatively messy, and the calculated standard deviation is 35.5HU.
[0021] This parameter represents the average grayscale value of pixels within the sliding window, measured in HU. It reflects the overall brightness level of a local area and is obtained through the following steps: (Similarly, based on the above...) Centered Slide the window, sum the grayscale values of all pixels within the window to obtain the total grayscale value, and then divide the total grayscale value by the number of pixels in the window. This yields the average grayscale value of the local area. This value can smooth out the influence of single-point noise and reflect the macroscopic brightness attributes of the location. For example, in the window mentioned above, the average value obtained by dividing the sum of all pixel grayscale values by 25 is 120.0 HU.
[0022] The texture sensitivity adjustment factor is a dimensionless constant. This parameter is used to balance the suppressive effect of the mean on the texture response. The steps to obtain it are as follows: Select a set of typical training images containing a clear tracheal inner wall and a blurred soft tissue boundary, and extract the mean gray-level variance of the inner wall boundary region and the smooth soft tissue region respectively. (unit )and (unit ), and the corresponding grayscale mean square. (unit A signal-to-noise ratio (SNR) comparison function is constructed, and the difference in PI values between the two regions is maximized through iterative search. The calculation formula is as follows: ,in This is an empirical coefficient, typically between 0.01 and 0.1, with the numerator and denominator units canceling each other out. For example, it can be calculated through statistical analysis of 10 standard CT slices. The setting value is 0.02.
[0023] This represents the smallest positive integer that prevents the denominator from being zero, and its unit is 1. Set to 0.001 .
[0024] This parameter represents the prior average gray value of the target tissue, in HU (hull unit). It represents the typical gray level of the tracheal wall or cartilage rings. The steps for obtaining this parameter are as follows: A senior radiologist manually delineates the ROI (Region of Interest) of the tracheal ring cartilage and inner wall tissue from at least 20 representative tracheal CT scan images. The gray values of all pixels within these regions are extracted, and a gray-level distribution histogram is constructed. A Gaussian fitting method is used to find the position of the main peak of the histogram; the gray level corresponding to this peak is the gray value. For example, through statistical analysis of a large number of samples, the typical gray mean value of the tracheal cartilage rings was determined to be 150.0 HU.
[0025] This represents the prior standard deviation of the target organization's grayscale, in HU units. This parameter controls the tolerance for the target grayscale range. The steps to obtain it are as follows: Within the manually drawn ROI area, calculate... Based on this, calculate the grayscale values of all pixels within the ROI relative to... To enhance the inclusiveness of variation, the standard deviation of the statistical standard deviation is usually set to 1.5 to 2 times the calculated statistical standard deviation as the parameter value. For example, if the calculated statistical standard deviation is 20 HU, then the parameter value is set to... It is 30.0 HU.
[0026] Calculations based on parameters: Select a pixel at the edge of the tracheal wall Perform a calculation exercise, substituting the previously obtained parameter values: HU; HU; ; ; HU; HU; Calculate the first item (texture item): Denominator: ; molecular: ; Internal score of the index: ; First value: ; Calculate the second term (brightness similarity term): molecular: ; Denominator: ; Internal score of the index: (dimensionless); Second value: ; Total Index : ; The pixel porosity index of this pixel is 0.5989, which is relatively high. This indicates that the pixel has both strong texture fluctuation (Term1 close to 1) and a gray level close to the target tissue (Term2 about 0.6), which is consistent with the characteristics of the tracheal wall. If the pixel is smooth tissue (e.g., s=5), then Term1 will drop to about 0.08, resulting in an extremely low total index, thereby achieving suppression of non-target areas.
[0027] Based on the porosity index matrix calculated in the previous step, the seed points for the superpixel segmentation algorithm are initialized. An improved version of the linear iterative clustering algorithm (SLIC) is used to uniformly generate an initial cluster center grid on the image plane at a preset step size, such as every 10 pixels. Each cluster center includes not only its geometric coordinates on the image plane, but also... and It also includes the original grayscale intensity at that location. and the calculated pixel porosity index A multi-dimensional feature space is constructed, defining a comprehensive distance metric between pixels and cluster centers. This metric is composed of a weighted average of spatial Euclidean distance, brightness difference distance, and porosity index difference distance. To eliminate the influence of different units (pixel coordinates, HU brightness, and ratio porosity), the distance calculation is normalized by dividing by their respective maximum expected range values. For each pixel in the image, a cluster center within its finite neighborhood is searched, and the comprehensive distance between the pixel and each candidate center is calculated. The pixel is then assigned to the cluster center with the smallest distance. After one assignment, the mean geometric coordinates, mean grayscale, and mean porosity index of all pixels within each cluster are recalculated, updating the position and features of the cluster centers. This assignment and update process is repeated until a cluster center is found. The pixel aggregation process is completed when the positional change is less than a preset convergence threshold, such as less than 0.5 pixels, or when the preset maximum number of iterations, such as 10, is reached. Post-processing is then performed on the generated superpixel blocks to check for isolated tiny fragments with an area smaller than a preset threshold, such as less than 20 pixels. If such fragments exist, they are merged into the adjacent superpixel blocks with the smallest difference in their comprehensive features based on their adjacency relationship, in order to ensure the connectivity and integrity of the region. Finally, each generated superpixel block is traversed, and the pixel porosity index corresponding to all pixels in the block is extracted. The average value is calculated and used as the porosity feature attribute of the superpixel block. A mapping map that reflects the local tissue porosity structure features and corresponds to the superpixel segmentation result of the original image is constructed, generating a porosity superpixel feature map.
[0028] The steps for obtaining local structural feature values and corresponding principal feature vectors are as follows: Based on the gaps in the superpixel feature map, the gray-level difference sequence of adjacent pixels in the horizontal direction and the gray-level difference sequence of adjacent pixels in the vertical direction are extracted for each superpixel block according to the pixel coordinates. The average absolute difference between the gray-level difference sequence of adjacent pixels in the horizontal direction and the gray-level difference sequence of adjacent pixels in the vertical direction are calculated respectively. The gray-level gradient of each superpixel block is represented by ordered binary components to obtain the set of gray-level gradient vectors of the superpixel block. Based on the set of gray-level gradient vectors of superpixel blocks, the horizontal component square, the vertical component square, and the product of the two components are averaged for each superpixel block to construct the structure tensor matrix of each superpixel block. The eigenvalue decomposition process of the structure tensor matrix is called and the direction information is recorded according to the vector corresponding to the largest eigenvalue to generate local structural eigenvalues and the corresponding main eigenvectors.
[0029] Specifically, based on the tracheal void space superpixel feature map generated in the previous steps, the index marker of each independently divided superpixel block in the feature map and the two-dimensional position coordinates of all pixels contained in that block are read. For each independent superpixel block, each pixel contained within the block is traversed, and the grayscale value of the original image at the corresponding position is read. In order to accurately capture the edge direction of the fine structure of the tracheal inner wall, the grayscale change of each pixel in the horizontal and vertical directions is calculated separately, using the central difference method or the forward difference method. For example, for the horizontal direction, the grayscale value of the current pixel is obtained by subtracting the grayscale value of the adjacent pixel to the right; for the vertical direction, the grayscale value of the current pixel is obtained by subtracting the grayscale value of the adjacent pixel below. The absolute values of the horizontal differences of all pixels in the superpixel block are accumulated and divided by . The total number of pixels within a block yields the average grayscale change rate of that block in the horizontal direction. Similarly, the average grayscale change rate in the vertical direction is calculated. These two values represent the texture fluctuation intensity of the superpixel block along two orthogonal axes of the image plane. They are combined into an ordered binary array as a basic feature describing the texture directionality of the local region. For pixels located at the edge of a superpixel block, if their neighboring pixels belong to another superpixel block, only the pixel difference within the same block is calculated, or an edge filling strategy is used to avoid cross-region interference, ensuring that the gradient calculation only reflects the texture characteristics within the current block. The above calculation process is repeated for all superpixel blocks. The horizontal and vertical gradient components calculated for each block are stored in block index order to form a set of superpixel block grayscale gradient vectors containing texture direction information of the entire image.
[0030] The purpose of using the aforementioned set of superpixel grayscale gradient vectors is to extract the dominant texture direction and structural intensity of each superpixel block through mathematical transformations. For each superpixel block, the horizontal gradient components of all pixels within it are extracted. and vertical gradient components Construct a structure tensor matrix that can describe the local geometric structure of the image. The calculation formula is as follows: ; in, This represents the structure tensor matrix of the current superpixel block. This represents the set of coordinates of all pixels within the current superpixel block. This represents a Gaussian weighting function, used to assign higher weights to the center pixel to smooth out noise. Represents pixels The horizontal grayscale gradient at that location Represents pixels The vertical grayscale gradient at a given location is calculated by summing the pixels within the block, integrating the pixel-level gradient information into a block-level structural description matrix. Next, this matrix is used to... Symmetric positive semidefinite matrix Perform eigenvalue decomposition and solve the characteristic equation. Two non-negative eigenvalues were obtained. and (For example ), and the corresponding main feature vector and secondary eigenvectors ,in It reflects the energy in the direction of the most drastic gray-level change within the local neighborhood, that is, the direction perpendicular to the edge. It reflects the energy of grayscale changes along the edge direction. The direction of maximum change in the grayscale gradient is indicated, and the calculated maximum eigenvalue is obtained. As local structural feature values, the corresponding feature vector These two parameters are recorded as the principal feature vectors and normalized to characterize the local geometric properties of the tracheal wall or cartilage ring edge, thereby generating local structural feature values and corresponding principal feature vectors.
[0031] The steps for obtaining the anisotropic diffusion tensor field are as follows: Based on the local structural eigenvalues and the corresponding principal eigenvectors, linear stretching is performed according to the eigenvalue range to obtain the tangential diffusion coefficient and the normal diffusion coefficient is obtained according to the same rule. The two diffusion coefficients are decomposed along the principal eigenvectors and tensor entries are combined between adjacent superpixel blocks to generate an anisotropic diffusion tensor field.
[0032] Specifically, based on the extracted local structural feature values and corresponding principal feature vectors, a tensor field is constructed to guide the subsequent segmentation path search. First, a mapping relationship from structural feature values to diffusion coefficients needs to be defined. The aim is to enhance diffusion along the edge direction (tangential direction) of the tracheal inner wall and weaken diffusion along the direction perpendicular to the edge (normal direction) to prevent edge blurring. The mapping function for the diffusion coefficients is then set, starting by statistically analyzing the structural feature values of all superpixel blocks in the entire image. The distribution range, to obtain the maximum eigenvalue. and minimum eigenvalue Set the tangential diffusion coefficient The calculation formula is: ; in, This represents the tangential diffusion coefficient, with a value range of [value range missing]. between, This is a preset minimum diffusion basis value used to ensure basic connectivity; for example, it can be set to 0.1. This is the sensitivity control constant, for example, set to 0.5. These are the local structural feature values of the current superpixel block. and These are the maximum and minimum eigenvalues of the entire map obtained statistically. This formula makes the diffusion coefficient of regions with smaller eigenvalues (flat areas) close to 1, and the diffusion coefficient of regions with larger eigenvalues (edge areas) close to 1. Similarly, the diffusion coefficient in the normal direction is set. Adopted and The opposite mapping logic can be set to a smaller constant to suppress cross-edge diffusion, for example in... Force setting at larger edges Then, an anisotropic diffusion tensor is constructed using the calculated coefficients and principal eigenvectors. The calculation formula is: ; in, Let be the anisotropic diffusion tensor of the current superpixel block. For the principal eigenvector and secondary eigenvectors The rotation matrix formed, Diffusion coefficient in the normal direction and tangential diffusion coefficient The resulting diagonal matrix is used to rotate the anisotropic diffusion properties defined along the feature axes back to the global coordinate system using this formula, and the tensor of each superpixel block is calculated. These tensors are then combined according to their spatial positions to generate an anisotropic diffusion tensor field.
[0033] The steps to obtain the connection weight values between nodes are as follows: Based on the anisotropic diffusion tensor field, each superpixel block is defined as a graph node. Candidate adjacent superpixel block pairs are generated according to the pixel four-connectivity and eight-connectivity relationships. The number of common boundary pixels of each pair of superpixel blocks is counted and the combination with zero common boundary pixels is filtered out. The connection edge vector is generated by connecting the center coordinates of each pair of superpixel blocks and the endpoint index is recorded to form a set of adjacent graph node connection edges. Based on the set of adjacent graph node connection edges, sampling points are selected at equal intervals along each connection edge vector on the anisotropic diffusion tensor field, and the principal eigenvectors at the sampling points are read. The absolute value of the direction cosine of the connection edge vector and the principal eigenvector at each sampling point is calculated, and the average of the sampling sequence is taken to obtain the projection magnitude of the connection edge. Based on the distribution of the projection magnitude of the connection edge, the tangent direction threshold and the normal direction threshold are extracted. Connection edges whose projection magnitude is not less than the tangent direction threshold are marked as tangent direction connections and assigned an upper weight bound. Connection edges whose projection magnitude is not greater than the normal direction threshold are marked as normal direction connections and assigned a lower weight bound. Connection edges between the two thresholds are assigned a value between the lower weight bound and the upper weight bound by linear interpolation, generating the connection weight values between nodes.
[0034] Specifically, based on the generated anisotropic diffusion tensor field, each superpixel block in the image is treated as an independent node in a graph theory network. The unique identifier of each superpixel block and its contained pixel set information are read. Initial connection candidates between nodes are established based on the spatial adjacency relationships of image pixels. All superpixel blocks are traversed. For each central superpixel block, firstly, directly adjacent superpixel blocks sharing at least one pixel edge (i.e., four-connected neighbors) are checked. Then, diagonally adjacent superpixel blocks that only touch through pixel corners (i.e., eight-connected neighbors) are checked. All adjacent blocks meeting the conditions are considered candidate neighbor nodes for the central block. For each determined pair of adjacent superpixel blocks, the specific number of pixels sharing a common boundary between them is counted. Calculating this number is to assess the tightness of their spatial contact. If the number of pixels sharing a common boundary between a pair of superpixel blocks is zero, it indicates that they are not actually in direct spatial contact, belonging to a misjudgment or weak connection, and are directly removed from the adjacency list. For the remaining valid pairs of adjacent superpixel blocks, the geometric center coordinates of both are extracted. and Using these two coordinate points, construct a straight line segment on a two-dimensional plane as the connecting edge, and calculate the... point to vector And record the node indices at both ends of the connecting edge. and The entire graph is traversed to determine the adjacency relationships of all nodes and construct vectors. All valid adjacency relationships are then summarized to form a set of connecting edges between adjacent graph nodes.
[0035] Based on the established set of connecting edges between adjacent graph nodes, process each connecting edge in the set one by one. For each connecting node... and Connecting edge vectors In the image space corresponding to the anisotropic diffusion tensor field, along the connecting line segment A series of discrete sampling points are selected at a preset fixed step size (e.g., every 1 pixel). At each sampling point, the principal feature vector of the anisotropic diffusion tensor corresponding to the superpixel block at that location is read. (This vector indicates the main direction of the local texture or edge), calculate the connecting edge vector. With the principal eigenvector of that point The absolute value of the direction cosine between them, i.e. The closer this value is to 1, the more parallel (tangential) the direction of the connecting edge is to the local texture direction; the closer it is to 0, the more perpendicular (normal) it is to the local texture direction. The average of the absolute values of the direction cosines calculated from all sampling points on the connecting edge yields the projection modulus of the connecting edge. Calculate the histogram of the projection magnitude distribution of all connected edges in the entire graph, and set the tangent direction threshold based on the distribution characteristics. With normal direction threshold The process for setting these two thresholds is as follows: First, calculate the mean of the projection modulus of all connected edges. with standard deviation For example, if the mean is 0.6 and the standard deviation is 0.2, set... (e.g., 0.7), set (For example, 0.5). This setting is based on statistical principles, considering connections above the mean by a certain margin as significant tangent connections and those below the mean by a certain margin as significant normal connections. For each connection edge, if its projected magnitude... If it is a tangential connection, it is assigned a high weight. (For example, set to 0.9), if If the connection is in the normal direction, it is determined to be connected and assigned a low weight. (For example, set to 0.1), if Then, a linear interpolation formula is used to assign intermediate weights: For example, if the modulus of a connecting edge is 0.6, then the weight is calculated as follows: This process assigns weights to each edge, reflecting the structural characteristics of tight connections along the tracheal wall and sparse connections perpendicular to the tracheal wall, and generates connection weight values between nodes.
[0036] The steps to obtain the structure of a weighted undirected graph are as follows: Based on the connection weight values between nodes, the connection weight values between nodes are written into the weight attribute of the corresponding connection edge, and the bidirectional records of the same node pair are merged into an undirected single record. The index consistency between the graph node set and the connection edge set is maintained, and a weighted undirected graph structure is generated.
[0037] Specifically, based on the calculated connection weights between nodes, each edge in the set of adjacent graph node connection edges is traversed, and its corresponding weight value is read. This value is written as an attribute parameter into the edge attribute list of the graph data structure. Since it is an undirected graph, it is necessary to handle the possible bidirectional record redundancy and check whether there are node pairs. and If duplicate entries exist, it is checked whether their weights are consistent, and they are merged into a single undirected edge record. Typically, only records with smaller indices pointing to larger nodes are retained to save storage space. Simultaneously, a mapping table is established between node indices and actual superpixel block features to ensure the integrity of nodes in the graph structure. Corresponding one-to-one with the previous superpixel block index, after completing the weight assignment and record merging of all edges, a complete adjacency matrix or adjacency list data structure is constructed. This structure contains all graph nodes and connecting edges carrying specific weights, thereby generating a weighted undirected graph structure.
[0038] The steps to obtain the minimum cut energy path are as follows: Based on the weighted undirected graph structure, extract all graph nodes and connection edge information, label the seed point of the air region in the tracheal lumen as the source node and label the seed point of the cartilage ring tissue region as the sink node, establish a capacity mapping table for all connection edges and record the connection direction, and generate a capacity view. Based on the capacity view, the maximum flow rate is calculated using the following formula: ; in, For the first Total flow value after the next iteration, initial value , For the first The augmenting path from source node S to sink node T in the residual graph during the next iteration. To augment the residual capacity of the edge (u,v) on the path, Indicates the bottleneck capacity of the path. Let be the gap density superpixel feature value of the u-th node in the path. This represents the number of intermediate nodes in the path, excluding the source node S and the sink node T. This represents the average porosity characteristic of all nodes in the entire graph. This is the characteristic gain adjustment constant, used to control the exponential amplification intensity; Based on the convergence state of the maximum flow, a reachability search is performed on the residual graph starting from the source node. All reachable nodes are divided into a source-side node set, and the remaining nodes form a sink-side node set. All edges connecting the source-side node set and the sink-side node set are extracted and identified as the minimum cut edge set, generating a minimum cut energy path.
[0039] Specifically, based on the established weighted undirected graph structure, the index identifiers of all graph nodes, as well as the weight attributes and topological relationships of the edges connecting each node, are comprehensively extracted. Typical air regions within the trachea are manually or automatically identified in the image. For example, the location with extremely low grayscale and the largest connected region area at the center of the image is selected, and its corresponding superpixel block is marked as the source node, representing the starting injection point of the fluid network. Similarly, at the image edges or in clearly highlighted soft tissue areas, superpixel blocks representing the cartilage ring or surrounding tissue are selected based on anatomical prior knowledge and marked as sink nodes, representing the outflow and convergence points of the fluid network. To construct the network flow model, each undirected connection edge in the graph is divided into... The solution is to use two directed edges in opposite directions, and initialize the capacity value of each directed edge. The capacity value is set directly by referencing the weight value of the edge in the weighted undirected graph. That is, the larger the weight of the edge, the greater the virtual flow allowed to pass through, reflecting the tightness of the organizational connection in that direction. At the same time, a capacity mapping table is established to record the connection direction between each pair of nodes and its corresponding initial capacity in the form of key-value pairs. For all edges originating from the source node, their capacity is set to infinity to ensure that the fluid can be fully injected into the network. For all edges connected to the sink node, sufficient capacity is also given to prevent the outlet from being blocked. Finally, a complete network topology containing nodes, directed edges and their capacity constraints is formed, generating a capacity view.
[0040] The maximum flow rate calculation formula introduces a flow rate gain mechanism based on porosity characteristics, which exponentially amplifies the flow rate through areas with typical tracheal wall characteristics (high porosity index), thereby guiding the minimum cut to occur preferentially in these characteristic areas. The exponential term acts as a "characteristic excitation factor". When the average characteristic on the path is stronger than the average level of the whole map, the flow rate is amplified, and vice versa.
[0041] Indicates the first The total flow rate after the next iteration is dimensionless, and its initial value is... This parameter is used to accumulate and record the total throughput from the source to the sink in the network. The steps to obtain it are as follows: It is initialized to 0 at the beginning of the algorithm. After each iteration of finding augmenting paths, the effective incremental throughput calculated in this iteration is added to the total throughput of the previous round. For example, if the increment is calculated to be 5.0 in the first iteration, then... .
[0042] Indicates the first In the next iteration, the augmenting path from the source node S to the sink node T in the residual graph is obtained as an ordered sequence of nodes. The steps are as follows: Using a breadth-first search (BFS) or depth-first search (DFS) algorithm, search the current residual network for a path starting from the source node, passing through a series of intermediate nodes, and finally reaching the sink node. The remaining capacity of each edge on the path must be greater than zero. For example, if a path is found... .
[0043] Indicates the upper edge of the augmenting path The residual capacity is dimensionless and reflects the remaining throughput of each connecting edge on the current path. It is obtained by reading each edge in the path. The remaining value after subtracting used traffic from the initial capacity is the current available capacity for a new path, for example, on path... Middle, side The capacity is 10. The capacity is 5. If the capacity is 8, then the residual capacities of each side are 10, 5, and 8, respectively.
[0044] This parameter represents the bottleneck capacity of the path, is dimensionless, and determines the maximum physical flow capacity of the current path without considering feature gain. It is obtained by traversing the current augmenting path. Residual capacity of all edges The minimum value is selected as the bottleneck value. For example, if the minimum value in the above path is 5, then the bottleneck capacity is 5.
[0045] Indicates the first in the path The porosity superpixel feature value of each node is dimensionless. This parameter quantifies the local organization characteristics of the region traversed by the path. The steps to obtain it are as follows: based on the nodes... The index is directly retrieved from the table in the "Gapility Superpixel Feature Map" generated in the previous steps, showing the mean gapility index of the corresponding superpixel block. For example, the index of node A... Node B .
[0046] This parameter represents the number of intermediate nodes in the path excluding the source node S and the sink node T. It is dimensionless and used to calculate the average level of the path characteristics. The steps to obtain this parameter are: count the total number of nodes in the path sequence and subtract 2 (excluding the start and end points). For example, for the path... The middle nodes are A and B, and the number of nodes is 2.
[0047] This represents the mean value of the porosity feature of all nodes in the entire graph. It is dimensionless and serves as a baseline for judging the quality of path features. The steps to obtain it are as follows: traverse all superpixel nodes in the graph, accumulate their porosity feature values and divide by the total number of nodes. For example, if there are 1000 nodes in the entire graph and the sum of the feature values is 500, then the mean value is 0.5.
[0048] This represents the feature gain adjustment constant, which is dimensionless. This parameter controls the exponential amplification intensity. The steps to obtain it are as follows: Set a set of candidate values (e.g., 0.5, 1.0, 1.5, 2.0), run the segmentation algorithm on the validation set, calculate the Dice coefficient between the segmentation result and the gold standard, and select the value that maximizes the Dice coefficient. For example, after testing, set... .
[0049] Calculations based on parameters: For example, the current iteration is the 1st iteration ( ), Path found .
[0050] Bottleneck capacity .
[0051] The feature values of intermediate nodes A and B in the path are respectively Number of intermediate nodes .
[0052] Overall mean .
[0053] Adjustment constant .
[0054] Path average eigenvalue: ; Characteristic differences: ; Index item: ; This traffic increase: ; Update total traffic: ; Because the area traversed by this path has a high porosity feature (average 0.75 > full graph 0.5), its flow contribution is amplified by about 28.4%, which means that the algorithm is more inclined to let the "fluid" pass through these feature-rich areas. This makes it easier for the final minimum cut (i.e. the flow saturation break) to occur at the boundary position where the feature is weak or the flow is blocked, thus enhancing the sensitivity to specific tissue interfaces.
[0055] The algorithm monitors the changes in the maximum flow value in the network in real time and sets a convergence criterion. For example, when the flow increment calculated in three consecutive iterations is less than one-thousandth of the total flow, or when the total number of iterations reaches a preset upper limit (e.g., 1000), the maximum flow algorithm is considered to have converged. At this point, the network has reached saturation, meaning that no new augmenting path can be found from the source node to the sink node. On the residual graph that has reached convergence, a breadth-first search (BFS) or depth-first search (DFS) is performed starting from the source node. All nodes reachable through the remaining positive capacity edges are marked, and these marked nodes are then... Nodes are categorized into source-side node sets, which represent the connected air regions within the trachea. The remaining nodes, which cannot be reached from the source nodes, are categorized into sink-side node sets, representing the tracheal wall and external tissues. All connecting edges in the graph are traversed, and the two endpoints of each edge are examined. Edges whose endpoints belong to both the source-side and sink-side node sets, i.e., connecting edges that cross the boundaries of these two sets, are identified. The set formed by these edges is the minimum cut, which corresponds to the optimal interface for dividing the tracheal wall in terms of energy. The index information of these edges is extracted to generate minimum cut energy paths.
[0056] The steps for obtaining the segmented region of the tracheal inner wall are as follows: Based on the minimum cut energy path, in the weighted undirected graph structure, the connecting edges on the minimum cut energy path are deleted one by one in order. The remaining connecting edges are used to perform a connectivity search on all graph nodes and divide them into two independent node sets according to reachability. The geometric positions corresponding to the deleted connecting edges are collected along the boundary of the two independent node sets and rearranged in adjacency order to obtain a continuous boundary trajectory. The continuous boundary trajectory is mapped to a closed curve according to the pixel index of the connecting edge, and the region is filled with the inside of the closed curve to generate the segmented region of the tracheal inner wall.
[0057] Specifically, based on the determined minimum cut energy path, in the original weighted undirected graph data structure, all connecting edges belonging to the minimum cut set are located and deleted, completely removing these edges from the graph's connectivity, thus logically severing the connection between the source and sink regions. A graph traversal algorithm (such as the connected component labeling algorithm) is then used to scan the remaining graph structure. At this point, the graph naturally splits into two independent, disconnected subgraphs, corresponding to the intratracheal lumen region and the extratracheal wall region, respectively. Along the interface between these two independent node sets—that is, the geometric location of the deleted connecting edges—all relevant images are extracted. Based on the spatial adjacency of pixels, edge tracking algorithms (such as Moore's neighborhood tracking algorithm) are used to sort these discrete boundary points in a clockwise or counterclockwise direction and connect them to form a continuous closed boundary trajectory. Since the edges of superpixel segmentation may be jagged, B-spline curve interpolation or smoothing filtering can be used to further optimize the trajectory to make it conform to the smooth anatomical features of the tracheal inner wall. Finally, using scan line filling algorithm or region growing algorithm, all pixels inside the closed curve are marked as the tracheal inner wall region and assigned a specific mask value (such as 1) to generate the tracheal inner wall segmentation region.
[0058] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1. A method for segmenting the tracheal inner wall based on artificial intelligence, characterized in that, Includes the following steps: Receive a tracheal scan image, set a sliding window to traverse the image pixel matrix, calculate the pixel porosity index, aggregate image pixels into superpixel blocks based on spatial proximity and brightness similarity, map the pixel porosity index into the corresponding superpixel blocks, and generate a porosity superpixel feature map. Based on the porosity superpixel feature map, calculate the gray-level gradient vectors of the superpixel block in the horizontal and vertical directions, obtain the local structural feature values and the corresponding principal feature vectors, calculate the anisotropic diffusion coefficients along the tangent and normal directions of the tracheal wall based on the local structural feature values, and generate anisotropic diffusion tensor fields. Based on the anisotropic diffusion tensor field, each superpixel block is defined as a graph node, connecting edges are established between adjacent graph nodes, the projection magnitude of the connecting edge vector in the anisotropic diffusion tensor field is calculated, the connection weight value between nodes is obtained based on the projection magnitude, and the connection weight value between nodes is loaded onto the corresponding connecting edge to generate a weighted undirected graph structure. Based on the weighted undirected graph structure, seed points for the air region and cartilage ring tissue region in the trachea are set. The maximum flow rate between the seed points through the graph network is calculated. The minimum cut energy path is obtained. The connecting edges on the minimum cut energy path are disconnected and the graph nodes are divided into two independent node sets. The boundary trajectory at the intersection of the node sets is extracted to generate the segmented region of the trachea inner wall.
2. The method for segmenting the tracheal inner wall based on artificial intelligence according to claim 1, characterized in that, The steps for obtaining the porosity superpixel feature map are as follows: The pixel matrix of the tracheal scan image is received and a fixed-size sliding window is set to traverse the entire image row by row and column by column. The average value and standard deviation of the pixel gray level are calculated in each sliding window. The center pixel coordinates and gray level distribution characteristics of each window are recorded. Sliding windows with a gray level average value lower than the set background threshold are removed to obtain the gray level statistics of the sliding window. Calculate the pixel porosity index based on the grayscale statistics of the sliding window; Based on the pixel porosity index of each pixel, pixels are aggregated by combining spatial proximity and brightness similarity. The calculated pixel porosity index is mapped to the corresponding superpixel block, and the mean value of the pixel porosity index is calculated in each superpixel block to generate a porosity superpixel feature map.
3. The method for segmenting the tracheal inner wall based on artificial intelligence according to claim 1, characterized in that, The steps for obtaining the local structural feature values and the corresponding principal feature vectors are as follows: Based on the aforementioned gap density superpixel feature map, for each superpixel block, extract the gray-level difference sequence of adjacent pixels in the horizontal direction and the gray-level difference sequence of adjacent pixels in the vertical direction according to the pixel coordinates. Calculate the average absolute difference between the gray-level difference sequences of adjacent pixels in the horizontal direction and the gray-level difference sequences of adjacent pixels in the vertical direction, and represent the gray-level gradient of each superpixel block with ordered binary components to obtain the set of gray-level gradient vectors of the superpixel block. Based on the set of gray-level gradient vectors of the superpixel blocks, the squares of the horizontal components, the squares of the vertical components, and the product of the two components are averaged for each superpixel block to construct the structure tensor matrix of each superpixel block. The eigenvalue decomposition process of the structure tensor matrix is called and the direction information is recorded according to the vector corresponding to the largest eigenvalue to generate local structural eigenvalues and the corresponding main eigenvectors.
4. The method for segmenting the tracheal inner wall based on artificial intelligence according to claim 1, characterized in that, The steps for obtaining the anisotropic diffusion tensor field are as follows: Based on the local structural eigenvalues and the corresponding principal eigenvectors, linear stretching is performed according to the eigenvalue range to obtain the tangential diffusion coefficient and the normal diffusion coefficient is obtained according to the same rule. The two diffusion coefficients are decomposed along the principal eigenvectors and tensor entries are combined between adjacent superpixel blocks to generate an anisotropic diffusion tensor field.
5. The method for segmenting the tracheal inner wall based on artificial intelligence according to claim 1, characterized in that, The steps for obtaining the inter-node connection weight values are as follows: Based on the anisotropic diffusion tensor field, each superpixel block is defined as a graph node. Candidate adjacent superpixel block pairs are generated according to the pixel four-connection and eight-connection relationships. The number of common boundary pixels of each pair of superpixel blocks is counted and the combination with zero common boundary pixels is filtered out. A connection edge vector is generated by connecting the center coordinates of each pair of superpixel blocks and the endpoint index is recorded to form a set of adjacent graph node connection edges. Based on the set of adjacent graph node connection edges, sampling points are selected at equal intervals along each connection edge vector on the anisotropic diffusion tensor field, and the principal feature vector at the sampling point is read. The absolute value of the direction cosine of the connection edge vector and the principal feature vector at each sampling point is calculated, and the average of the sampling sequence is taken to obtain the projection magnitude of the connection edge. Based on the distribution of the projection magnitude of the connection edge, the tangent direction threshold and the normal direction threshold are extracted. Connection edges whose projection magnitude is not less than the tangent direction threshold are marked as tangent direction connections and assigned an upper weight bound. Connection edges whose projection magnitude is not greater than the normal direction threshold are marked as normal direction connections and assigned a lower weight bound. Connection edges between the two thresholds are assigned a value between the lower weight bound and the upper weight bound by linear interpolation, generating the connection weight value between nodes.
6. The method for segmenting the tracheal inner wall based on artificial intelligence according to claim 1, characterized in that, The steps for obtaining the weighted undirected graph structure are as follows: Based on the connection weight values between nodes, the connection weight values between nodes are written into the weight attribute of the corresponding connection edge, and the bidirectional records of the same node pair are merged into an undirected single record. The index consistency between the graph node set and the connection edge set is maintained, and a weighted undirected graph structure is generated.
7. The method for segmenting the tracheal inner wall based on artificial intelligence according to claim 1, characterized in that, The steps for obtaining the minimum cut energy path are as follows: Based on the weighted undirected graph structure, extract all graph nodes and connection edge information, label the seed point of the air region in the tracheal lumen as the source node and label the seed point of the cartilage ring tissue region as the sink node, establish a capacity mapping table for all connection edges and record the connection direction, and generate a capacity view. Calculate the maximum flow rate based on the capacity view; Based on the convergence state of the maximum flow, a reachability search is performed on the residual graph starting from the source node. All reachable nodes are divided into a source-side node set, and the remaining nodes form a sink-side node set. All edges connecting the source-side node set and the sink-side node set are extracted and identified as the minimum cut edge set, generating a minimum cut energy path.
8. The method for segmenting the tracheal inner wall based on artificial intelligence according to claim 1, characterized in that, The steps for obtaining the segmented region of the tracheal inner wall are as follows: Based on the minimum cut energy path, in the weighted undirected graph structure, the connecting edges on the minimum cut energy path are deleted one by one in the order of the minimum cut energy path. The remaining connecting edges are used to perform a connectivity search on all graph nodes and divide them into two independent node sets according to reachability. The geometric positions corresponding to the deleted connecting edges are collected along the boundary of the two independent node sets and rearranged in adjacency order to obtain a continuous boundary trajectory. The continuous boundary trajectory is mapped into a closed curve according to the pixel index of the connecting edge, and the region is filled with the inside of the closed curve to generate the segmented region of the tracheal inner wall.
