Visual alignment of arteries in coronary cine-angiogram using global motion stabilisation approach

Coronary cine-angiogram (CCA) is an invasive medical image modality, which is used to detect stenosis in coronary arteries (CA). Global motion that occurs due to the heart beat is a major obstruction to visually track correlated arterial flow within CCAs. This study devises a novel method to align the main CA visualised among the CCA frames using global motion stabilisation. In order to stabilise the global motion artifact, motion vectors are calculated through improved template matching technique, which is introduced in this study to match a given CA template with the CCA frame that contains deformed CA tree. The accuracy of the proposed content alignment method was reported as 97.45 %. The content aligned global motion stabilised CCA is produced as the output of this study and those CCAs can be used to further enhance the angiography image modality, to determine the functional significance of CA to assess the severity level of the detected stenosis.


INTRODUCTION
Coronary cine-angiogram (CCA) is one of the invasive medical image modalities used to detect luminal obstruction or the degree of stenosis in coronary arteries (CA). The diagnosis based on coronary angiogram is subjective because the results are produced mainly through visual judgments, which are done based on the angiogram images taken under the limited number of views (Wagner et al., 2011;Wong et al., 2012). Therefore, overestimations and underestimations of stenosis frequently occur in clinical judgments due to the lack of objective assessment methods in the angiography technique (Tonino et al., 2010). Hence, it is desirable to conduct an objective assessment of the detected stenosis Non-uniform illumination and noise degrade the visual clarity of vessel structures in CCA frames (Dehkordi et al., 2011). Additionally, CCAs consist of various types of motion artifacts (Moscheni et al., 1995;Yamamoto et al., 2009). There are three main types of motions in CCAs, namely, the global, radial and local motions. Global and radial motions occur due to the systolic and diastolic movements of the heart. Global motion produces rapid displacements of vessel structures from its initial recorded point, and radial motion makes tiny movements in distal parts of the main CA. Local motion and it is the important motion category to determine the et al., 1995). Figure 1 consists of non-uniformly illuminated four consecutive frames of a CCA and graphically elaborate the artifact produced by both global and local motions of a heart. The catheter engaged area shown in each frame of Figure 1 is marked using a white square for better visualisation of the artifact. As a result of global motion, the placement of this marked region varies in the four consecutive frames named as a, b, c and d of Figure 1. It is noteworthy that, the distribution of contrast agent gradually increases in all four images as a result of the local motion.
implicitly recorded with global motion, thus it changes the placements of vessel structure from one frame correlation of the vessel structure across the CCA frames sequence (Meijering et al., 1999; Shechter et al. Kusumawardhani et al., 2011). Nonetheless, the visual correlation of the marked or dyed arteries across the frames is crucial prior to determining the functional computation steps to determine the placement of the vessel's starting point (catheter engage point) in each frame due to the nonexistence of visual correlation.
to stabilise global motion artifacts in CCA frames so that the marked arteries can be aligned across the frames based on a selected point in its initial frame.
Although coronary angiography consists of visual problems, global motion artifact and subjective diagnosis, it is still the standard technique for guiding percutaneous coronary intervention in patients with coronary artery disease (Kusumawardhani et al., 2011). Therefore, various research attempts have been undertaken in the recent past to estimate and eliminate the motion artifacts from coronary angiography (Meijering et al., 1999;Yamamoto et al., 2009;Zheng & Weirong, 2009;Kusumawardhani et al., 2011). Feature descriptor based based method are among the major techniques for motion stabilisation in angiograms.
A scale invariant feature transform (SIFT) based motion estimation and video stabilisation technique was described in a recent research study (Kusumawardhani et al., 2011). In this study, SIFT was used to obtain the key points between two consecutive frames. The nearest distance between the SIFT feature in two consecutive frames was calculated during the SIFT feature matching step to determine the global motion vector.
Image registration based approaches for motion estimation and correction have been proposed previously (Meijering et al., 1999). In their proposed method canny edge detection was applied to extract artifact regions. Template matching was applied to compute the displacement vector, and a histogram based method was used as the similarity measure of the template matching. Finally, warping technique was applied to create the motion compensated angiogram images. Zheng and Weirong (2009) analysed the coronary and elastic registration. It has been proved that the optical image sequence. Further, they explained that the elastic the globally matching vessel skeletons at different time points.
The proposed motion stabilisation method is implemented based on the template matching technique and it aligns the vessel structures (content align) shown in the visually enhanced frame sequence of the CCA by reducing the global motion artifact. In conventional template matching, the given template is matched with the spatial contents coherence (Bradski & Kaehler, 2008;Brunelli, 2009). However, when based on angiogram images the conventional template matching will fail because the arteries recorded in angiogram frames are different from frame-to-frame due to vessel structure deformation and motion artifacts. The proposed motion stabilisation method can address this issue successfully and it produces visually aligned CCA frames as the output. Further, the resulting CCA frames are free from global motion artifact and visualise the spreading of contrast agent within the vessel structure starting from later used to formalise a mechanism for the detection phases, namely, preprocessing and motion stabilisation. The objective of the preprocessing phase is to enhance the input CCA by eliminating the visual problems such as noise, non-uniform illumination and increasing the contrast of the vessels through normalisation. This enhanced CCA frames are fed as input to the motion stabilisation phase. The main objective of the motion stabilisation phase is to align the vessel structures visualised in individual frames by removing the global the proposed method is depicted in Figure 2 for further 2011; Kusumawardhani et al., 2011). In order to reduce was applied to the selected CCA frames. Subsequently, a extract the illumination component from those selected CCA frames to obtain the illumination uniformity of the CCA frames.

