2. Measurement principles
Every automated deformation measurement system rests on four interlocking definitions: what counts as intrusion, how the deformed surface is represented, which undisturbed geometry serves as the baseline, and how all of these are expressed numerically. Get any one of them wrong and the resulting numbers may look plausible while being systematically biased. This section establishes those definitions precisely, because the Python code in later chapters is only as trustworthy as the measurement model it implements.
Intrusion depth: a signed distance, not a magnitude
Intrusion depth is the perpendicular distance from a deformed surface point to a reference plane, measured along the plane normal and signed according to direction. For a vehicle body panel, the convention used throughout this course is:
- Positive depth — displacement into the occupant compartment (intrusion).
- Negative depth — displacement outward, away from the compartment (bulging or rebound).
This sign convention must be fixed before any data is processed. If the reference plane normal points outward from the vehicle and the sign is not flipped, every intrusion reading becomes negative and downstream threshold checks silently fail. A single scalar depth answers "how far," but it says nothing about where the deepest point lies or how the deformation is distributed — that requires a contour.
In practice, depth is computed per sampled point rather than at one location. Given a point cloud P = {(x_i, y_i, z_i)} captured from the deformed panel and a reference plane defined by unit normal n and offset d, the signed depth of each point is:
depth_i = n · p_i - d # signed perpendicular distance
intrusion_i = -depth_i # if n points outward from the vehicle
The maximum intrusion depth is then max(intrusion_i), and its location is the (x, y) of the corresponding point. Reporting only the maximum is common in crash documentation, but for repair assessment the full distribution matters, which is why the contour is the primary deliverable.
Deformation contour: from point cloud to surface
A deformation contour is a continuous representation of the panel surface after impact, typically expressed as a depth field over a two-dimensional domain. Raw scan data is a scattered point cloud; converting it to a usable contour involves three steps:
- Projection. Each 3D point is projected onto the reference plane, yielding 2D coordinates
(u, v)in the plane's local frame. - Interpolation. Scattered
(u, v, intrusion)samples are interpolated onto a regular grid — for example a 5 mm × 5 mm lattice — using linear, natural-neighbor, or thin-plate spline interpolation. - Smoothing. A light Gaussian or median filter suppresses scanner noise without erasing genuine local peaks.
The grid resolution is a real engineering trade-off. A 5 mm grid on a 1.2 m × 0.8 m door panel produces roughly 38,400 cells — manageable in NumPy and detailed enough to resolve creases. A 20 mm grid runs faster but can miss a narrow buckle between two sample lines. The choice should be documented alongside the results, because two reports using different resolutions are not directly comparable.
Reference planes: defining "undeformed"
The reference plane is the geometric baseline representing the original, undamaged surface. Three approaches are used in vehicle measurement, in increasing order of fidelity:
| Method | Definition | Typical use |
|---|---|---|
| Nominal CAD plane | Plane fitted to the design surface from CAD data | New-vehicle development, repeatable lab tests |
| Fitted plane from undamaged regions | Least-squares plane through scan points outside the damage zone | Field inspection of an existing vehicle |
| Local tangent patch | Small plane fitted to a neighborhood around each measurement point | Curved panels where a single global plane is invalid |
For a flat or gently curved panel, a least-squares plane fit is sufficient. Given undamaged points Q, the plane minimizes the sum of squared perpendicular distances; the solution is the eigenvector of the covariance matrix corresponding to the smallest eigenvalue. In Python this is a few lines with numpy.linalg.eigh:
centroid = Q.mean(axis=0)
centered = Q - centroid
cov = centered.T @ centered
eigenvalues, eigenvectors = np.linalg.eigh(cov)
normal = eigenvectors[:, 0] # smallest eigenvalue → plane normal
offset = normal @ centroid
For strongly curved panels — a fender or roof — a single plane introduces curvature error that can exceed the intrusion being measured. The local tangent patch method avoids this by fitting a plane within a moving window (for example a 150 mm radius) around each point, so depth is always measured relative to the local original surface. The cost is that depths from different windows are not directly comparable unless the window geometry is consistent.
Coordinate systems and the transformation chain
Measurements pass through at least three coordinate frames, and confusing them is the most common source of sign and orientation errors:
- Scanner frame — where the raw point cloud originates; arbitrary origin and orientation.
- Vehicle frame — the manufacturer's body coordinate system, typically with X along the vehicle length, Y across the width, and Z vertical, origin at a defined datum.
- Plane-local frame — a 2D
(u, v)system lying in the reference plane, used for contour gridding.
Registration from scanner to vehicle frame is performed by aligning known reference features — datum holes, fixture targets, or a best-fit to undamaged geometry. The transformation is a rigid-body rotation and translation, applied as:
p_vehicle = R @ p_scanner + t
where R is a 3×3 rotation matrix and t is the translation vector. Once in the vehicle frame, the reference plane normal and offset are expressed in the same frame, and depths become directly comparable across scans and across vehicles.
How the four concepts connect
The diagram below shows the complete measurement chain: raw scan points are registered into the vehicle frame, the reference plane is established from undamaged geometry, signed depths are computed along the plane normal, and the depth field is gridded into a contour. The sign convention and frame identity propagate through every stage.
Worked example: a door panel scan
Consider a 1.2 m × 0.8 m front door outer panel scanned after a low-speed impact. The scanner produces 180,000 points in its own frame. Registration against three datum holes places the cloud in the vehicle frame with a residual RMS error of 0.4 mm — acceptable for panel work. A least-squares plane is fitted to the 60% of points lying outside a 200 mm radius around the visible damage center, giving normal n = (0.02, −0.998, 0.05) and offset d = 812.3 mm.
Depths are computed for all points, then gridded at 5 mm resolution. The resulting contour shows a peak intrusion of 47.2 mm at a point 310 mm from the panel's leading edge, with a secondary ridge of 18–22 mm running diagonally. If the acceptance threshold for this panel is 40 mm, the peak triggers a fail; the secondary ridge, though below threshold, indicates the deformation pattern extends further than a simple dent, which matters for repair estimation.
Typical failure symptoms at this stage include: a contour that shows intrusion at the panel edges (extrapolation beyond the hull), a maximum depth that changes sign when the normal is flipped (sign convention not fixed), and depths that vary by more than 2 mm between repeated scans of the same undamaged panel (registration or plane-fit instability). Each points to a specific stage in the chain above, which is why the chain is worth keeping explicit in code and in reports.
Practical checklist before processing
- Confirm the reference plane normal direction and document the sign convention in the output metadata.
- Verify registration residual RMS is below the tolerance appropriate to the panel (typically 0.5 mm for body panels).
- Choose grid resolution and record it; do not compare contours of different resolutions directly.
- Restrict interpolation to the convex hull of measured points.
- Keep the frame identifier attached to every intermediate array.
With these definitions fixed, the Python implementation in the following sections can focus on data handling and automation rather than re-litigating geometry. The measurement model is the contract; the code is the execution.