1 / 21

Parallel Banding Algorithm for Distance Transform

This paper discusses the Parallel Banding Algorithm (PBA) for computing the Euclidean distance transform on GPU. It presents a three-phase approach that improves upon the naïve approach in terms of accuracy, parallelism, and expected total work. The paper includes experimental results comparing PBA with other algorithms, as well as limitations and future work.

brentonj
Download Presentation

Parallel Banding Algorithm for Distance Transform

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Thanh-Tung Cao Ke Tang Anis Mohamed Tiow-Seng Tan

  2. Outline • Distance transform and applications • Related works • Exact Euclidean distance transform • Parallel Banding Algorithm (PBA) • Experiment results i3D 2010 - Washington DC, USA

  3. Distance Transform • Given a grid N = ndand a set of sites S, compute for every grid point the distance to the nearest site. n n Distance transform Voronoi diagram i3D 2010 - Washington DC, USA

  4. Applications • Image processing, graphics, computational geometry... Morphological operation Integer medial axis Stipple drawing i3D 2010 - Washington DC, USA

  5. Related Work • Approximate: Vector propagation approach • Danielsson [1980], O(n). • GPU based: • Jump flooding [Rong and Tan, 2006, 2007] • Schneider et al. [2009] • Exact: Voronoi diagram-based • Maurer et al. [2003], O(n), parallelizable. • PRAM: Lee et al [2003], Wang et al [2001] • GPU: PBA is the first. i3D 2010 - Washington DC, USA

  6. Euclidean Distance Transform • Consider one column on the 2D image. Column i B' B Fact 1: Among all sites in the same column, only the nearest matter. i3D 2010 - Washington DC, USA

  7. Euclidean Distance Transform • Consider one column on the 2D image. A Column i B C Fact 2: The Voronoi region of A and C can dominatethat of B. i3D 2010 - Washington DC, USA

  8. Euclidean Distance Transform • Consider one column on the 2D image. A Column i C Fact 3: If A is on top of C then A’s region is also on top of C’s region. i3D 2010 - Washington DC, USA

  9. Parallel Banding Algorithm Phase 1 Final result Phase 3 Phase 2 i3D 2010 - Washington DC, USA

  10. The naïve approach • Phase 1: • Left – Right sweep, each pixel updates with the pixel on its left. • Right – Left sweep. i3D 2010 - Washington DC, USA

  11. The naïve approach • Phase 2: Finding proximate points in linear time. • Process sites from top to bottom • Store the current set of proximate sites in a stack dominated i3D 2010 - Washington DC, USA

  12. The naïve approach • Phase 3: • For a column, pixels are “colored” from top to bottom s1 p-1 s2 p p is nearer to s1 than to s2 Yes No p belongs to s1 s1 can be removed i3D 2010 - Washington DC, USA

  13. Parallel Banding Algorithm • Motivations: • Within a row/column, the computation is sequential. • Maximum number of threads used is n (512, 1024, etc). • We needs 104 – 105 threads to fully utilize the latest GPUs. i3D 2010 - Washington DC, USA

  14. Parallel Banding Algorithm • Phase 1: • A row is equally divided into m1 bands. • Within a band, perform the sweeping similar to the naïve approach. • Propagate the information among the first and the last pixel of different bands. • Pixels update with the first/last pixel of its band Updated! i3D 2010 - Washington DC, USA

  15. Parallel Banding Algorithm • Phase 2: • A column is equally divided into m2 bands • For each band, we compute the proximate sites using the naïve approach. • Bands are merged hierarchically i3D 2010 - Washington DC, USA

  16. Parallel Banding Algorithm • Phase 3: • Color a band of m3 pixels at a time, 1 thread per pixel. • Move to the next band when the last pixel of the current band confirms its color. s1 s2 confirmed s3 remove s1 i3D 2010 - Washington DC, USA

  17. Experiment results • CUDA, nVidia GeForce GTX280 Naïve v.s. Banding approach i3D 2010 - Washington DC, USA

  18. Experiment results Scalability Different bands for Phase 2 i3D 2010 - Washington DC, USA

  19. Experiment results • Compare with JFA [Rong et al. 2006]and SKW [Schneider et al. 2009] 2D 3D i3D 2010 - Washington DC, USA

  20. Conclusions • Advantages: • Accurate result → Algorithm to computing weighted centroidal Voronoi Diagrams on GPU (see paper) • Optimal linear expected total work • High level of parallelism, GPU friendly • Limitations: • Load balancing in Phase 2 • Worst case not work-optimal in Phase 3 i3D 2010 - Washington DC, USA

  21. The paper, video, presentation slides and source code are available at: http://www.comp.nus.edu.sg/~tants/pba.html THANK YOU!

More Related