A method for automatic segmentation and three-dimensional positioning of small kidney stones based on CT images

By constructing inner and outer layer regions, local saliency, and structural regularity, and adjusting the level set edge indicator function, the problem of missed detection and false positive segmentation of small kidney stones in CT images was solved, achieving accurate segmentation and three-dimensional localization of small kidney stones and reducing the missed detection and false positive rates.

CN122492733APending Publication Date: 2026-07-31AIR FORCE MEDICAL CENT PLA
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
AIR FORCE MEDICAL CENT PLA
Filing Date
2026-07-01
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing level set segmentation methods suffer from problems such as missed detection of weak edges of small targets and high false positive rates due to the use of fixed global contrast parameters in edge indicator functions, making accurate segmentation particularly difficult in the boundary detection of small kidney stones in CT images.

Method used

By constructing an inner analysis region and an outer background region, the local saliency is determined based on the grayscale difference and the degree of background fluctuation, candidate points are screened, and the structural regularity is determined by the radial monotonicity and directional consistency within the local window. By combining the grayscale change trend and attenuation smoothness of the ring zone, the contrast parameter of the level set edge indicator function is adjusted to achieve accurate segmentation and three-dimensional localization of small kidney stones.

Benefits of technology

It effectively reduces the risk of missed detection and false positive rate of small kidney stones, improves the specificity and accuracy of small kidney stone boundary detection, adapts to background noise, stably screens out candidate points, and distinguishes small kidney stones from noise or artifacts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122492733A_ABST
    Figure CN122492733A_ABST
Patent Text Reader

Abstract

This invention relates to the field of medical image processing technology, specifically to an automatic segmentation and three-dimensional localization method for small kidney stones based on CT images. The method determines local saliency based on the gray-level difference between the inner analysis area and the outer background area of ​​a pixel, as well as the degree of gray-level fluctuation in the outer layer; and selects candidate points; obtains the structural regularity of candidate points based on the radial monotonicity and directional consistency of gray-level distribution within the candidate point window; divides multiple concentric rings centered on the candidate points; calculates the ring gray level of each ring; determines the scale matching degree based on the gray-level change trend of adjacent rings and the relative concentration of ring gray-level differences; determines the comprehensive confidence level based on saliency, regularity, and matching degree; adjusts the contrast parameter of the level set edge indicator function based on the comprehensive confidence level; and uses the adjusted function to drive the evolution of the level set to obtain the segmented contour and three-dimensional spatial localization of the target, thereby reducing the rate of missed detection of weak edges and false positives.
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, specifically to a method for automatic segmentation and three-dimensional localization of small kidney stones based on CT images. Background Technology

[0002] CT imaging, as a routine method for high-density target detection in clinical diagnosis, has a high detection rate for larger kidney stones. However, for smaller kidney stones, due to partial volume effects, noise interference, and uneven grayscale, conventional image segmentation algorithms often struggle to accurately extract their boundaries. Among numerous segmentation methods, the level set algorithm, while suitable for segmenting small targets with blurred boundaries, has become an important tool in the field of medical image segmentation.

[0003] Currently, traditional level set methods typically rely on a fixed global contrast parameter to control gradient sensitivity. This contrast parameter determines the strength of gradient changes in an image that can be considered target boundaries. If the contrast parameter is set too low, the edge indicator function is sensitive to gradients and can capture weak edges, but it is easily fooled by background noise or artifacts, leading to numerous false positives. If the contrast parameter is set too high, the edge indicator function is insensitive to gradients and can penetrate noisy regions, but it is prone to leakage at the true weak boundaries of small kidney stones, resulting in missed detections. Because small kidney stones exhibit weak boundary characteristics in CT images, the gradient magnitude at their boundaries is often comparable to the gradient magnitude of background noise. Using a fixed contrast parameter cannot simultaneously capture weak boundaries of small kidney stones and suppress noise; improper parameter settings can easily lead to false positive segmentation or missed target detection. Summary of the Invention

[0004] To address the technical problems of missed detection of weak edges of small targets and high false positive rates in existing level set segmentation methods due to the use of fixed global contrast parameters in edge indicator functions, this invention provides an automatic segmentation and three-dimensional localization method for small kidney stones based on CT images. The specific technical solution adopted is as follows: This invention proposes an automatic segmentation and three-dimensional localization method for small kidney stones based on CT images. The method includes: Acquire preprocessed CT images; For each pixel in a CT image, an inner analysis region and an outer background region are constructed. Based on the grayscale difference between the two and the grayscale fluctuation of the outer background region, the local saliency of the pixel is determined. Candidate points are selected from all pixels based on local saliency; a local window is constructed for each candidate point; the radial monotonicity is determined based on the radial monotonicity of the gray-level distribution within the window, the directional consistency is determined based on directional consistency, and the two are fused to obtain the structural regularity of the candidate points. Divide the candidate point into multiple concentric rings; calculate the ring gray level of each ring; determine the radial monotonicity ratio based on the ring gray level variation trend of adjacent rings; determine the attenuation smoothness based on the relative concentration of the ring gray level difference between adjacent rings; and fuse the radial monotonicity ratio and the attenuation smoothness to obtain the scale matching degree of the candidate point. The overall confidence level is determined based on local saliency, structural regularity, and scale matching. The contrast parameter of the level set edge indicator function is adjusted based on the overall confidence level. The adjusted function is used to drive the evolution of the level set to obtain the accurate segmentation contour of the target and realize the three-dimensional spatial positioning of the target.

[0005] Furthermore, the construction of an inner analysis region and an outer background region for each pixel in the CT image includes: Obtain the radius of the inner region and the radius of the outer region; Concentric circular regions are constructed with the pixel as the center, based on the inner and outer region radii; The circular region constructed with the radius of the inner region within the concentric circle region is denoted as the inner analysis region; the annular region extending outward from the edge of the inner analysis region to the edge of the concentric circle region is denoted as the outer background region.

[0006] Furthermore, the local saliency determination process includes: Calculate the arithmetic mean of the gray values ​​of all pixels in the inner analysis area as the inner gray mean; calculate the arithmetic mean of the gray values ​​of all pixels in the outer background area as the outer gray mean; calculate the standard deviation of the gray values ​​of all pixels in the outer background area as the outer gray standard deviation. Calculate the difference between the mean gray level of the inner layer and the mean gray level of the outer layer as the gray level difference value; calculate the sum of the standard deviation of the outer layer gray level and the preset minimum positive number as the first sum value; Divide the grayscale difference value by the first sum value to obtain the local saliency of the pixel.

[0007] Furthermore, the candidate point is a pixel whose local saliency is greater than zero; The radial single-schedule determination process includes: For each candidate point, a circular local window is constructed with the candidate point as the center; the radius of the circular local window is determined based on the arithmetic mean of the supporting region radii of all local maxima points in the CT image. Calculate the Euclidean distance from all pixels within the local window to the candidate point, and use this distance as the first distance; Based on the first distance in ascending order, all pixels within the local window are divided into multiple concentric annular bands; each annular band corresponds to a distance interval, and the first distance from pixels within the same annular band to the candidate point belongs to the same distance interval. List all pixel pairs formed by pixels within two different annular bands, filter out pixel pairs where the first distance between pixels in the inner annular band is less than the first distance between pixels in the outer annular band, and record the total number of valid pixel pairs. Each valid pixel pair is checked one by one, and the number of pixel pairs that meet the decreasing condition is selected as the number of decreasing pixel pairs; where the decreasing condition is that the gray value of the inner circle pixel in the valid pixel pair is greater than or equal to the gray value of the outer circle pixel. The radial single schedule is obtained by dividing the number of decreasing pixel pairs by the total number of valid pixel pairs.

