Problemadvanced
Localization for inspection
Also called best-fit alignment to CAD, part localization.
Find the rigid motion that places measured points best on the CAD surfaces, in least squares or in the minimax sense, before the deviations of the part are read.
Localization for inspection is the problem of placing measured points of a part, given in the coordinates of the measuring machine, onto the nominal CAD model by a rigid motion, so that the deviation of each point from the model can be read. The motion is chosen to minimize the sum of the squared distances from the points to the model surfaces, or their maximum, or it is fixed by the datum features of the drawing. With known pairs of points the least-squares problem has a closed form, the Kabsch algorithm. Without pairs it is solved by iterations such as the iterative closest point method, which converge to a local minimum. The choice of the objective changes the result of a profile tolerance check. This page is the problem; the workflow around it is CAD-based inspection, and the evaluation of form, which needs no model, is form error evaluation.
In plain words
A part lies somewhere on the table of a measuring machine. The machine records points on its surface, but it does not know how the part sits. Before we can say "this point is 0.1 mm too high", we must lay the measured points over the drawing of the part in the computer.
We look for the move, a turn and a shift with no stretching, that makes the points sit as close to the drawing as possible. "As close as possible" can mean the smallest total of the squared gaps, or the smallest worst gap. If we knew which spot on the drawing each point belongs to, one formula would give the best move. We do not, so we guess the spots as the nearest ones, find the best move for that guess, then guess again. Each round makes the fit no worse.
Definition
The input is a set of measured points in , after the correction for the probe radius, and a nominal surface , a set of trimmed patches of the CAD model. A rigid motion is with a rotation, , and . Let be the distance from to , signed by the outer normal when is closed. The deviation of under is .
Least-squares localization. Minimize over rigid motions.
Minimax localization. Minimize , the one-sided Hausdorff distance from the moved points to . A profile tolerance of total width with no datum is met by the sample exactly when .
Datum localization. The drawing names datum features in order of precedence. The motion is fixed by fitting the primary datum first, which removes up to three degrees of freedom, then the secondary, then the tertiary, as in the datum reference frame and the 3-2-1 locating principle. Only the degrees of freedom the datums leave free are fitted to the toleranced surface.
The output is the motion and the deviations .
Variants
- Known correspondences. Each has a matching nominal point , from targets or from a measurement plan that probes known points. Then becomes , which the Kabsch closed form solves.
- Point to plane. Replace by the distance to the tangent plane at the current closest point, as in point-to-plane ICP after Chen and Medioni. This lets the points slide along the surface and needs fewer iterations.
- Restricted motions. A part held in a fixture, or a feature whose datums fix some degrees of freedom, is fitted over a subgroup: translations only, rotation about one axis, and so on.
- Weighted and robust fits. Points on critical surfaces get larger weights, and outliers from dirt or burrs are trimmed or down-weighted.
- Symmetric parts. If a rigid motion maps onto itself, the problem has several optima, and if a continuous family of motions slides along itself, the motion is not determined in those directions. Slippage analysis finds these directions.
- Registration of two clouds. When the model is another point cloud, the problem is point cloud registration.
Examples
Least squares against minimax. A flat profile surface is located by datums except for a shift along its normal. Four points have the normal deviations mm before the shift. The least-squares shift is the mean, , which leaves the deviations and the largest one . The minimax shift is the midrange, , which leaves and the largest one . Under a profile tolerance of mm, a zone of mm, the least-squares placement rejects the part and the minimax placement accepts it. The drawing must state which placement applies.
A symmetric outline. The model is the boundary of the rectangle in the plane, and the measured points are points spread evenly on that boundary, at the centers of equal pieces of length , so the true motion is the identity. ICP started at a rotation of degrees reaches the identity, and started at degrees reaches the rotation by degrees, which fits the outline exactly as well: the error is at both. Started at exactly degrees, the pairs are symmetric, the Kabsch step returns the same rotation, and ICP stays there with the squared error . With the points spaced from a corner instead, the pairs at degrees are not symmetric, and ICP reaches the identity. In every run the error did not increase. These runs were measured with a small script, and they show why a part with symmetric surfaces needs a datum or a feature that breaks the symmetry.
Known algorithms
The Kabsch closed form, for known pairs. For pairs , the minimizer of is found as follows.
- Translation. For fixed , the sum is a convex quadratic in with gradient , so with the centroids . With and the sum becomes .
- Rotation. Expand: with , since and . Let be a singular value decomposition. Then with orthogonal, so and . The bound is reached at , that is .
- The sign. If , then is a reflection, and the best rotation is with the smallest singular value. The proof that this is optimal among rotations is in Umeyama (1991).
The time is to form and for the decomposition.
ICP, for unknown pairs. Iterative closest point, after Besl and McKay (1992), alternates two steps: pair each moved point with its closest point on , then set to the rigid motion that minimizes by the Kabsch closed form. It repeats until the error stops decreasing.
ICP never increases the error. Let for points . The pairing step chooses as the closest point to , so . The Kabsch step gives . And for each , since is one point of , so . The values do not increase and are bounded below by , so they converge. Besl and McKay prove this; the limit is in general a local minimum, and the result depends on the start. If the closest point is found only approximately, for example by Newton steps of point projection onto a surface, the proof still holds when the step keeps the previous partner of a point whenever the new one is farther.
Point-to-plane steps. Each step minimizes the squared distances to tangent planes, linearized in the small rotation, a linear system. It converges in fewer iterations near the optimum but has no monotone guarantee without a line search.
Minimax localization. Linearize the motion as a small screw of three rotations and three translations, the small displacement torsor, and the deviations as the distances to tangent planes. Then minimizing the largest deviation is a linear program in seven variables. Repeated with updated planes and a bound on the step, this gives a local method, as in the free-form inspection literature that Li and Gu survey.
A good start. ICP and the minimax iterations need a start near the right motion: from the probing of datum features, from three or more known points, or from a coarse global search.
Bounds
- Known pairs. time: every point must be read, and the closed form uses each point once.
- ICP iterations. One iteration costs closest-point queries. Against a fine mesh of triangles with a k-d tree or another spatial index this is about in practice; against trimmed spline patches it is point projections. The number of iterations has no useful bound in general, and it is large when the surface lets the points slide.
- No global guarantee. The least-squares and minimax objectives are not convex in the rotation, and ICP and the linearized methods stop at local minima or, as in the symmetric example, at stationary points. A certified global optimum needs a search over all rotations.
Reductions
- Known pairs reduce to the orthogonal Procrustes problem, solved by one singular value decomposition.
- Least-squares localization without pairs reduces to a sequence of problems with pairs, by the pairing step of ICP.
- Minimax localization with a linearized motion reduces to linear programming in seven variables, a fixed dimension, so each program takes time by the methods for fixed dimension.
- Form error is localization with a free reference. When the nominal feature is a plane or a cylinder and its size and place are free, the minimax localization is the minimum zone problem of form error evaluation.
Applications
- Free-form surfaces. Turbine blades, dies and car body panels are checked by profile tolerances after a best fit, and the deviations are shown as a color map on the model.
- Measuring machine programs. The part coordinate system of a measuring machine program is set by probing the datum features, a datum localization, before the rest of the points are taken.
- Scans. Optical and laser scans of a whole part are aligned to the CAD model by ICP after a coarse alignment, then compared surface by surface.
- Reverse engineering. Aligning a scan to a reference model, or two scans to each other, uses the same methods.
References
- Paul J. Besl and Neil D. McKay, A method for registration of 3-D shapes, IEEE Transactions on Pattern Analysis and Machine Intelligence 14(2), 1992, 239 to 256, the iterative closest point algorithm, the proof that its mean squared error does not increase and converges, and its local minima
- Wolfgang Kabsch, A solution for the best rotation to relate two sets of vectors, Acta Crystallographica Section A 32(5), 1976, 922 to 923, the rotation of least squared distance between two matched sets of vectors
- Shinji Umeyama, Least-squares estimation of transformation parameters between two point patterns, IEEE Transactions on Pattern Analysis and Machine Intelligence 13(4), 1991, 376 to 380, the closed form by the singular value decomposition with the sign correction that excludes reflections, and its proof
- Yang Chen and Gérard Medioni, Object modelling by registration of multiple range images, Image and Vision Computing 10(3), 1992, 145 to 155, the registration that minimizes the distances from points to the tangent planes of the other surface
- C.-H. Menq, H.-T. Yau and G.-Y. Lai, Automated precision measurement of surface profile in CAD-directed inspection, IEEE Transactions on Robotics and Automation 8(2), 1992, 268 to 278, the localization of measured points to a CAD surface for profile inspection
- Yadong Li and Peihua Gu, Free-form surface inspection techniques state of the art review, Computer-Aided Design 36(13), 2004, 1395 to 1417, the survey of localization methods for free-form surface inspection, least squares and minimax
- ASME Y14.5-2018, Dimensioning and Tolerancing, The American Society of Mechanical Engineers, 2019, the standard as a whole (profile tolerances and datum reference frames); no clause is quoted
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag B1XGPE Edit this page History Report an error Markdown