13472J/1.128J/2158J/16940J COMPUTATIONAL GEOMETRY Lecture 21 Prof, i .k. atkikalak Copyright@2003 Massachusetts Institute of Technology Contents 21 Object Matching 21.1 Various matching methods 21.2 Methods through localization/registration 21.3 Classification of matching methods 21. 4 Problem statement 21.41 Distance metric 1.4.2 Distance between a point and a parametric surface 3 Distance metric function 2222444455 1.5 Matching problems: CG woS, CPwos, cGws or CPWs 21.5. 1 Resolving the scaling effects 1.5.2 Rotation and translation 21.6 Matching problems: IG WOS, IPWOS, IG WS or IPWS 21.6.1 Iterative Closest Point(ICP)algorithm 1 for IGWOS or IPWOS 21.6.2 ICP algorithm for scaling effects 21.7 Matching problems: NG WOS or NPWOS Search method (2 1.7.2 KH method 21.8 Matching problems: NGWS 555666777899 21.9 Matching problems: NPWS 21.9.1 Umbilical point method 7 9.2 Optimization method [7 21.10Matching problems: offset method 21.101 Distance function 13 21.10.2 Objective function 14 21.10. 3 Gradient vector 15 Bibliography 16
13.472J/1.128J/2.158J/16.940J COMPUTATIONAL GEOMETRY Lecture 21 Dr. K. H. Ko Prof. N. M. Patrikalakis Copyright c 2003 Massachusetts Institute of Technology Contents 21 Object Matching 2 21.1 Various matching methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 21.2 Methods through localization/registration . . . . . . . . . . . . . . . . . . . . 2 21.3 Classification of matching methods . . . . . . . . . . . . . . . . . . . . . . . . 2 21.4 Problem statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 21.4.1 Distance metric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 21.4.2 Distance between a point and a parametric surface . . . . . . . . . . . 4 21.4.3 Distance metric function . . . . . . . . . . . . . . . . . . . . . . . . . . 4 21.5 Matching problems : CGWOS, CPWOS, CGWS or CPWS . . . . . . . . . . . 5 21.5.1 Resolving the scaling effects . . . . . . . . . . . . . . . . . . . . . . . . 5 21.5.2 Rotation and translation . . . . . . . . . . . . . . . . . . . . . . . . . . 5 21.6 Matching problems : IGWOS, IPWOS, IGWS or IPWS . . . . . . . . . . . . . 6 21.6.1 Iterative Closest Point (ICP) algorithm [1] for IGWOS or IPWOS . . . 6 21.6.2 ICP algorithm for scaling effects . . . . . . . . . . . . . . . . . . . . . . 6 21.7 Matching problems : NGWOS or NPWOS . . . . . . . . . . . . . . . . . . . . 7 21.7.1 Search method [2] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 21.7.2 KH method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 21.8 Matching problems : NGWS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 21.9 Matching problems : NPWS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 21.9.1 Umbilical point method [7] . . . . . . . . . . . . . . . . . . . . . . . . . 9 21.9.2 Optimization method [7] . . . . . . . . . . . . . . . . . . . . . . . . . . 12 21.10Matching problems : offset method . . . . . . . . . . . . . . . . . . . . . . . . 13 21.10.1Distance function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 21.10.2Objective function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 21.10.3Gradient vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Bibliography 16 1
Lecture 21 Object Matching 21.1 Various matching methods Moment method · Principal component Contour and silhouette · New representation Localization/registration ● Miscell aneous appro 21.2 Methods through localization /registration a basic goal of matching through localization/registration is to find the best rigid body trans- formation which aligns two objects as closely as possible. The correspondence search between two objects is a key issue in finding the best transformation for matching. Correspondence can be established by calculating distinct features of one object and locating the same ones on the other object. Therefore, the features have to be carefully chosen such that they are robustly extracted and invariant with respect to various transformations. Among various fea- tures, intrinsic differential properties are used for matching purposes. They are independent of parametrization and methods of representation, and only depend on the geometric shape of the object. Moreover, they are invariant under any rigid body transformations(rotation and translation) 21.3 Classification of matching methods Two types of matching can be considered: global and partial. Simply, the global matching is regarded as the matching for whole objects, while the partial matching is considered as
Lecture 21 Object Matching 21.1 Various matching methods • Moment method • Principal component • Contour and silhouette • New representation • Localization/registration • Miscellaneous approaches 21.2 Methods through localization/registration A basic goal of matching through localization/registration is to find the best rigid body transformation which aligns two objects as closely as possible. The correspondence search between two objects is a key issue in finding the best transformation for matching. Correspondence can be established by calculating distinct features of one object and locating the same ones on the other object. Therefore, the features have to be carefully chosen such that they are robustly extracted and invariant with respect to various transformations. Among various features, intrinsic differential properties are used for matching purposes. They are independent of parametrization and methods of representation, and only depend on the geometric shape of the object. Moreover, they are invariant under any rigid body transformations (rotation and translation). 21.3 Classification of matching methods Two types of matching can be considered: global and partial. Simply, the global matching is regarded as the matching for whole objects, while the partial matching is considered as 2
the matching of part of objects. Matching problems can be further categorized based on the ava ailability of correspondence or initial transformation information between two obj ects a the application of scaling. The classification of matching problems is summarized in Table 21.1. In the table, acronyms are used for simplification as follows C: Correspondence information is provided I: Initial information on correspondence is provided .N: No correspondence information is available ·P: Partial matching ·G: Global matching ●WOS: Without scali ·Ws: With scaling Global matching Partial matching Criteria Without scaling With scaling Without scaling With scaling Correspondence CGWOS CGWS CPWOS CPWS nformation Initial information IGWOS IPWOS IPWS No information NGWOS NGWS NPWOS NPWS Table 21.1: Classification of matching problems I When correspondence information is provided, which is one of the types CGWOS or CP- OS, then a matching problem is simply reduced to calculation of the rigid body trans- formation 3, 4. If no correspondence is known, but a good initial approximation for the transformation is available(IGWOS or IPWOS), then popular iterative schemes such as the Iterative Closest Point(ICP)algorithm [1]can be employed. However, when no prior clue for correspondence or transformation is given(NGWOS or NPWOS), the matching problem be comes more complicated. In this case, the solution process must provide a means to establish such correspondence information such as in 2 Scaling is another factor that needs to be considered separately. If a matching problem involves scaling effects, then direct comparison of quantitative measures cannot be used any longer. For the global matching case, a scaling factor can be estimated by the ratio of surface areas and applied to resolve the scaling transformation. However, when it comes to partial matching, such area information becomes useless for the scaling factor estimation. When the correspondence information between two objects is known(CGWS or CPWS), the scaling factor between the objects can be easily obtained by using the ratio of Euclidean distances between two sets of corresponding points or areas, or the ratio of the principal curvatures. If an initial scaling value as well as a good initial approximation is provided (IGWS or IPWS) the ICP algorithm by Besl [1] or other optimization schemes such as the quasi-Newton method
the matching of part of objects. Matching problems can be further categorized based on the availability of correspondence or initial transformation information between two objects and the application of scaling. The classification of matching problems is summarized in Table 21.1. In the table, acronyms are used for simplification as follows: • C : Correspondence information is provided. • I : Initial information on correspondence is provided. • N : No correspondence information is available. • P : Partial matching. • G : Global matching. • WOS : Without scaling. • WS : With scaling. Global matching Partial matching Criteria Without scaling With scaling Without scaling With scaling Correspondence information CGWOS CGWS CPWOS CPWS Initial information IGWOS IGWS IPWOS IPWS No information NGWOS NGWS NPWOS NPWS Table 21.1: Classification of matching problems When correspondence information is provided, which is one of the types CGWOS or CPWOS, then a matching problem is simply reduced to calculation of the rigid body transformation [3, 4]. If no correspondence is known, but a good initial approximation for the transformation is available (IGWOS or IPWOS), then popular iterative schemes such as the Iterative Closest Point (ICP) algorithm [1] can be employed. However, when no prior clue for correspondence or transformation is given (NGWOS or NPWOS), the matching problem becomes more complicated. In this case, the solution process must provide a means to establish such correspondence information such as in [2]. Scaling is another factor that needs to be considered separately. If a matching problem involves scaling effects, then direct comparison of quantitative measures cannot be used any longer. For the global matching case, a scaling factor can be estimated by the ratio of surface areas and applied to resolve the scaling transformation. However, when it comes to partial matching, such area information becomes useless for the scaling factor estimation. When the correspondence information between two objects is known (CGWS or CPWS), the scaling factor between the objects can be easily obtained by using the ratio of Euclidean distances between two sets of corresponding points or areas, or the ratio of the principal curvatures. If an initial scaling value as well as a good initial approximation is provided (IGWS or IPWS), the ICP algorithm by Besl [1] or other optimization schemes such as the quasi-Newton method 3
[12 can be employed. The problem of NGWS type can be solved by the moment method using the principal moment of inertia and ratio of areas or volumes. No attempt, however, has been made to solve the problems of NPWS type. For a more detailed overview, see Ko 6 21.4 Problem statement 21. 4.1 Distance metric The Euclidean distance between two points p1 and p2 is defined as d(p1,P2)=|p1-p2 We also define the minimum distance between a surface r and a point p as follows (r, p)=minde(p, pi), Vpi Erl 21.4.2 Distance between a point and a parametric surface Let us assume that we have a point p and a parametric surfacer=r(u, u),0<u, v<l.Then the squared distance function is defined as follows D(u,)=|p-r(u,)|2 (p-r(u,)·(p-r(u,) Finding the minimum distance between p and r is reduced to minimizing(21.3) within the square 0<u, v<l. Therefore, the problem needs to be broken up into several sub-problems which consider the behavior of the distance function at the boundary and in the interior of the bound(10. The sub-problems are summarized as follows: Find the minimum distances(1)in the interior domain,(2) along the boundary curves and (3)from the corner points. Among those minimum distances the smallest one is chosen as the minimum distance between the point p and the surface r. A robust calculation of the minima of the distance function(21.3 can be achieved by the Interval Projected Polyhedron(IPP)algorithm[13, 10, 14 21, 4.3 Distance metric function A function can be defined using the squared distance function(21.3) to formulate a matching problem. Suppose that we have a NURBS surface rB and an object ra represented in discrete points or surfaces. Then, a matching problem can be stated as finding the rigid body trans- formation(a translation vector t and a rotation matrix R)so that a global distance metric function ∑d(rB,(GRP+t) becomes minimal. where g is a scaling factor
[12] can be employed. The problem of NGWS type can be solved by the moment method using the principal moment of inertia and ratio of areas or volumes. No attempt, however, has been made to solve the problems of NPWS type. For a more detailed overview, see Ko [6]. 21.4 Problem statement 21.4.1 Distance metric The Euclidean distance between two points p1 and p2 is defined as de(p1, p2) = |p1 − p2|. (21.1) We also define the minimum distance between a surface r and a point p as follows: dsp(r, p) = min{de(p, pi), ∀pi ∈ r}. (21.2) 21.4.2 Distance between a point and a parametric surface Let us assume that we have a point p and a parametric surface r = r(u, v), 0 ≤ u, v ≤ 1. Then the squared distance function is defined as follows: D(u, v) = |p − r(u, v)| 2 , = (p − r(u, v)) · (p − r(u, v)). (21.3) Finding the minimum distance between p and r is reduced to minimizing (21.3) within the square 0 ≤ u, v ≤ 1. Therefore, the problem needs to be broken up into several sub-problems which consider the behavior of the distance function at the boundary and in the interior of the bound [10]. The sub-problems are summarized as follows: Find the minimum distances (1) in the interior domain, (2) along the boundary curves and (3) from the corner points. Among those minimum distances, the smallest one is chosen as the minimum distance between the point p and the surface r. A robust calculation of the minima of the distance function (21.3) can be achieved by the Interval Projected Polyhedron (IPP) algorithm [13, 10, 14]. 21.4.3 Distance metric function A function can be defined using the squared distance function (21.3) to formulate a matching problem. Suppose that we have a NURBS surface rB and an object rA represented in discrete points or surfaces. Then, a matching problem can be stated as finding the rigid body transformation (a translation vector t and a rotation matrix R) so that a global distance metric function Φ = X ∀p∈rA dsp(rB,(σRp + t)) (21.4) becomes minimal, where σ is a scaling factor. 4
21.5 Matching problems: CGWOS, CPWOS, CGWs or CPWs 21.5.1 Resolving the scaling effects Matching problems of CG WS or CPWS type involve the scaling effects. Therefore, a scaling factor has to be estimated so that the scaling transformation is performed, before calculatin the rigid body transformation. Since correspondence information between two objects are available, a scaling factor can be estimated by using the ratio of the principal curvatures at the corresponding points. After scaling has been resolved, the matching problems of CGWS or CPws type are treated as those of CG wos or CPwos type 21.5.2 Rotation and translation Suppose that we have two 3-tuples m; and n; (i= 1, 2, 3), and the correspondence information for each point. From these points, a translation vector and a rotation matrix can be calculated The translation vector is easily obtained by using the centroids of each 3-tuple. The centroids Cm and cn are given b ni (21.5) and the difference between Cm and cn becomes the translation vector tT Cn-Cm. A rotation matrix consists of three unknown components(the Euler angles). Since the two 3- tuples provide nine constraints, the rotation matrix may be constructed by using some of the constraints. But the results could be different if the remaining constraints are used for the rotation matrix calculation 3. In order to use all the constraints equally, the least squares method may be employed 3]. The basic solution by Horn 3 is described below. Suppose that the translation has been performed. Then what is left is to find the rotation matrix R so that ∑|;-(Rm)|2 n-2∑n;(Rm)+ (21.6) is minimized. Here, D=E_i ni(Rmi has to be maximized to minimize ' The problem can be solved in the quaternion framework. a quaternion can be considered as a vector with four components, i. e. a vector part in 3D and a scalar part. A rotation can be equivalently defined as a unit quaternion q=cos(), sin()ax, sin()ay, sin()a2 which represents a rota tion movement around (az, ay, as)by degree. In the quaternion framework, the problem is reduced to the eigenvalue problem of the 4 x 4 matrix H obtained from the correlation matrix M S11+S22+S H S11-822-S33 S12+s2122-S11-533 S31+S13 S23+S32
21.5 Matching problems : CGWOS, CPWOS, CGWS or CPWS 21.5.1 Resolving the scaling effects Matching problems of CGWS or CPWS type involve the scaling effects. Therefore, a scaling factor has to be estimated so that the scaling transformation is performed, before calculating the rigid body transformation. Since correspondence information between two objects are available, a scaling factor can be estimated by using the ratio of the principal curvatures at the corresponding points. After scaling has been resolved, the matching problems of CGWS or CPWS type are treated as those of CGWOS or CPWOS type. 21.5.2 Rotation and translation Suppose that we have two 3-tuples mi and ni(i = 1, 2, 3), and the correspondence information for each point. From these points, a translation vector and a rotation matrix can be calculated. The translation vector is easily obtained by using the centroids of each 3-tuple. The centroids cm and cn are given by cm = 1 3 X 3 i=1 mi , cn = 1 3 X 3 i=1 ni , (21.5) and the difference between cm and cn becomes the translation vector tT = cn − cm. A rotation matrix consists of three unknown components (the Euler angles). Since the two 3- tuples provide nine constraints, the rotation matrix may be constructed by using some of the constraints. But the results could be different if the remaining constraints are used for the rotation matrix calculation [3]. In order to use all the constraints equally, the least squares method may be employed [3]. The basic solution by Horn [3] is described below. Suppose that the translation has been performed. Then what is left is to find the rotation matrix R so that Φ 0 = X 3 i=1 |ni − (Rmi)| 2 = X 3 i=1 |ni | 2 − 2 X 3 i=1 ni · (Rmi) + X 3 i=1 |Rmi | 2 (21.6) is minimized. Here, D = P3 i=1 ni · (Rmi) has to be maximized to minimize Φ 0 . The problem can be solved in the quaternion framework. A quaternion can be considered as a vector with four components, i.e. a vector part in 3D and a scalar part. A rotation can be equivalently defined as a unit quaternion qˇ = h cos( θ 2 ),sin( θ 2 )ax,sin( θ 2 )ay,sin( θ 2 )az i which represents a rotation movement around (ax, ay, az) by θ degree. In the quaternion framework, the problem is reduced to the eigenvalue problem of the 4 × 4 matrix H obtained from the correlation matrix M: H = s11 + s22 + s33 s23 − s32 s31 − s13 s12 − s21 s23 − s32 s11 − s22 − s33 s12 + s21 s31 + s13 s31 − s13 s12 + s21 s22 − s11 − s33 s23 + s32 s12 − s21 s31 + s13 s23 + s32 s33 − s22 − s11 , (21.7) 5