# A Novel Connected-Components Algorithm for 2D Binarized Images
## 2 Materials and Methods
### Extraction of Connected Components
## 4 Discussion

This section interprets the experimental results presented earlier, analyzing some of the strengths and potential limitations of the proposed method. We identify scenarios where the method performs well and present some justifications and insights into this behavior, as well as scenarios where the method underperforms and propose directions for optimization and future research. ### Comparative Performance

The proposed method consistently achieves faster execution times than most algorithms it was tested against, across a broad range of image types, with a couple of exceptions. On datasets that contain large-resolution images, such as Hamlet, Tobacco, xDocs, and Medical, our algorithm tends to heavily outperform every other one, obtaining improvements between 20% and 50% over Spaghetti. These gains are likely due to the fact that we operate at run level, rather than pixel level, in combination with the efficient merging strategy that leverages pointer-based data structures. It is important to mention that our algorithm loses in terms of speed to other algorithms that read the image using bit-level operations, such as BRTS and BMRS. Against those algorithms, we tend to be around 50% slower. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**MethodDataset** & **Fingerprints** & **Hamlet** & **Medical** & **3 dpes** & **Tobacco** & **xDocs** & **Mirfilckr** & **Synthetic** \\ \hline
**SAUF** & \(8.1\times 10^{5}\) & \(1.4\times 10^{7}\) & \(7.1\times 10^{6}\) & \(2.1\times 10^{6}\) & \(2.4\times 10^{7}\) & \(8.8\times 10^{7}\) & \(1.2\times 10^{7}\) & \(1.3\times 10^{6}\) \\ \hline
**BBDT** & \(5.7\times 10^{5}\) & \(1\times 10^{6}\) & \(4.8\times 10^{6}\) & \(1.5\times 10^{6}\) & \(1.7\times 10^{7}\) & \(6.1\times 10^{7}\) & \(7.8\times 10^{6}\) & \(9\times 10^{7}\) \\ \hline
**PRED** & \(8\times 10^{5}\) & \(1.4\times 10^{7}\) & \(7\times 10^{6}\) & \(1.1\times 10^{6}\) & \(2.4\times 10^{7}\) & \(8.8\times 10^{7}\) & \(1.2\times 10^{6}\) & \(1.2\times 10^{6}\) \\ \hline
**DRAG** & \(8\times 10^{5}\) & \(1.4\times 10^{7}\) & \(7\times 10^{6}\) & \(1.1\times 10^{6}\) & \(2.4\times 10^{7}\) & \(8.8\times 10^{7}\) & \(1.2\times 10^{7}\) & \(1.2\times 10^{6}\) \\ \hline
**Spaghetti** & \(5.6\times 10^{5}\) & \(1\times 10^{7}\) & \(4.8\times 10^{6}\) & \(1.5\times 10^{6}\) & \(1.7\times 10^{7}\) & \(6.1\times 10^{7}\) & \(7.8\times 10^{7}\) & \(8.7\times 10^{7}\) \\ \hline
**SBLA** & \(7.4\times 10^{5}\) & \(1.2\times 10^{7}\) & \(6.5\times 10^{6}\) & \(1.6\times 10^{6}\) & \(2\times 10^{7}\) & \(7.5\times 10^{7}\) & \(1.1\times 10^{6}\) & \(1.2\times 10^{6}\) \\ \hline
**BRTS** & \(4.2\times 10^{5}\) & \(8.2\times 10^{6}\) & \(3.6\times 10^{6}\) & \(1.2\times 10^{6}\) & \(1.4\times 10^{7}\) & \(5\times 10^{7}\) & \(5.5\times 10^{5}\) & \(5.9\times 10^{7}\) \\ \hline
**BMRS** & \(4.6\times 10^{5}\) & \(8.4\times 10^{6}\) & \(3.9\times 10^{6}\) & \(1.2\times 10^{6}\) & \(1.4\times 10^{7}\) & \(5.2\times 10^{7}\) & \(6.3\times 10^{7}\) & \(6.6\times 10^{7}\) \\ \hline
**Proposed** & \(6.7\times 10^{5}\) & \(5.9\times 10^{6}\) & \(2.7\times 10^{6}\) & \(1.4\times 10^{5}\) & \(2.7\times 10^{6}\) & \(1.3\times 10^{7}\) & \(4\times 10^{5}\) & \(5.5\times 10^{6}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Total number of memory accesses performed by each algorithm.