Normalisation
The processed frames were then normalised to obtain the contrast among the vessel structures. Equation (1) represents the normalisation technique applied in the preprocessing phase.
where M and V denote the estimated mean and variance of the input image and M d and V d are desired mean and variance values, respectively. N (i, j) is the output image and img(i,j) denotes the input image where i and j represent the pixel position of both input and output images. According to the experimental results M d was set as M/2 and V d was set as (V×4) to obtain better results. Radial distance and order parameters of M d , V d parameters of normalisation are adjustable according to experimental setups. Figure 3 depicts the original CCA frame and the respective preprocessed CCA frame for further Flow chart of the proposed global motion stabilisation method

Frame selection
Within this step, the CCA frames which visualise the were extracted directly from the CCA. The selected frames are important because they demonstrate the visual problems such as noise, non-uniform illumination and low contrast.

Removal of noise and non-uniform illumination
It was revealed that the CCA frames consist of salt-andpepper noise and non-uniform illumination as major visual degradations, which lead to some incorrect results in subsequent matching procedures (Dehkordi et al., Preprocessing step: (a) frame extracted from direct CCA; (b) corresponding preprocessed frame of (a)

March 2017
Journal of the National Science Foundation of Sri Lanka 45(1)

Motion stabilisation phase
The motion stabilisation phase contains two main sub processes, namely, global motion reduction process and content aligned video creation process. The global motion reduction process is an iterative process and within the iteration, new global motion stabilised frames are generated from the input preprocessed video frames. Later, the content aligned global motion stabilised CCA is created within the content aligned video creation process. The main steps under these sub processes of the motion stabilisation phase are further described in the following sections.

Template selection
The global motion reduction process starts with the template selection step. In this step, the initial template input preprocessed CCA. As shown in Figure 4(a), the selected template is located at F x,y point of the initial frame and it has (w) width and (h) height. The values of w and h depend on the pixel width and height of the arbitrarily selected template. In addition to the template selection, it is required to select another region around the selected template as the search window, in order to set the boundary for the subsequent template matching step. Figure 4(b) depicts the template search window located at G x,y point of the initial frame. It has m width and n height where and The success of matching steps depends on the selected template's visual contents. Therefore, selecting a template around the the CCA provides successful results during the template matching steps, because the catheter engaged area is clearly visualised in all recorded frames of most CCA cases. Hence, it is recommended to select the initial to be processed.

Template matching step
The template matching step begins after the template selection step and it repeats until the last frame of the CCA is processed. Within this step, the template selected from the initial frame (location: F x,y , dimensions: w×h) is matched with the next frame using the search window of (m) width and (n) height. The correlation for the template matching step because it produces the lowest false matching occurrences in the preliminary experiment (Bradski & Kaehler, 2008;Brunelli, 2009). Matching point is denoted as C x,y where C x,y x,y . Inequality between C x,y point and F x,y point is caused by the global motion, which occurs due to the heart beat. The illustration of the template matching step is depicted in Figure 5.

False matching detection
There is a very low probability of matching the selected template with the current frame without representing a visual spatial content similarity ( Table 2). This type of match is considered as a false positive (FP) match. As a consequence, the matched region contains a similar intensity distribution with the visually mismatched representation, compared to the selected template in the happens because of the deformations in vessel structures due to the motion artifacts. This exception affects the motion stabilisation defectively. has been implemented for template matching to detect and correct the FP matches. Further, it has been experimentally observed that it contains larger displacements between F x,y and C x,y points when a FP match occurs. In addition to that, the occurrence of shape mismatches has been observed among the features of matching templates in some FP matching instances. The shape similarity between the template region in the previous frame and the template matched region in the current frame was determined based on the histogram based oriented gradient (HOG) descriptor. Euclidean distance between the HOG descriptor values (HOG distance -D HOG ) obtained for both template region in the previous frame and the template matched region in the current frame was computed. In order to identify the FP templates, HOG distance value was compared with a threshold HOG distance (D HOGThreshold ) value, which was determined during the preliminary experiment. The following algorithm was implemented to detect the FP matching occurrences. If there is any FP matching occurrence, the re-correction step will begin. The re-correction was done using the matched point obtained in the previous template matching iteration, which is denoted as C x,y . For example, if the FP detection occurs in the n th iteration of the global motion reduction process, it will use the matched coordinates obtained in the (n-1) th iteration to recorrect it. In this re-correction process, the re-corrected template matching point is marked explicitly from P x,y position in the current frame where P x,y equals the C x,y point of the previous iterations' template matching step. Journal of the National Science Foundation of Sri Lanka 45 (1) It was revealed that this re-correction approach does not provide the best matched location for the selected template. Instead, it provides near equal matched area. The reason for that is: the deformation that occurs in vessel structures due to the radial motion among the arteries is visualised in both re-corrected matching region of the current frame and template. Therefore, it is match point. Euclidean distance between the template and the matched region in the current frame is taken as In order to smoothen the re-corrected point, the Euclidean distance is calculated between the template at F x,y point of the previous frame and the re-corrected template marked in P x,y point in the current frame, and the result is denoted as ED i . Subsequently, the Euclidean distance values are calculated separately between the template at F x,y point of the previous frame and the possible matching points, which can be obtained from a region around the P x,y point (block mating). At the end of this block matching, the best matched block to the template at F x,y point of the previous frame is obtained and it is denoted as ED m . Finally, the coordinate point which provides ED i is selected as the re-corrected best matched location if ED i <= ED m . Otherwise ED m is selected as the re-corrected best matched point during the FP correction step.

Calculating the global motion vector
In order to construct the global motion stabilised frames, it is required to compute the motion vector M x y of two consecutive frames using the following equation; ... (2) where C x and C y denote the x, y coordinates of the matched point obtained from C x,y point in the current frame, and F x and F y denote the x, y coordinates of the selected template point at F x,y point in the previous frame.

Construction of motion stabilised frame
In order to construct a motion stabilised frame, the current frame is translated into a calculated distance towards the direction determined by the motion vector. If (C x -F x ) is negative, the current frame must be shifted to the right direction; else it is shifted to the left. Similarly, if (C y -F y ) is negative, the current frame must be shifted downwards; else it is shifted upwards. As a result of this translation, a new frame is constructed and it is stored within the system to create the content aligned video in the second process of the video stabilisation phase. Further, it is used as the input for the template matching step of the next iteration for selecting the template from F x,y point with dimensions of (w×h). After step is done automatically using the newly constructed frame produced in the previous frame construction step of the global motion reduction process. This procedure is repeated until the last frame of the input CCA and a set of global motion eliminated angiogram images are produced as the output.

Process of creating content aligned video
Content aligned video creation process creates a global motion stabilised video using the global motion eliminated frames produced by the global motion of the motion stabilised video are set as same as the angiography standards.

Dataset
selected patient cases has been selected to validate the proposed method. Each patient case consists of three CCAs, which were recorded under three standard angiography views, namely, left anterior oblique (LAO) cranial, anterior posterior (AP) caudal views of left coronary artery (LCA), and LAO cranial view of right coronary artery (RCA).
Further, Table 2 Test 1 columns summarise the TP matching results obtained under the CC similarity measure for each test case according to the selected angiography view. Moreover, the analysis results have shown TP matching percentages under the selected steps were presented in the executed dataset under each similarity measure. Further, the visually observed template matching judgment, calculated HOG distance (D HOG ) and the Euclidean distance between matched templates for each matching step were recorded.
Each matching instance is determined both as TP or FP matching based on the visually observed template matching judgement made by experts, and is used as

Finding a value for D HOGThreshold
Initially, the visually observed template matching judgement was compared with the recorded D HOG values for each matching instance of CCAs separately. During this observation, the occurrence of critical shape dissimilarities when D HOG is greater than or equal to 43 has been clearly disclosed. Hence, the value 43 was selected as the D HOGThreshold distance value and if D HOG 43, the matching is considered as a TP match, otherwise it is considered as a FP match. Figure 7 depicts the TP and FP matched templates and HOG descriptor

Setting a value for distance factor
The value for distance factor is decided using the template distance (d temp ) values obtained for template matching records. In order to determine this, the template distance (d temp ) values, which are not placed in the matching selected records are not placed in the matching region and do not represent the shape similarity. Therefore, it is necessary to calculate the distance ratio for selected upper bound and lower bound records in order to mark the distance margin for determining these total mismatch occurrences. Hence, the distance ratio for upper and lower bounds were calculated as follows; Upper bound distance ratio = d temp / (d mean + d std ) Lower bound distance ratio = (d mean -d std )/ d temp .
Out of the calculated distance ratios the minimum distance ratio is selected as the distance factor and it is denoted as 2.

Assessing the robustness of the proposed method
The proposed method was executed for the second time using the same dataset and the same template parameters matching validation algorithm was enabled to detect and correct FP matches. During this execution CC was set as the similarity measure for template matching operation and value 43 was set as the D HOGThreshold . Table 2 Test 2 columns enlist the TP matches obtained as results for this execution. Analysis results of this execution have revealed TP matching percentages under the selected Figure 8 lists four consecutive frames extracted from a test case to visually compare the results of the proposed content alignment method. It contains the original nonmotion stabilised frames and respective motion stabilised frames constructed during the execution of the proposed method.

DISCUSSION
In this study, a global motion stabilised CCA creation method and its implementation using a simple image registration technique called template matching has been proposed (Kumar et al., 2007;Bradski & Kaehler, 2008;Mahalakshmi et al., 2012). Conventional template matching matches the given template with the reference image by checking the spatial resemblance of intensities, and the matching features must not be isotropic and scale invariant. Empirical results of this study have revealed 1259 steps out of 1372 total template matching steps as Journal of the National Science Foundation of Sri Lanka 45 (1) March 2017 The results further emphasise that the proposed method contains a chance of having FP matching instances stabilised CCAs are formed. The main reasons for these FP matches are; the occurrence of radial motion artifacts in vessels and contrast agent concentration variation among the frames. Therefore, rapid spatial differences between the template and the match region in the reference frame can occur. The proposed motion stabilisation method has been implemented with a FP match detection and correction mechanism to improve the TP matching rate further. This improvement is clearly emphasised by the Table 2  An algorithm has been implemented to detect and correct the FP matches in template matching and it was the major improvement suggested to advance the results provided by the conventional template matching technique. According to this proposed algorithm, FP matches are detected based on the displacement of the matched templates and HOG descriptor, because it has been experimentally observed that some FP matches contain rapid distance displacements and some FP matches contain shape dissimilarities between the matched templates. As depicted in Figure 7, HOG descriptor was used to determine the shape dissimilarities According to the experimental results, it has been revealed that the proposed adaptive template matching approach provides the matching results by considering both the spatial intensity and feature resemblance among the reference and matched templates. Therefore, unlike the conventional template matching, this novel adaptive template matching method can tolerate the structural provide visually acceptable matching results. This is the major improvement that has been suggested for the conventional template matching as a result of this research study, so that it can be adaptively matched with the templates from the angiograms with deformed vessel structures.
The global motion stabilisation phase of the proposed method can provide the expected content alignment of the vessel structure (foreground) among the frames. This can be visually judged by looking at the catheter engaged area of both the original and stabilised frame sequences shown in Figure 8. The catheter engaged area is marked as a white square and according to the results, motion location. This happens as a result of reconstructing the frame by eliminating the global motion. This frame reconstruction is done based on the calculated motion vector. Hence, it is possible to detect larger motion gaps

March 2017
Journal of the National Science Foundation of Sri Lanka 45 (1) vessel structure is visualised starting from the catheter engaged point. This visual correlation obtained among the CCA frames could be used for segmentation of blood vessels among the CCA frame sequence starting from a CCA frame sequences obtained as a result of this study can be considered as an improvement suggested for the coronary angiography image modality.
methods slow down the template matching process because the template needs to be matched to every location in the image and the matching involves element-1981). In order to improve the template matching pixel dimension has been suggested instead of using the vision library. This new template search window has of the template matching process by reducing the number Similar research work has been reported in a recent study and it has described global motion stabilisation of CCAs using scale-invariant feature transform (SIFT) descriptor (Kusumawardhani et al., 2011). According to their study, the global motion vector has been determined based on SIFT feature matching between the two consecutive frames. We have empirically observed that SIFT provides many miss-corresponding key point pairs matching features is ambiguous. As a result of that, it provides erroneous global motion vectors for motion compensation.
The proposed method works successfully with the camera motion free CCAs. Due to camera motion, the template area can be shifted out from the captured frame area in some matching instances, and the reconstruction of global motion reduction frame becomes highly camera motion free CCAs to this algorithm to obtain successful results.

CONCLUSION
This study introduces a novel approach to obtain CCA frames by removing the global motion artifact.
The proposed method was implemented based on the improved template matching technique that can adapt to match the deformed vessel structures in CCAs. accuracy and the conventional template matching is CCAs produced from this study would extend research directions to obtain the corelation of vessel segmentation among the CCAs' frames, and consequently determine disease.