[0008] Furthermore, the process of determining the structural regularity includes: Centered on the candidate point, the local window is divided into multiple directional intervals, each covering the same angular range; For each directional interval, pixels radially distributed outward from the candidate point are collected; the collected pixels are arranged in ascending order according to their first distance from the candidate point to obtain the radial grayscale sequence of the directional interval. The radial grayscale sequences of each directional interval are length aligned; any two different directional intervals are taken to form a directional interval pair; the Pearson correlation coefficient between the length-aligned radial grayscale sequences in the directional interval pair is calculated as the correlation coefficient; if the correlation coefficient is negative, the correlation coefficient is truncated to zero. Calculate the variance of the radial grayscale sequence for each directional interval; if there is an outlier directional interval with zero variance, set the correlation coefficient between the outlier directional interval and all other directional intervals to zero; calculate the arithmetic mean of the correlation coefficients of all directional interval pairs as the directional consistency. Multiply the directional consistency by the radial single scheduling to obtain the structural regularity of the candidate points.

[0009] Furthermore, the process of calculating the grayscale of each ring includes: Determine the maximum investigation radius and divide it into multiple equally spaced radius steps; using the candidate point as the center, construct multiple equally spaced concentric rings based on the multiple equally spaced radius steps; Calculate the arithmetic mean of the gray values ​​of all pixels within each ring zone, and use it as the original ring zone gray value for each ring zone; Calculate the difference between the gray value of the candidate point and the preset local background gray value, and use it as the baseline difference; if the baseline difference is less than or equal to zero, exclude the corresponding candidate point. If the reference difference is greater than zero, subtract the preset local background gray level from the original ring gray level of each ring, and then divide by the reference difference to obtain the ring gray level.

[0010] Furthermore, the radial monotonic ratio determination process includes: Sort all the rings according to their distance from the center from near to far, and arrange the gray levels of the sorted rings in sequence to form a radial gray level profile; initialize the counter to zero; The total number of rings in the radial grayscale profile is counted and denoted as the first number. Then the total number of adjacent ring pairs is the first number minus one and denoted as the second number. Starting from the innermost ring, the grayscale of the current ring is compared with the grayscale of the next outer ring to determine whether the grayscale of the current ring is greater than that of the outer ring. For each pair of adjacent ring bands, if the gray level of the inner ring band is greater than that of the outer ring band, increment the counter by 1; After traversing all adjacent ring pairs, divide the counter value by the second quantity to obtain the radial monotonic ratio.

[0011] Furthermore, the scale matching degree determination process includes: Based on the radial grayscale profile, starting from the innermost ring, the difference between the grayscale of each inner ring and the grayscale of its adjacent outer ring is calculated sequentially as the grayscale difference; all grayscale differences are arranged in order of distance from the center from near to far to form a decreasing amplitude sequence. Calculate the arithmetic mean of all grayscale differences in the decreasing amplitude sequence as the grayscale mean; calculate the standard deviation of all grayscale differences in the decreasing amplitude sequence as the grayscale standard deviation. If the average grayscale value is less than or equal to zero, the attenuation smoothness of the candidate point is directly determined to be zero. If the average gray value is greater than zero, the original value of the attenuation smoothness is obtained based on the average gray value and the gray standard deviation; the original value of the attenuation smoothness of the candidate point is normalized to obtain the normalized attenuation smoothness. Multiplying the radial monotonicity and the attenuation smoothness yields the scale matching degree of the candidate points.

[0012] Furthermore, the determination of the overall confidence level based on local saliency, structural regularity, and scale matching includes: Obtain the influence weights of preset rules and preset scales; Calculate the difference between 1 and the structural regularity as the rule missing degree; multiply the preset rule influence weight, rule missing degree, and local significance to obtain the first product; subtract the first product from 1 to obtain the rule correction coefficient; multiply the local significance by the rule correction coefficient to obtain the provisional confidence level. Calculate the difference between 1 and the scale matching degree as the scale missing degree; multiply the preset scale influence weight by the scale missing degree to obtain the second product; subtract the second product from 1 to obtain the scale correction coefficient; multiply the provisional confidence degree by the scale correction coefficient to obtain the initial confidence degree. The initial confidence level is subjected to an S-shaped transformation to obtain the overall confidence level.

[0013] Further, the adjustment of the contrast parameter of the level set edge indicator function based on the comprehensive confidence level includes: Obtain the minimum and maximum preset contrast parameters; calculate the difference between the minimum and maximum preset contrast parameters as the contrast difference value. For each candidate point, the overall confidence score is multiplied by the contrast difference to obtain the confidence-weighted difference; the difference between the maximum value of the preset contrast parameter and the confidence-weighted difference is calculated as the contrast parameter of the candidate point. For non-candidate points, their overall confidence level is set to zero, and their contrast parameter is the maximum value of the preset contrast parameter.

[0014] An automatic segmentation and three-dimensional localization system for small kidney stones based on CT images is disclosed. The system includes a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of an automatic segmentation and three-dimensional localization method for small kidney stones based on CT images.

[0015] The present invention has the following beneficial effects: This invention constructs an inner analysis region and an outer background region. Based on the grayscale difference between the two and the degree of grayscale fluctuation in the outer background region, a local saliency is obtained. This local saliency is positively correlated with the grayscale difference and negatively correlated with the degree of background fluctuation, achieving self-adaptation to background fluctuations. In regions with uniform backgrounds, the local saliency maintains high sensitivity to slight grayscale increases, while in regions with complex backgrounds, the local saliency automatically reduces its sensitivity, effectively suppressing false responses. This allows for stable screening of candidate points even when the contrast between small kidney stones and the background is extremely low, significantly reducing the risk of missed detections. A local window is constructed for each candidate point. Radial monotonicity is determined based on the radial monotonicity of the grayscale distribution within the window, and directional consistency is determined based on directional consistency. These two factors are combined to obtain structural regularity, thereby quantifying the local spatial structural characteristics of candidate points from two dimensions: radial monotonicity tests whether the grayscale shows a monotonically decreasing trend from the center outwards, and directional consistency tests whether the grayscale profiles in each direction are similar, with only candidate points showing similarity. Only when the structure possesses both the characteristics of "bright center and dark edge" and "isotropy" can its regularity be relatively high, thus effectively distinguishing small kidney stones with regular shapes from scattered noise or strip artifacts and reducing the false positive rate. Multiple concentric rings are divided around the candidate point, and the gray level of each ring is calculated. The radial monotonicity ratio is determined based on the gray level change trend of adjacent rings, and the attenuation smoothness is determined based on the relative concentration of the gray level difference between adjacent rings. The two are then combined to obtain the scale matching degree of the candidate point. The radial monotonicity ratio measures whether the gray level of each ring gradually decreases with increasing radius from the center outwards, while the attenuation smoothness measures whether the gray level decrease between adjacent rings is uniform. It can be seen that only when the gray level shows a monotonically decreasing trend from the center outwards with a uniform and smooth decrease can the scale matching degree be relatively high. This design, based on the principle of partial volume effect, can effectively distinguish small kidney stones from large-sized interference structures with plateau or bimodal shapes, further improving the specificity of small kidney stone boundary detection. Attached Figure Description

[0016] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a flowchart of an automatic segmentation and three-dimensional localization method for small kidney stones based on CT images, provided in one embodiment of the present invention. Figure 2 This is an example diagram illustrating the structural regularity determination process provided in one embodiment of the present invention. Detailed Implementation

[0018] The following description, in conjunction with the accompanying drawings, details the specific scheme of the automatic segmentation and three-dimensional localization method for small kidney stones based on CT images provided by this invention.

[0019] Please see Figure 1 The diagram illustrates a flowchart of an automatic segmentation and three-dimensional localization method for small kidney stones based on CT images, according to an embodiment of the present invention. The method includes: S101: Acquire the preprocessed CT image.

[0020] It's important to understand that the level set method is a commonly used active contour model in image segmentation. This method implicitly represents the segmentation contour using a zero-level set of a high-dimensional function, and drives contour evolution by solving partial differential equations, gradually approximating the true boundary of the target. In the level set method, the edge indicator function (also known as the edge stopping function) is the core component controlling contour evolution. The classic edge indicator function is expressed by the following formula: Where g represents the edge indicator function value; Represents the image gradient; The contrast parameter controls the sensitivity of the edge indicator function to image gradients. If the gradient magnitude at a point in the image is much greater than the contrast parameter, the edge indicator function value approaches 0, stopping the contour evolution. Conversely, if the gradient magnitude is much smaller than the contrast parameter, the edge indicator function value approaches 1, allowing the contour to continue evolving. Therefore, the contrast parameter determines the strength of gradient changes considered as target boundaries. In traditional level set methods, the contrast parameter is typically set to a fixed global constant.

