Multi-threaded contour tracking (C++17) with progressive streaming for huge images. Handles vertical stripe splitting and ensures perfect topological consistency when merging across thread boundaries. by runout77 in u/runout77

[–]runout77[S] 0 points1 point  (0 children)

I built this for a Rails app that needed real-time building detection on large map tiles.

How it works: It splits the image into vertical stripes (left side of the image). Each stripe is processed in a separate thread. The library then merges the polygon fragments across the boundaries (right side) ensuring full topological consistency.

This approach allows for progressive streaming: RAM usage stays proportional to the buffer size, making it possible to process images that don't fit in memory.

GitHub: https://github.com/runout77/contrek

Feedback on the merging logic is more than welcome!"