◇ Blog · Machine vision

Vision system false rejects: why your camera fails good parts, and how to stop it.

Your camera probably isn't broken. When a vision system starts rejecting good parts, something in the image changed, the parts changed, or the threshold was set on too few parts. Pull the logged images and run a golden sample before you touch a single setting.

Relling Engineering
Published Updated 14 min read
On this page

    Vision system false rejects almost always come from three places. The image drifted (light, focus, position or blur), the good parts vary more than the ones you set up on, or the threshold was placed with too little data. Find which one moved and fix that. Loosening the threshold's the last thing to try.

    We build robotic cells with machine vision applications inside them, and we inherit plenty of stations someone else commissioned. The usual story is a lens wiped with a shop rag on second shift, a ring light bumped during a changeover, and a threshold loosened at 2 a.m. to keep the line moving. This is the order we work through those stations in. It's the same on a Cognex In-Sight, a Keyence CV-X or a Basler camera on a PC, because the optics don't care whose logo is on the housing.

    Key takeaways

    • Most false rejects come from a changed image, changed parts or a threshold set on 20 or 30 setup parts.
    • Look at logged reject images and run a golden sample before you adjust anything. It's minutes of work.
    • Set thresholds from score histograms of good and bad parts, never from pass and fail counts alone.
    • If good and bad score distributions overlap, no threshold can fix it. You'll have to fix the image.

    What is a false reject in machine vision?

    A false reject is a good part that the vision system calls bad. It's the opposite of an escape (also called a false accept), where a bad part gets through. Every inspection trades one against the other, and where that trade lands depends on the threshold and on how far apart good and bad parts score.

    The AIAG measurement systems manual calls the false reject rate the false alarm rate, and the escape rate the miss rate.6 You'll hear every one of these names on the same floor.

    The direct cost is the part you scrap, rework or check by hand. The indirect cost's bigger. A station that cries wolf a few times an hour teaches operators to fish parts out of the reject bin, and then to bypass it. Once that happens, the station bought to stop escapes is producing them.

    So the most expensive false reject is the one that teaches people the camera's not worth listening to.

    Fig. 01Why a threshold set on 30 parts rejects good ones
    020406080100 Defect score from the vision tool · higher = more likely bad parts (relative) threshold A · 36 threshold B · 50 1 30 setup parts production good parts bad parts 1false rejects at A Threshold A · from setup parts 7.7% of good parts rejected · escapes near zero Threshold B · from production data 0.03% of good rejected · 0.7% of bad escape
    The setup parts were real, just not representative. Illustrative normal distributions (setup parts mean 24, SD 4.2; production good mean 26, SD 7; bad mean 72, SD 9). Threshold A sits just above the 30 setup parts and rejects the tail of the wider production spread. Threshold B, placed from production scores, nearly eliminates false rejects and lets a small share of bad parts through. Neither is free. Where you put the vision inspection threshold is a cost decision, not a camera setting.

    Why does my vision system reject good parts?

    Because the image, the part or the decision changed after setup. Lighting drifts, lenses get dirty, fixtures wear, suppliers change, and a threshold set on 30 tidy commissioning parts meets the full spread of production. The camera's usually reporting exactly what it sees. It's what it sees that moved.

    We sort the causes into six families on a fishbone (Ishikawa) diagram. It's there to make you check every bone before you fall in love with one theory, because a station rejecting good parts usually has two or three small causes stacked together.

    Fig. 02Root causes of false rejects · Ishikawa diagram
    Good parts rejected false reject Lighting Optics + camera Threshold + model Presentation Motion + trigger Parts + supplier ambient light LED aging warm-up drift focus shift dirty lens, window exposure, gain too few setup parts no boundary samples AI model drift fixture nest wear height or tilt not seated motion blur trigger jitter vibration cosmetic variation new supplier, lot finish, coating check every bone first
    Six bones, one effect. The root causes of machine vision false rejects fall into six families. Lighting, optics and motion change the image; presentation and supply change the part; threshold and model change the decision. A station usually has more than one bone contributing, which is why the diagnosis in Fig. 03 tests the image before it tests the decision.

    What are the most common causes of machine vision false rejects?

    The eight we see most are ambient light and lighting drift, focus drift and dirty optics, part presentation, motion blur and trigger timing, thresholds set on too few samples, cosmetic variation in good parts, supplier changes, and model drift in deep-learning tools. Each one's got its own telltale pattern in the reject log.

    1. Ambient light and lighting drift

    A vision station sees its own light plus a skylight at 3 p.m., the dock door and the brighter fixture maintenance put in last month. If the station's light doesn't dominate, your results depend on the time of day. The standard defenses are a shroud, strobing hard enough to swamp the room light, or narrow-band light with a matching bandpass filter.1 Our machine vision lighting guide covers how to pick between them.

    The station's own light drifts too. LED output falls with operating hours, and faster when the LED runs hot, which is why the lighting industry projects it with the IES LM-80 test and TM-21 extrapolation at several temperatures.2 A light that's overdriven or cooked in an enclosure ages faster than its datasheet says. And lights warm up, so Monday's first images aren't quite Monday's noon images.

    2. Focus drift and dirty optics

    A focus ring that wasn't locked will walk with vibration. So will one a technician brushed while cleaning. Coolant mist, oil, dust and fingerprints on the lens or window cut contrast and soften edges, and edge tools suffer first. If false rejects creep up over weeks and a cleaning knocks them back down, this is your bone. Locking screws are cheap, and our guide on how to choose a machine vision lens covers why some lenses hold focus better than others.

    3. Part presentation and fixturing variation

    A conventional lens images the part at a scale that depends on working distance. At 200 mm working distance, a part sitting 2 mm higher changes the image scale by about 1% (2 ÷ 200). On a 40 mm feature that's 0.4 mm of apparent size change, which is easily bigger than the tolerance a dimensional gauging with machine vision station is checking. Tilt, a worn nest or a gripper that lets the part slip a millimeter do the same thing. The part's fine. It just isn't where the tool expects it.

    The telltale sign? Rejects that cluster by fixture nest, pallet or gripper rather than by lot.

    4. Motion blur and trigger timing

    A moving part smears across the sensor during the exposure. A handy way to size it is blur in pixels = part speed × exposure time × pixels across the field of view ÷ field of view, and blur usually starts to hurt beyond about one pixel.3 Say a part moves at 200 mm/s, the exposure is 1 ms and you have 2,448 pixels across a 120 mm field. That's 200 × 0.001 × 2,448 ÷ 120, or about 4.1 pixels of blur. Cutting the exposure to 0.2 ms brings it to about 0.8 pixels. But you'll need five times the light to keep the same brightness, which is why strobes exist.

    Trigger timing is the quieter cousin. With a photo-eye, a PLC scan and a software trigger between the part and the shutter, the delay varies. At 200 mm/s, 5 ms of jitter moves the part 1 mm, enough to push a feature out of a tight region of interest. A hardware or encoder trigger takes most of that out, and it's usually a day's work.

    5. Thresholds set on too few samples

    This one's the cause we find most often on stations we inherit, and Fig. 01 shows why. At commissioning someone runs 20 or 30 good parts from one lot, cleaned and placed with care. Their scores cluster tightly, and the threshold goes just past the worst of them. Then production shows the station every lot, shift and nest, and the tail of that wider spread crosses the line.

    Volume makes it hurt. If a station sees 2,000 parts a shift and the threshold sits at the 99th percentile of production good-part scores, that's about 20 good parts rejected every shift (2,000 × 1%), before a single real defect shows up.

    6. Cosmetic variation in good parts

    Good parts aren't identical. Machining marks change with tool wear, castings vary in texture, and paint shifts from batch to batch. A surface defect inspection taught only on pristine parts will treat acceptable cosmetics as defects. The cure is a set of boundary samples, signed off by quality, showing the worst acceptable condition of each feature, and a tool that's tuned against them.

    7. Supplier, material and process changes

    The supplier who switched resin color without telling anyone is a classic. So are a new stamping lubricant and label stock with a different gloss. Any of them can change the image overnight while parts stay in spec. If false rejects jump on one date and line up with a lot, look at incoming material before the camera. And ask purchasing to tell the vision owner when a supplier changes. It sounds obvious. It almost never happens.

    8. Model drift in deep-learning inspection

    A deep-learning tool only knows the images it was trained on. When the incoming data drifts away from that training set, which the machine-learning literature calls data or concept drift, the model's confidence on perfectly good parts drops and they land in the reject class.5 A new part revision or slow lighting drift can do it. The fix is a loop. Log the false rejects, have quality label them, retrain, and check the new model on a fixed test set before release. Our comparison of deep learning vs rule-based inspection covers when that extra upkeep is worth it, and the AI visual inspection post shows what the loop looks like on a real line.

    How do you troubleshoot false rejects on a vision system?

    Diagnose before you adjust. Look at the logged reject images first, then run a golden sample to see whether the station drifted, then split rejects by nest, shift and lot. Only then look at the threshold. None of it needs new hardware, and most of it's done in minutes.

    Image logging comes first, because without it every false-reject argument's just opinion. Save each rejected image with its score, timestamp, recipe, nest, lot and shift. Set it up at commissioning, not after the first angry phone call.

    A golden sample is a few known-good and known-bad parts kept in a drawer at the station and run each shift. If the golden good part scores differently from its baseline, the station moved. If it doesn't, the parts probably changed.

    A/B runs settle the "is it the light or the parts?" argument, and they're cheap. Run the same parts twice and change one thing, like a clean lens against a dirty one, or nest 1 against nest 3. Then rerun the rejects. A part that fails once and passes the second time is telling you about repeatability.

    Score histograms are the most useful tool of the four. Plot raw scores, not just pass and fail, split by shift, nest, lot and date. You'll see one tight cluster, a wide smear, or two humps that point to two populations.7 Two humps split by nest is a fixture problem. A hump that slides over weeks is drift.

    Fig. 03Troubleshooting false rejects · test the image before the decision
    False rejects rising 1 Look at the logged reject images Would a person call these parts good? no real defects The station is right Fix the process upstream, not the camera yes 2 Run the golden good sample Does it score inside its baseline band? no image drifted Restore the image first Clean; check focus, light, exposure, job yes 3 Split rejects by nest, shift and lot Do they cluster on one factor? yes shared factor Fix that factor Fixture nest, ambient light, supplier lot no 4 Plot good-part scores vs threshold Do rejects sit just past the threshold? yes threshold too tight Re-set it from score data Good and bad histograms, as in Fig. 01 no tool limit The tool cannot separate the variation Re-teach, retrain, or change the image After any fix: rerun golden + A/B parts
    Order matters when your vision system is rejecting good parts. Checking the decision before the image is how stations end up with loosened thresholds and a dirty lens. Steps 1 and 2 take minutes with a logged image archive and a golden sample in the drawer; step 4 needs a day or more of logged scores.

    Don't skip the first question in Fig. 03. Plenty of "false rejects" turn out to be real defects operators had been quietly passing.

    How do you reduce false rejects without letting defects escape?

    Fix the cause the diagnosis pointed at, cheapest first, and don't touch the threshold until you've got score data for both good and bad parts. Cleaning optics and restoring a saved job take minutes. Re-fixturing or switching to 3D takes weeks, so you'll want the cheap causes ruled out first.

    Fixes for vision system false rejects, ranked by effort
    FixEffortAddressesWatch out for
    Clean lens and window, lock focus and irisMinutesDirty optics, focus driftCleaning can bump focus, so check against a target afterward
    Restore the saved job and settingsMinutesChanged exposure, gain or tool settingsOnly works if a known-good job was archived
    Shroud or enclosureHoursAmbient lightStill has to allow loading and cleaning
    Strobe, or narrow-band light with a matched bandpass filterHours to a dayAmbient light, motion blurOverdriving shortens LED life, so check duty cycle
    Shorter exposure with more lightA dayMotion blurHigher gain adds noise, so add light rather than gain
    Hardware or encoder triggerA dayTrigger jitter, part outside the region of interestNeeds PLC and wiring changes
    Re-set the threshold from score dataA day of logging, an hour of analysisThresholds set on too few partsNeeds labeled bad parts too, or you'll trade false rejects for escapes
    Re-teach or retrain with boundary samplesDaysCosmetic variation, model driftRe-verify on a fixed test set before release
    Re-fixture, or locate the part before inspectingDays to weeksPresentation and fixturing variationTouches the mechanical design and the cycle time
    Telecentric lens, or move to 3DWeeks, new hardwareHeight variation, low-contrast geometryTelecentric field of view is limited by the front lens size

    We'd push back on one common reflex. People reach for a higher-resolution camera when a station rejects good parts, but more pixels rarely help with light, blur or presentation, and they'll make a marginal exposure worse. Check the machine vision camera resolution math or our machine vision resolution calculator before you spend the money. If you really are heading for the last row, read 2D vs 3D machine vision first.

    How do you set a vision inspection threshold?

    Collect scores for a few hundred good parts across real variation and for every defect type you must catch, plot both histograms on one axis, and put the threshold in the gap between them. Lean it toward whichever side carries the more expensive error. If they overlap, stop. You've got an image problem.

    Treat the threshold as a statistical decision, because that's what it is. Good parts make one distribution of scores and bad parts make another. Moving the line between them trades false rejects against escapes, the same trade-off ROC analysis describes for any classifier. You can't lower one error rate without raising the other unless the distributions move apart.4

    1. Score good parts from several lots, shifts and nests. A few hundred is a sensible floor, since you're trying to see the tail.
    2. Score every defect type, including the faintest one quality calls a reject. Boundary rejects matter more than gross ones.
    3. Plot both histograms on one axis. If there's a clear gap, put the threshold in it, closer to the good parts for a safety or customer-critical defect.
    4. If they overlap, no threshold fixes it. Go back to the lighting, optics or presentation. A wider gap is what those buy you.
    5. Think about a gray zone with two thresholds. Pass below the first, reject above the second, and re-image or route to manual review in between.
    6. Write down the data set, threshold, date and approver. On a regulated line that record's part of your vision system validation.

    Don't widen the threshold until you know why parts are failing. If the cause was a dirty window, a looser threshold means the station now accepts parts it can't see properly, and it'll keep doing so after the window's cleaned.

    How often should you check a vision system for drift?

    Run a golden good and golden bad sample every shift and record the scores, clean and check focus weekly, and review score histograms monthly. Drift's slow, so a station checked only when someone complains has usually been rejecting good parts for weeks.

    Fig. 04 shows the shape we mean. A golden sample's brightness falls as the window collects film and the LED ages. Cleaning gets the film back but not the LED, and eventually the image leaves the window the threshold was set in. Nothing changes shift to shift, which is why nobody notices.

    Fig. 04Lighting drift over a year · illustrative
    A · Golden-sample mean gray level ±8% window baseline 200 220200180160 lens window cleaned leaves window · wk 40 Cleaning recovers film, not LED aging B · False-reject rate per week 4%2%0% 013263952 week illustrative model, not station data
    Lighting drift is slow, so measure it with a golden sample. An illustrative model: LED output falling about 0.08% a week plus a window film costing 0.25% a week, with one cleaning at week 20. Nothing changes from one shift to the next, which is why nobody notices until the golden sample leaves the window the threshold was set in. A per-shift golden-sample log would have flagged the trend weeks before the false rejects climbed.

    Here's the routine we leave behind on most stations.

    • Every shift, run the golden good and bad samples and log the scores. Out of band means you stop and check before running production.
    • Weekly, clean the window, check focus against a printed target, and skim the reject images. Ten minutes of looking catches problems before the numbers do.
    • Monthly, plot score histograms by nest and shift, and look at fixture nests for wear.
    • After any change (a new supplier, part revision, light, lens, firmware or model), run the golden samples and a short A/B run before the station goes back to production.
    • Yearly, plan light replacement, archive the job files, and redo the threshold study with a year of logged scores.

    Our machine vision maintenance checklist turns that into a printable sheet. Put a named owner on it, though. The stations we see drifting usually aren't anybody's job, and the PLC tech who doesn't want to touch the vision job isn't going to volunteer.

    When should you change the vision hardware instead of tuning it?

    When the image is clean, the station is stable, the threshold came from good data and the good and bad distributions still overlap. That means you've hit the limit of the current setup. More tuning will only move false rejects into escapes.

    The usual next steps are a different lighting geometry, more resolution on the defect, a telecentric lens, 3D for height, or deep learning for cosmetic calls that rules can't express. Honestly, which one is a judgment call, and we'd test on your parts before buying. The Cognex vs Keyence comparison and the smart camera vs PC-based vision guide help if the answer turns out to be a different platform.

    In a robotic cell there's also a mechanical answer. The robot presents the part the same way every time and re-presents it when the score lands in the gray zone. That's how we build our machine vision workcells, and it's often the cheapest way to take presentation out of the problem. If you're deciding whether a fix is worth paying for, the machine vision ROI post shows how to put a dollar figure on a false reject rate.

    Frequently asked questions

    What is an acceptable false reject rate for a vision system?

    There's no universal number. It depends on what a false reject costs you against what an escape costs your customer. The AIAG MSA manual's attribute criteria are commonly quoted with a false alarm rate of 5% or less as acceptable for a study, but production lines usually want far lower. Agree a target with quality first.

    How many parts do you need to set a vision inspection threshold?

    More than the 20 or 30 most stations get commissioned with. You need to see the tail of the good-part distribution, so a few hundred good parts from several lots and shifts is a floor, plus labeled examples of every defect. A one-in-a-thousand false reject is invisible in a small sample.

    Should parts rejected by a vision system be re-inspected?

    Yes, at least until you trust the false reject rate. Re-inspecting rejects tells you how many were really good and gives you labeled images for tuning. In a robotic cell the robot can re-present a borderline part at a second angle, which recovers good parts without a manual station.

    Can you use different thresholds for different defect types?

    Yes, and you usually should. A cosmetic scratch and a missing O-ring don't carry the same risk, so they shouldn't share a threshold. Most smart cameras and deep-learning tools let you set limits per tool or class. Keep zero tolerance where an escape is safety-critical and allow margin where a false reject only costs rework.

    Do AI vision systems have fewer false rejects?

    They can on cosmetic inspections, where acceptable variation is hard to describe with rules, because a model learns what acceptable looks like from labeled images. But it only knows its training images. When parts or lighting drift it'll start rejecting good parts, so plan a retraining loop and a fixed test set.

    Why did my vision system's false rejects suddenly increase?

    A sudden jump usually means something changed on a specific date. Check the maintenance log for a cleaning, light swap, firmware update or job edit, then check incoming lots. Run a golden sample. If it still scores normally, the parts changed and the station didn't.

    Sources

    1. Daryl Martin (Advanced Illumination), A Practical Guide to Machine Vision Lighting, NI, 2012. Covers ambient light mitigation by strobing, enclosures and pass filters matched to narrow-band light. Read the guide.
    2. Eric E. Richman, The Elusive "Life" of LEDs: How TM-21 Contributes to the Solution, LEDs Magazine, Pacific Northwest National Laboratory, 2011. Explains how IES TM-21 projects LED lumen depreciation from LM-80 test data at several temperatures. OSTI record.
    3. Jon Chouinard, Imaging Basics: Calculating Exposure Time for Machine Vision Cameras, 1stVision, 2018 (updated 2023). Gives the blur formula B = Vp × Te × Np ÷ FOV and notes blur becomes an issue past about one pixel. Read the article.
    4. Tom Fawcett, An introduction to ROC analysis, Pattern Recognition Letters 27(8), Elsevier, 2006. The standard reference on the trade-off between false positive and true positive rates as a decision threshold moves. doi:10.1016/j.patrec.2005.10.010.
    5. João Gama, Indrė Žliobaitė, Albert Bifet, Mykola Pechenizkiy and Abdelhamid Bouchachia, A survey on concept drift adaptation, ACM Computing Surveys 46(4), 2014. Defines concept and data drift and surveys methods for detecting and adapting to it. doi:10.1145/2523813.
    6. Automotive Industry Action Group, Measurement Systems Analysis Reference Manual, 4th edition (MSA-4), AIAG, 2010. Reference for attribute agreement studies, including effectiveness, miss rate and false alarm rate. ANSI webstore listing.
    7. NIST/SEMATECH, e-Handbook of Statistical Methods, section 1.3.3.14 Histogram, National Institute of Standards and Technology, 2012. How to read distribution shape, spread and multimodality from a histogram. Read the section.

    Sourced: the ambient-light countermeasures, LED depreciation methods, motion blur formula, ROC trade-off, concept drift definition, AIAG terminology and histogram interpretation, as cited. From our own commissioning and service experience: the ordering of causes, the diagnostic sequence, the fix ranking and the maintenance routine. The worked numbers (working distance, blur, jitter, parts per shift) are arithmetic shown in the text, and every chart is labeled illustrative; none is a measurement from a customer station.

    Get a second look at a station that rejects good parts.Bring Relling to your shop floor.

    We started Relling to help American manufacturers make more of what this country needs. Tell us about the part and we'll scope a cell to it.