Urinary calculus CT image automatic segmentation method based on deep learning

By analyzing the structural tensor field characteristics of CT images of urinary calculi and the geometric principles of CT imaging, the influence of hardening artifacts was identified and corrected, solving the problem of insufficient geometric fidelity in the segmentation results of high-density urinary calculi in existing technologies, and achieving higher precision stone segmentation.

CN121437533APending Publication Date: 2026-01-30TIANJIN MEDICAL UNIVERSITY GENERAL HOSPITAL
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202511520117.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-23
Publication Date
2026-01-30

AI Technical Summary

Technical Problem

Existing deep learning-based CT image segmentation methods for urinary stones are limited by the physical imaging characteristics of the CT system when processing high-density urinary stones. This results in insufficient geometric fidelity of the segmentation results, leading to distortion of morphological features and affecting the accuracy of key parameters such as stone volume and surface area.

Method used

By analyzing the distribution of structural tensor field eigenvalues ​​in the edge neighborhood of the initial stone segmentation region, the risk area of ​​hardening artifacts is identified. Based on the projection geometry principle of CT imaging, the source point of the artifact is located. By analyzing the morphological distortion characteristics of the CT value profile curve and the singularity characteristics of the local boundary curvature caused by the source point of the artifact, geometric correction is performed to obtain the final stone segmentation region.

Benefits of technology

It improves the geometric fidelity of the segmentation results, significantly enhances the accuracy of stone segmentation, and makes the segmentation results closer to the actual anatomical structure, providing reliable basic data for subsequent quantitative analysis of stones.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121437533A_ABST
    Figure CN121437533A_ABST
Patent Text Reader

Abstract

The invention discloses a urinary calculus CT image automatic segmentation method based on deep learning, particularly relates to the technical field of medical image processing, and is used for solving the problem of low geometric fidelity of a segmentation result caused by hardening artifacts when an existing deep learning segmentation method is used for processing a high-density urinary calculus CT image. The method comprises the following steps: acquiring a urinary calculus CT image, performing initial segmentation by using a deep learning model to generate an initial calculus segmentation region, evaluating texture heterogeneity degree and identifying a hardening artifact risk region by analyzing feature value distribution of a structure tensor field, and positioning an artifact-causing source point based on a CT imaging projection geometric principle by reversely tracing a spatial position relation. According to the method, boundary distortion features are identified by analyzing CT value profile curve form distortion features and local boundary curvature singularity features, geometric correction is performed on corresponding boundaries in an initial stone segmentation region according to the boundary distortion features, a final stone segmentation region is obtained, and the geometric accuracy and reliability of a segmentation result are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical image processing technology, and in particular to a method for automatic segmentation of CT images of urinary stones based on deep learning. Background Technology

[0002] Computed tomography (CT) imaging is the primary means of clinical diagnosis of urinary calculi. Deep learning-based image segmentation methods have been applied to the automated analysis of CT images of urinary calculi. By using convolutional neural networks to learn the imaging features of stones from labeled data, pixel-level localization and segmentation can be achieved, providing a foundation for the quantitative assessment of stones.

[0003] However, existing deep learning-based segmentation methods suffer from inherent limitations in geometric fidelity when processing high-density urinary calculi CT images due to the inherent physical imaging characteristics of the CT system. Because the hardening artifacts at the edges of high-density calculi exhibit intensity characteristics similar to real calculi tissue in the image, deep learning models struggle to effectively distinguish between the two during feature learning. This leads to systematic distortion of the morphological features of the segmented calculi region, directly affecting the accuracy of measurements of key morphological parameters such as calculi volume and surface area, and weakening the reliability of the segmentation results in quantitative analysis and subsequent clinical applications. Summary of the Invention

[0004] This invention addresses the technical problems existing in the prior art by providing an automatic segmentation method for CT images of urinary stones based on deep learning.

[0005] The technical solution of the present invention to solve the above-mentioned technical problems is as follows:

[0006] A deep learning-based automatic segmentation method for CT images of urinary calculi includes:

[0007] S1. Obtain CT images of urinary tract stones;

[0008] S2. Use a pre-trained deep learning model to perform initial segmentation on the CT image to generate the initial stone segmentation region;

[0009] S3. The degree of texture heterogeneity is evaluated by analyzing the distribution of structural tensor field eigenvalues ​​in the edge neighborhood of the initial stone segmentation area. When the degree of texture heterogeneity exceeds the preset threshold, it is identified as a hardening artifact risk area.

[0010] S4. By tracing back the spatial relationship between the hardening artifact risk area and the initial stone segmentation area, the artifact source point that causes the hardening artifact is located based on the projection geometry principle of CT imaging.

[0011] S5. By analyzing the morphological distortion characteristics of the CT value profile curve caused by the artifact source point and the curvature singularity characteristics of the local boundary, the boundary distortion characteristics caused by the artifact source point are identified.

[0012] S6. Based on the identification results of boundary distortion features, perform geometric correction on the boundary corresponding to the artifact source point in the initial stone segmentation region to obtain the final stone segmentation region.

[0013] Further, CT images of urinary tract stones are acquired, including:

[0014] The patient's abdomen was scanned using a computed tomography (CT) scanner to acquire a sequence of CT images covering the area of ​​urinary stones.

[0015] The CT image sequences are stored in a digital imaging and communication medical format, and the slice thickness and pixel spacing parameters of the CT image sequences are set to fixed values ​​during the scanning process to ensure the consistency of the image data in the spatial dimension.

[0016] Furthermore, a pre-trained deep learning model is used to perform initial segmentation of the CT image, generating initial stone segmentation regions, including:

[0017] The acquired CT image sequence is input into a convolutional neural network with an encoder-decoder structure;

[0018] The convolutional neural network was trained on a dataset of urinary calculi CT images through transfer learning, and pixel-level classification results were obtained through forward propagation of the network.

[0019] Based on the pixel-level classification results, connected regions are extracted to generate a binarized initial stone segmentation region.

[0020] Furthermore, the degree of texture heterogeneity is assessed by analyzing the distribution of structural tensor field eigenvalues ​​in the edge neighborhood of the initial stone segmentation region. When the degree of texture heterogeneity exceeds a preset threshold, it is identified as a hardening artifact risk region, including:

[0021] A ring-shaped neighborhood region is established outside the boundary contour of the initial stone segmentation region;

[0022] The structure tensor of each pixel is calculated based on the image gradient of each pixel within the annular neighborhood region.

[0023] The eigenvalue set is obtained by performing eigenvalue decomposition on the structure tensor of each pixel.

[0024] The standard deviation and skewness coefficient of the minimum eigenvalues ​​corresponding to all pixels within the annular neighborhood region are calculated as the degree of texture heterogeneity.

[0025] When the standard deviation and skewness coefficient of texture heterogeneity both exceed the preset threshold, the corresponding annular neighborhood is marked as a hardening artifact risk area.

[0026] Furthermore, the calculation of the structure tensor of each pixel based on the image gradient of each pixel in the annular neighborhood region includes: calculating the image gradient values ​​of each pixel in the horizontal and vertical directions in the annular neighborhood region respectively, and taking the square of the horizontal gradient value, the square of the vertical gradient value, and the product of the two gradient values ​​as the components of the structure tensor of the corresponding pixel.

[0027] Furthermore, by tracing the spatial relationship between the sclerosis artifact risk area and the initial stone segmentation area, the artifact source points that generate sclerosis artifacts are located based on the projection geometry principle of CT imaging, including:

[0028] Establish a normal projection plane perpendicular to the CT scan plane within the marked hardening artifact risk area;

[0029] Construct a reference ray path in the normal projection plane that starts from the X-ray source point and passes through the center point of the hardened artifact risk region;

[0030] Identify the main direction of artifact propagation based on the distribution pattern of the intersection points between the reference ray path and the boundary of the initial stone segmentation region;

[0031] Search for candidate artifact source points that satisfy the projection geometry constraints on the boundary of the initial stone segmentation region along the main direction of artifact propagation;

