1 Introduction

Coronary artery disease (CAD) is the most prevalent type of heart disease and remains the leading cause of global mortality, affecting approximately 330 million individuals and resulting in the loss of 17.9 million lives annually [1, 2]. X-ray coronary angiography (XCA) is considered the gold standard for diagnosing CAD [3]. It involves the administration of contrast dye into the coronary vessels, followed by the visualization of its flow through 2D projections of the vessel structure. XCA aids clinicians in identifying potential stenoses, assessing their severity visually, and determining the most appropriate interventional treatments [4]. However, visual stenosis assessment based on XCA images is prone to unreliability. It tends to overestimate severe blockages while underestimating milder ones [5, 6], and it exhibits high variability among different observers and even within the same observer [7, 8]. To provide a more objective evaluation of the lumen diameter, quantitative coronary angiography (QCA) was introduced [9]. QCA enables semi-automatic analysis of XCA images [10, 11]. Vessel segmentation is a crucial step in QCA as it is necessary for calculating the percentage of arterial stenosis.

Extracting blood vessels from XCA images is a critical initial step in developing a computer-assisted diagnostic and therapeutic framework, which encompasses tasks such as stent placement [12]. Due to the time-consuming and costly nature of manually annotating vessel structures, there has been significant research on automatic or semi-automatic computer-assisted segmentation methods [13,14,15]. However, these methods face challenges when it comes to vessel segmentation, including the presence of low contrast, noise, and artifacts in angiography images, and the complexity of vessel structures, such as multi-scale structures, bifurcation structures, and overlapping structures. As a result, achieving precise vessel segmentation from XCA images continues to be a demanding task, requiring ongoing innovations and advancements in image processing and computational techniques.

The organization of the rest of this paper is as follows: In Sect. 2, the related works are explained. The proposed method is presented in Sect. 3. Section 4 explains the experimental results, and Sect. 5 concludes the paper.

2 Relatd Studies

In recent years, several researchers have made significant progress in developing effective methods for vessel segmentation. The most used Hessian matrix-based method, proposed by Frangi et al [16], involves designing a multi-scale second-order derivative filter to characterize vessel structures. This approach computes the eigenvalues and eigenvectors of the Hessian matrix. However, to address the non-uniform response observed in Frangi’s method, Jerman et al. [17] introduced an enhanced technique relying on the Hessian matrix for improving angiographic images. This method introduces a novel vesselness function designed to accurately represent the elliptical cross-sections inherent in vessel structures.

Several segmentation frameworks have been proposed that incorporate vessel features for vessel segmentation [18,19,20,21]. Unsupervised methods for automatic coronary vessel segmentation can be broadly categorized into tracking-based, model-based, and filter-based approaches [22].

Tracking-based methods [23] involve selecting seed points on vessel edges or centerlines and iteratively searching for nearby vessel edges or centerlines. These methods estimate the vessel direction and take steps in that direction to find new edges. While tracking-based methods maintain continuity in the segmentation of the vessel tree structure, they heavily rely on the quality of the initial seed points and may struggle to handle background elements adjacent to vessels. Certain tracking methods [24,25,26] have constructed the segmentation pipeline by incorporating prior information derived from structures like centerlines or surfaces.

Model-based methods [27,28,29,30,31,32], utilize deformable models or region growing techniques to evolve the segmentation towards vessel-background boundaries based on energy functions. These methods apply forces and constraints defined by the energy functions and may use similarity functions with threshold parameters as growing conditions. Model-based methods also require initial seeds for segmentation, making them sensitive to initialization. While they often achieve good segmentation continuity for the vessel tree structure, they may struggle with confounding elements in the background.

