Download presentation
Presentation is loading. Please wait.
Published byAiden Rhead Modified over 10 years ago
1
Parallel Banding Algorithm to Compute Exact Distance Transform with the GPU Thanh-Tung Cao Ke Tang Anis Mohamed Tiow-Seng Tan
2
Euclidean Distance if p = ( p 1, p 2,..., p n ) and q = ( q 1, q 2,..., q n ) are two points in Euclidean n -space, then the distance from p to q, or from q to p is given by:Euclidean n -space
3
Voronoi diagram A set of points (called seeds, sites, or generators) is specified beforehand and for each seed there will be a corresponding region consisting of all points closer to that seed than to any other.
4
Euclidean Distance Transform 100
5
Exact Euclidean Distance Transform Let S i,j be the nearest site, among all sites in row j, of the pixel ( i, j ), and let S i = { S i,j | S i,j NULL, j = 0, 1, 2,..., n −1} be the collection of such closest sites for all pixels in column i. Note that S i,j is NULL when there is no site in row j. Let P i be the set of sites whose Voronoi regions intersect the pixels in column i. These sites are termed the proximate sites of column i.
6
Fact 1 Consider column i and let b ( i 1, j ) and b ′( i 2, j ) be two sites in row j. If | i 1 − i | < | i 2 − i |, then the Voronoi region of b ′ cannot intersect column i. This fact means that for each column i, there can be at most one site along a row that can potentially be a proximate site, or basically, P i ⊆ S i. As a result, | P i | ≤ n.
7
Fact 2 Consider column i and let a ( i 1, j 1 ), b ( i 2, j 2 ), c ( i 3, j 3 ) be any three sites with j 1 v then the Voronoi region of b cannot intersect column i. When the mentioned situation happens, we say that a and c dominate b on column i. In this case, b P i.
8
Fact 3 Let q ( i, v ) and p ( i, u ) be two pixels in column i such that u > v, and let a ( i 1, j 1 ) and c ( i 3, j 3 ) be the closest sites to q and p respectively. Then we have j 1 ≤ j 3. This fact means that the proximate sites of column i have their Voronoi regions appear in exactly the same order as when they are sorted by their y -coordinates.
9
Exact Euclidean Distance Transform Phase 1: For each pixel ( i, j ), compute S i,j. Phase 2: Compute the set P i for each column i using S i. Phase 3: Compute the closest site for each pixel ( i, j ) using P i
10
Parallel Banding Algorithm Phase 1 - Band Sweeping Band 1Band 2Band 3Band 4
11
Parallel Banding Algorithm Phase 1 - Band Sweeping Band 1Band 2Band 3Band 4 ( i,j ) s i,j sisi i
12
Parallel Banding Algorithm Phase 1 - Band Sweeping Band 1Band 2Band 3Band 4
13
Parallel Banding Algorithm Phase 1 - Band Sweeping Band 1Band 2Band 3Band 4
14
Parallel Banding Algorithm Phase 1 - Band Sweeping Band 1Band 2Band 3Band 4
15
Parallel Banding Algorithm Phase 2 - Hierarchical Merging Band 1 Band 2 Band 3 Band 4
16
Parallel Banding Algorithm Phase 2 - Hierarchical Merging Band 1 i S i,1 S i,2 S i,3 S i,4 S i,5 S i,6 S i,7 sisi
17
Parallel Banding Algorithm Phase 2 - Hierarchical Merging Band 1 i S i,1 S i,2 S i,3 S i,4 S i,5 S i,6 S i,7 sisi stack S i,1 S i,2
18
Parallel Banding Algorithm Phase 2 - Hierarchical Merging Band 1 i S i,1 S i,2 S i,3 S i,4 S i,5 S i,6 S i,7 sisi stack S i,1 S i,2 S i,3 ( i,v ) ( i,u ) v u
19
Parallel Banding Algorithm Phase 2 - Hierarchical Merging Band 1 i S i,1 S i,2 S i,3 S i,4 S i,5 S i,6 S i,7 sisi stack S i,1 S i,2 S i,3 ( i,v ) ( i,u )
20
Parallel Banding Algorithm Phase 2 - Hierarchical Merging Band 1 i S i,1 S i,2 S i,3 S i,4 S i,5 S i,6 S i,7 sisi stack S i,1 S i,2 S i,3 S i,4 S i,5 S i,6 S i,7 ( i,v ) ( i,u ) v u
21
Parallel Banding Algorithm Phase 2 - Hierarchical Merging Band 1 i S i,1 S i,2 S i,3 S i,4 S i,5 S i,6 S i,7 sisi stack S i,1 S i,2 S i,4 ( i,v ) ( i,u ) v u
22
Parallel Banding Algorithm Phase 2 - Hierarchical Merging Band 1 i S i,1 S i,2 S i,3 S i,4 S i,5 S i,6 S i,7 sisi stack S i,1 S i,2 S i,4 ( i,v ) ( i,u ) v u
23
Parallel Banding Algorithm Phase 2 - Hierarchical Merging Band 1 i S i,1 S i,2 S i,3 S i,4 S i,5 S i,6 S i,7 sisi stack S i,1 S i,2 S i,4 S i,5 ( i,v ) ( i,u ) v u
24
Parallel Banding Algorithm Phase 2 - Hierarchical Merging Band 1 i S i,1 S i,2 S i,3 S i,4 S i,5 S i,6 S i,7 sisi stack S i,1 S i,2 S i,4 S i,5 S i,6 S i,7
25
Parallel Banding Algorithm Phase 2 - Hierarchical Merging Band 1 i S i,1 S i,2 S i,3 S i,4 S i,5 S i,6 S i,7 sisi stack S i,1 S i,2 S i,4 S i,5 S i,6 S i,7 ( i,v ) ( i,u ) v u
26
Parallel Banding Algorithm Phase 2 - Hierarchical Merging Band 1 i S i,1 S i,2 S i,3 S i,4 S i,5 S i,6 S i,7 sisi stack S i,1 S i,2 S i,4 S i,5 S i,7 ( i,v ) ( i,u ) v u
27
Parallel Banding Algorithm Phase 2 - Hierarchical Merging Band 1 i S i,1 S i,2 S i,3 S i,4 S i,5 S i,6 S i,7 sisi stack S i,1 S i,2 S i,4 S i,7 ( i,v ) ( i,u ) v u
28
Parallel Banding Algorithm Phase 2 - Hierarchical Merging Band 1 i S i,1 S i,2 S i,3 S i,4 S i,5 S i,6 S i,7 sisi stack S i,1 S i,2 S i,4 S i,7
29
Parallel Banding Algorithm Phase 2 - Hierarchical Merging Band 1 i stack S i,1 S i,2 S i,4 S i,7 Band 2 i S i,8 S i,9 S i,12 S i,13
30
Parallel Banding Algorithm Phase 2 - Hierarchical Merging Band 1 i stack S i,1 S i,2 S i,4 S i,7 Band 2 S i,8 S i,9 S i,12 S i,13
31
Parallel Banding Algorithm Phase 2 - Hierarchical Merging Band 1 i stack S i,1 S i,2 S i,4 S i,7 Band 2 S i,8 S i,9 S i,12 S i,13
32
Parallel Banding Algorithm Band 1 i Phase 2 - Hierarchical Merging proximate texture
33
Parallel Banding Algorithm Phase 3 - Block Coloring Case 1 i m3m3 pipi a b a b
34
Parallel Banding Algorithm Phase 3 - Block Coloring Case 2 i m3m3 pipi a b a b
35
Parallel Banding Algorithm Phase 3 - Block Coloring Case 2 i m3m3 pipi a b a b a b a b
36
Parallel Banding Algorithm
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.