[0032] The final location of the artifact source point is determined by verifying the spatial continuity between the candidate artifact source point and the corresponding hardened artifact risk area.

[0033] Furthermore, the identification of the main direction of artifact propagation based on the intersection distribution pattern of the reference ray path and the boundary of the initial stone segmentation region includes: statistically analyzing the spatial distribution of all intersection points of the reference ray path and the boundary of the initial stone segmentation region on the boundary of the initial stone segmentation region, analyzing the spatial distribution characteristics formed by the intersection points on the boundary of the initial stone segmentation region, and determining the main direction of artifact propagation based on the main extension direction reflected in the spatial distribution characteristics.

[0034] Furthermore, by analyzing the morphological distortion features of the CT value profile curves caused by artifact sources and the curvature singularity features of local boundaries, the boundary distortion features caused by artifact sources are identified, including:

[0035] Starting from the identified artifact source point, CT values ​​are sampled and constructed along the normal direction of the initial stone segmentation region boundary to both the inner and outer sides to build a profile curve;

[0036] The kurtosis coefficient of the profile curve is calculated to quantify the sharpness of the curve peaks, and the asymmetry coefficient of the profile curve is calculated to quantify the overall skewness of the curve distribution, which together serve as morphological distortion characteristics.

[0037] The discrete curvature distribution is calculated on the boundary segment corresponding to the artifact source point, and the high-frequency fluctuations in the discrete curvature distribution that exceed the normal anatomical variation range are extracted as curvature singularity features.

[0038] The abnormal response regions of kurtosis coefficient and asymmetry coefficient in the morphological distortion features are spatially matched with the high-frequency fluctuation regions in the curvature singularity features. When the two coincide in spatial location, the corresponding overlapping region is identified as the boundary distortion feature caused by the artifact source point.

[0039] Furthermore, the calculation of the kurtosis coefficient of the profile curve to quantify the sharpness of the curve peaks, and the calculation of the asymmetry coefficient of the profile curve to quantify the overall skewness direction of the curve distribution include: calculating the ratio of the fourth central moment to the fourth power of the standard deviation of the constructed profile curve to obtain the kurtosis coefficient, calculating the ratio of the third central moment to the cube of the standard deviation of the profile curve to obtain the asymmetry coefficient, and using the kurtosis coefficient and the asymmetry coefficient together as morphological distortion features.

[0040] Furthermore, based on the identification results of boundary distortion features, the boundaries corresponding to the artifact source points in the initial stone segmentation region are geometrically corrected to obtain the final stone segmentation region, including:

[0041] High-frequency fluctuation peaks in the curvature singularity features of the identified boundary distortion feature regions are extracted as key control points for boundary correction.

[0042] The boundary normal correction is calculated based on the morphological distortion characteristics of the CT value profile curves corresponding to the key control points.

[0043] A smooth, corrected boundary curve is generated between key control points using an interpolation algorithm;

[0044] The corresponding boundary distortion feature region in the initial stone segmentation region is replaced by the corrected boundary curve to obtain the final stone segmentation region after geometric correction.

[0045] The beneficial effects of this invention are:

[0046] 1. By introducing the eigenvalue analysis mechanism of the structural tensor field, the texture heterogeneity features of the edge neighborhood of the initial segmentation region can be effectively captured, thereby accurately identifying the risk area of ​​hardening artifacts. The reverse tracing method based on the projection geometry principle of CT imaging can accurately locate the spatial position of the source point of the artifact, providing an accurate target for subsequent boundary correction. The technical path of tracing from the artifact manifestation to the root cause breaks through the limitation of traditional methods that only start from the appearance features of the image, and realizes a deep analysis of the influence mechanism of hardening artifacts.

[0047] 2. Further analysis of the morphological distortion features of CT value profile curves and the singularity features of local boundary curvature caused by artifact sources led to the establishment of a multi-feature fusion boundary distortion recognition method. Based on this, a geometric correction strategy was designed to specifically restore the boundary deformation caused by hardening artifacts, significantly improving the geometric fidelity of the segmentation results. While maintaining the efficiency advantages of deep learning segmentation, it effectively overcomes the impact of hardening artifacts on segmentation accuracy, making the final obtained stone segmentation area closer to the real anatomical structure in terms of morphological features, providing more reliable basic data for subsequent quantitative analysis of stones. Attached Figure Description

[0048] Figure 1 This is a flowchart of the automatic segmentation method for CT images of urinary stones based on deep learning, as described in this invention. Detailed Implementation

[0049] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0050] Example: Figure 1 This invention presents a deep learning-based automatic segmentation method for CT images of urinary calculi, comprising:

[0051] S1. Obtain CT images of urinary tract stones;

[0052] S2. Use a pre-trained deep learning model to perform initial segmentation on the CT image to generate the initial stone segmentation region;

[0053] S3. The degree of texture heterogeneity is evaluated by analyzing the distribution of structural tensor field eigenvalues ​​in the edge neighborhood of the initial stone segmentation area. When the degree of texture heterogeneity exceeds the preset threshold, it is identified as a hardening artifact risk area.

[0054] S4. By tracing back the spatial relationship between the hardening artifact risk area and the initial stone segmentation area, the artifact source point that causes the hardening artifact is located based on the projection geometry principle of CT imaging.

[0055] S5. By analyzing the morphological distortion characteristics of the CT value profile curve caused by the artifact source point and the curvature singularity characteristics of the local boundary, the boundary distortion characteristics caused by the artifact source point are identified.

[0056] S6. Based on the identification results of boundary distortion features, perform geometric correction on the boundary corresponding to the artifact source point in the initial stone segmentation region to obtain the final stone segmentation region.

[0057] S1. Obtain CT images of urinary tract stones, specifically as follows:

[0058] In acquiring CT images of urinary calculi, a computed tomography (CT) scanner is used to scan the patient's abdomen, acquiring a sequence of CT images covering the area containing the urinary calculi. Specifically, a standard clinical abdominal CT scanning protocol is used. This protocol is designed based on the anatomical characteristics of the urinary system, with the scanning range extending from the upper pole of the kidney to the lower edge of the bladder, ensuring complete coverage of the ureter, bladder, and other potential stone distribution areas. Before scanning, the patient is placed in a supine position and undergoes breathing exercises to reduce motion artifacts. The scanning equipment generates X-rays according to preset tube voltage and current parameters, for example, a tube voltage of 120 kV and a tube current of 200 mA. These preset tube voltage and current parameters are adjusted according to the patient's body size and clinical needs. After the detector receives the X-ray signal penetrating the body, it converts the analog signal into a digital signal. The digital signal is then processed by a filtered back-projection reconstruction algorithm to generate a cross-sectional image. The convolution kernel in the reconstruction algorithm uses a standard algorithm to balance noise and resolution. The final result is a sequence of CT images arranged continuously along the long axis of the human body. Each image in the sequence represents a cross-section of a specific anatomical location. The image matrix size is, for example, 512 pixels by 512 pixels. This acquisition process ensures that the image sequence can fully reflect the anatomical structure of the urinary system and the stone lesions that may exist inside it, providing basic data for subsequent segmentation.

[0059] The CT image sequences are stored in a Digital Imaging and Communication Medicine (DICM) format, a universal medical image storage standard that fully preserves all raw image data and related metadata generated during the scanning process. Metadata includes the scanning equipment model, scan time, patient basic information, image size, window width and level parameters, and spatial positioning information required for subsequent processing, such as image origin coordinates, pixel spacing, and slice orientation. During storage, the system packages each cross-sectional image and its corresponding metadata into an independent file according to the DICM format specifications. The file structure includes a header file and image data blocks; the header file stores metadata, and the image data blocks store pixel value arrays. The data is then transmitted over a network to an image storage server for centralized management, using a secure encryption protocol to ensure data integrity. This storage method guarantees the integrity and traceability of image data in subsequent processing, providing a reliable data foundation for subsequent analysis steps and avoiding data loss or errors due to format incompatibility.