Filter-based methods [33] employ various filters for tasks such as non-uniform background intensity balancing, suppression of irrelevant structures, noise reduction, and vessel enhancement. The filtered images are then processed using thresholding techniques to generate segmentation masks. Filter-based methods are easy to implement and can mitigate illumination issues. They are commonly used as preprocessing steps in both supervised and unsupervised methods for automated coronary vessel segmentation [32, 34,35,36,37,38,39]. However, they are typically insufficient on their own as they can be sensitive to background structures and may not perform well on vessel junctions and bifurcations [40]. In accordance with the findings from studies on the Hessian matrix, several scholars have introduced a multidirectional filter bank. This implementation results in a heightened filter response along the vessel direction within the feature map [38, 41, 42]. The primary objective of the multi-directional filter bank is to diminish background noise and augment the response of vessels. As X-ray angiography images constitute a temporal series, certain investigations have aimed to maximize temporal information. This has been achieved through matrix decomposition, employed to eliminate background elements and yield a more precise blood vessel tree [30, 43, 44]. Nevertheless, it is noteworthy that matrix decomposition, being an iterative process, entails a substantial amount of time for high-dimensional matrix decomposition.

Deep learning methods have made considerable strides because of its ability to independently learn powerful feature representations from dataset and have been used for segmentation in numerous applications [45]. Moreover, The essential reliance of deep learning algorithms on data underscores the crucial requirement for robust datasets to demonstrate optimal performance [46]. Ronneberger et al. [47] proposed a U-shaped network architecture known as UNet. This architecture consists of an encoding path, a decoding path, and skip-connection paths that facilitate the transmission of feature maps from the encoding path to the decoding path. UNet has demonstrated strong performance across various medical applications. Numerous beneficial structures have been suggested to enhance the efficacy of deep learning models, including normalization [48,49,50,51], residual blocks [52, 53], dense blocks [54, 55], inception blocks [56, 57], dilated convolution [58], feature aggregation modules [59], spatiotemporal super-resolution frameworks [60,61,62], encoder-decoder architectures [63, 64], and more. Present research on 2D vessel segmentation methods is predominantly concentrated on retinal vessel segmentation. Zhu et al. [65] employed the Pyramid Scene Parsing Network, which was originally proposed by [66], for the segmentation of coronary vessels. They utilized the network’s structure to incorporate features from multiple scales through pyramid pooling and applied transfer learning to prevent overfitting on a limited training dataset. Navarro et al. [67] introduced two auxiliary tasks, namely a distance map and a contour map, at the network’s end to achieve more precise segmentation. Concurrently, an increasing number of deep learning models [68,69,70,71,72] are being employed for tasks involving the segmentation of volume data.

When it comes to supervised methods for coronary artery segmentation, the focus may be primarily on the major coronary arteries, as they are of greater concern to clinicians, rather than the entire arterial tree. While network-based supervised methods have certain limitations, such as overfitting with small training sets, reduced interpretability compared to unsupervised filter-based methods, and challenges in ensuring connectivity within predicted masks, they still offer advantages such as requiring less manual input and demonstrating greater robustness in distinguishing background structures like catheters and spines, in comparison to unsupervised methods.

This paper introduces a segmentation method that utilizes coronary vessel tracking to identify the border and centerline of the vessel. The method consists of two primary components: preprocessing and tracking. During the preprocessing stage, the original image is subjected to feature enhancement through the application of a guided filter and edge-sharpening algorithms. In the tracking stage, an initial point is chosen, and a semi-circle operator is employed, leveraging the Gaussian property, to track the line that is perpendicular to the vessel.

3 Proposed Method

This technique segments coronary vessels by tracking their border and centerline using two main components: preprocessing and tracking. Preprocessing enhances the original image using guided filtering and edge-sharpening algorithms. In the tracking phase, an initial point is chosen, and a semi-circle operator based on the Gaussian property is used to track the vessel’s perpendicular line The diagram of the proposed method is shown in Fig. 1.

Fig. 1
figure 1

Graph of the proposed tracking method

3.1 Pre-Processing

