← Back to the scanner case study

Calibration · Numerical optimization · Python/C++/CUDA

Making scanner calibration dependable

Camera and structured-light calibration, from image measurements and pattern identification to nonlinear fitting and model validation.

From observations to calibration

Calibration needs consistent target observations and correct associations between image features and projected patterns. My work covered target detection, centroid refinement, pattern-label validation, and camera and pattern calibration in the scanner's production codebase.

Detection and pattern validation

Camera calibration uses observations of a patterned target. In one failed capture, fixed detection thresholds rejected valid pattern elements. I replaced those thresholds with detection based on the target's spatial structure and kept element labels consistent across calibration images. I also improved the estimation of feature centers under uneven illumination.

Structured-light observations carry decoded labels identifying portions of the projected pattern. I added a CUDA validation stage that checks those labels against the pattern's expected spatial relationships. It rejects inconsistent labels and corrects selected decoding errors before depth is computed.

Checking the model

Another failed calibration exposed an error in the conversion to the structured-light shape model. I corrected the conversion and evaluated the fitted result.

I rebuilt the numerical solvers with analytical Jacobians and Gauss–Newton steps with Levenberg–Marquardt damping. Outlier rejection first identifies points by their deviation from the median, then refits with iteratively reweighted least squares.

I showed that one fitted parameter was unidentifiable: changes to it could be absorbed by other parameters without changing the model's prediction. I fixed its value to remove that freedom from the solve.

Perspective makes a calibration pattern element's image trajectory a Möbius function of stage position. Replacing the linear trajectory model with that form reduced the median per-element trajectory RMS residual from 0.112 px to 0.050 px in a recorded development comparison.

A separate scan-distortion investigation found a mismatch between the optimizer's assumptions and how calibration was used downstream. I aligned those constraints and added validation.

Evaluation

Camera calibration reports pixel reprojection residuals; pattern calibration reports surface-fit residuals in millimetres. These measure agreement with the observations used for fitting. Reconstructed surface accuracy is evaluated separately.

Client work for E4D Technologies, now Planmeca, described at a technical level. References are available on request.