Algorithm of dynamic programming for optimization of the global matching between two contours defined by ordered points Francisco P. M. Oliveira, i João Manuel R. S. Tavares tavares@fe.up.pt www.fe.up.pt/~tavares ICCES 8 International Conference on Computational & Experimental Engineering and Science 6 - March 8, Honolulu, Hawaii, USA
Contents: Introduction Main goal and assumptions; Dynamic Programming Absolute and relative order definition; Algorithm proposed; Methodology used to obtain the affinity cost matrices Shapiro s methodology; Results and comparisons with the classic assignment algorithms; Conclusions and future work. F. Oliveira & J. Tavares Alg. of dynamic prog. for optimization of the global matching between two contours defined by ordered points
Introduction Main goal: To determine an optimal global matching between two contours defined by points, without crossed correspondences, based on an affinity cost matrix previously obtained using a matching methodology. Crossed correspondences Matching of two contours of a heart. F. Oliveira & J. Tavares Alg. of dynamic prog. for optimization of the global matching between two contours defined by ordered points
Introduction Assumptions: The contours to be matched are closed and each one is defined by a sequence of ordered points; A affinity cost matrix for the points of the two contours to be matched was already built; The matches to establish are of the type one-to-one. Example of an affinity cost matrix (that will be further used in our example): C = 6 8 7 Note: C ij represents the affinity cost between the point i from the first contour and the point j from the second contour. F. Oliveira & J. Tavares Alg. of dynamic prog. for optimization of the global matching between two contours defined by ordered points
Introduction Matching found without respecting the order: Global matching = 8 6 C Contour 8 7 6 6 Contour Total cost: Crossed correspondences Total cost: Crossed correspondences Matching found respecting the order: Contour = C Global matching Contour 8 7 6 C 6 Total cost: F. Oliveira & J. Tavares Alg. of dynamic prog. for optimization of the global matching between two contours defined by ordered points
Dynamic Programming Absolute order and relative order: Consider the points numbered from to in the image on bottom. If these points are organized in the order (,,,, ) then they respect both the absolute and the relative order; However, if the same points are organized in the order (,,,, ) then they respect only the relative order. Note: If we follow the same approach, for the relative order it does not matter which is the first point of the sequence. F. Oliveira & J. Tavares Alg. of dynamic prog. for optimization of the global matching between two contours defined by ordered points 6
Dynamic Programming Algorithm to determine the optimum global matching respecting the absolute order:. Do n equal to the number of points of the contour with less points and m equal to the number of points of the other contour;. Define n stages and (m n + ) states;. For i = ton: - Compute the minimum costs to match the points,,,, to i of the contour defined by less points, function of the state variable and cost matrix; - Store the values of costs found in a lookup table;. Make a search in the lookup table previously built in order to find the global l matching of minimum cost. F. Oliveira & J. Tavares Alg. of dynamic prog. for optimization of the global matching between two contours defined by ordered points 7
Dynamic Programming An example of application of our algorithm: n = (number of points of contour ) m = 6 (number of points of contour ) It is defined stages and states (m n + ) C = 6 8 7 Minimum costs State Cost matrix Stage 6 9 Minimum cost F. Oliveira & J. Tavares Alg. of dynamic prog. for optimization of the global matching between two contours defined by ordered points 8
Dynamic Programming To determine the global matching of minimum cost that respect the relative order of contours, we determine all relative orders of the contour with more points d l th l ith i l t d h i f th l b l t hi th and apply the algorithm previously presented choosing for the global matching the one of minimum cost. In practice, we change the position of the columns of the affinity cost matrix and p, g p y find the optimum global matching that respects the absolute order in those new matrices and then we choose the global matching with the minimum cost. = 6 8 7 C = 6 8 7 C = 8 7 6 C 7 7 Total cost: Total cost: Total cost: 7 F. Oliveira & J. Tavares Alg. of dynamic prog. for optimization of the global matching between two contours defined by ordered points 9
Methodology used to obtain the affinity cost matrices Diagram of the methodology based on modal analysis of the objects shapes proposed by Shapiro: Contour Shape matrix Compute eigenvalues and eigenvectors Correlation matrix (affinity cost matrix) Contour Shape matrix Compute eigenvalues and eigenvectors F. Oliveira & J. Tavares Alg. of dynamic prog. for optimization of the global matching between two contours defined by ordered points
Results Matching obtained using the classic assignment algorithm (CAA) (Hungarian method, LAPm and Simplex for flow problems) and the dynamic programming algorithm (DPA): Matching with CAA: Matching with DPA: Matching of two contours of a heart and aorta artery. F. Oliveira & J. Tavares Alg. of dynamic prog. for optimization of the global matching between two contours defined by ordered points
Results Matching obtained using the classic assignment algorithm (CAA) (Hungarian method, LAPm and Simplex for flow problems) and the dynamic programming algorithm (DPA): Matching with CAA: Matching with DPA: Matching of two contours of a thoracic cage. F. Oliveira & J. Tavares Alg. of dynamic prog. for optimization of the global matching between two contours defined by ordered points
Results Matching obtained using the classic assignment algorithm (CAA) (Hungarian method, LAPm and Simplex for flow problems) and the dynamic programming algorithm (DPA): Matching with CAA: Matching with DPA: Matching of two contours from images of dynamic pedobarography. F. Oliveira & J. Tavares Alg. of dynamic prog. for optimization of the global matching between two contours defined by ordered points
Results Computation times of the optimization algorithms considered in this work (using a PC Intel Pentium III at. GHz and 6 MB RAM): Contours number of points and name Computation times [s] Contour Contour Hungarian LAPm Simplex Dynamic 8, heart 8, hearta,,,, 6, hearta 6, hearta >6,,, 6, rib 6, rib >6,78,6,, foot 8, foot6 >6,7,9, 86, airplane 7, airplane >6 77,77 9,9, 8, heart 8, heart6 >6,,,, foot 67, foot >6,,7,, foot, foot >6 >6,, 89, heartb 9, heartb >6 >6,9,6 89, heartb 7, heartb >6 >6 6,96,6 F. Oliveira & J. Tavares Alg. of dynamic prog. for optimization of the global matching between two contours defined by ordered points
Conclusions Our dynamic programming algorithm always reached a matching solution without crossed correspondences; The matching quality obtained using our dynamic programming algorithm was always equal or better than the matching quality obtained using the classic assignment algorithms considered; The computation time of our dynamic programming algorithm was always considerable lower than the computation time of the classic assignment algorithms used; The affinity (matching) methodology proposed by Shapiro becomes easier to use and more robust when applied to ordered contours in combination with our dynamic programming algorithm. F. Oliveira & J. Tavares Alg. of dynamic prog. for optimization of the global matching between two contours defined by ordered points
Future work To apply and test our dynamic programming algorithm on cost matrices built using others affinity methodologies in order to optimize the global matching of contours points; To improve the computational efficiency of our algorithm by developing a parallel implementation; To apply and test our matching algorithm on common benchmarking matching images. F. Oliveira & J. Tavares Alg. of dynamic prog. for optimization of the global matching between two contours defined by ordered points 6
Acknowledgment This work was partially done in the scope of project Segmentation, Tracking and Motion Analysis of Deformable (D/D) Objects using Physical Principles, financially supported by FCT - Fundação para a Ciência e a Tecnologia from Portugal, with reference POSC/EEA- SRI/86/. F. Oliveira & J. Tavares Alg. of dynamic prog. for optimization of the global matching between two contours defined by ordered points 7
Algorithm of dynamic programming for optimization of the global matching between two contours defined by ordered points Francisco P. M. Oliveira, i João Manuel R. S. Tavares tavares@fe.up.pt www.fe.up.pt/~tavares ICCES 8 International Conference on Computational & Experimental Engineering and Science 6 - March 8, Honolulu, Hawaii, USA