[0060] Furthermore, the slice thickness and pixel pitch parameters of the CT image sequence are set to fixed values ​​during the scanning process to ensure the spatial consistency of the image data. Slice thickness determines the spatial resolution along the long axis of the human body, achieved by controlling the collimation width of the detector during scanning. For example, a slice thickness of 1 mm is chosen based on the typical size of urinary stones and clinical diagnostic needs; too thick a slice may miss small stones, while too thin a slice increases noise and scanning time. Pixel pitch determines the spatial resolution within the transverse image plane, controlled by the sampling interval parameter in the reconstruction algorithm. For example, a pixel pitch of 0.6 mm is calculated based on the image matrix size and scanning field of view to ensure uniform pixel size. These two parameters remain constant during a single scan and are monitored and adjusted in real time by the scanning equipment's control system, for example, through feedback mechanisms to ensure consistency in detector collimation and reconstruction sampling. This consistency is crucial for subsequent deep learning model processing and geometric feature analysis, avoiding measurement errors and feature extraction deviations caused by resolution differences. For example, in the segmentation step, fixed parameters ensure accurate boundary localization.

[0061] S2. Utilize a pre-trained deep learning model to perform initial segmentation of the CT image, generating initial stone segmentation regions. The specific implementation is as follows:

[0062] In the initial segmentation step of CT images using a pre-trained deep learning model, the acquired CT image sequence is input into a convolutional neural network with an encoder-decoder structure. Specifically, the encoder-decoder convolutional neural network employs a symmetrical hierarchical design. The encoder part consists of multiple alternating convolutional and pooling layers to progressively extract image features and reduce spatial resolution. For example, the encoder contains five stages, each using two convolutional layers and one max-pooling layer. The convolutional layers use 3×3 kernels with a stride of 1 pixel. Each convolutional layer is followed by a modified linear unit activation function to introduce a non-linear transformation. The pooling layers use a 2×2 window to halve the feature map size, and max-pooling preserves salient features. The decoder consists of multiple alternating upsampling and convolutional layers to progressively restore spatial resolution and generate segmentation results. For example, the decoder contains five stages, each using one upsampling layer and two convolutional layers. The upsampling layer doubles the feature map size through bilinear interpolation, which calculates the new pixel value based on a weighted average of neighboring pixel values. The convolutional layers also use 3×3 convolutional kernels with a stride of 1 pixel. Each convolutional layer is followed by a modified linear unit activation function.

[0063] The network input consists of a single cross-sectional image from the acquired CT image sequence, with the image size matching the sequence (e.g., 512 pixels × 512 pixels). The image data is normalized before input by subtracting the dataset mean from the original pixel values ​​and then dividing by the dataset standard deviation. The mean and standard deviation are calculated based on the statistical characteristics of the training dataset; for example, the mean is set to 100 Henlein units and the standard deviation to 50 Henlein units. The network output is a feature map of the same size as the input image. Each location in the feature map contains multiple channels, with the number of channels equal to the number of categories. For example, two channels might be set to correspond to the background and stone categories, respectively. The output layer uses a softmax function to convert the feature values ​​into a probability distribution. The softmax function calculates the probability value for each category using exponential normalization. This encoder-decoder structure can fuse the high-resolution features of the encoder with the semantic features of the decoder through skip connections. Skip connections are achieved by concatenating the feature maps from the encoder stage with the corresponding feature maps from the decoder stage along the channel dimension, ensuring the accuracy of the segmentation boundaries.

[0064] A convolutional neural network was trained on a urological stone CT image dataset using transfer learning. Pixel-level classification results were obtained through forward propagation. The transfer learning process first used model parameters pre-trained on a natural image dataset, such as ImageNet, containing a large number of natural images across 1000 categories. The pre-training weights were obtained through large-scale supervised learning, using cross-entropy loss and stochastic gradient descent optimization algorithms. Fine-tuning was then performed using the urological stone CT image dataset, which contains numerous annotated CT images of urological stones. The annotations, performed by experienced radiologists, consist of pixel-level masks of the stone regions. The dataset size is, for example, several thousand images, covering cases of stones of different sizes, shapes, and locations. Dataset preprocessing included image scaling and enhancement operations, such as random rotation and flipping, to increase data diversity. During training, the dataset was divided into training, validation, and test sets, with the split ratios set based on clinical needs, such as random splits at 70%, 15%, and 15%. The splits ensured a balanced distribution of stone size and location within each set to avoid bias. The training uses stochastic gradient descent optimization algorithm, and the loss function is cross-entropy loss. Cross-entropy loss optimizes model parameters by calculating the difference between the predicted probability and the true label. The learning rate is set to 0.001 and gradually decays with the number of training epochs. The decay strategy is adjusted based on the performance of the validation set. For example, the learning rate is halved when the validation set loss does not improve within 5 consecutive epochs. The batch size is set to 16 images, the number of training epochs is set to 100, and the early stopping mechanism is implemented based on the monitoring of the validation set loss.

[0065] During forward propagation, the input image is transformed layer by layer through the network. The encoder extracts features through convolution and pooling operations, gradually decreasing the feature map size while increasing the number of channels. The decoder recovers details through upsampling and convolution operations, gradually increasing the feature map size while decreasing the number of channels. Finally, the output layer uses the softmax function to calculate the probability of each pixel belonging to each category. For example, for each pixel, the probability value of belonging to the kidney stone category is calculated, with the probability value ranging from 0 to 1. The pixel-level classification results are presented in the form of a probability map, where the value of each pixel represents the probability that the pixel is classified as a kidney stone. The probability map is stored as a floating-point array with the same size as the input image.

[0066] Connected regions are extracted based on pixel-level classification results to generate initial binarized stone segmentation regions. During connected region extraction, the probability map in the pixel-level classification results is first converted into a binary image. This conversion is achieved by setting a probability threshold. The probability threshold is set based on performance evaluation on the validation set during training. Performance evaluation uses the Dice coefficient as an indicator. The Dice coefficient measures segmentation accuracy by calculating the overlap between the predicted and ground truth regions. Threshold selection is performed through grid search. For example, probability thresholds from 0.3 to 0.7 are tested in steps of 0.05, and the threshold that maximizes the Dice coefficient is selected as the optimal value. For example, the optimal threshold is set to 0.5.

[0067] In the binary image, pixels with a probability value greater than or equal to a probability threshold are identified as stones and set as white pixels, while pixels with a probability value less than the threshold are identified as background and set as black pixels. The image data type is an 8-bit unsigned integer, with a white pixel value of 255 and a black pixel value of 0. Then, connected component analysis is performed on the binary image to identify all connected white pixel regions. Connectivity is defined as 8-neighbor connectivity, meaning each pixel is connected to its upper, lower, left, right, and four diagonal neighbors. During the analysis, each pixel in the binary image is traversed. When a white pixel is encountered, a depth-first search algorithm is used to label all connected white pixels. The depth-first search is implemented using a stack structure, exploring all adjacent white pixels from the current pixel until the boundary. Each connected region is assigned a unique label to distinguish it from other regions. Each connected region represents a potential stone lesion. The region boundary is determined by tracing the contour of the white pixel block. The contour tracing algorithm uses a boundary following method, for example, traversing boundary points clockwise from the region edge point. The boundary point sequence is stored as a coordinate list. Finally, all connected regions are combined into a binarized initial stone segmentation region, which is stored as a binary image where white pixels represent stones and black pixels represent the background, with the image size being the same as the input CT image.

[0068] In anomaly handling, when the area of ​​a connected region is too small or too large, it is filtered by setting an area threshold. The area threshold is set based on clinical prior knowledge. For example, a region with an area of ​​less than 10 pixels is considered noise, and a region with an area of ​​more than 10,000 pixels is considered an incorrect segmentation. Regions considered to be incorrectly segmented are excluded from the binary image and set as background to ensure the accuracy of the initial stone segmentation region.

[0069] S3. The degree of texture heterogeneity is assessed by analyzing the distribution of structural tensor field eigenvalues ​​in the edge neighborhood of the initial stone segmentation region. When the degree of texture heterogeneity exceeds a preset threshold, it is identified as a hardening artifact risk region. The specific implementation is as follows:

[0070] In the step of assessing the degree of texture heterogeneity by analyzing the distribution of eigenvalues ​​of the structural tensor field in the edge neighborhood of the initial stone segmentation region, a ring-shaped neighborhood region is established outside the boundary contour of the initial stone segmentation region. The ring-shaped neighborhood region is established based on the boundary contour of the initial stone segmentation region, which is obtained by extracting the outer boundary of the binarized initial stone segmentation region. The outer boundary is defined as the set of stone pixels adjacent to the background pixels. The extraction method employs a boundary tracing algorithm, for example, starting from any boundary pixel and traversing adjacent pixels clockwise until returning to the starting point. The ring-shaped neighborhood region is set as a ring-shaped band surrounding the boundary contour. The width of the ring band is set according to the stone size and image resolution; for example, the width of the ring band is set to 10% of the average diameter of the initial stone segmentation region. The average diameter is obtained by calculating the equivalent circle diameter of the region, but the width of the ring band does not exceed a specific multiple of the image pixel size, such as no more than 10 pixels, to ensure a reasonable region size. The annular band is generated by offsetting the boundary contour outward by a fixed distance. The offset distance is adjusted based on clinical experience; for example, it is set to 3 pixels to ensure coverage of texture variation areas around the boundary. The inner boundary of the annular neighborhood region coincides with the boundary of the initial stone segmentation region, and the outer boundary is obtained by offsetting the inner boundary. The offset operation uses a morphological dilation method with a circular kernel as the structuring element, and the kernel size corresponds to the offset distance. Pixels within the region are contained within the annular neighborhood region for subsequent analysis. The annular neighborhood region is stored as a binary mask, where white pixels represent the annular neighborhood region and black pixels represent the background.

[0071] The structure tensor of each pixel is calculated based on the image gradient of each pixel within a ring-shaped neighborhood region. Image gradient calculation is implemented using a difference operator, calculating the image gradient values ​​of each pixel within the ring-shaped neighborhood region in both the horizontal and vertical directions. Horizontal gradient calculation is performed by applying the horizontal Sobel operator. The Sobel operator's horizontal convolution kernel is a 3x3 matrix with elements containing -1, 0, 1, -2, 0, 2, -1, 0, 1. The convolution operation obtains the gradient value by weighted summation of the convolution kernel and the local image region. During weighted summation, the center of the convolution kernel is aligned with the current pixel, and the local region is a 3x3 pixel block. Vertical gradient calculation is performed by applying the vertical Sobel operator. The convolution kernel is a 3x3 matrix with elements containing -1, -2, -1, 0, 0, 0, 1, 2, 1. The convolution stride is set to 1 pixel, and zero-padding is used to handle image boundaries, adding virtual pixels with a value of zero outside the image edges. The gradient value represents the rate of grayscale change of a pixel in the corresponding direction. After calculation, the square of the horizontal gradient value, the square of the vertical gradient value, and the product of the two gradient values ​​of each pixel are used as the components of the structure tensor of the corresponding pixel. The structure tensor is represented as a two-dimensional matrix. The element in the upper left corner of the matrix is ​​the square of the horizontal gradient value, the element in the lower right corner of the matrix is ​​the square of the vertical gradient value, and the elements in the upper right and lower left corners of the matrix are the product of the two gradient values. The structure tensor is stored in the form of a 2x2 matrix for each pixel.

[0072] Eigenvalue decomposition is performed on the structure tensor of each pixel to obtain a set of eigenvalues. Eigenvalue decomposition is achieved by solving the characteristic equation, which is constructed based on the elements of the structure tensor matrix. For each structure tensor matrix, its eigenvalues ​​and eigenvectors are calculated. Eigenvalue decomposition is performed using numerical methods, such as calculating the determinant and trace of the matrix, and then solving the quadratic equation for the eigenvalues. The eigenvalues ​​represent the principal and secondary directions of the local image structure; larger eigenvalues ​​correspond to gradient changes in the principal direction, and smaller eigenvalues ​​correspond to gradient changes in the secondary direction. Specifically, for each structure tensor matrix, the trace and determinant are first calculated. The trace is the sum of the diagonal elements of the matrix, and the determinant is the product of the top-left and bottom-right elements minus the product of the top-right and bottom-left elements. Then, the eigenvalues ​​are calculated based on the trace and determinant. The eigenvalues ​​are obtained by solving the characteristic polynomial equation, which is the square of the eigenvalue minus the trace multiplied by the eigenvalue plus the determinant, which equals zero. The eigenvalue set contains two eigenvalues ​​for each pixel, ordered from largest to smallest. The smallest eigenvalue reflects the texture consistency of the image region; low values ​​indicate uniform texture, while high values ​​indicate messy texture. During eigenvalue decomposition, for each structure tensor matrix, eigenvalue calculation uses a closed-form solution, i.e., obtaining two eigenvalues ​​through the quadratic equation root-finding formula. The eigenvalues ​​are stored as floating-point arrays.

[0073] The standard deviation and skewness coefficient of the minimum eigenvalues ​​corresponding to all pixels within the annular neighborhood region are calculated as the degree of texture heterogeneity. The standard deviation is calculated based on the set of minimum eigenvalues ​​for all pixels within the annular neighborhood region. First, the average of the minimum eigenvalues ​​is calculated. The average is obtained by summing all minimum eigenvalues ​​and dividing by the total number of pixels. This summation operation iterates through all pixels within the annular neighborhood region. The total number of pixels is obtained by counting the number of white pixels in the mask of the annular neighborhood region. Then, the deviation of each minimum eigenvalue from the average is calculated. The deviation is the minimum eigenvalue minus the average. The square root of the average of the squared deviations is taken as the standard deviation. The standard deviation measures the dispersion of the minimum eigenvalues; a high standard deviation indicates strong texture heterogeneity. The skewness coefficient is calculated based on the third central moment and standard deviation of the set of minimum eigenvalues. The third central moment is obtained by averaging the cubed differences between each minimum eigenvalue and the mean. The mean is calculated as the sum of the cubed differences of all differences divided by the total number of pixels. The skewness coefficient is the third central moment divided by the cubed standard deviation. The skewness coefficient measures the asymmetry of the distribution of minimum eigenvalues; positive skewness indicates a right-side tailing of the distribution, and negative skewness indicates a left-side tailing. The degree of texture heterogeneity is jointly characterized by the standard deviation and the skewness coefficient. Together, they reflect the variability and distribution pattern of texture within the annular neighborhood region. The standard deviation and skewness coefficient are stored as scalar values ​​for subsequent threshold comparisons.

[0074] When both the standard deviation and skewness coefficient of texture heterogeneity exceed preset thresholds, the corresponding annular neighborhood is marked as a hardening artifact risk area. The preset thresholds are set based on statistical analysis of a large number of normal and abnormal CT images. The statistical analysis uses a historical dataset containing CT images labeled with and without hardening artifacts; the historical dataset typically contains hundreds of images, covering different patients and scanning conditions. Threshold settings are achieved by calculating the quantiles of texture heterogeneity distribution in normal images. For example, the standard deviation threshold is set to the 95th quantile of the standard deviation distribution of normal images, and the skewness coefficient threshold is set to the 95th quantile of the skewness coefficient distribution of normal images. Quantile calculation uses the percentile method, sorting the standard deviation and skewness coefficient values ​​of normal images and then taking the value at the corresponding percentile position. During threshold comparison, for each annular neighborhood region, if its standard deviation is greater than a preset standard deviation threshold and its skewness coefficient is greater than a preset skewness coefficient threshold, then the region is marked as a hardening artifact risk region. Marking is achieved by assigning risk labels to the annular neighborhood regions. These risk labels are stored as binary masks, where risk regions have a value of 1 and non-risk regions have a value of 0. The marking process iterates through all annular neighborhood regions, ensuring that each region is evaluated independently. Risk regions are used for further analysis in subsequent steps. In abnormal situations, such as when the area of ​​an annular neighborhood region is too small, filtering is performed by setting a minimum area threshold. The minimum area threshold is set based on the number of pixels in the annular neighborhood region; for example, regions with an area less than 5 pixels are not evaluated to avoid noise interference.