The preprocessing stage focuses on reducing noise and enhancing vessel edges without extensive modifications to the image. Additional filters are avoided to preserve the Gaussian property of the vessel in the cross-sectional line. The brightness level of the image is adjusted between 0 and 255, and image noise is reduced using a guided filter described in Sect. 3.1.1. The Unsharp-Masking method described in Sect. 3.1.2 is employed to enhance edge visibility.

3.1.1 Guided Filter

In [73], a filter is designed to improve the quality of images. The guided filter serves as an edge-preserving filter that transfers the characteristics of the original image to the output image based on a guide image. The guide image can be the same as the input image or a different image. Considering I as the guide image and p as the input image for quality enhancement, the output image (q) is obtained using Eq. 1.

$$\begin{aligned} q_i=\sum {W_{ij}\left( I\right) p_j} \end{aligned}$$
(1)

Where i and j are pixel indexes, and the filter kernel \(W_{ij}\) is a function of the guide image I, which is independent of the input image. The guided filter is a linear filter based on the input image. It can be assumed that q is a linear transformation of I within a window \(\omega _k\) centered at the pixel k, and \(a_k\) and \(b_k\) are constant linear coefficients within the window.

$$\begin{aligned} q_i=a_kI_i+b_k\in \omega _k \end{aligned}$$
(2)

Accordingly, the images can be divided into overlapping windows with a radius of r. It can be established that within each window, q exhibits edge-preserving behavior only if it has edges. In other words, a model can be proposed to suppress the additional and unwanted components n of the input image from it like noise/textures:.

$$\begin{aligned} q_i=p_i-n\ \end{aligned}$$
(3)

To preserve the structure of the input image and maintain the edges, the difference between p and q should be minimized. Therefore, in Eq. 4, the cost function within the window \(\omega _k\) should be minimized. The cost function represents the discrepancy between the input and guided images.

$$\begin{aligned} E\left( a_k,b_k\right) =\sum _{i\in \omega _k}{(a_kI_i+b_k-p_i)^2+\epsilon a_k^2} \end{aligned}$$
(4)

Here \(\epsilon\) is a regularization parameter penalizing large \(a_k\). The energy function is minimized concerning the values of \(a_k\) and \(b_k\) in Eqs. 5 and 6. By minimizing the energy function, the optimal values of \(a_k\) and \(b_k\) are obtained, which help minimize the discrepancy between p and q within the window.

$$\begin{aligned}{} & {} a_k=\frac{\left( \frac{1}{|\omega |}\sum _{i\ \in \omega _k}{I_ip_i-\mu _k\overline{p_k}}\right) }{\sigma _k^2+\epsilon } \end{aligned}$$
(5)
$$\begin{aligned}{} & {} b_k=\overline{p_k}-a_k<\overline{\mu _k} \end{aligned}$$
(6)

In these equations, \(\mu _k\) and \(\sigma _k^2\) represent the mean and variance of I within the window \(\omega _k\), respectively. \(|\omega |\) denotes the number of pixels in the window \(\omega _k\). \(p_k=1/|\omega | \sum _{i\ \in \omega _k} p_i\) is the mean of p within the window \(\omega _k\). With the known values of coefficients (\(a_k\) and \(b_k\)), the output image can be obtained based on Eq. 2 (Fig. 2).

Fig. 2
figure 2

The process of obtaining the filtered image using the guided image [73]

3.1.2 Unsharp-Masking Edge Enhancement Filter

The Unsharp-Masking algorithm is a technique for sharpening digital images [74, 75]. In this algorithm, a smoothed version (\(f_{smooth}\)) of the original image (f) is subtracted to obtain the edge image (g). In the next step, the sharpened image (\(f_{sharp}\)) is obtained by adding the original image multiplied by a coefficient of the edge image, which essentially emphasizes the high-frequency components of the original image. Figure 3 illustrates the steps of creating a sharp signal using this method and the effects when applied to angiography images. As shown in the figure, the details and edges are better revealed in the image where this algorithm is applied. In Eq. 7, \(G_\sigma\) refers to a Gaussian filter with standard deviation \(\sigma\). In the below equations, the standard deviation is set to 2, and the gain (K) is set to 1.

