Machine Vision

OK vs NG: How AI Inspection Makes the Call in Milliseconds

GSO Engineering Team11 Aug 20265 min read
OK vs NG: How AI Inspection Makes the Call in Milliseconds

On a HIKROBOT smart camera the output looks binary: a green OK box or a red NG box. Underneath, the system is doing something more nuanced — scoring how far the part sits from a learned boundary between good and bad, then applying a threshold you control.

Rule-based vision: fast and explainable

Traditional tools measure something exact — an edge position, a diameter, a grey level, a matched pattern — and compare it to a tolerance. This is fast, repeatable, and easy to justify to a quality auditor. It shines when the defect is well defined: a missing cap, an out-of-spec dimension, a barcode that does or does not decode.

Deep learning: judgement, not just measurement

Some defects resist a clean rule. Scratches wander. Textures vary. “Acceptable” and “defective” surfaces can look almost identical to a fixed algorithm. Here a model trained on many labelled samples learns the boundary itself — and holds it even as background, lighting, or part position shift. The same approach reads codes that are blurred, low-contrast, or partly occluded, because it has seen thousands of degraded examples.

The threshold is a business decision, not a technical one: it sets the balance between letting a bad part through and rejecting a good one.

Tuning the line to your risk

Move the threshold one way and you catch every defect but reject more good product; move it the other way and you pass more, but risk escapes. The right setting depends on the cost of each mistake in your process. A pharmaceutical seal and a cosmetic scratch do not deserve the same tolerance — and a well-designed system lets you set each independently, with the OK/NG evidence images to prove the choice.

That is why our solution demos always show the pass sample beside the reject sample. Seeing the boundary is how an operator learns to trust it.

Butuh solusi machine vision untuk pabrik Anda?

Tim GSO siap bantu dari konsultasi, uji sampel, hingga integrasi penuh.

Konsultasi Gratis