[0075] S4. By tracing the spatial relationship between the hardening artifact risk area and the initial stone segmentation area, the artifact source point causing the hardening artifact is located based on the projection geometry principle of CT imaging. The specific implementation is as follows:

[0076] In the step of locating the source point of hardening artifacts based on the projection geometry principle of CT imaging by tracing the spatial relationship between the hardening artifact risk area and the initial stone segmentation area, a normal projection plane perpendicular to the CT scan plane is established within the marked hardening artifact risk area. The establishment of the normal projection plane is based on the geometric parameters of the CT scanning equipment and the spatial position of the hardening artifact risk area. The CT scan plane is a transverse image plane, and its spatial orientation is determined by the scanning coordinate system, which is defined by the detector array plane of the CT equipment and the position of the X-ray source point. The normal projection plane is set to be perpendicular to the transverse image plane and passes through the center point of the hardening artifact risk area. The center point is calculated as the average of the coordinates of all pixels within the hardening artifact risk area. The average is obtained by calculating the arithmetic mean of the X and Y coordinates of all pixels respectively. For example, the average X coordinate is the sum of the X coordinates of all pixels divided by the number of pixels, and the average Y coordinate is the sum of the Y coordinates of all pixels divided by the number of pixels. The Z coordinate is obtained from the slice position information of the CT image sequence. The direction of the normal projection plane is determined by the normal vector of the CT scan plane. This normal vector is obtained from the coordinate system of the scanning device. For example, in a standard CT scan coordinate system, the Z-axis is perpendicular to the cross-sectional image plane, and the normal vector of the normal projection plane is set to be parallel to the Z-axis. The plane equation is defined using point normals, which are constructed using the center point coordinates and the normal vector. For example, the plane equation is that the dot product of the normal vector and any point vector on the plane is a constant, calculated by the dot product of the normal vector and the center point vector. The normal projection plane is used for subsequent projection calculations, and its parameters are stored as the normal vector and the center point coordinates.

[0077] A reference ray path is constructed within the normal projection plane, originating from the X-ray source and passing through the center point of the hardening artifact risk region. The X-ray source coordinates are obtained from the geometric parameters of the CT scanning equipment, which are stored in the metadata of a digital imaging and communication medical format file. The source position is determined based on the scanning geometry model; for example, in cone-beam CT scanning, the source is located at a fixed position on one side of the gantry. The reference ray path is constructed as a straight line pointing from the X-ray source to the center point of the hardening artifact risk region. The equation of the line is expressed in parametric form, defined by the source coordinates and a direction vector. The direction vector is calculated by subtracting the source coordinates from the center coordinates and then normalizing them. Normalization is achieved by dividing the vector by its length. The projection of the ray path into the normal projection plane is achieved by transforming the three-dimensional coordinates to a planar coordinate system. The coordinate transformation is calculated using planar basis vectors, which are generated from the normal vector of the normal projection plane and two orthogonal vectors. The two orthogonal vectors are obtained by cross-multiplying the normal vector with any non-parallel vector. For example, the first orthogonal vector is obtained by cross-multiplying the unit vector with the normal vector, and the second orthogonal vector is obtained by cross-multiplying the normal vector with the first orthogonal vector. The reference ray path is used to simulate the propagation trajectory of X-rays. The path equation is stored in parameter form, with the parameter range from zero to one, corresponding to the line segment from the source point to the center point. The points on the path are calculated by linear interpolation of the parameter values.

[0078] The main direction of artifact propagation is identified based on the intersection distribution pattern of the reference ray path and the boundary of the initial stone segmentation region. Intersection point calculation is achieved by solving the mathematical intersection of the reference ray path and the boundary of the initial stone segmentation region. The boundary of the initial stone segmentation region is extracted from the binarized initial stone segmentation region, with boundary points being stone pixels adjacent to background pixels. The extraction method employs a boundary tracing algorithm. The intersection is solved using a ray-polygon intersection algorithm. The polygon is composed of a sequence of boundary points of the initial stone segmentation region. The algorithm traverses the boundary segments and calculates the intersection points of the ray and the segments. The intersection point coordinates are obtained through linear interpolation, which is calculated based on the endpoint parameters of the segments and the ray parameters. The spatial distribution of all intersection points of the reference ray path and the boundary of the initial stone segmentation region is statistically analyzed on the boundary of the initial stone segmentation region. The spatial distribution positions are recorded as the parametric coordinates of the intersection points on that boundary. The parametric coordinates are calculated by normalizing the boundary arc length, which involves dividing the actual arc length by the total arc length to obtain a value between zero and one. The spatial distribution characteristics of the intersection points formed on the boundary of the initial stone segmentation region are analyzed. These characteristics include the degree of clustering and directional trends of the intersection points. For example, the density distribution and principal direction angles of the intersection points are calculated. The density distribution is calculated using kernel density estimation, and the principal direction angles are calculated using directional statistics. The main propagation direction of the artifact is determined based on the dominant extension direction reflected in the spatial distribution characteristics. This dominant extension direction is calculated using principal component analysis (PCA), which is obtained by calculating the eigenvectors of the covariance matrix of the intersection points. The direction of the first principal component is taken as the main propagation direction of the artifact, and the main direction is stored as an angle value or a unit vector.

[0079] Candidate artifact sources satisfying projection geometry constraints are searched along the main direction of artifact propagation on the boundary of the initial stone segmentation region. These constraints are based on the projection geometry principles of CT imaging and include the requirement that candidate points lie on the extension of the reference X-ray path and have linear visibility from the hardening artifact risk area. The search process traverses the pixels on the boundary of the initial stone segmentation region, proceeding along the main direction of artifact propagation, for example, moving from one end of the boundary to the other, with a step size of one pixel. For each boundary point, its compliance with projection geometry constraints is checked. This check includes calculating whether the line connecting the point to the X-ray source point passes through the hardening artifact risk area and whether the distance between the point and the center of the risk area is within a reasonable range. The reasonable range is based on prior clinical knowledge; for example, the distance should not exceed 20% of the average diameter of the initial stone segmentation region, which is obtained by calculating the diameter of the equivalent circle of the region. Boundary points that satisfy the constraints are recorded as candidate artifact source points. Candidate points are stored as a list of coordinates. Each candidate point is associated with its constraint satisfaction score. The score is calculated based on distance and angle deviation. The distance deviation is the perpendicular distance from the point to the reference ray path, and the angle deviation is the angle between the direction of the point and the main direction of artifact propagation.

[0080] The final location of the artifact source point is determined by verifying the spatial continuity between the candidate artifact source point and the corresponding hardening artifact risk region. Spatial continuity verification is achieved by checking whether there is an unobstructed straight path between the candidate artifact source point and the hardening artifact risk region. An unobstructed path is defined as a path where all points are located within the stone region or the risk region. The verification method uses a raycasting algorithm, emitting a virtual ray from the candidate point to the center point of the risk region and checking the number of intersections between the ray and background pixels. Zero intersections indicate spatial continuity. The raycasting algorithm is implemented through discrete sampling, with a sampling step size of one pixel. The pixel category of each sampling point is checked along the ray path, obtained from the initial stone segmentation region and the hardening artifact risk region mask. For each candidate artifact source point, its spatial continuity score with the risk region is calculated. The score is based on pixel category statistics along the ray path, such as the continuous pixel ratio, which is the ratio of the number of pixels belonging to the stone or risk region to the total number of pixels on the path. The final artifact source point is selected as the candidate point with the highest spatial continuity score. The highest score is determined by comparing the scores of all candidate points; for example, the candidate point with the largest score is selected. If multiple candidate points have the same highest score, the candidate point closest to the center of the risk area is selected. The distance is calculated as Euclidean distance, which is calculated by taking the square root of the sum of the squared coordinate differences. The final artifact source point location is stored as two-dimensional or three-dimensional coordinates for analysis in subsequent steps.