$$\begin{aligned}{} & {} f_{smooth}\left( x,y\right) =f\left( x,y\right) G_\sigma \end{aligned}$$
(7)
$$\begin{aligned}{} & {} g\left( x,y\right) =f\left( x,y\right) -f_{smooth}\left( x,y\right) \end{aligned}$$
(8)
$$\begin{aligned}{} & {} f_{sharp}\left( x,y\right) = f\left( x,y\right) + K\left( x,y\right) \end{aligned}$$
(9)
Fig. 3
figure 3

The signal process of obtaining a sharpened image

3.2 Edge-Based Tracking Method

This section presents a dynamic algorithm for vessel tracking, which begins from an initial point (O) selected by the user. To handle branch points and vessel crossings, the algorithm creates a list to store these points. Additionally, another list is created to store detected vessel points along with their conditions, such as vessel radius and intensity level. The algorithm utilizes a semicircular operator to track and identify edge points of the vessel. Vessel characteristics are extracted from the vicinity of this operator to determine the type of location, including branch points, vessel crossings, end points, and normal vessels. This process is repeated until the entire vessel is traversed.

3.2.1 Overall Process of the Tracking Algorithm

Assuming in Figs. 4 and 5, the points corresponding to the i-th iteration are marked. Initially, a circle with a radius of R is considered around the center point \(P_c^i\). This circle is divided into two parts by a diameter passing through points \(P_L^i\) and \(P_R^i\).

\(\bullet\) Calculation of the angle between two previous points: To calculate the angle of the line between points \(P_L^i\) and \(P_R^i\), the slope of the line passing through these two points is first calculated. Then, the angle \(\theta _i\) corresponding to the slope m is determined.

$$\begin{aligned} m=\frac{X_L^i-X_R^i}{Y_L^i-Y_R^i} \end{aligned}$$
(10)

The slope of the line is obtained using Eq. 11. In this equation, (\(Y_L^i\),\(X_L^i\)) represents the coordinates of the left point, and (\(Y_R^i\),\(X_R^i\)) represents the coordinates of the right point on the vessel.

$$\begin{aligned} \theta _i=Arc\tan {(}m) \end{aligned}$$
(11)
Fig. 4
figure 4

Detection of circular direction and determination of boundary points

\(\bullet\) Determining the direction of the semicircle: To select one of the two sides of the semicircle, the previous detected point positions are used (Fig. 5). For this purpose, the direction of the operator’s movement to detect the previous points is determined, and a corresponding semicircle is chosen based on that direction. Four directions are considered for the movement of the vessel, as shown in Figure 5. Based on the positions of the previous points, the new direction of the semicircle is determined in the i-th iteration according to 1 (Table 1).

Fig. 5
figure 5

Possible directions for the vessel

Table 1 Determining the direction of the semi-circle in the tracking method based on the previous directions in Fig. 5

\(\bullet\) Detection of the boundary of the vessel: In Fig. 6, the pixels along the linear path through the vessel exhibit a shape resembling the inverse Gaussian function. However, this shape is not easily analyzable in all cases, making it challenging to determine the vessel boundary from such a plot. The proposed method in this work introduces three approaches to predict the points on the vessel edge.

The selection of a suitable boundary location is necessary to remove the irregularities present in the vessel characteristic. For this purpose, each component in the characteristic is averaged with its neighbors in two stages. Then, the locations of the valleys in the vessel characteristic are identified, and the deepest valley Vmin is considered as the center point of the vessel at coordinates (\(x_v\),\(y_v\)).

Fig. 6
figure 6

The characteristics of the line drawn in angiography images vary in different regions

