~ / projects /

Panel Gap Identification for Automobiles

The gaps between a car’s body panels are a quality signal. Too wide, and they add drag, whistle at speed, and let in water and grit; uneven, and they read as poor build quality before a customer has opened a door. Measuring them is still largely a manual job with feeler gauges.

Close-up of a white car's front fender and door with the panel seams traced as magenta contour lines.
Panel seams recovered as contours (magenta) on a car's fender and door.

The goal was a tool that measures those gaps from a camera instead, built for CMU 24-678 (Computer Vision for Engineers). The self-imposed constraint was to use classical computer vision only, with no machine learning anywhere in the pipeline.

Why classical. Every measurement traces back to a threshold and a contour rather than to a set of weights, so when the tool flags a gap you can see exactly why. The cost is discrimination: a learned segmenter would separate seams from look-alikes more reliably, at the price of that transparency.

Approach

Images of the vehicle exterior go through global thresholding and contour detection to isolate the gap edges, with masking to suppress everything that is not a panel seam. Structure from motion across multiple views recovers the geometry, and the gap coordinates are logged into a point cloud so measurements can be taken in 3D rather than in pixels.

Results

The system measures gap widths along each seam and compares them against expected values, color-mapping the variation so a whole panel can be read at a glance. Tolerances are configurable, and gaps outside them are flagged as defective.

A curved panel seam on a white car with gap-width readings annotated in purple at points along it.
Gap widths measured at points along a seam.
The same seam overlaid with a green-to-red gradient showing how far each point deviates from the expected gap width.
The same seam color-mapped by deviation from the expected width: green within tolerance, red outside it.
The mobile version measuring a door seam in real time.

The clearest limitation is discrimination: the pipeline finds gap-shaped features, and anything else gap-shaped, such as a trim line or a shadow, has to be excluded by hand. Separating those automatically, and improving the depth mapping behind the point cloud, are the obvious next steps.

  • Computer Vision
  • Inspection
  • Embedded Systems