[0021] CT images are acquired by CT equipment and stored in DICOM format. Each pixel corresponds to a CT value, which reflects the degree of tissue attenuation of X-rays. Typically, during clinical acquisition, the subject is scanned while holding their breath to reduce motion artifacts.

[0022] It should be noted that the CT images mentioned in this invention refer to two-dimensional tomographic slice images generated by CT scans. Specifically, the subsequent steps involve performing a segmentation method layer by layer on each two-dimensional slice, and then stacking the segmentation results of each layer to achieve three-dimensional localization.

[0023] It should be noted that the preprocessing includes anisotropic diffusion filtering and grayscale normalization. Specifically, to suppress image noise while preserving edge structure, anisotropic diffusion filtering is used to achieve strong smoothing in uniform regions with small image gradients to suppress noise, and weak smoothing or no smoothing in edge regions with large image gradients to maintain edge sharpness. To eliminate the differences in image grayscale range under different CT equipment and scanning parameters, grayscale normalization is used to map the image grayscale values ​​to a standard range (e.g., 0 to 255).

[0024] S102: For each pixel in the CT image, construct its inner analysis area and outer background area, and determine the local saliency of the pixel based on the gray level difference between the two and the gray level fluctuation of the outer background area.

[0025] It's important to understand that small targets appear as locally high-density areas in CT images, with their inner grayscale typically higher than the outer background grayscale. Therefore, calculating the grayscale difference can provide a preliminary identification of potential targets. However, the degree of background fluctuation varies across different regions. For example, a slight increase in grayscale is significant against a uniform background like kidney parenchyma, while the same increase might only be normal fluctuation against a complex background. Therefore, it's necessary to consider the degree of background fluctuation simultaneously. To this end, we consider the grayscale difference between the inner analysis area of ​​a pixel and the outer background area, as well as the degree of grayscale fluctuation in the outer background area, thereby achieving adaptive saliency detection that is highly sensitive in uniform backgrounds and less sensitive in complex backgrounds.

[0026] As a preferred implementation, the inner region radius and the outer region radius are obtained; concentric circle regions are constructed with the pixel as the center based on the inner region radius and the outer region radius; the circular region constructed with the inner region radius in the concentric circle region is denoted as the inner analysis region; the annular region extending outward from the edge of the inner analysis region to the edge of the concentric circle region is denoted as the outer background region.

[0027] It is understandable that the radius of the inner region is smaller than the radius of the outer region.

[0028] Specifically, with the current pixel as the center, two concentric circles are drawn with the inner radius as the first radius and the outer radius as the second radius, forming a concentric circular region. The circular region corresponding to the first radius is denoted as the inner analysis region, which is used to cover the main part of the potential target; the annular region between the first and second radii is denoted as the outer background region, which is used to capture the statistical characteristics of the local background.

[0029] As a preferred adaptive implementation, the inner and outer radii are adaptively determined based on the local structural statistical characteristics of the current CT image: local maxima are extracted from the CT image; the radius of the supporting region for each local maxima is calculated, and all supporting region radii are sorted from smallest to largest to form a statistical set; the smaller quantile (e.g., the 25th percentile) of the statistical set is taken as the inner radius, and the larger quantile (e.g., the 75th percentile) is taken as the outer radius.

[0030] As a simplified implementation, a preset fixed radius value can also be used, such as an inner radius of 2 pixels and an outer radius of 5 pixels.

[0031] A local maximum (Local Maximum) is a pixel whose grayscale value is higher than its surrounding neighboring pixels. The radius of the support region refers to the average distance of the area covered by extending outward from the center of the Local Maximum until the grayscale value drops to half of its peak value. It should be noted that the determination of both the Local Maximum and the radius of the support region are common methods in existing technologies, which should be understood by those skilled in the art, and will not be elaborated upon here.

[0032] Because for pixels near the boundaries of a CT image, when constructing the inner analysis region and outer background region centered on them, the concentric circle region may partially extend beyond the image boundary. As a processing method, local saliency calculation is performed only on pixels that can form complete inner analysis regions and outer background regions; for boundary pixels that cannot form complete concentric circle regions, their local saliency is directly set to zero and they are not included in subsequent candidate point selection. Alternatively, as an alternative, the portion extending beyond the boundary can be mirrored or the edge pixel values ​​copied to complete the concentric circle region before calculation.

[0033] It should be specifically noted that the term "small kidney stone" in this solution refers to a tiny target appearing as a localized high-density area in CT images, with a diameter smaller than a preset threshold (e.g., 5 mm). Therefore, this solution is not limited to the detection of kidney stones; any tiny target exhibiting a localized high-density feature in CT images can be segmented and located using the method of this invention. For the sake of brevity, "small kidney stone" or "localized high-density target" will be collectively referred to as "target" or "small target" in the following text.

[0034] In a preferred embodiment, the arithmetic mean of the gray values ​​of all pixels in the inner analysis area is calculated as the inner gray mean; the arithmetic mean of the gray values ​​of all pixels in the outer background area is calculated as the outer gray mean; the standard deviation of the gray values ​​of all pixels in the outer background area is calculated as the outer gray standard deviation; the difference between the inner gray mean and the outer gray mean is calculated as the gray difference value; the sum of the outer gray standard deviation and a preset minimum positive number is calculated as the first sum; the gray difference value is divided by the first sum to obtain the local saliency of the pixel.

[0035] Since the inner layer grayscale mean reflects the overall brightness level of the potential target subject area (i.e., the area represented by the inner layer analysis area), and the outer layer grayscale mean reflects the brightness benchmark of the local background (i.e., the area represented by the outer layer background area), the grayscale difference value represents the grayscale increase of a pixel's area relative to its local background. A larger grayscale difference value for a pixel indicates a brighter area and a greater likelihood of it becoming a target candidate.

[0036] The outer grayscale standard deviation reflects the degree of dispersion of grayscale values ​​within the local background, that is, the degree of fluctuation of the local background.

[0037] It should be noted that the specific value of the preset minimum positive number can be determined based on industry experience, and this embodiment does not impose a specific limitation. For example, the preset minimum positive number is usually 10 to the power of -6.

[0038] Local saliency is a dimensionless numerical value used to characterize the degree of gray-level elevation of a pixel relative to its local background. Local saliency has the following characteristics: when the local background fluctuation is small (i.e., the outer gray-level standard deviation is small), the same gray-level difference value will produce a larger saliency, and it is more sensitive in a uniform background; when the background fluctuation is large (i.e., the outer gray-level standard deviation is large), the same gray-level difference value will produce a smaller saliency.

[0039] S103: Select candidate points from all pixels based on local saliency; construct a local window for each candidate point; determine radial monotonicity based on the radial monotonicity of grayscale distribution within the window, determine directional consistency based on directional consistency, and fuse the two to obtain the structural regularity of the candidate points.

[0040] Since the first sum is always positive, the sign of local saliency is entirely determined by the numerator, i.e., by the gray-level difference value. Therefore, if the local saliency of a pixel is greater than zero, it means that the mean gray level of the inner layer is greater than the mean gray level of the outer layer. That is, the average brightness of the inner analysis area where the pixel is located is higher than the average brightness of the surrounding background area. In CT images, high-density targets (such as small stones) typically exhibit local gray levels higher than the surrounding background, so such pixels have the potential to become candidate points. Conversely, if the local saliency of a pixel is equal to zero, it means that the mean gray level of the inner layer is equal to the mean gray level of the outer layer. The area where the pixel is located has no significant difference from the background and does not possess the characteristics of becoming a candidate point. If the local saliency is less than zero, it means that the mean gray level of the inner layer is less than the mean gray level of the outer layer. The area where the pixel is located is darker than the background and does not meet the characteristics of a high-density target.

[0041] In this embodiment, a candidate point is a pixel whose local saliency is greater than zero.