[0081] S5. By analyzing the morphological distortion characteristics and curvature singularity characteristics of the CT value profile curve caused by artifact source points, the boundary distortion characteristics caused by artifact source points are identified. Specifically, this is implemented as follows:

[0082] In the step of identifying boundary distortion features caused by artifact source points by analyzing the morphological distortion features and curvature singularity features of the CT value profile curve caused by the artifact source points, the CT values ​​are sampled to construct the profile curve starting from the determined artifact source point and extending inward and outward along the normal direction of the initial stone segmentation region boundary. The location of the artifact source point is obtained from the previous step, and its coordinates are represented by the image pixel position. The boundary normal direction is obtained by calculating the local normal vector of the boundary contour of the initial stone segmentation region. The normal vector is calculated using the difference method of adjacent boundary points. For example, for each point in the boundary point sequence, the average of its vector with the previous point and the vector of the next point is calculated, and then rotated 90 degrees to obtain the normal vector direction. The sampling process starts from the artifact source point and extends along the normal direction into the interior and exterior background regions of the stone. The extension distance is set based on the size of the initial stone segmentation region. For example, the extension distance is set to 20% of the equivalent circle diameter of the initial stone segmentation region. The equivalent circle diameter is calculated by the area of ​​the region, which is equal to the number of pixels in the region multiplied by the square of the pixel physical size. The sampling point interval is set to a fixed step size, such as one pixel. The CT value of each sampling point is obtained through bilinear interpolation. Bilinear interpolation is calculated based on the weighted average of the four nearest pixels, with the weights determined by the relative position of the sampling point to its neighboring pixels. The constructed profile curve is stored as a series of coordinate and CT value pairs of sampling points. The coordinates are parameterized along the normal direction, with parameter values ​​ranging from negative to positive corresponding to the direction from inside to outside. Negative values ​​represent the interior of the stone, and positive values ​​represent the external background. The CT values ​​are stored in Henlein units, and the curve data is used for subsequent morphological analysis.

[0083] The kurtosis coefficient of the profile curve is calculated to quantify the sharpness of the curve peaks, and the asymmetry coefficient of the profile curve is calculated to quantify the overall skewness of the curve distribution, together serving as morphological distortion characteristics. The kurtosis coefficient calculation is based on the constructed profile curve. First, the average value of all CT values ​​of the profile curve is calculated. The average value is obtained by summing all CT values ​​and dividing by the number of sampling points; this summation operation is performed on all sampling points. Then, the fourth central moment of the profile curve is calculated. The fourth central moment is obtained by averaging the fourth power of the difference between each CT value and the average value. The average value is calculated as the sum of the fourth powers of all differences divided by the number of sampling points. Simultaneously, the standard deviation of the profile curve is calculated. The standard deviation is obtained by taking the square root of the average of the squares of the differences between each CT value and the average value. The average value is calculated as the sum of the squares of all differences divided by the number of sampling points. The kurtosis coefficient is the ratio of the fourth central moment to the fourth power of the standard deviation. This ratio reflects the kurtosis of the curve distribution; a high value indicates a sharp distribution, and a low value indicates a flat distribution. The asymmetry coefficient is calculated based on the third central moment of the profile curve. The third central moment is obtained by averaging the cubes of the differences between each CT value and the mean value. The mean value is calculated as the sum of the cubes of all differences divided by the number of sampling points. The asymmetry coefficient is the ratio of the third central moment to the cube of the standard deviation. This ratio reflects the skewness of the curve distribution; a positive value indicates right skewness, and a negative value indicates left skewness. Morphological distortion features are characterized by both the kurtosis coefficient and the asymmetry coefficient, both stored as scalar values ​​for subsequent analysis. The threshold setting is based on statistical analysis of normal CT images.

[0084] Discrete curvature distributions are calculated on the boundary segments corresponding to the artifact source points. High-frequency fluctuations exceeding the normal anatomical variation range are extracted as curvature singularity features. A boundary segment is defined as a portion of the initial stone segmentation region boundary centered on the artifact source point. The segment length is set based on the stone size; for example, the segment length is set to 10% of the perimeter of the initial stone segmentation region. The perimeter is obtained by multiplying the number of boundary pixels by the pixel spacing. Discrete curvature calculation uses a geometric method based on the boundary point sequence. For each point on the boundary segment, its local curvature is calculated. Curvature is obtained through the rate of change of the angle between adjacent point vectors. For example, the three-point method is used to calculate curvature, which constructs a circle fit based on the current point and its preceding and following adjacent points to calculate the reciprocal of the curvature radius. The curvature distribution is stored as an array of curvature values ​​corresponding to the boundary point sequence. High-frequency fluctuation extraction is achieved by analyzing the frequency components of the curvature distribution. Digital filtering methods are used to separate high-frequency signals; for example, a Butterworth high-pass filter is used to retain components above a specific frequency. The filter's cutoff frequency is set based on the normal anatomical variation range. The range of normal anatomical variations is obtained through statistical analysis of the curvature distribution of a large number of normal urinary calculi CT images. For example, the standard deviation of the curvature distribution of normal images is calculated, and fluctuations exceeding three times the standard deviation are considered abnormal. High-frequency fluctuation regions are defined as continuous boundary segments where the curvature value fluctuation amplitude exceeds a threshold. The threshold is set based on the quantile of historical data, for example, the threshold is set to the 95th quantile of the normal curvature fluctuation distribution.

[0085] Spatially matching the abnormal response regions of kurtosis and asymmetry coefficients in morphological distortion features with the high-frequency fluctuation regions in curvature singularity features, when the two coincide in spatial location, the corresponding overlapping region is identified as a boundary distortion feature caused by the source point of artifacts. An abnormal response region is defined as a boundary segment where the morphological distortion feature value exceeds a preset threshold. The threshold is set statistically based on normal CT images; for example, the kurtosis coefficient threshold is set to the 90th quantile of the normal distribution, and the asymmetry coefficient threshold is also set to the 90th quantile of the normal distribution. The normal distribution is calculated by collecting a large number of artifact-free CT images of stones. Spatial matching is achieved by comparing the spatial positions of the abnormal response region and the high-frequency fluctuation region on the boundary of the initial stone segmentation region. The position is recorded as the boundary arc length parameter, and the arc length is calculated cumulatively from the boundary starting point. Coincidence judgment is based on the region overlap calculation, defined as the ratio of the boundary length jointly covered by two regions to the total region length. When the overlap exceeds a preset threshold, it is considered a coincidence; for example, the overlap threshold is set to 70%. The matching process traverses all possible region pairs. For each artifact source point, it checks whether its corresponding morphological distortion anomalous region and curvature singularity region spatially overlap. Overlapping regions are marked as boundary distortion features. This marking is achieved by assigning distortion labels to boundary segments, which are stored as binary masks where distorted regions have a value of one and non-distorted regions have a value of zero. The final identification result is used in subsequent geometric correction steps to ensure accurate detection of boundary distortion features. In abnormal cases where multiple artifact source points correspond to the same distorted region, the source point with the highest spatial continuity is selected as the primary artifact source point.

[0086] S6. Based on the identification results of boundary distortion features, perform geometric correction on the boundary corresponding to the artifact source point in the initial stone segmentation region to obtain the final stone segmentation region. The specific implementation is as follows:

[0087] In the geometric correction step of the boundary corresponding to the artifact source point in the initial stone segmentation region based on the identification results of boundary distortion features, high-frequency fluctuation peak points in the curvature singularity features of the identified boundary distortion feature region are extracted as key control points for boundary correction. The boundary distortion feature region is obtained from the previous step, and its position and range are determined by the distortion identifier, which is stored in the form of a binary mask, where a pixel with a value of 1 represents the boundary distortion feature region. The high-frequency fluctuation peak points in the curvature singularity features are obtained by analyzing the discrete curvature distribution, which is stored as an array of curvature values ​​corresponding to the boundary point sequence. The curvature values ​​are calculated from the boundary point coordinates, which are extracted from the boundary of the initial stone segmentation region. Peak points are defined as local curvature maxima. The detection method adopts the sliding window comparison method, and the window size is set based on the boundary resolution. For example, the window size is set to 5 boundary points. This size is selected by balancing detection sensitivity and computational efficiency. Too large a window may miss detailed features, while too small a window may introduce noise interference. For each boundary point, its curvature value is compared with the curvature values ​​of its two neighboring points within a window. The window includes the two points before and after the current point. When the curvature value of this point is greater than the curvature values ​​of all its neighboring points and exceeds the global curvature average by a certain multiple (e.g., more than twice the average), the point is identified as a peak point. The global curvature average is calculated by summing the curvature values ​​of all boundary points and dividing by the total number of boundary points, which is obtained by counting the number of boundary pixels. The selection of key control points also considers the spatial distribution density of peak points. When the distance between multiple peak points is too small (e.g., less than 3 pixels), only the point with the largest curvature value is retained. The largest curvature value is determined by comparing the curvature values, which are read from a discrete curvature distribution array. Finally, the key control points are stored as a boundary point index list. Each key control point is associated with its curvature value and spatial location, represented by image pixel coordinates. The index list is used for subsequent correction operations.

[0088] The boundary normal correction is calculated based on the morphological distortion features of the CT value profile curves corresponding to key control points. The CT value profile curves corresponding to key control points are obtained from a previously constructed profile curve dataset, which stores a sequence of CT values ​​for each key control point, expressed in Heinz units. Morphological distortion features include kurtosis and asymmetry coefficients, calculated from the CT value sequence of the profile curves. The boundary normal correction comprehensively considers both the magnitude and direction of the morphological distortion features. The magnitude of the correction is related to the weighted sum of the kurtosis and asymmetry coefficients, with weights set based on the importance of the features. For example, the weight of the kurtosis coefficient is set to 0.6, and the weight of the asymmetry coefficient is set to 0.4. The weight values ​​are determined through regression analysis of historical data. The regression analysis uses a large number of correction cases to optimize the weights to minimize the correction error. The correction cases include CT images with known boundary distortion and normal boundaries. The direction of the correction is determined by the sign of the asymmetry coefficient of the profile curve. A positive asymmetry coefficient indicates correction towards the outside of the stone, while a negative asymmetry coefficient indicates correction towards the inside of the stone. The direction is defined based on the distribution characteristics of CT values, which are obtained from profile curve analysis. In the specific calculation, the kurtosis coefficient and asymmetry coefficient are first normalized to the range of 0 to 1. Normalization uses the maximum and minimum values ​​from historical data, which are derived from statistical analysis of artifact-free stone images. This statistical analysis calculates the distribution range of the kurtosis coefficient and asymmetry coefficient. Then, a weighted sum is calculated and multiplied by the base correction amount, which is set based on the pixel size. For example, the base correction amount is set to 2 pixels, a value determined through clinical expert experience based on typical stone sizes and image resolution. The final boundary normal correction amount is stored as a correction vector for each key control point, including magnitude and direction. The magnitude is in pixels, and the direction is represented by a unit vector, calculated from the normal direction.

[0089] A smooth, corrected boundary curve is generated between key control points using an interpolation algorithm. The interpolation algorithm employs a parametric spline interpolation method, with key control points serving as interpolation nodes. The node parameter is the boundary arc length coordinate, which is calculated cumulatively from the boundary starting point by accumulating the Euclidean distance between adjacent points. The spline curve uses a cubic spline function to ensure continuous first and second derivatives at the nodes. Continuity is achieved by setting the function value, first derivative, and second derivative at the nodes to be equal; the function value is derived from the key control point coordinates. The curve generation process first calculates the tangent direction at the nodes, determined by the direction of the line connecting adjacent nodes. For endpoint nodes, a natural boundary condition is applied, setting the second derivative at the endpoints to zero. The endpoint nodes are the first and last points in the list of key control points. Then, a system of spline equations is constructed, containing node position constraints and continuity constraints. Node position constraints ensure that the spline curve passes through all key control points, while continuity constraints ensure the curve is smooth. The system of equations is solved using matrix operations; for example, a tridiagonal matrix is ​​constructed, and the spline coefficients are solved using the pursuit method, a numerical solution method for linear equations. The interpolated curve transitions smoothly between nodes. Curve points are calculated using spline functions, with a sampling density consistent with the original boundary; for example, one curve point is calculated for each pixel spacing. The coordinates of the sampling points are calculated by substituting parameter values ​​into the spline function, with parameter values ​​uniformly distributed from 0 to 1. The generated corrected boundary curve is stored as an ordered sequence of points. The curve and the original boundary naturally connect at key control points. The connection is ensured by adjusting the spline parameters to ensure that the position and tangent direction are consistent, with the tangent direction obtained from the original boundary normal vector.

[0090] The initial stone segmentation region is geometrically corrected by replacing the corresponding boundary distortion feature regions with a corrected boundary curve. The replacement operation first determines the boundary segments to be replaced, defined by the positions of key control points, including all boundary points between the start and end key control points. The start and end points are determined by the first and last points in the key control point list, with point positions obtained from the boundary point sequence index. Next, the original boundary segments are removed from the initial stone segmentation region boundary. This removal is achieved by deleting points from the corresponding interval in the boundary point sequence, from the start point index to the end point index, with index values ​​read from the boundary point sequence list. Then, the point sequence of the corrected boundary curve is inserted into the deletion positions, maintaining a clockwise order of boundary points. This order is ensured by comparing point coordinates obtained from the corrected boundary curve sequence. Finally, the binary segmentation region is regenerated based on the updated boundary point sequence. The regeneration uses a boundary filling algorithm, which fills inwards from the boundary points until the other side of the boundary is encountered. The filling uses a scanline method, where the scanline checks boundary intersections along the image row direction, determined by comparing the categories of adjacent pixels. The final segmented stone region after geometric correction is stored as a binary image, where white pixels represent the stone region and black pixels represent the background region. The region boundaries are smooth, and artifact-induced distortion is eliminated. In abnormal cases where the corrected boundary intersects with the original boundary, the boundary orientation is adjusted using the shortest path principle. The shortest path is determined by calculating the Euclidean distance between boundary points, which is calculated by the square root of the squared coordinate difference, ensuring the correct topological structure of the segmented region. The final segmented stone region is used for subsequent analysis or clinical diagnosis. Its accuracy is evaluated by comparing the region shape before and after correction, with evaluation metrics including region area and boundary smoothness.

[0091] All calculations involved in the embodiments are dimensionless numerical calculations, and the preset parameters and thresholds in the calculations are set by those skilled in the art according to the actual situation.

[0092] It should be noted that this invention can be deployed on the device itself to realize embedded applications, or it can run on a PC or other terminal with a user interface, thereby meeting various hardware environments and usage requirements.

[0093] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions according to the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wireless or wired route; wired transmission methods include optical fiber, twisted pair, coaxial cable, etc.; wireless transmission includes infrared, microwave, etc. Computer-readable storage media can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more sets of available media. Available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media. Semiconductor media can be solid-state drives.

[0094] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and modules described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0095] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.

[0096] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0097] In addition, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.