In the first method, the characteristic array of the vessel is divided into two parts from the valley point, and the Otsu thresholding method is applied separately to each part to determine the threshold values \(T_{left}\) and \(T_{right}\). From the \(V_min\) point, the vessel’s characteristic is traversed towards the left and right, and the first value that exceeds the threshold is chosen as the vessel boundary, determining the two points \(p_1\) and \(p_2\).

If the first method fails to find points around the valley, a window with dimensions of 30*30 centered at (\(x_v\), \(y_v\)) is considered. The brightness of this window is adjusted, and an edge detection filter is applied to it. Then, the first edges found on both sides of the valley are selected as the initial boundary points \(p_1\) and \(p_2\). Sometimes it may not be possible to obtain an edge. In this case, the width of the valley is halved, and we move half of the valley width on both sides of the valley to determine the values of \(p_1\) and \(p_2\). If all three methods fail to find points on the vessel boundary, the boundary failure flag (\(P_{err}\)) is activated and indicates that the vessel has reached its end.

When the two boundary points are obtained, the midpoint of these two points, Pcenter, is recognized as the centerline point of the vessel.

The left and right boundary points (\(p_1\) and \(p_2\)) divide the space surrounding the vessel into three parts: background 1, background 2, and the vessel itself. In this work, a distinction is made between the backgrounds on both sides of the vessel. This differentiation is due to the potential difference in brightness levels between the two sides. The average value of each part is calculated and stored separately.

\(\bullet\) Point validity assessment: In this stage, the validity of the selected point is evaluated from multiple perspectives. If the selected point is not acceptable in any of the evaluations, the \(F_{BE}\) (End of Branch) flag is activated to exit the algorithm. The reasons that activate the \(F_{BE}\) flag are listed below:

- \(P_{err}\) flag activation.

- Insufficient or excessive distance between two points, \(p_1\) and \(p_2\): The geometric distance between the two points is calculated, and if it is less than 3 pixels or greater than 30 pixels, the \(F_{BE}\) flag is activated.

- Going out of the image: If the coordinates of either \(p_1\) or \(p_2\) are outside the image boundaries.

- Insufficient contrast with the background: Even in non-vessel areas (Fig. 6), there may be valleys. To identify these cases, we examine the average difference between the vessel’s brightness level and the background average. If the average brightness level of the vessel differs by less than 6 from the background average, that region is not considered a vessel.

- Failure to pass the Hessian filter: In some cases where the obtained points are not on the vessel, by considering a small window around the \(P_{center}\) and comparing the sum of vessel metrics for all pixels in the window with the product of the image’s Hessian filter threshold and the number of pixels in the window, if the sum is lower, the point is not a vessel.

- Encounter with a repeated point: With each iteration of vessel tracking and reaching two points, \(p_1^i\) and \(p_2^i\), in the i-th iteration, and two \(p_1^{i-1}\) and \(p_2^{i-1}\) points in the 1-i iteration, if both iterations belong to the same vessel branch, a quadrilateral can be drawn to represent the vessel within the distance of these two point sets. This quadrilateral can be used to obtain a cover at each stage and update it. If, during edge tracking, the algorithm encounters an area that has been previously visited, it stops in the current branch. If the \(F_{BE}\) flag is activated due to any of the six mentioned reasons, the algorithm stops in the current branch and continues in another branch. This process continues until all branches are encountered.

\(\bullet\) Detection of branch points or crossing of two vessels: In vessel tracking, branching and vessel intersections can occur. Our method detects branch points during each iteration. If a branch point is found, its central point is stored, and the algorithm continues from the next point in each branch. Detection relies on analyzing vessel characteristics. Valleys in the vessel’s linear characteristic indicate branch points. By examining characteristics at these points, additional valleys become evident, representing vessels in the image. Our proposed method detects branch points using these observations.

