Download presentation
Presentation is loading. Please wait.
Published bySpencer Heath Modified over 9 years ago
1
1 EFFICIENT BITMAP RESEMBLENCE UNDER TRANSLATION Klara Kedem & Daniel Cohen This presentation will probably involve audience discussion, which will create action items. Use PowerPoint to keep track of these action items during your presentation In Slide Show, click on the right mouse button Select “Meeting Minder” Select the “Action Items” tab Type in action items as they come up Click OK to dismiss this box This will automatically create an Action Item slide at the end of your presentation with your points entered.
2
2 Introduction “Whether two point set A and B resemble each other ?” minimum Hausdorff distance under translation Use of the graphic hardware in order to speed-up run-times of the existing algorithms
3
3 The algorithms Huttenlocher, Kedem and Sharir Huttenlocher, Klanderman and Rucklidge Chew and Kedem
4
4 Graphic Hardware Pixel plane Word for each pixel Processor for each pixel Operations that supported are restricted (or, and, …) Parallel execution
5
5 In order to use graphic hardware the input for the algorithms will be in raster form, i.e., matrices of pixels, each having value 0 or 1, standing for white or black color of the image 1100100110 0010010011 0000101010 1111101111 Bitmaps
6
6 Automatic navigation. In automatic navigation two successive images are taken by a camera attached to an autonomous vehicle, with a short time interval between them. We need to find the matching features in the images in order to determine the exact motion and the new location of the vehicle The application
7
7 Assume that we have two consecutive images and we have a vague knowledge of motion between them, which consist of a translation value and a tolerance We compute a rasterized approximation of the exact motion within window W
8
8 Example The map is known, the motion is roughly known We need to find the exact motion
9
9 Theoretical Background A, B –point sets (a,b) – any metric (for example L 1, L 2, L ) Directed Hausdorf distance from a A to B d(a, B) a
10
10 Theoretical Background Directed Hausdorff distance from A to B It measures the distance of the point of A which is farthest from the set B Attention: h(A, B) is not symetric
11
11 Theoretical Background h(A, B) h(B, A)
12
12 Theoretical Background Symmetric Hausdorff distance from A to B
13
13 Theoretical Background The measure of resemblance D(A, B), between the sets A and B - the minimum value of the Hausdorff distance under translation. A is fixed, B is allowed to translate in the plane where B + x is the set B translated by x
14
14 Theoretical Background we discuss the directed Hausdorff distance only Consider the directed distances in (*) as function that depends on the translation x of the set B.
15
15 Voronoi Surface Consider the function The graph of this function is the Voronoi surface of A
16
16 Voronoi Surface in one dimention x
17
17 Voronoi Surface on the plane
18
18 Upper Envelope For each b B, we shift by –b f(x) is the upper envelope of these shifts
19
19 Upper Envelope x Goal – is to find the translation x that minimize f(x) - this is directed minimum Hausdorff distance
20
20 Algorithm 1:Huttenlocher, Kedem and Sharir (i) Initialization: Generate ; Set f(x) to zero; (ii) For each b B do f(x) = max (f(x), )), for all x W. (iii) Find the minimum of f(x) for all x W.
21
21 Speed-ups Encode the distance values in the distance transform g A (x) into words in the pixel plane distance i = g A (x) present by its unary representation U(i) = 2 i -1 min(U(i), U(j) = and (U(i), U(j)) max(U(i), U(j) = or (U(i), U(j))
22
22 Speed-ups If the length of a word in the pixel plane is 6 bits, then g A (x) = 1 encoded by 000001 g A (x) = 6 encoded by 111111 Restricts the distance we can represent to be smaller then the size (in bits) of words in the pixel plane truncate g A (x)
23
23 Speed-ups k –size of a word in the pixel plane in bits first – transform g A (x) to k-g A (x) truncate all the negative values of k-g A (x) => get k-g A (x ) if g A (x) <= k g’ A (x) = 0 otherwise
24
24 Horizontal mirroring of Truncated horizontal mirroring of k k
25
25 Inverted distance truncated distance
26
26 By the transformation above we compute a truncated lower envelope f’(x) of g’ A (x+b) Maximum of f’(x) is desired minimum Hausdorff distance (under k-bit limitation)
27
27 Algorithm 3: The Huttenlocher, Klanderman and Rucklidge 1. Initialization: Compute ; Initialize 2. For each x W do (a) For each b B do d = max(d, ); (b) = min(, d);
28
28 Search of the minimum is done in the inner loop Speed-up: as soon as for some b the computed distance d is grater that the current value of f min leave the inner loop since x will not yield a better Hausdorff distance
29
29 The framework of Chew and Kedem examines certain cross-sections of Voronoi surfaces. Disc of radius is put about each point of A,creating set A (the union of these discs) A={3, 9}, B={5, 12} 0
30
30 Consider the set A - b; the set A shifted by –b A -b – set of all translations that map b into A F = b B A - b : set of all translations that map all points b B into A A={3, 9}, B={5, 12} 0 0
31
31 Hausdorff decision problem – for a given whether the minimum Hausdorff distance under translation is less then The answer is true if there exists a translation x such that the Hausdorff distance between A and B+x is less than or equal to => F above is not empty
32
32 Algorithm 2:Chew and Kedem Algorithm 2:Rasterization of the Chew and Kedem algorithm 1. Given a distance , compute a disk of this radius, C( ). 2. For each point a A put C( ) centered around a, thus creating. 3. For each point b B shiftby –b and compute the intersection,, of the overlaid (shifted) with former ones, over W. 4. Check whether the intersection,, is not empty
33
33 Given an initial Create a disc of radius filled with 1’s and fill the rest of the bitmap with 0’s Shift this bitmap about all point a A such that the center of the disc is at a; or operation over all the shifts gets the union A Shifting A by –b for all b B, and intersecting these shifted copies, generates F ; this can be computed by the and operation Implementation of Alg.2
34
34 we can perform k decision algorithms simultaneously (k –number of bits in the pixel plane) 1, 2, …, k – ascending sequence of the values which we chose to check simultaneously by alg.2 Number the bits in the pixel plane from 1 to k (1 and k the most significant and the least significant bits, respectively) Relate to bit number j as to the layer representing the discs of radius j (this layer will represent A j ) A - pixel plane with al the A j, j = 1,…,k Interleaving algorithms 1 and 2
35
35 word size = k The k-bit pixel plane for discs of various radius about a A (the template) k layer 2: = 3 layer 4: = 7 point a
36
36 The intersection areas, F 1, F 2, …, F k, will indicate whether A and B are closer then the corresponding ’s The and operation that we used for radius can answer k decision problems and here yields a pixel plane that contains f’ – all of the intersected F i together
37
37 If for 1, …, i the answer the decision problem is false, and for i+1, …, k is true, refine the range( i, i+1 ) by creating a new sequence of ’s in this range and we run Alg.2 again In practice the range diminishes very quickly (this procedure runs at most twice)
38
38 Template Define template about the pixel a A to be the pixel plane with 0 everywhere and the unary representation the set of all words in the pixel plane which get a value other than 0 by drawing the disc about a
39
39 Algorithm 4: a combination of 1 and 2 1. Initialization : zero f’(x) for all x W ; 2. Build template: Given an ascending sequence of possible Hausdorff distances, create a template of disks in the pixel plane for one point a A; 3.Create : for each point a A copy the template, centered at a, performing an or operation between the pixel planes; 4. for each b B shift the pixel of by –b, performing the and operation between the pixel plane containing f’ and the current shift of, f’ = and (f’, -b) 5. For each x W, find the maximum pointin f’, by performing = or(f’(x)| x W)
40
40 in algorithm 4 the distance transform g’ A is replaced by A The word size k which restrict the largest distance that could be stored in g’ A is not restricting any more
41
41 Implementation and results Alg.4 and Alg.3 were implemented in C on a Silicon Graphics Indigo with 8-bits pixel-plane Performances of Alg.4 and Alg.3 were compared under different parameters
42
42 Implementation and results Two images were taken by a moving camera, camera slightly shifted downwards A binary images were obtained The matching has been applied between windows in 1 and corresponding windows in 2 1 2
43
43 Implementation and results A comparison between the algorithms for the matching times as a function of the window size with max =20 Fig. 3Fig. 2Fig. 1AlgorithmWindow size 1.16 2.16 0.64 1.53 0.34 0.38 4343 30 1.99 3.78 1.14 3.90 0.49 0.67 4343 40 2.96 6.38 1.70 4.40 0.76 1.12 4343 50 4.13 9.34 2.37 5.33 1.00 1.54 4343 60 5.37 11.48 3.14 6.00 1.31 1.92 4343 70 7.26 12.69 4.20 6.60 1.71 2.41 4343 80
44
44 Implementation and results The mathcing times as function of max. Window size = 80 Fig. 3Fig. 2Fig. 1Algorithm max 7.25 7.87 4.27 3.80 1.47 1.34 4343 15 7.16 12.69 4.30 6.60 1.50 2.41 4343 20 7.30 21.22 4.30 11.80 1.48 3.49 4343 25 7.33 32.80 4.29 15.84 1.68 4.51 4343 30 7.34 44.90 4.26 19.71 1.67 5.71 4343 35
45
45 Summary Alg.4 is faster than Alg.3 in most of the experiments For now it is the fastest known sequential implementation of the minimum Hausdorff distance computation.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.