[0042] In this embodiment, after selecting candidate points based on local saliency, the method further includes: calculating the minimum and maximum values ​​of the local saliency of all candidate points; and mapping the local saliency of each candidate point to the interval between 0 and 1 through minimum-maximum normalization to obtain the normalized local saliency.

[0043] It should be noted that the local significance mentioned in the subsequent steps refers to the local significance after normalization, and its value ranges from 0 to 1.

[0044] It's important to understand that local saliency, which judges pixel brightness solely based on grayscale differences and background fluctuations, cannot distinguish the regularity of the bright spot's shape. Relying solely on local saliency can easily lead to misidentification of isolated high-intensity noise points or microcalcifications—bright but irregularly shaped structures—as targets. Furthermore, in CT images, high-density targets (such as small stones) exhibit the following characteristics due to partial volume effects and their near-spherical growth morphology: from the center outwards, the proportion of voxels occupied by the target gradually decreases, and the CT value monotonically decreases accordingly; simultaneously, because the target is approximately spherical, its two-dimensional slices are circular, and the grayscale attenuation patterns in all directions are basically similar, exhibiting a centrally symmetrical distribution. These characteristics are the result of the combined effects of CT imaging physics and spherical geometry, and are common knowledge in the field. In contrast, isolated noise points are usually scattered and lack a regular spatial structure; while strip artifacts (such as blood vessel sections) may also exhibit monotonically decreasing attenuation in a certain direction, their attenuation patterns differ significantly across directions. Therefore, based on the above distinguishing features, the spatial structure regularity of candidate points can be quantified from two dimensions: radial monotonicity and directional consistency, in order to distinguish targets with regular shapes from interference points with messy shapes.

[0045] The radial single-schedule determination process includes the following steps: 1) For each candidate point, construct a circular local window centered on the candidate point; wherein, the radius of the circular local window is determined based on the arithmetic mean of the supporting region radii of all local maxima points in the CT image.

[0046] As a specific implementation method, the arithmetic mean of the supporting region radii of all local maxima points in the CT image is calculated as the window radius; a circular local window is constructed with the current candidate point as the center.

[0047] It should be noted that local maxima are subsets of candidate points (the local significance of a local maxima is necessarily greater than zero), and the calculation of the support region radius only applies to local maxima. Furthermore, since the diameter of small targets has a preset range, and the size differences between different targets are small, this invention uses the arithmetic mean of the support region radii of all local maxima as a unified local window radius. Those skilled in the art should understand that either a unified window radius or an adaptive window radius can achieve the purpose of this invention, and this invention does not limit the specific method of determining the window radius.

[0048] 2) Calculate the Euclidean distance from all pixels within the local window to the candidate point, and use it as the first distance.

[0049] It should be noted that the Euclidean distance calculation method is a common technique, and will not be described in detail in this embodiment.

[0050] The first distance reflects how far a pixel within a local window of a candidate point deviates from the center (i.e., the candidate point itself).

[0051] 3) Divide all pixels within the local window into multiple concentric annular bands in ascending order of first distance; each annular band corresponds to a distance interval, and the first distance from pixels within the same annular band to the candidate point belongs to the same distance interval.

[0052] As an example, a distance step size is preset; the window radius is divided into multiple consecutive intervals, resulting in multiple distance intervals, each corresponding to a ring band; pixels within a local window are assigned to the corresponding ring band based on their first distance falling into the corresponding distance interval. Specifically, first, a distance step size (usually 1 pixel) is determined; then, the window radius is divided into multiple consecutive distance intervals with this distance step size as the interval. For example, pixels with a first distance between 0 and 1 are assigned to the first ring band, those between 1 and 2 to the second ring band, those between 2 and 3 to the third ring band, and so on.

[0053] To avoid ambiguity in pixel classification at distance interval boundaries, one specific implementation method is to use half-integer boundaries to divide the intervals, such as [0.5, 1.5), [1.5, 2.5), etc., so that any first distance can only uniquely fall into one interval. Alternatively, as an alternative implementation method, it can be agreed that pixels are uniformly classified into the inner or outer circle.

[0054] 4) List all pixel pairs formed by pixels within two different annular bands, filter out pixel pairs where the first distance between pixels in the inner annular band is less than the first distance between pixels in the outer annular band, and record the total number of valid pixel pairs.

[0055] It should be noted that the inner and outer rings in this scheme are relative concepts. The inner and outer rings can be determined by comparing the radii of the two rings.

[0056] The two pixels in an effective pixel pair come from different annular zones, and the inner pixel is closer to the center than the outer pixel.

[0057] 5) Check each valid pixel pair one by one, and select the number of pixel pairs that meet the decreasing condition as the decreasing pixel pair number; where the decreasing condition is that the gray value of the inner circle pixel in the valid pixel pair is greater than or equal to the gray value of the outer circle pixel; divide the decreasing pixel pair number by the total number of valid pixel pairs to obtain the radial single schedule.

[0058] Radial single-discretion reflects the statistical proportion of gray levels monotonically decreasing from the center outwards within a local window of a candidate point. The value of radial single-discretion ranges from 0 to 1. If the radial single-discretion of a candidate point's local window is close to 1, it indicates that most pixel pairs within the local window satisfy the relationship that the inner gray level is not lower than the outer gray level, and the local window exhibits a stronger radial monotonically decreasing trend. If the radial single-discretion of a candidate point's local window is close to 0.5, it indicates that the gray level distribution within the local window is nearly random. If the radial single-discretion of a candidate point's local window is less than 0.5, it indicates that the gray level within the local window actually shows an increasing trend.

[0059] The process of determining structural regularity is as follows: Figure 2 As shown, it includes: S103-1: Centered on the candidate point, the local window is divided into multiple directional intervals, each directional interval covering the same angular range.

[0060] It's important to note that determining the number of direction intervals typically requires balancing computational efficiency and direction sensitivity. In short, too few direction intervals make it difficult to capture subtle directional changes, while too many increase computational complexity. For example, eight direction intervals are an empirically preferred value. Alternatively, the number of direction intervals can be adaptively determined based on the local window radius. For instance, a larger window radius results in more direction intervals, and a smaller window radius results in fewer. For example, four direction intervals are used when the window radius is less than 3 pixels, while 12 or 16 are used when the window radius is greater than 5 pixels.

[0061] For example, if we want to divide the 360-degree circle into 8 equal directional intervals, then we would divide the 360-degree circle into 8 equal directional intervals, with each interval covering a 45-degree angle range.

[0062] S103-2: For each directional interval, collect pixels radially distributed outward from the candidate point within the directional interval; arrange the collected pixels in ascending order according to the first distance to the candidate point to obtain the radial grayscale sequence of the directional interval.

[0063] Outward radial distribution refers to extending outward from the center of the candidate point along the ray direction. Specifically, for a given directional interval, all pixels in the outward radial direction within that directional interval are taken. These pixels are roughly arranged on a ray originating from the center. Then, these pixels are arranged in ascending order of their first distance from the center, thus obtaining the radial grayscale sequence for that directional interval.

[0064] A radial grayscale sequence in a certain directional range reflects the change in grayscale values ​​from the center outwards in that direction.

[0065] S103-3: Perform length alignment processing on the radial grayscale sequences of each directional interval; take any two different directional intervals to form a directional interval pair; calculate the Pearson correlation coefficient between the length-aligned radial grayscale sequences in the directional interval pair as the correlation coefficient; if the correlation coefficient is negative, truncate the correlation coefficient to zero.

[0066] Because the number of pixels sampled in different directional intervals may differ (e.g., 5 pixels in the 45-degree angle and 6 pixels in the 90-degree angle), this can lead to inconsistent radial grayscale sequence lengths. One specific length alignment method is to find the shortest length among all directional interval sequences and truncate the other sequences to that shortest length, retaining only the first few elements. Another method is interpolation: sampling all sequences to the same length (e.g., all with 5 elements) through interpolation.

