News
Why Casting Surfaces Defeat Vision
A vision station that works well on machined faces is often installed on a casting surface and produces one of two results: it finds almost everything as a defect, or it finds almost nothing. Both outcomes come from the same cause, and neither is a camera problem.
A machined face and a casting surface reflect light in fundamentally different ways. Everything that follows about casting surface inspection comes from that difference.
The Problem: A Casting Surface Is Not A Machined Surface
A machined face has a direction. Tool marks run one way, the roughness is consistent within a few micrometres, and a defect interrupts that regularity. A casting surface has none of those properties.
A casting surface is generated by molten metal against a mould. Its roughness varies by location, its colour varies with the sand and the cooling, and its texture has no dominant direction. A defect on a casting surface is an irregularity in a field that is already irregular.
The consequence is that the contrast a vision station relies on does not exist in the same form. On a machined face, a scratch is dark against a bright background. On a casting surface, a scratch is dark against a background that is already partly dark, in a pattern that changes from part to part.
The Diagnosis: Three Mechanisms
The difficulty separates into three mechanisms, and each needs a different response.
The first is absorption. A raw casting surface, particularly one with residual mould coating, absorbs a large fraction of the light that reaches it. Less light back means less signal, and the same defect that is obvious on a machined face produces a faint variation that sits inside the noise.
The second is scatter. A rough surface sends light in many directions, so illumination that works on a flat face arrives at the camera from a surface at every possible angle. The result is a granular texture that masks small defects and makes thresholds unstable across the field of view.
The third is legitimate variation. A casting surface has features that are not defects: flow marks, cold shuts that were accepted at the foundry, sand inclusion patterns, and colour differences from cooling. Each of those is a real variation in the image and none of them is a defect, which means the inspection criterion has to separate two things that look similar.
The Response: Where The Work Actually Goes
The work on a casting surface is not in the camera or the algorithm. It is in the illumination and the criterion, in that order.
Illumination is the lever because it determines whether the defect produces contrast at all. A low-angle light reveals a raised defect as a shadow and a depression as a highlight, and it does so against a background that is otherwise dark, which is why raking light is the default for casting surfaces. Coaxial light does the opposite: it suppresses texture and reveals surface finish, which is useful for porosity and useless for a raised inclusion.
Multi-angle fusion exists because no single illumination makes every defect class visible. Two or three light directions, combined, produce an image in which a defect appears in at least one channel. The cost is acquisition time and computation, and on a casting surface it is usually the difference between a station that works and one that is overridden.
The criterion is the second lever, and it is harder. A casting surface requires a definition of defect that distinguishes it from casting texture, and that definition has to be agreed with the foundry before the station is built. The practical form is a limit sample set: ten parts, agreed as acceptable and unacceptable, photographed under the station's illumination. Those samples become the acceptance criterion, and any dispute afterwards is a dispute about the samples rather than about the station.
A Case Where The Casting Surface Won
A block line installed one station for the machined faces and, six months later, asked for the as-cast faces to be added. The station had been running at a false call rate under two percent on the machined faces, and on the casting surface the same station flagged between fifteen and twenty percent of parts in the first week.
The cause was not the camera. The illumination installed for the machined faces was a bright field arrangement, which is close to the worst possible choice for a casting surface: it produces a uniform bright reflection on a flat face and a mottled, high-contrast image on a rough one, in which every sand grain looks like a defect.
Adding two low-angle bars changed the image more than any algorithm would have. On the casting surface the low-angle bars produced a mostly dark background with raised features throwing shadows, and the false call rate fell to around four percent before any threshold was touched. The remaining four percent were the genuine disagreements about what counts as a defect on a cast surface, which is why the limit sample set was built next, from six parts the foundry and the customer both accepted and six they both rejected.
The station now runs both surfaces from two recipes on one platform. The lesson that travelled was that the casting surface needed different light before it needed different logic, and that the money spent on the lights was a fraction of what a second station would have cost.
Why Parameters Do Not Transfer
The most common failure is using the settings from a machined surface on a casting surface, because the same part has both.
A station that inspects the machined faces of a block and then moves to the as-cast faces has to change its illumination, its exposure and its thresholds for the second surface. Where the station is programmed with one parameter set for the whole part, one of the two surfaces is always being inspected with the wrong settings, and the resulting false call rate is attributed to the algorithm.
The practical rule is that a station covering both surfaces needs two recipes and, usually, two illumination arrangements. That is a design decision made at specification, not a setting changed afterwards, because the light hardware has to be there.
What To Specify
A casting surface inspection requirement that can be built to names four things: the defect classes and their sizes, the limit sample set, the illumination arrangement per surface, and the false call rate that will be accepted.
What should not be specified is an accuracy figure borrowed from a machined surface. A casting surface inspection that claims the same resolution as a machined face inspection is claiming that the surfaces are equivalent, and they are not.
The useful summary is that a casting surface is a harder optical problem than a machined face by an order of magnitude, and the effort goes into light and agreed samples rather than into the camera. A station built that way inspects a casting. One built on machined-surface assumptions inspects the light.