All valleys with a level difference greater than 8 in the characteristic, except for the deepest valley examined in the boundary determination section, are placed in a list, and the presence of an edge point on both sides is examined. Initially, for each valley, a point for the left edge and a point for the right edge are calculated by moving from the minimum point of the valley \((V_{min}^m\)) towards the left and right by half the width of the valley. These points are denoted as \(p_{Lw}^m\) and \(p_{Rw}^m\), respectively. Similarly, as described in the boundary identification section, two threshold levels, \(T_{left}^m\) and \(T_{right}^m\), are determined for each valley, and on the left and right sides of each valley, the first point that exceeds these threshold values is recognized as \(p_{Lt}^m\) or \(p_{Rt}^m\).

In this method, the vessel characteristic is smoothed initially. Valleys exceeding a difference of 8 compared to the higher level are selected. Two boundary calculation methods are applied to determine the vessel’s sides. The results are combined for further analysis.

In this stage, the results of the two methods for each boundary are combined to select the boundary between the obtained boundaries. For determining the left boundary (\(p_L^m\)), the boundary between the boundaries obtained by the two methods (\(p_{Lw}^m\) and \(p_{Lt}^m\) ) is selected as the left boundary if it is farther away than \(V_{min}^m\), in other words, more towards the left. Similarly, for determining the right boundary (\(p_R^m\)), the boundary between the two methods that is more towards the right is selected as the right boundary. Then, the midpoint between these two boundaries (\(p_{center}^m\)) is calculated and used as the starting point of a new branch, which is stored. To store the starting points of new branches, the central point of the vessel (\(p_{center}^m\)), the edges (\(p_{Lw}^m\) and \(p_{Lt}^m\) ) the characteristics of the two points before branch detection (\(p_{center}^i\) and \(p_{center}^{i-1}\)), the angle of the line perpendicular to the vessel at the central point \(p_{center}^m\) (\(\theta _L\)), and the number of the detected point (i) are added to the branch point list.

To calculate the new radius for considering the circle, the value of the radius changes based on the size of the current location’s radius. The new circle radius is calculated as follows:

$$\begin{aligned} R_{new}=\frac{(4\times R_{vessel}+R)}{5}+offset \end{aligned}$$
(12)

In equation 12, the value of R represents the current radius of the circle, while \(R_{vessel\ }\)corresponds to half the distance between the two detected boundary points of the vessel. The offset is a parameter used to adjust the circle’s radius, and the optimal outcome is obtained when the offset is set to 1.

In this section, all the information obtained during the detection of each point on the vessel is stored in a list called "vessel points." This list includes the coordinates of the left and right points of the vessel (\(x_L^m\),\(x_R^m\), \(y_L\), \(y_R\)), their center, the average background intensity, and the status of the vessel, which indicates the starting and ending points of the vessel.

3.2.2 Starting From the Initial Point

In the initial step, a circle with a radius of R is centered around point O. A perpendicular line to the vessel passing through point O is determined to divide the circle into two semicircles. In the method that is employed to find this perpendicular line, the maximum vessel radius, r, is assumed. The circle with a diameter of 2r is rotated around point O, with each rotation being one degree. The intensity values of the vessel are stored in an array, and their average is computed (Fig. 7). As the vessel typically exhibits lower brightness compared to the background region, the line with the highest average brightness level is considered the perpendicular line to the vessel. Initially, the first semicircle is selected, and the tracking process commences from this point.

Next, the brightness characteristics of the points along the semicircle are analyzed. Figure 4 demonstrates the brightness graph of the semicircle operator for four consecutive operators. This graph reveals that the brightness levels form a shape resembling an inverse Gaussian curve, which aids in identifying the vessel boundary. Furthermore, Fig. 8 showcases the vessel traversal process and the sequence in which the algorithm traverses the detected branching sub-branches. It is apparent from this image that the sub-branches originating from earlier branching points in the initial point list are traversed first.

Fig. 7
figure 7

Finding the line perpendicular to the vessel

Fig. 8
figure 8

Sequential iterations of the tracking algorithm

3.2.3 Binary Vessel Map Formation