[0067] The correlation coefficient measures the degree of linear correlation between two radial gray-level sequences, and its value ranges from negative one to positive one. Specifically, if the correlation coefficient between two radial gray-level sequences in a given directional interval is positive and the absolute value is larger, it indicates that the changing trends of the two radial gray-level sequences are more consistent.

[0068] Since a negative correlation coefficient for a pair of directional intervals indicates that the gray-scale change trends of that pair of intervals are opposite in the two directions, which does not conform to the characteristic that "the gray-scale decay patterns in each direction are basically similar", it is considered dissimilar. That is, if the correlation coefficient is negative, the correlation coefficient is truncated to zero.

[0069] It should be noted that before calculating the Pearson correlation coefficient between the radial gray-scale sequences of the two directional intervals, it is also necessary to determine whether the variance of each sequence is zero.

[0070] S103-4: Calculate the variance of the radial grayscale sequence for each directional interval; if there is an abnormal directional interval with zero variance, set the correlation coefficient between the abnormal directional interval and all other directional intervals to zero; calculate the arithmetic mean of the correlation coefficients of all directional interval pairs as the directional consistency.

[0071] Since a variance of zero for a certain directional interval indicates that all pixels within that interval have identical grayscale values, a correlation coefficient cannot be calculated. In this case, the correlation coefficient between this abnormal directional interval and all other directional intervals is set to zero.

[0072] Directional consistency is used to measure whether the grayscale changes of a local window of a candidate point are consistent in all directions. Specifically, the closer the directional consistency of a local window of a candidate point is to 1, the more similar the radial grayscale sequences are in all directions within the local window, and the better the local window exhibits isotropic characteristics, which conforms to the distribution pattern of spherical targets. On the other hand, the lower the directional consistency of a local window of a candidate point, the greater the difference in the radial grayscale sequences in all directions within the local window, and the more likely the candidate point is to be a strip structure (e.g., fast decay in some directions and slow decay in others) or irregular noise.

[0073] S103-5: Multiply the directional consistency with the radial single scheduling to obtain the structural regularity of the candidate points.

[0074] Structural regularity is used to measure whether the spatial structure of a candidate point's local window conforms to the typical characteristics of a spherical target. Specifically, a higher structural regularity indicates that the candidate point possesses both radial monotonicity ("bright center, dark edges") and isotropic characteristics ("similarity in all directions"), making it more likely to be a real target. Conversely, a lower structural regularity indicates that the candidate point is more likely to be noise, stripe artifacts, or other non-target structures.

[0075] As a specific implementation, this invention uses multiplicative fusion of data from two dimensions—directional consistency and radial monotonicity—to obtain structural regularity. Its advantage lies in reflecting the "indispensable" logic: structural regularity is high only when both dimensions perform well; poor performance in either dimension will significantly reduce structural regularity. However, those skilled in the art should understand that other fusion methods can also be used, such as weighted sum, geometric mean, or minimum value, as long as they comprehensively reflect the evaluation results of radial monotonicity and directional consistency.

[0076] S104: Divide the candidate point into multiple concentric rings; calculate the ring gray level of each ring; determine the radial monotonicity ratio based on the ring gray level change trend of adjacent rings; determine the attenuation smoothness based on the relative concentration of the ring gray level difference between adjacent rings; and fuse the radial monotonicity ratio and the attenuation smoothness to obtain the scale matching degree of the candidate point.

[0077] In this embodiment, the maximum observation radius is determined and divided into multiple equally spaced radius steps. Multiple equally spaced concentric rings are constructed based on the multiple equally spaced radius steps, with the candidate point as the center. The arithmetic mean of the grayscale values ​​of all pixels within each ring is calculated as the original ring grayscale of each ring. The difference between the grayscale value of the candidate point and the preset local background grayscale is calculated as the baseline difference. If the baseline difference is less than or equal to zero, the corresponding candidate point is excluded. If the baseline difference is greater than zero, the original ring grayscale of each ring is subtracted from the preset local background grayscale, and then divided by the baseline difference to obtain the ring grayscale.

[0078] As a preferred adaptive implementation, the specific value of the maximum observation radius is determined based on the target's maximum expected diameter and image resolution. Specifically, the maximum observation radius = (target's maximum expected diameter ÷ 2) ÷ pixel pitch, then rounded to the nearest integer. For example, assuming the target's maximum diameter is 5mm and the pixel pitch is 0.5mm / pixel, then 2.5 divided by 0.5 equals 5, which, after rounding, is still 5 pixels.

[0079] It should be noted that the specific value of the number of rings is determined by referring to the maximum observation radius, and this embodiment does not impose a specific limitation. For example, taking a maximum observation radius of 5 pixels as an example, and selecting a radius step size of 1 pixel based on experience, then it can be divided into 5 rings, with the number of rings being 5. The first ring corresponds to the radius interval [0.5, 1.5), the second ring to [1.5, 2.5), the third ring to [2.5, 3.5), the fourth ring to [3.5, 4.5), and the fifth ring to [4.5, 5.5]. The center radius of each ring is taken, that is, the midpoint value of the ring radius interval. Since the distance interval of the first ring is [0.5, 1.5), and the midpoint value is 1, the center radius of the first ring is 1. The center radii of the other rings are deduced in the same way. Thus, each ring is identified by its center radius (1, 2, 3, 4, 5).

[0080] The radius step size refers to the spacing width between adjacent rings, that is, the thickness of each ring.

[0081] The center radius refers to the midpoint of each ring and is used to identify the radial position of each ring.

[0082] As a specific implementation method, since the average gray level of the outer layer reflects the brightness benchmark of the local background and has the same or similar locality as the candidate point, the specific value of the preset local background gray level can be exemplified by the average gray level of the outer layer. For example, if the average gray level of the outer layer calculated at a certain pixel is 85, then the preset local background gray level of that pixel is 85.

[0083] In CT images, high-density targets (such as small stones) typically exhibit a grayscale level higher than the surrounding background. If the baseline difference of a candidate point is less than or equal to zero, it indicates that the grayscale level of that candidate point is not higher than the background, meaning that the candidate point does not possess the characteristic of a high-density target where the center is brighter than the background. Therefore, such candidate points do not meet the target characteristics and should be excluded from subsequent calculations.

[0084] It's important to understand that local saliency and structural regularity can only determine whether a candidate point is "bright enough" and "regular in shape," but cannot distinguish whether the size of that regular shape matches the characteristics of a small target. Relying solely on local saliency and structural regularity can easily lead to misclassification of structures with similar spherical regular shapes, such as renal calyx wall cross-sections and blood vessel cross-sections, as targets, even if they are larger. Furthermore, based on the physical principle of partial volume effect, the essential difference between these large-sized interference structures and true small targets lies in scale: the diameter of a small target is strictly limited to a small range (e.g., less than 5mm), while the diameter of a large-sized interference structure far exceeds this range. Therefore, in CT images, the radial grayscale attenuation patterns of targets of different sizes show significant differences: the smaller the size, the faster the attenuation and the steeper the curve; the larger the size, the gentler the attenuation and the more likely the curve is to plateau. Therefore, the radial grayscale profile of candidate points can be analyzed from two dimensions: radial monotonicity (measuring whether it is monotonically decreasing) and attenuation smoothness (measuring whether it is smooth and uniform), to determine whether their scale matches that of a small target, thus excluding large-sized interference structures.

[0085] In this embodiment, all rings are sorted from near to far from the center, and the gray values ​​of the sorted rings are arranged sequentially to form a radial gray-scale profile. The counter is initialized to zero. The total number of rings in the radial gray-scale profile is counted and recorded as the first number. The total number of adjacent ring pairs is the first number minus one and recorded as the second number. Starting from the innermost ring, the gray value of the current ring is compared with the gray value of the next outer ring to determine whether the gray value of the current ring is greater than that of the outer ring. For each pair of adjacent rings, if the gray value of the inner ring is greater than that of the outer ring, the counter is incremented by 1. After traversing all adjacent ring pairs, the value of the counter is divided by the second number to obtain the radial monotonic ratio.

[0086] Since the distance from the center needs to be quantified using specific data, a preferred approach is to use the center radius of each annulus as the sorting criterion. The center radius refers to the midpoint value (e.g., 1.0) of each annulus's distance interval (e.g., [0.5, 1.5)), and its magnitude directly reflects the degree to which the annulus deviates from the center.

