TRUCO:面向多核CPU的免锁并行轮廓提取算法
TRUCO: A Scalable Lock-Free Algorithm for Parallel Contour Extraction
TRUCO 是一种面向多核 CPU 的免锁并行轮廓提取算法,输出与串行 Suzuki–Abe 算法完全一致。它按水平条带划分图像,用几何归属规则让各线程独立跨条带追踪完整轮廓,并将轮廓追踪与层级重建解耦。在高分辨率数据集上,含层级计算时相对最快串行基线加速 4.7x 至 17.4x,不含层级时为 2.3x 至 17.8x。
arXiv:2610.37297v3 Announce Type: replace Abstract: 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.
来源:arXiv (AI + Vision + Imaging) · arxiv.org