26 12 2003 12 Vol 26 No 12 CHIN ESE J OURNAL OF COMPU TERS Dec 2003 ( 310027 ( CAD & CG 310027 ; ; ; ; TP391 Three Dimensional Signed Eucl idean Distance Transf orm and Its Appl ications L IN Hong2Wei WAN G Guo2Jin ( Institute of Computer Image and Graphics Zhejiang University Hangzhou 310027 (State Key Laboratory of CAD & CG Zhejiang University Hangzhou 310027 Abstract The researches for distance transform have long history in image processing In this paper we extend two dimensional signed distance transform to three dimension optimize it and analyze its computational complexity Furt hermore we apply it to computer grap hics Firstly it can be em2 ployed to transform the triangular mesh representation of graphics model into its distance field repre2 sentation By t he t hree dimensional signed distance t ransform on t he voxel representation of a grap hics model the global search for the point which is closest to a given space point and on the graphical model can be simplified to a local search It greatly reduces t he computational complexity Secondly and similarly it can be employed to calculate t he minimum distance between two pieces of surfaces in the space Keywords Euclidean distance transform ; distance field ; surface ; minimum distance 1 [1 feld Pfaltz ] [2 7 ] Danielsson [2 ] ; Ye Danielsson ( 22Dimension Signed Euclidean Distance Transform 22SED T [3 ] ; Rosen2 ( nearest feature ponit 2002207210 ; 2002212219 (60173034 (2002CB312101 1973 E2 mail hwlin @css zju edu cn 1944 1995-2005 Tsinghua Tongfang Optical Disc Co Ltd All rights reserved
1646 2003 ; 1992 Leymarie Levine [4 ] 32SEDT 22SED T ( 32SED T (32SED T [8 9 ] [10 ] ; SED T [9 11 13 ] i (morphing ; f i [10 ] [14 ] ; 0 (LOD ( 1 [8 ] Daniel [11 ] / [6 Chamfer ] 12SEDT 1 0 i ( i = 2 3 7 { f i - 1-1 f i + 0} Bradley Arthur [10 ] 2 i ( i = 6 5 1 { f i + 0 f i + 1 + 1} ; 2 32SED T 32SED T 2 2 12SED T 6 0 ; [ 15 ] - 2 1995-2005 Tsinghua Tongfang Optical Disc Co Ltd All rights reserved
12 1647 2 ; 4 (6-2 = 4 3 12SED T 3 (22SED T [3 4 ] 3 4 (32SED T V { V ijk 1 Φ i Φ L 1 Φ j Φ M 1 Φ k Φ N } f ijk = (0 0 0 f ijk = ( u u u u 32SED T 4 k2 (0 0 0 (0 0 0 1 (0 0 1 (0 0 0 5 (0 0-1 1 (0 0 0 2 ; 32SED T 1 i = L - 1 i (0 0 0 ( i = 2 L - 1 Ε i Ε 2 k = N - 1 j ; j 2 1995-2005 Tsinghua Tongfang Optical Disc Co Ltd All rights reserved
1648 2003 k = N - 2 k = N - 3 k = 2 j 3 k = 2 ; j ( i + 0 ( j - 1 + 2 k + 0 V i j + 1 k 4 k = 3 k = 4 k = N - 1 i = 2 0 i j - 1 k i i = L - 1 2 Φ i Φ L - 1 k = 2 V ijk f ijk j 5 ; ( i j k + f ijk j 6 k = N - 1 j 7 k = N - 1 ; j 8 f ijk = ( f i f j f k k = 2 3 3 V ijk 2 f ijk + 2 f ijk ( d i d j d k + ( d i d j d k ijk = ijk f ijk + (0 0 0 f i j +1 k + (0 1 0 f i +1 j +1 k + (1 1 0 f i +1 j k + (1 0 0 f i +1 j - 1 k + (1-1 0 ( x y z 32SED T = x 2 + y 2 + z 2 3 70 ( L - 2 ( N - 2 ( M - 2 32SED T ( 2 110 ( L - 2 ( N - 2 ( M - 4 2 38 ( L - 2 ( N - 2 ( M - 2 ( (0 0 0 3 V ijk V i j + 1 k f i j + 1 k = (0 i j - 1 k = = (0 2 0 f i +1 j k + (1 1 0 f i +1 j - 1 k + (1 0 0 f i +1 j - 2 k + (1-1 0 i j - 1 k = ( 0 2 0 V i j - 1 k V i j - 1 k V i j + 1 k f ijk + (0 1 32SED T f ijk + ( d i d j d k 2 = d i d j d k + 1-1 0 3 0 0 f i j + 1 k + (0 1 0 = (0 1 0 = 1 3 V ijk ijk = (0 1 0 V ijk ( i + 0 j + 1 k + 0 V i j + 1 k 3 32SED T V i j - 1 k f i j - 1 k + (0 0 0 ; f ijk + (0 1 0 = (0 1 0 + (0 1 0 32SED T ; 2 1995-2005 Tsinghua Tongfang Optical Disc Co Ltd All rights reserved
12 1649 AB C Q Q AB C P 1 ( (i P AB C Q 1 Q AB C ( (ii ABC P R if ( Ε 0 & & Ε 0 & & Ε 0 Q 7 R Q 2 32SED T else if ( < 0 Q B C B C 3 Q 2 R Q B C 3 1 8 12 6 else if ( < 0 Q CA C A 3 1 1 Q 4 R Q CA V 3 1 2 V else if ( < 0 Q AB A B 3 1 3 Q 6 R Q AB 3 2 8 12 6 else if ( Q A B C Q A 3 2 3 1 Q 5 R A else if ( Q A B C 8 3 1 Q B Q 1 R B 1 else if ( Q A B C (1 3 1 1 Q C A A Q 3 R C (iii P AB C d A (3 3 1 3 P A d A d P Q Q N (2 3 1 2 P Q P N AB C 5 P (i Q N Q N Q N Q N (ii Q P N dot dot > 0 P 1995-2005 Tsinghua Tongfang Optical Disc Co Ltd All rights reserved
1650 2003 dot < 0 P d ( S 1 1 6 S 2 = d ( S 2 S 1 8 Marching Cube [16 ] 7 9 S 1 S 2 (1 S 1 S 2 B (2 B S 1 T 1 32SED T S 1 (4 S 1 S 2 V 1 V 2 E 1 E 2 1 1 6 8 n n n 2 n 2 CPU Intel Pentium 933MHz ; 128MB RAM ( n - 1 B 1 1 (s 67036 33519 52 47858 23931 41 4 S 1 S 2 (0 0070 5 0012 0 0000 210020 (0 3 d ( S 1 S 2 = min{ x - y x S 1 y S 2 } 0 (0 5 0 2 32SED T (3 B S 2 T 2 T 2 S 1 V 2 ( i j k f ijk = ( f i f j f k T 1 S 2 V 1 ( i + f i j + f j k + f k 10 S 1 x 2 + y 2 + z 2 = 9 S 2 x 2 + ( y - 7 2 + z 2 = 4 = 10-2 n = 10 ( 10 (0 0070 2 9992 0 0000 1995-2005 Tsinghua Tongfang Optical Disc Co Ltd All rights reserved
12 1651 6 David W P Distance transforms properties and machine vision 10 applications CV GIP Graphical Models and Image Processing 5 Proceedings New Orleans 2000 249 254 243 (1 65 71 32SED T 17 (2 116 141 alization 96 San Francisco 1996 165 172 13 Turk G O functions In Proceedings of SIGGRAPH 32SED T ceedings Los Angeles 1999 335 342 1 Rosenfeld A Pfaltz J Sequential operations in digital picture pro2 cessing Journal of Association for Computing Machinery 1966 13 (4 471 494 2 Danielsson P Euclidean distance mapping Computer Graphics and Image Processing 1980 14 (3 227 248 3 Ye Q2Z The signed Euclidean distance transform and its applica2 tions In Proceedings of the 9th International Conference of Pat2 tern Recognition Rome Italy 1988 495 499 4 Leymarie F Levine M D Fast raster scan distance propagation on the discrete rectangular lattice CV GIP Image Understanding 1992 55 (1 84 94 5 Rosenfeld A Pfaltz J Distance functions on digital pictures Pat2 tern Recognition 1968 1 (1 33 61 1992 54 (1 56 74 7 Borgefors G Distance transformations in digital images Computer Vision Graphics and Image Processing 1986 34 ( 3 344 371 8 Frisken S F Perry R N Rockwood A P Jones T R Adaptively sampled distance fields A general representation of shape for com2 puter graphics In Proceedings of SIGGRAPH 2000 Conference 9 Fang Xiang Bao Hu2J un Heng Pheng2Ann Wong Tien2Tsin Peng Qun2Sheng Continuous field based free2form surface model2 ing and morphing Computers and Graphics 2001 25 (2 235 10 Payne B A Toga A W Distance field manipulation of surface models IEEE Computer Graphics and Applications 1992 12 11 Daniel Coher2Or Levin D Solomovici A Three dimensional dis2 tance field metamorphosis ACM Transactions on Graphics 1998 12 Daniel Coher2Or Levin D Solomovici A Contour blending using warp2guided distance field interpolation In Proceedings of Visu2 Brien J Shape transformation using variational implicit 99 Conference Pro2 14 Koning Z A Viergever M Acceleration of ray2casting using 3D distance transforms In Proceedings of Visualization in Biomedical Computing 92 Chapel Hill North Carolina 1992 324 335 15 Johnson D E Cohen E A framework for efficient minimum dis2 tance computation In Proceedings of IEEE Conference on Robotics and Automation Leuven Belgium 1998 3678 3683 16 Lorensen W E Cline H E Marching cubes A high resolution 3D surface construction algorithm Computer Graphics 1987 21 (4 163 169 L IN Hong2Wei born in 1973 Ph D candidate His research interests in2 clude computer aided geometric design computer graphics and reverse engineer2 ing WANG Guo2Jin born in 1944 professor Ph D supervi2 sor His research interests include computer aided geometric de2 sign computer graphics digital geometric signal processing discrete differential geometry and applied approximation theory 1995-2005 Tsinghua Tongfang Optical Disc Co Ltd All rights reserved