TRUCO: A Scalable Lock-Free Algorithm for Parallel Contour Extraction
Transforming binary masks into geometric contours remains a critical step in many computer vision pipelines, particularly for post-processing high-resolution segmentation outputs. Yet, standard algorithms such as the Suzuki-Abe method are limited by their sequential nature and the overhead of building topological hierarchies. As modern applications transition to high-resolution imaging, there is a critical need for contour extraction that leverages multi-core CPU architectures without the complexity of tile stitching or heavy synchronization. This paper presents TRUCO (Threaded Raster Unrestricted Contour Ownership), a lock-free parallel algorithm designed for high-performance geometric boundary extraction. TRUCO introduces a start-point ownership rule, combined with a speculative tracing model, in which threads trace contours downward into adjacent regions and use an upward-termination logic to ensure each contour is processed exactly once. Experimental results on synthetic and real-world datasets, conducted on both consumer and server-grade CPUs, demonstrate that TRUCO significantly outperforms existing baselines. The method achieves speedups of over an order of magnitude compared to the industry standard while maintaining robust scalability on high-resolution scenes across diverse hardware architectures.
Authors
- Francisco J. Romero-Ramírez (ORCID: https://orcid.org/0000-0002-9572-0128)
- Manuel Jesús Marín-Jiménez (ORCID: https://orcid.org/0000-0001-9294-6714)
- Rafael Muñoz‐Salinas (ORCID: https://orcid.org/0000-0002-8773-8571)
Publication Details
- Journal
- arXiv (Cornell University)
- Published
- 2026-10-27
- DOI
- https://doi.org/10.48550/arxiv.2610.37297
- Primary Topic
- Digital Image Processing Techniques
- Type
- preprint