[0087] The radial grayscale profile reflects the change in grayscale value from the center (i.e., the candidate point) outwards.

[0088] The radial monotonicity ratio is the proportion of adjacent ring bands in a radial grayscale profile where the inner ring band's gray level is greater than the outer ring band's gray level. It measures whether the gray level exhibits a monotonically decreasing trend from the center outwards. A larger radial monotonicity ratio indicates more adjacent ring band pairs where the inner ring's gray level is greater than the outer ring's, resulting in a better monotonically decreasing trend and better matching the typical characteristic of small targets gradually darkening from the center outwards. Conversely, a smaller radial monotonicity ratio indicates more adjacent ring band pairs where the inner ring's gray level is not greater than the outer ring's gray level, resulting in an increasing or randomly fluctuating trend. This is less consistent with the attenuation characteristics of small targets and more likely to be large-scale interference or artifacts.

[0089] The process of determining scale matching degree includes the following steps: 1) Based on the radial grayscale profile, starting from the innermost ring, calculate the difference between the grayscale of each inner ring and the grayscale of its adjacent outer ring in sequence, and use it as the grayscale difference value; arrange all the grayscale differences in order from near to far from the center to form a decreasing amplitude sequence.

[0090] The inner ring refers to the ring closer to the center, and the outer ring refers to the ring farther from the center. The two are adjacent in the radial direction, with no other rings between them. For example, the first ring (center radius 1) and the second ring (center radius 2) are adjacent rings, where the first ring is the inner ring and the second ring is the outer ring.

[0091] As a specific implementation method, the arrangement of grayscale differences can also be based on the center radius of the rings. Specifically, since each grayscale difference corresponds to a pair of adjacent rings, namely an inner ring and an outer ring, each grayscale difference is assigned to its outer ring. Then, based on the center radius of its outer ring, the values ​​are sorted from smallest to largest. After sorting by the center radius of the outer ring, the grayscale differences naturally present an order from near to far. For example, the grayscale difference between the 1st ring and the 2nd ring corresponds to an outer ring center radius of 2, the grayscale difference between the 2nd ring and the 3rd ring corresponds to an outer ring center radius of 3, and so on.

[0092] 2) Calculate the arithmetic mean of all grayscale differences in the decreasing amplitude sequence as the grayscale average; calculate the standard deviation of all grayscale differences in the decreasing amplitude sequence as the grayscale standard deviation.

[0093] The average grayscale value reflects the average magnitude of attenuation.

[0094] The grayscale standard deviation reflects the degree to which each attenuation amplitude deviates from the grayscale average, i.e., the magnitude of fluctuation in the attenuation process.

[0095] 3) If the average gray value is less than or equal to zero, the attenuation smoothness of the candidate point is directly determined to be zero.

[0096] Since if the average gray value of a candidate point is less than or equal to zero, it means that the radial gray value profile as a whole shows a non-decreasing trend (such as increasing or remaining flat), which does not conform to the attenuation characteristics of small-sized targets, the attenuation smoothness of the candidate point is directly determined to be zero.

[0097] 4) If the average gray value is greater than zero, the original value of the attenuation smoothness is obtained based on the average gray value and the gray standard deviation; the original value of the attenuation smoothness of the candidate point is normalized to obtain the normalized attenuation smoothness.

[0098] The original value of the attenuation smoothness = average gray level ÷ (standard deviation of gray level + preset minimum constant).

[0099] It should be noted that the specific value of the preset minimum constant can be determined based on engineering experience, and this embodiment does not impose a specific limitation. For example, the typical standard deviation of outer layer grayscale in CT images is usually between 5 and 50, so the influence of the preset minimum constant on the calculation results can be ignored.

[0100] It should be noted that normalization is a common practice, and the appropriate normalization method can be selected based on the actual situation of the data. Specifically, the original values ​​of attenuation smoothness of all candidate points in the current CT image are statistically analyzed, and the minimum and maximum values ​​are obtained. The original value of attenuation smoothness of each candidate point is then mapped to the interval between 0 and 1 through minimum-maximum normalization to obtain the normalized attenuation smoothness.

[0101] Because there is a risk of the denominator being zero when the minimum and maximum values ​​are equal during min-max normalization, as is understood by those skilled in the art, when the minimum value equals the maximum value, the normalization result can be directly set to a preset fixed value (such as 0, 0.5, or 1), without limiting the specific processing method, as long as the purpose of numerical normalization can be achieved.

[0102] Attenuation smoothness measures the uniformity of the radial attenuation process. Higher attenuation smoothness indicates smoother and more uniform attenuation, which better matches the characteristics of small-sized targets; lower attenuation smoothness indicates less uniform attenuation, which is more likely to be large-sized interference or artifacts.

[0103] 5) Multiply the radial monotonicity and the attenuation smoothness to obtain the scale matching degree of the candidate points.

[0104] Since the radial monotonicity ratio measures whether the attenuation is monotonically decreasing and the attenuation smoothness measures whether the attenuation is uniform, the multiplication of the two reflects the logic that "neither can be omitted". That is, the scale matching degree is high only when the radial grayscale profile is both monotonically decreasing and smooth and uniform.

[0105] S105: Determine the overall confidence level based on local saliency, structural regularity, and scale matching; adjust the contrast parameter of the level set edge indicator function based on the overall confidence level; use the adjusted function to drive the evolution of the level set to obtain the precise segmentation contour of the target and achieve the three-dimensional spatial positioning of the target.

[0106] The process of determining the overall confidence level includes the following steps: 1) Obtain the influence weight of preset rules and the influence weight of preset scale.

[0107] The preset rule influence weights are used to control the strength of the correction of saliency by the structural regularity.

[0108] As a specific adaptive implementation method, the preset rule influence weight can be dynamically determined based on the coefficient of variation of structural regularity within a high-salience region: A set of pixels with high local salience (e.g., pixels whose local salience is higher than the average local salience of the entire image or ranks in the top 20%) is defined as a high-salience region. Then, the coefficient of variation of structural regularity for all pixels within the high-salience region is calculated. The coefficient of variation is the ratio of the standard deviation to the mean. The coefficient of variation measures the relative dispersion of the data; a larger coefficient of variation indicates more dispersed data and stronger regularity discrimination, in which case the preset rule influence weight should be larger (e.g., 0.7). A smaller coefficient of variation indicates a more concentrated distribution of regularity and weaker discrimination, in which case the preset rule influence weight should be smaller (e.g., 0.3). The preset rule influence weight typically ranges from 0 to 1.

[0109] The preset scale influence weight is used to control the strength of the scale matching degree's correction to the temporary confidence degree.

[0110] As an adaptive implementation, the preset scale influence weight can be dynamically determined based on the coefficient of variation of scale matching degree within the high temporary confidence region: A set of pixels with high temporary confidence (e.g., temporary confidence higher than the average temporary confidence of the entire image) is defined as the high temporary confidence region; then, the coefficient of variation of the scale matching degree of all pixels within the high temporary confidence region is calculated. A smaller coefficient of variation indicates a more concentrated distribution of scale matching degree and weaker discriminative ability; in this case, the preset scale influence weight should be a smaller value (e.g., 0.3). The preset scale influence weight typically ranges from 0 to 1.

[0111] 2) Calculate the difference between 1 and the structural regularity as the rule missing degree; multiply the preset rule influence weight, rule missing degree and local significance to obtain the first product; subtract the first product from 1 to obtain the rule correction coefficient; multiply the local significance and the rule correction coefficient to obtain the provisional confidence level.

[0112] The rule missingness reflects the degree of deficiency in the structural regularity of a candidate point. Specifically, the lower the structural regularity, the higher the rule missingness.

