Inline Optical Inspection
Inline 2D optical inspection for detecting micrometric deviations during mechanical-part manufacturing.
- Optical inspection
- Image processing
- Machine vision
- Manufacturing
Overview
Turning a camera image into a dimensional measurement takes more than detecting an edge. Optics, illumination, calibration and geometric reasoning must work together to compare the observed profile with the intended part.
This case study brings together two related applications: inspection of machined components and machine-integrated profile scanning. Both shared an image-to-measurement core adapted to different acquisition and manufacturing conditions.
My contribution
I worked across optics and illumination, calibration and metrology, image-processing and geometric-measurement algorithms, software and GUI development, machine integration and experimental testing. My contribution connected acquisition with the algorithms and operator workflows needed to obtain usable dimensional results.
I co-authored the preliminary validation report, authored the machine-inspection GUI user guide and contributed geometric-measurement software. Development and experimental results were collaborative team work.
From image to metric profile
Acquire a useful edge
The optical setup combined a monochrome global-shutter camera, telecentric optics and controlled illumination. Calibration established metric coordinates across the field of view. Lighting and exposure made the physical edge observable despite surface appearance and machining residues.


Refine the contour below the pixel grid
An initial contour supplied the local geometry. Neighbouring points were used to estimate normals, and intensity transitions along those normals refined the boundary to sub-pixel coordinates. Calibration converted the extracted profile into metric space.

Align with CAD and measure selected features
DXF geometry defined the nominal profile and inspection regions. Alignment brought the observed contour into that reference frame; local fitting and robust distance estimation produced linear, angular and diameter measurements.
The final prototype added learning-assisted alignment to handle pose changes and mirrored orientations. Part-specific keypoint detection supported registration, while dimensional measurement remained tied to the calibrated contour.
Reference-part validation
At 3000 µs exposure, a preliminary experiment found absolute differences of 1.5–3.9 µm across four independently measured reference dimensions, averaging approximately 2.4 µm.

These results characterize the controlled reference setup. The machine-integrated application used the same measurement principles in a different acquisition context.
Final prototype and production lessons
The complete inspection tool combined acquisition, contour extraction, CAD alignment, dimensional measurement and result monitoring. Processing took 0.5–1.5 seconds per part, depending on contour complexity and measurement count. The final report describes burr-free reference measurements as consistent with the ±5 µm target.

Manufacturing-line trials exposed a decisive limitation: nearly straight, redeposited machining burrs could resemble the intended edge. On the tested component, this prevented reliable process-drift detection.

Machine-integrated scanning
In the second application, the nominal profile was divided into capture locations. The machine positioned the camera, acquired successive images and retained their extracted profiles. Camera-to-machine calibration connected optical measurements to axis and tool coordinates.

A coarse/fine autofocus sequence supported acquisition with configurable travel, step size and settling time. Python application logic and modular native interfaces separated camera access, calibration, focus, machine communication and geometric measurement. Saved projects retained settings, images and profiles together.
Engineering takeaways
- Optics and algorithms: design image quality and contour processing as one measurement chain.
- Geometric metrology: connect sub-pixel profiles with CAD-defined features and metric calibration.
- Reusable software: adapt the measurement core to inspection stations and machine workflows.
- Real-process validation: use production trials to expose limits beyond the controlled bench.
Project context / Sources
This case study uses the supplied Optical Inspection — Project Presentation package: the February 2023 preliminary validation, March 2024 machine-inspection guide, shared software and final production-prototype reports. Numerical results belong to the production-part experiments; the second application contributes integration and workflow evidence.