# TRUCO: A Scalable Lock-Free Algorithm for Parallel Contour Extraction

arXiv: https://arxiv.org/abs/2610.37297 · HTML: https://mlsanity.com/paper/2610.37297/

## Key facts

- No citing papers in the map yet (data through 26 Nov 2026).
- Builds on 2 of its 29 references that are in the map.
- Submitted 27 Oct 2026.

## Builds on (most cited first, 2 of 2)

- [Holistically-Nested Edge Detection](https://mlsanity.com/paper/1504.06375/) (2015)
- [A Comprehensive Benchmark for Single Image Compression Artifacts Reduction](https://mlsanity.com/paper/1909.03647/) (2019)

## Abstract (arXiv)

Extracting binary contours and their containment hierarchy is a fundamental step in many computer vision pipelines. While the standard Suzuki--Abe algorithm is inherently sequential, existing parallel tracers neither preserve its exact contours nor compute their hierarchy. This paper presents TRUCO (Threaded Raster Unrestricted Contour Ownership), a lock-free parallel algorithm for multi-core CPUs that produces the exact output of Suzuki--Abe. TRUCO relies on two core ideas. First, the image is partitioned into horizontal stripes, and a geometric ownership rule allows each thread to trace complete contours independently across stripe boundaries, avoiding both locks and post-processing merges. Second, contour tracing is decoupled from hierarchy reconstruction, which is performed in a subsequent parallel pass and can be skipped entirely when only the contours are needed. We formally prove that TRUCO is deterministic, data-race-free, and identical in output to Suzuki--Abe regardless of thread count. Across diverse high-resolution datasets-from sparse segmentation masks to dense real-world photographs-TRUCO achieves speedups of 4.7x to 17.4x over the fastest sequential baseline with hierarchy computation, and 2.3x to 17.8x without it.