The last phase of the suggested segmentation algorithm involves converting the probability map generated for the vessel region into a binary segmentation mask. To achieve this, a threshold is applied to the values within the final probability map. Pixels with probabilities surpassing the threshold are designated as part of the vessel region.

The proposed method utilizes an adaptive approach to determine an appropriate threshold for each image. To achieve this, the threshold is initially set to a small value of \(\epsilon\), such as \(\epsilon = 0.001\). Using this initial threshold, the largest connected component is tracked within the binary mask. Subsequently, the threshold is gradually increased, resulting in a new binary mask. As the threshold increases, fewer points are identified as part of the vessel region. The threshold increment stops when less than 80% of the points with a probability greater than 0.5 are included in the largest connected component. The obtained threshold value is then chosen for generating the final segmentation mask. This adaptive threshold selection process is employed to preserve the connectivity of the extracted vessel regions.

4 Results and Discussion

4.1 Evaluation Metrics

The performance of the proposed method is evaluated on a dataset consisting of X-ray angiography images acquired using the Siemens Artis Zee Floor Fluoroscopy system. The dataset consists of 44 grayscale images, each with dimensions of 512 \(\times\) 512 pixels. Expert-annotated ground truth is provided for segmentation evaluation.

The evaluation of the proposed vessel extraction method in X-ray angiograms involves comparing it to state-of-the-art algorithms.

The evaluation metrics used for comparison are defined by Eqs. 13,14,15 and 16:

$$\begin{aligned}{} & {} Dice\ Score=\frac{2TP}{2TP+FN+FP} \end{aligned}$$
(13)
$$\begin{aligned}{} & {} Accuracy=\frac{\left( TP+TN\right) }{TP+FN+TN+FP} \end{aligned}$$
(14)
$$\begin{aligned}{} & {} Sensitivity=\frac{TP}{TP+FN} \end{aligned}$$
(15)
$$\begin{aligned}{} & {} Specificity=\frac{TN}{TN+FP}\ \end{aligned}$$
(16)

True Positive (TP): number of pixels correctly labeled as vessel in both the ground truth and the produced segmentation mask.

False Negative (FN): number of vessel pixels missed by segmentation mask.

False Positive (FP): number of pixels that are incorrectly classified as vessel.

True Negative (TN): number of background pixels accurately labeled as background by segmentation mask.

4.2 Performance of the Proposed Method

The performance metrics are summarized in Table 2. The proposed method outperforms other algorithms in terms of segmentation accuracy, sensitivity, specificity, and Dice score. Notably, the proposed method achieves a high Dice score of 81.79% by accurately detecting vessel parts.

Table 2 Performance metrics of different methods

Figure 9 displays the results of applying the proposed algorithm to a dataset of X-ray angiography images. The tracking method effectively follows the main branches of the vessel and accurately identifies the main bifurcations. However, in smaller vessels, the method occasionally fails to exit the loop. Nevertheless, where the method successfully traverses, it provides a reliable estimation of the vessel boundary, as depicted in the images.

Fig. 9
figure 9

Different results of the tracking method: a) Branching locations. b) Determined boundary points in the complete execution of the algorithm. c) Orientation of the semicircle operator. d) Centerline of the vessel. e) Obtained mask from the proposed method. f) Vessel boundary

Visual results of the proposed methods, along with the available ground truth for segmentation, are presented in Fig. 10. In 10-a, the automatically detected branching points are highlighted. In 10-b, the method successfully performs orientation estimation. The displayed image in the figure contains points in all directions as illustrated in Fig. 5, demonstrating accurate determination of the orientation in the applied method.

Fig. 10
figure 10

Results of the proposed tracking method on angiography images: a) Original image. b) Ground truth reference image. c) Mask obtained from vessel tracking method