[0098] If a function is implemented as a software module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0099] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0100] In conclusion, the above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A deep learning-based automatic segmentation method for urinary stone CT images, characterized in that, The method comprises the following steps: S1, acquiring a CT image of a urinary calculus; S2, performing initial segmentation on the CT image by using a pre-trained deep learning model to generate an initial calculus segmentation region; S3, evaluating the texture heterogeneity degree by analyzing the eigenvalue distribution of the structure tensor field of the edge neighborhood of the initial calculus segmentation region, and determining a calcification artifact risk region when the texture heterogeneity degree exceeds a preset degree threshold; S4, locating a pseudo-artifact source point that causes the calcification artifact based on the projection geometry principle of CT imaging by reversely tracing the spatial position relationship between the calcification artifact risk region and the initial calculus segmentation region; S5, identifying the boundary distortion characteristics caused by the pseudo-artifact source point by analyzing the morphological distortion characteristics of the CT value profile curve and the curvature singularity characteristics of the local boundary; S6, performing geometric correction on the boundary corresponding to the pseudo-artifact source point in the initial calculus segmentation region according to the identification result of the boundary distortion characteristics to obtain a final calculus segmentation region. 2.The deep learning-based automatic segmentation method of urinary stone CT images according to claim 1, characterized in that, The method comprises the following steps: S1, acquiring a CT image of a urinary calculus; S2, performing initial segmentation on the CT image by using a pre-trained deep learning model to generate an initial calculus segmentation region; 3.The deep learning-based automatic segmentation method of urinary stone CT images according to claim 1, characterized in that, S3, evaluating the texture heterogeneity degree by analyzing the eigenvalue distribution of the structure tensor field of the edge neighborhood of the initial calculus segmentation region, and determining a calcification artifact risk region when the texture heterogeneity degree exceeds a preset degree threshold; S4, locating a pseudo-artifact source point that causes the calcification artifact based on the projection geometry principle of CT imaging by reversely tracing the spatial position relationship between the calcification artifact risk region and the initial calculus segmentation region; S5, identifying the boundary distortion characteristics caused by the pseudo-artifact source point by analyzing the morphological distortion characteristics of the CT value profile curve and the curvature singularity characteristics of the local boundary; S6, performing geometric correction on the boundary corresponding to the pseudo-artifact source point in the initial calculus segmentation region according to the identification result of the boundary distortion characteristics to obtain a final calculus segmentation region. 4.The deep learning-based automatic segmentation method of urinary stone CT images according to claim 1, characterized in that, The method comprises the following steps: S1, acquiring a CT image of a urinary calculus; S2, performing initial segmentation on the CT image by using a pre-trained deep learning model to generate an initial calculus segmentation region; S3, evaluating the texture heterogeneity degree by analyzing the eigenvalue distribution of the structure tensor field of the edge neighborhood of the initial calculus segmentation region, and determining a calcification artifact risk region when the texture heterogeneity degree exceeds a preset degree threshold; S4, locating a pseudo-artifact source point that causes the calcification artifact based on the projection geometry principle of CT imaging by reversely tracing the spatial position relationship between the calcification artifact risk region and the initial calculus segmentation region; S5, identifying the boundary distortion characteristics caused by the pseudo-artifact source point by analyzing the morphological distortion characteristics of the CT value profile curve and the curvature singularity characteristics of the local boundary; 5.The deep learning-based automatic segmentation method of urinary stone CT images according to claim 4, characterized in that, S6, performing geometric correction on the boundary corresponding to the pseudo-artifact source point in the initial calculus segmentation region according to the identification result of the boundary distortion characteristics to obtain a final calculus segmentation region. The method comprises the following steps: S1, acquiring a CT image of a urinary calculus; S2, performing initial segmentation on the CT image by using a pre-trained deep learning model to generate an initial calculus segmentation region; S3, evaluating the texture heterogeneity degree by analyzing the eigenvalue distribution of the structure tensor field of the edge neighborhood of the initial calculus segmentation region, and determining a calcification artifact risk region when the texture heterogeneity degree exceeds a preset degree threshold; S4, locating a pseudo-artifact source point that causes the calcification artifact based on the projection geometry principle of CT imaging by reversely tracing the spatial position relationship between the calcification artifact risk region and the initial calculus segmentation region; S5, identifying the boundary distortion characteristics caused by the pseudo-artifact source point by analyzing the morphological distortion characteristics of the CT value profile curve and the curvature singularity characteristics of the local boundary; S6, performing geometric correction on the boundary corresponding to the pseudo-artifact source point in the initial calculus segmentation region according to the identification result of the boundary distortion characteristics to obtain a final calculus segmentation region. 6.The deep learning-based automatic segmentation method of urinary stone CT images according to claim 1, characterized in that, The space position relationship between the hardened artifact risk area and the initial stone segmentation area is traced back reversely, and a projection geometry principle of CT imaging is used to locate a pseudo-artifact source point causing the hardened artifact, including: a normal projection plane perpendicular to a CT scanning plane is established in the marked hardened artifact risk area; a reference ray path is constructed in the normal projection plane, which starts from an X-ray source point and passes through a center point of the hardened artifact risk area; a main direction of artifact propagation is identified based on a distribution mode of intersection points of the reference ray path and a boundary of the initial stone segmentation area; a candidate pseudo-artifact source point is searched on the boundary of the initial stone segmentation area along the main direction of artifact propagation and meets a projection geometry constraint; a final position of the pseudo-artifact source point is determined by verifying a space continuity between the candidate pseudo-artifact source point and the corresponding hardened artifact risk area. 7.The deep learning-based automatic segmentation method of urinary stone CT images according to claim 6, characterized in that, The main direction of artifact propagation is identified based on the distribution mode of intersection points of the reference ray path and the boundary of the initial stone segmentation area, including: the spatial distribution positions of all intersection points of the reference ray path and the boundary of the initial stone segmentation area on the boundary of the initial stone segmentation area are counted, the spatial distribution characteristics formed by the intersection points on the boundary of the initial stone segmentation area are analyzed, and the main direction of artifact propagation is determined according to the main extension direction embodied in the spatial distribution characteristics. 8.The deep learning-based automatic segmentation method of urinary stone CT images according to claim 1, characterized in that, The boundary distortion characteristics caused by the pseudo-artifact source point are identified by analyzing the morphological distortion characteristics of the CT value profile curve caused by the pseudo-artifact source point and the curvature singularity characteristics of the local boundary, including: a profile curve is constructed by sampling CT values in the inward and outward directions along the normal direction of the boundary of the initial stone segmentation area from the determined pseudo-artifact source point; a kurtosis coefficient of the profile curve is calculated to quantify the sharpness of the peak of the curve, and an asymmetry coefficient of the profile curve is calculated to quantify the overall skew direction of the curve distribution, which are used as the morphological distortion characteristics; a discrete curvature distribution is calculated on the boundary segment corresponding to the pseudo-artifact source point, and high-frequency fluctuations exceeding the normal anatomical variation range in the discrete curvature distribution are extracted as the curvature singularity characteristics; the abnormal response regions of the kurtosis coefficient and the asymmetry coefficient in the morphological distortion characteristics and the high-frequency fluctuation regions in the curvature singularity characteristics are spatially matched, and when they coincide in the spatial position, the corresponding coincident region is identified as the boundary distortion characteristics caused by the pseudo-artifact source point. 9.The deep learning-based automatic segmentation method of urinary stone CT images according to claim 8, characterized in that, The kurtosis coefficient of the profile curve is calculated to quantify the sharpness of the peak of the curve, and the asymmetry coefficient of the profile curve is calculated to quantify the overall skew direction of the curve distribution, including: the ratio of the fourth-order central moment to the fourth power of the standard deviation of the constructed profile curve is calculated to obtain the kurtosis coefficient, and the ratio of the third-order central moment to the third power of the standard deviation of the profile curve is calculated to obtain the asymmetry coefficient, which are used as the morphological distortion characteristics. 10.The deep learning-based automatic segmentation method of urinary stone CT images according to claim 1, characterized in that, According to the identification result of the boundary distortion characteristics, the boundary corresponding to the pseudo-artifact source point in the initial stone segmentation area is geometrically corrected to obtain a final stone segmentation area, including: high-frequency fluctuation peak points in the curvature singularity characteristics in the identified boundary distortion characteristic region are extracted as key control points for boundary correction; a boundary normal correction amount is calculated based on the morphological distortion characteristics of the CT value profile curve at the key control points; A smooth correction boundary curve is generated between the key control points by an interpolation algorithm; The initial stone segmentation region is replaced by the smooth correction boundary curve to obtain a final stone segmentation region with corrected geometry.

Citation Information

Cited By

  • Oral and maxillofacial region CT image automatic segmentation method and system

    CN121982048A

  • An automatic segmentation method and system for oral and maxillofacial CT images

    CN121982048B

  • Image recognition assisted positioning method and system for hypospadias surgery in children

    CN122223019A

  • Cardiovascular oct image plaque automatic recognition method and system based on deep learning

    CN122391626A