[0113] It's important to understand that the first product reflects the amount by which the rule missing degree corrects for local saliency, and its magnitude is influenced by the weighting of preset rules. The rule correction coefficient is used to adjust local saliency. If the structural regularity is high (i.e., the rule missing degree is low), the rule correction coefficient is close to 1, and the provisional confidence is closer to the significance, meaning that the significance of candidate points with high structural regularity is preserved. If the structural regularity is low (i.e., the rule missing degree is high), the rule correction coefficient is less than 1, and the provisional confidence is significantly reduced. Simultaneously, local saliency itself also appears in the product (i.e., multiplying local saliency by the rule correction coefficient), meaning that structural regularity only plays a significant corrective role in regions with high local saliency. For example, if the local saliency itself is very low, even if the structural regularity is also low, the product is still very small, the rule correction coefficient is close to 1, and the corrective effect of structural regularity is automatically suppressed.

[0114] 3) Calculate the difference between 1 and the scale matching degree as the scale missing degree; multiply the preset scale influence weight by the scale missing degree to obtain the second product; subtract the second product from 1 to obtain the scale correction coefficient; multiply the temporary confidence degree by the scale correction coefficient to obtain the initial confidence degree.

[0115] Scale missingness reflects the degree to which a candidate point is inadequate in terms of scale matching. Specifically, the lower the scale matching degree, the higher the scale missingness.

[0116] The second product reflects the amount by which the scale missing value corrects for the temporary confidence level.

[0117] It's important to understand that the smaller the scale missingness, the smaller the second product, the closer the scale correction coefficient is to 1, and the closer the initial confidence is to the provisional confidence. In other words, the provisional confidence of candidate points with high scale matching is preserved. Conversely, the smaller the scale matching (i.e., the larger the scale missingness), the smaller the scale correction coefficient, and the initial confidence is significantly reduced. Since scale matching reflects the absolute size attribute of candidate points and is physically independent of provisional confidence (which integrates local saliency and structural regularity), the correction effect of scale matching is independent and does not depend on the magnitude of the provisional confidence, meaning that regardless of the provisional confidence level, the initial confidence of candidate points with low scale matching will be reduced proportionally.

[0118] The initial confidence level is the result of adjusting for scale matching based on the provisional confidence level.

[0119] 4) Perform an S-shaped transformation on the initial confidence level to obtain the overall confidence level.

[0120] The sigmoid transform is a nonlinear mapping function used to stretch input values ​​in the middle range towards both ends, enhancing the distinction between high and low values. As a specific implementation, the sigmoid function or its power function variant is used to transform the initial confidence level: the transformed value monotonically increases with the initial confidence level, and if the initial confidence level is in the middle range, the transform curve is relatively steep, meaning even small changes can lead to significant changes in the output value; if the initial confidence level is close to 0 or 1, the transform curve tends to be flatter. After the sigmoid transform, the values ​​in the initial confidence level that were originally in the middle range are compressed towards both ends, resulting in higher high-confidence values ​​and lower low-confidence values, thus enhancing the distinction between the overall confidence level and the low-confidence region, providing a clearer decision boundary for subsequent level set parameter adjustment. The sigmoid transform (including the sigmoid function) is a well-known function in mathematics, and this embodiment directly applies it.

[0121] It should be noted that when using the standard Sigmoid function, the input value must first be shifted from the interval [0, 1] to the interval (-∞, +∞), or a Sigmoid variant with shifting (e.g., y = 1 ÷ (1 + ...)) should be used. Only by using the above-mentioned methods can the stretching effect be achieved, where y represents the transformed output value, i.e., the overall confidence level; x represents the input value before the transformation, i.e., the initial confidence level; a represents the translation parameter; and k represents the scaling parameter (steepness parameter). These are common variants of the standard Sigmoid function. Those skilled in the art should understand that the S-shaped transformation includes the above-mentioned variant forms.

[0122] As an example, the specific values ​​of a and k are determined based on engineering experience, and both are common parameters. For example, a is usually 0.5, and k can be 10.

[0123] The overall confidence score is used to comprehensively reflect the overall performance of candidate points across three dimensions: local saliency, structural regularity, and scale matching. As a preferred implementation, this invention employs a hierarchical correction coefficient method: first, based on local saliency, structural regularity is introduced for the first correction, yielding a provisional confidence score; then, based on the provisional confidence score, scale matching is introduced for the second correction, yielding an initial confidence score; finally, an S-shaped transformation is used to enhance discriminative power, resulting in the final overall confidence score. However, those skilled in the art should understand that this invention is not limited to this; any method that can comprehensively reflect the evaluation results across the three dimensions (such as weighted sum, product, geometric mean, etc.), and that satisfies the logic that higher values ​​in the three dimensions lead to higher overall confidence scores, can be used to achieve the purpose of this invention.

[0124] In this embodiment, the minimum and maximum preset contrast parameters are obtained; the difference between the minimum and maximum preset contrast parameters is calculated as the contrast difference; for each candidate point, the overall confidence level is multiplied by the contrast difference to obtain a confidence-weighted difference; the difference between the maximum preset contrast parameter and the confidence-weighted difference is calculated as the contrast parameter of the candidate point; for non-candidate points, their overall confidence level is set to zero, and their contrast parameter is the maximum preset contrast parameter.

[0125] It should be noted that the specific values ​​of the minimum and maximum preset contrast parameters can be determined based on the dynamic range of the image's grayscale. As a specific implementation, within the common 0-255 grayscale range of CT images, to enable the edge indicator function to respond to weak gradients (such as gradient magnitudes of 20-30 at the edges of small targets), the minimum preset contrast parameter can be set to 10; to enable the edge indicator function to ignore gradients generated by noise (such as gradient magnitudes of 10-15), the maximum preset contrast parameter can be set to 100. These values ​​can be adjusted according to the specific image's grayscale range and noise level; this embodiment does not impose specific limitations.

[0126] Since a higher overall confidence level for a pixel indicates a higher likelihood of it being a target, and target boundaries often exhibit weak edge characteristics, a smaller contrast parameter is needed to make the edge indicator function sensitive to weak gradients, allowing the evolution curve to stop precisely at the boundary. Conversely, in regions with low overall confidence, gradients often originate from noise, requiring a larger contrast parameter to make the edge indicator function insensitive to gradients, allowing the evolution curve to pass freely without being misled by noise. Therefore, the contrast parameter is negatively correlated with the overall confidence level: higher overall confidence corresponds to a smaller contrast parameter, making the edge indicator function more sensitive to weak gradients; conversely, lower overall confidence corresponds to a larger contrast parameter, making the edge indicator function less sensitive to gradients.

[0127] It should be noted that level set evolution is a well-known image segmentation method that iteratively solves the problem to approximate the target boundary. 3D localization employs a conventional method: stacking the 2D segmented contours into a 3D mask, extracting the surface mesh, and calculating the centroid coordinates and volume. Therefore, the process of using the adjusted function to drive level set evolution to obtain the accurate segmented contour of the target and achieve 3D spatial localization directly applies the aforementioned existing techniques. This embodiment can be directly applied, and its innovation lies in the preliminary adjustment of the contrast parameter.

[0128] An automatic segmentation and three-dimensional localization system for small kidney stones based on CT images is disclosed. The system includes a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of an automatic segmentation and three-dimensional localization method for small kidney stones based on CT images.

Claims

1. A method for automatic segmentation and three-dimensional positioning of small kidney stones based on CT images, characterized in that, The method includes: Acquire preprocessed CT images; For each pixel in a CT image, an inner analysis region and an outer background region are constructed. Based on the grayscale difference between the two and the grayscale fluctuation of the outer background region, the local saliency of the pixel is determined. Candidate points are selected from all pixels based on local saliency; a local window is constructed for each candidate point; the radial monotonicity is determined based on the radial monotonicity of the gray-level distribution within the window, the directional consistency is determined based on directional consistency, and the two are fused to obtain the structural regularity of the candidate points. Divide the candidate point into multiple concentric rings; calculate the ring gray level of each ring; determine the radial monotonicity ratio based on the ring gray level variation trend of adjacent rings; determine the attenuation smoothness based on the relative concentration of the ring gray level difference between adjacent rings; and fuse the radial monotonicity ratio and the attenuation smoothness to obtain the scale matching degree of the candidate point. The overall confidence level is determined based on local saliency, structural regularity, and scale matching. The contrast parameter of the level set edge indicator function is adjusted based on the overall confidence level. The adjusted function is used to drive the evolution of the level set to obtain the accurate segmentation contour of the target and realize the three-dimensional spatial positioning of the target.

