# Optical Flow-Based Extraction of Breathing Signal from Cone Beam CT Projections
## 4 Results and Discussion  
In this section, the experimental results are presented. The MathWorks, Inc., Natick, MA, USA is utilized as the main programming software in this research. Results for patient 1 dataset:  
This dataset comprises 701 CBCT projections with ground-truth obtained by diaphragm tracking. Figure 3 shows the extracted breathing signal for the patient 1 dataset and the corresponding phase-sorting plot. The average phase shift and standard deviation was observed to be 1.936 and 0.734, respectively. Results for Patient 2 dataset:  
This dataset comprises 1220 CBCT projections of a dimension of 768 \(\times\) 1024 with ground-truth obtained by tracking the location of one implanted marker. Figure 4 shows the extracted breathing signal for two different projections from the patient 2 dataset and the corresponding phase-sorting plot. As the total number of projections was too large to be processed at one time, the processing was therefore performed for groups of 300 projections. The average phase shift and standard deviation phase shift of the entire signal for the patient 2 dataset was observed to be 1.185 and 0.781. Figure 3: (a) Extracted breathing signal for patient 1 compared with ground-truth (diaphrag position). (b) Phase-sorting plot for patient 1 dataset. Results for Patient 3 dataset:  
This dataset comprises 2396 CBCT projections with a dimension of 768 \(\times\) 1024, with ground-truth obtained by tracking the location of four internal markers. Similar to the patient 2 dataset, the processing was performed for a group of 300 projections at a time. A plot of the extracted breathing signal in red, along with the position of four markers and their average location, is shown in Figure 5. The extracted signal was able to capture sudden changes in respiratory pattern similar to what was captured by markers A and B. These changes are highlighted in the plot with a black dotted rectangle. Figure 6 shows the extracted breathing signal for two different projetions from the patient 3 dataset and the corresponding phase-sorting plot. The average phase shift and standard deviation phase shift of the entire signal for the patient 3 dataset was observed to be 1.537 and 0.93. Unlike signals captured by markers C and D, the signal extracted by the proposed algorithm is fully continuous. Figure 4: Extracted signal (left) and the corresponding phase-sorting plot (right) for patient 2: (a,b) projections 1367 to 1667, (c,d) projections 1967 to 2267. Figure 5: Extracted breathing signal vs. all marker positions for patient 3. The average phase shift for patient 1 is higher in comparison to patient 2 and patient 3. The main difference between these datasets is that for dataset 2 and 3 the ground-truth was provided through an internal marker, while for patient 1 it was through diaphragm tracking. This shows that the extracted signal correlates more with the extracted signal using the internal markers, as they are both extracted from internal lung tissues. The extracted breathing signal was used for phase sorting where projections belonging to the same breathing phase were used for 4D image reconstruction. To test the feasibility of using the extracted signal for phase sorting and 4D image reconstruction, the proposed breathing signal extraction method was applied to a phantom dataset. This dataset was generated using the XCAT (extended cardiac torso) simulation software by [PERSON] et al. [32; 33]. The dataset was prepared simulating regular respiratory motion, where every cycle comprises 20 breathing phases. The total number of projections in this dataset is 720. The respiratory motion extraction results for this dataset were previously published in [26], where the dataset was referred to as Phantom dataset 2. Figure 7 shows coronal slices from the 3D and 4D CBCT reconstructed images of the phantom dataset. Figure 6: Phase-sorting plot of extracted signal for patient 3: (**a**) projections 1 to 300, (**b**) projections 300 to 600, (**c**) projections 600 to 900, (**d**) projections 1500 to 1800.