Designing the Light Before the Algorithm on a Polished Block
The polished faces and seal bands of a cylinder block decide sealing quality. Their defects are small: porosity, voids and seal-band scratches, and on a strongly reflective polished surface even the eye has to find the right angle to see them. Water jacket hole sizes have to be measured on every part, and missing operations judged on every part. Appearance and dimensional tasks land on one station, with a 42-second cycle.
On a reflective surface the light is designed before the algorithm
Glare off a polished face is specular, the defects are small and low-contrast, and once an area becomes a bright patch the image carries nothing usable. Changing the algorithm at that point is pointless; the input is already lost. High-brightness light with a controlled viewing angle compresses the glare so porosity and scratches become visible, and only then is judgment discussed. The selection order should be light and angle first, algorithm second.
Hole diameter is calibrated, not counted in pixels
Water jacket hole measurement takes another chain: the camera images the hole at a planned point, a classic algorithm fits the edge and diameter, and calibration converts pixels into real size. Every link can add error: reflection affects edge extraction, the fitting method affects roundness, and calibration sets the pixel-to-millimetre conversion. The acceptance question is how far it is from a standard gauge, and that chain needs its own calibration and verification.
Why missing operations sit on the geometry side
A missing operation looks like a presence question, but it is judged by whether the hole exists, where it is and whether the size is in range, which is geometric. It joins hole position and size on the classic side because that judgment needs explicit thresholds and reviewable evidence rather than a probabilistic conclusion. Porosity, voids and seal-band scratches go to deep learning, since their morphology varies and rules cannot express it.
Porosity or void: labelling decides whether the model can separate them
The two may look very close: porosity is a point depression, a void is a missing edge or region. Whether the model separates them depends on how clearly borderline samples were labelled, and difficult cases are rechecked against a regional template. Labelling is the most underestimated task in a layered scheme: the model ceiling is set there.
Recipe switching has to switch archiving too
Blocks come in several models, so the inspection program switches by model. What is easily forgotten is the archiving rule: images are stored under model and date directories, and the program and the rule switch together with the recipe, so every image matches a specific model and production date. Switching the program without the rule leaves records mixed together, and a query becomes harder, not easier.
What fills the 42 seconds
The cycle is 42 seconds, subject to site acceptance results, and contains capture at planned points for the model, region extraction and template matching, hole and size judgment, defect recognition, output and archiving. The two task families run in parallel on one station, which is the only way 42 seconds holds; serially, the algorithm time alone would exceed it. Parallelism also constrains layout: capture points must all be reachable within one cycle without doubling back.
The scheme suits inline inspection of appearance and hole geometry on block castings. On reflective surfaces, design light and angle first; use classic algorithms for geometry and deep learning for appearance. Region extraction and the layered structure carry over to similar castings with new templates, samples and recipes.
Glare, calibration and labelling in order
What if glare cannot be suppressed?
Adjust the incidence angle and polarisation before changing the light type. The goal is not a darker picture but a specular reflection that misses the camera while diffuse light survives.
What secures hole measurement accuracy?
The calibration chain and stable edge extraction. Calibration parameters, imaging distance and edge quality all have to be controlled; any drift shows up directly in the result.
Can one model judge both porosity and scratches?
It can, but the two need different imaging conditions, so separate regions are usually more stable. Whether to split models depends on separability in the image, not on a preference for more models.