2. The method for automatic segmentation and three-dimensional localization of small kidney stones based on CT images according to claim 1, characterized in that, The process of constructing an inner analysis region and an outer background region for each pixel in a CT image includes: Obtain the radius of the inner region and the radius of the outer region; Concentric circular regions are constructed with the pixel as the center, based on the inner and outer region radii; The circular region constructed with the radius of the inner region within the concentric circle region is denoted as the inner analysis region; the annular region extending outward from the edge of the inner analysis region to the edge of the concentric circle region is denoted as the outer background region.

3. The method for automatic segmentation and three-dimensional localization of small kidney stones based on CT images according to claim 2, characterized in that, The local saliency determination process includes: Calculate the arithmetic mean of the gray values ​​of all pixels in the inner analysis area as the inner gray mean; calculate the arithmetic mean of the gray values ​​of all pixels in the outer background area as the outer gray mean; calculate the standard deviation of the gray values ​​of all pixels in the outer background area as the outer gray standard deviation. Calculate the difference between the mean gray level of the inner layer and the mean gray level of the outer layer as the gray level difference value; calculate the sum of the standard deviation of the outer layer gray level and the preset minimum positive number as the first sum value; Divide the grayscale difference value by the first sum value to obtain the local saliency of the pixel.

4. The method for automatic segmentation and three-dimensional localization of small kidney stones based on CT images according to claim 1, characterized in that, The candidate point is a pixel whose local saliency is greater than zero; The radial single-schedule determination process includes: For each candidate point, a circular local window is constructed with the candidate point as the center; the radius of the circular local window is determined based on the arithmetic mean of the supporting region radii of all local maxima points in the CT image. Calculate the Euclidean distance from all pixels within the local window to the candidate point, and use this distance as the first distance; Based on the first distance in ascending order, all pixels within the local window are divided into multiple concentric annular bands; each annular band corresponds to a distance interval, and the first distance from pixels within the same annular band to the candidate point belongs to the same distance interval. List all pixel pairs formed by pixels within two different annular bands, filter out pixel pairs where the first distance between pixels in the inner annular band is less than the first distance between pixels in the outer annular band, and record the total number of valid pixel pairs. Each valid pixel pair is checked one by one, and the number of pixel pairs that meet the decreasing condition is selected as the number of decreasing pixel pairs; where the decreasing condition is that the gray value of the inner circle pixel in the valid pixel pair is greater than or equal to the gray value of the outer circle pixel. The radial single schedule is obtained by dividing the number of decreasing pixel pairs by the total number of valid pixel pairs.

5. The method for automatic segmentation and three-dimensional localization of small kidney stones based on CT images according to claim 4, characterized in that, The process of determining the structural regularity includes: Centered on the candidate point, the local window is divided into multiple directional intervals, each covering the same angular range; For each directional interval, pixels radially distributed outward from the candidate point are collected; the collected pixels are arranged in ascending order according to their first distance from the candidate point to obtain the radial grayscale sequence of the directional interval. The radial grayscale sequences of each directional interval are length aligned; any two different directional intervals are taken to form a directional interval pair; the Pearson correlation coefficient between the length-aligned radial grayscale sequences in the directional interval pair is calculated as the correlation coefficient; if the correlation coefficient is negative, the correlation coefficient is truncated to zero. Calculate the variance of the radial grayscale sequence for each directional interval; if there is an outlier directional interval with zero variance, set the correlation coefficient between the outlier directional interval and all other directional intervals to zero; calculate the arithmetic mean of the correlation coefficients of all directional interval pairs as the directional consistency. Multiply the directional consistency by the radial single scheduling to obtain the structural regularity of the candidate points.

6. The method for automatic segmentation and three-dimensional localization of small kidney stones based on CT images according to claim 1, characterized in that, The calculation process for the grayscale of each ring includes: Determine the maximum investigation radius and divide it into multiple equally spaced radius steps; using the candidate point as the center, construct multiple equally spaced concentric rings based on the multiple equally spaced radius steps; Calculate the arithmetic mean of the gray values ​​of all pixels within each ring zone, and use it as the original ring zone gray value for each ring zone; Calculate the difference between the gray value of the candidate point and the preset local background gray value, and use it as the baseline difference; if the baseline difference is less than or equal to zero, exclude the corresponding candidate point. If the reference difference is greater than zero, subtract the preset local background gray level from the original ring gray level of each ring, and then divide by the reference difference to obtain the ring gray level.

7. The method for automatic segmentation and three-dimensional localization of small kidney stones based on CT images according to claim 6, characterized in that, The radial monotonic ratio determination process includes: Sort all the rings according to their distance from the center from near to far, and arrange the gray levels of the sorted rings in sequence to form a radial gray level profile; initialize the counter to zero; The total number of rings in the radial grayscale profile is counted and denoted as the first number. Then the total number of adjacent ring pairs is the first number minus one and denoted as the second number. Starting from the innermost ring, the grayscale of the current ring is compared with the grayscale of the next outer ring to determine whether the grayscale of the current ring is greater than that of the outer ring. For each pair of adjacent ring bands, if the gray level of the inner ring band is greater than that of the outer ring band, increment the counter by 1; After traversing all adjacent ring pairs, divide the counter value by the second quantity to obtain the radial monotonic ratio.

8. The method for automatic segmentation and three-dimensional localization of small kidney stones based on CT images according to claim 7, characterized in that, The scale matching degree determination process includes: Based on the radial grayscale profile, starting from the innermost ring, the difference between the grayscale of each inner ring and the grayscale of its adjacent outer ring is calculated sequentially as the grayscale difference; all grayscale differences are arranged in order of distance from the center from near to far to form a decreasing amplitude sequence. Calculate the arithmetic mean of all grayscale differences in the decreasing amplitude sequence as the grayscale mean; calculate the standard deviation of all grayscale differences in the decreasing amplitude sequence as the grayscale standard deviation. If the average grayscale value is less than or equal to zero, the attenuation smoothness of the candidate point is directly determined to be zero. If the average gray value is greater than zero, the original value of the attenuation smoothness is obtained based on the average gray value and the gray standard deviation; the original value of the attenuation smoothness of the candidate point is normalized to obtain the normalized attenuation smoothness. Multiplying the radial monotonicity and the attenuation smoothness yields the scale matching degree of the candidate points.

9. The method for automatic segmentation and three-dimensional localization of small kidney stones based on CT images according to claim 1, characterized in that, The determination of the overall confidence level based on local saliency, structural regularity, and scale matching includes: Obtain the influence weights of preset rules and preset scales; Calculate the difference between 1 and the structural regularity as the rule missing degree; multiply the preset rule influence weight, rule missing degree, and local significance to obtain the first product; subtract the first product from 1 to obtain the rule correction coefficient; multiply the local significance by the rule correction coefficient to obtain the provisional confidence level. Calculate the difference between 1 and the scale matching degree as the scale missing degree; multiply the preset scale influence weight by the scale missing degree to obtain the second product; subtract the second product from 1 to obtain the scale correction coefficient; multiply the provisional confidence degree by the scale correction coefficient to obtain the initial confidence degree. Perform an S-shaped transformation on the initial confidence level to obtain the overall confidence level.

10. The method for automatic segmentation and three-dimensional localization of small kidney stones based on CT images according to claim 1, characterized in that, The adjustment of the contrast parameter of the level set edge indicator function based on the comprehensive confidence level includes: Obtain the minimum and maximum preset contrast parameters; calculate the difference between the minimum and maximum preset contrast parameters as the contrast difference value. For each candidate point, the overall confidence score is multiplied by the contrast difference to obtain the confidence-weighted difference; the difference between the maximum value of the preset contrast parameter and the confidence-weighted difference is calculated as the contrast parameter of the candidate point. For non-candidate points, their overall confidence level is set to zero, and their contrast parameter is the maximum value of the preset contrast parameter.