In the realm of coronary arteries segmentation, we presented a novel approach for extraction of coronary arteries in X-ray coronary angiography (XCA) images, with a specific focus on addressing challenges related to non-uniform illumination, artifacts, and noise. The proposed method consists of two main components: preprocessing and edge-based tracking. In the preprocessing stage, guided filtering and edge-sharpening algorithms are applied to enhance the features of the original angiographic images. This step is crucial for improving the accuracy of subsequent vessel segmentation, as it helps to preserve edges and enhance contrast. The edge-based tracking method employs a dynamic algorithm starting from a user-selected initial point. This algorithm is designed to handle branch points and vessel crossings, recording them in a list for further analysis. A semicircular operator is used to locate and track the vessel’s edge points, and the characteristics extracted from the operator determine the nature of the location, such as branch points, vessel crossings, endpoints, or regular segments. It is noteworthy to emphasize that our proposed method operates as a semi-automatic approach in contrast to fully automatic machine learning methods often used in the field. While fully automatic methods, including those based on Convolutional Neural Networks (CNNs) have demonstrated effectiveness in learning complex patterns independently, our approach integrates user-guided input for enhanced control and interpretability in the segmentation process. This recognition of the semi-automatic nature of our method aligns with the ongoing discourse in medical image analysis, highlighting the importance of balancing computational precision with human expertise. The deliberate involvement of user input in selecting the initial point adds a layer of interpretability and control, allowing clinicians to influence and validate results based on their expertise. Our proposed method demonstrated remarkable performance in terms of sensitivity, specificity, and accuracy. The sensitivity and specificity values of 86.93 and 99.61, respectively, highlight the ability to accurately identify vessel regions while minimizing false positives. The overall accuracy rate of 97.81 further underscores the reliability of our approach in segmenting coronary vessels. Comparison with existing state-of-the-art segmentation methods revealed that our proposed method outperformed others, as evidenced by its higher Dice score. The Dice score of 81.79% signifies a significant improvement in accurately detecting vessel parts compared to other contemporary techniques. These findings position our method as a notable advancement in the field of coronary vessel segmentation. In practical applications, our algorithm demonstrated effectiveness in following main vessel branches and accurately identifying bifurcations. Challenges were observed in smaller vessels where the algorithm occasionally struggled to exit loops. Despite these limitations, where successful, the algorithm provided reliable estimations of vessel boundaries. Exploration of further investigations and upcoming research initiatives is currently in progress, anticipating the advancement of more efficient models for clinical applications by leveraging larger and more varied datasets in the future.

5 Conclusion

This paper introduces a robust and effective method for the segmentation of coronary vessels in X-ray angiography images, addressing challenges associated with non-uniform illumination, artifacts, and noise. The proposed technique leverages an edge-based tracking approach, incorporating preprocessing steps such as guided filtering and edge-sharpening to enhance image features. The dynamic tracking algorithm efficiently identifies vessel boundaries, branch points, and crossings, providing a comprehensive framework for vessel segmentation. The results of the evaluation on a dataset of X-ray angiograms demonstrate the superiority of the proposed method over state-of-the-art algorithms, achieving outstanding performance metrics. With a Dice score of 81.79%, sensitivity of 86.93%, and an accuracy rate of 97.81%, the proposed approach surpasses existing methods in accurately delineating coronary vessels. The comparative analysis against established techniques such as CNN and PSPnet further highlights the competitiveness and potential of the proposed method in the field of coronary vessel segmentation. In practical applications, the proposed algorithm exhibits reliability in tracking main vessel branches and accurately identifying bifurcations. While challenges may arise in smaller vessels, the overall performance of the method underscores its efficacy in providing precise vessel boundary estimations. This research contributes a significant advancement in coronary vessel segmentation, offering a compelling alternative to existing methods. The notable achievements in terms of accuracy and robustness position the proposed approach as a valuable tool in computer-assisted diagnosis of coronary artery disease. Future work may explore optimizations and adaptations for specific clinical scenarios, further validating the practical utility of this method in real-world medical applications.