Manufacturing IoT
Computer Vision for Manufacturing Quality Control
Published by IOT Illinois Research & Editorial Team

- Start With the Defect, Not the Camera
- Get the Image Right First
- Choosing the Approach
- Build the Dataset Honestly
- Validate Before You Trust It
- Connect It to the Line
- Keep It Accurate Over Time
- A Metal Stamping Scenario
- Common Challenges
- What's Coming Next
- Explore More
- Frequently Asked Questions
- What is the most common reason a machine vision project fails?
- How many defect images do I need to train a model?
- What is a false reject, and why does it matter?
- Should I replace my human inspectors?
- Can machine vision work on shiny or dark parts?
- How long does it take to validate a new inspection station?
Most failed machine vision projects do not fail because the algorithm was weak. They fail because the lighting was wrong, the defects were never clearly defined, or nobody agreed on what "good enough" meant before go-live. This article is an implementation guide for quality teams in Manufacturing IoT who already believe inspection should be automated and want to know how to do it without a painful first six months. For the broader market picture, see our overview of computer vision across Illinois manufacturing.
Start With the Defect, Not the Camera
Before any hardware is chosen, write down what you are trying to catch. A defect taxonomy is a short list of defect types, each with a name, a photo, a size threshold and a severity. "Scratch" is not enough. "Scratch longer than 2 mm on the visible face" is something a system can be tested against.
- Cosmetic defects: scratches, dents, discoloration, print smudges. These depend heavily on lighting.
- Dimensional defects: out-of-tolerance holes, bent pins, wrong length. These depend on optics and calibration.
- Assembly defects: missing parts, wrong orientation, absent labels. These are often the easiest to automate first.
- Contamination: foreign material, residue, stray fibers. These need careful image capture and plenty of examples.
Ask your inspectors which two or three defects cost you the most in returns, rework or customer complaints. Start there.
Get the Image Right First
Experienced integrators say the same thing: fix the image before touching the software. A model cannot find what the camera cannot see. Work through the setup in this order of priority.
| Priority | Element | What to Check |
|---|---|---|
| 1 | Lighting | Angle, color and diffusion chosen so the defect stands out and shadows do not hide it |
| 2 | Optics | Lens and field of view matched to the smallest defect you must detect |
| 3 | Sensor | Resolution and shutter speed suited to part size and line speed |
| 4 | Part presentation | Consistent position, orientation and trigger timing |
| 5 | Enclosure | Shielding from ambient light, dust, vibration and temperature swings |
A common rule of thumb is that the smallest defect should cover several pixels in the image, not one or two. Ambient light is the quiet killer: a loading dock door opening on a bright afternoon can change what the camera sees, which is why many Illinois plants shroud the inspection station completely.
Choosing the Approach
Traditional rules-based vision measures edges, positions and pixel patterns. It is fast, predictable and works well for dimensions and presence checks. Deep learning models handle natural variation, such as texture, surface finish and cosmetic defects, that rules struggle to describe. Many successful stations use both: rules for measurements and a learned model for surface flaws. If you have few defect examples, look for anomaly-detection methods that learn only what good parts look like, then flag anything different.
Build the Dataset Honestly
Collect images across shifts, lots, operators and seasons, not just from one good afternoon. Include borderline cases and label them with the people who actually do the inspection. If two inspectors disagree on a part, that disagreement is information: your standard needs clarifying before a machine can follow it.
Validate Before You Trust It
Two numbers decide whether a system is helping or hurting. The false reject rate is the share of good parts wrongly pulled, which costs you yield. The escape rate is the share of bad parts that pass, which costs you customers. You can trade one against the other with a threshold, so decide in advance which error is more expensive for each defect.
- Seed known defects: Run a set of deliberately defective and borderline parts through the system, including parts that are only barely out of tolerance.
- Run in shadow mode: Let the system score every part for a few weeks while humans keep making the decision. Compare the two.
- Repeat across conditions: Test at different times of day, with different lots and with a clean and a slightly dirty lens.
- Document it: In regulated work, such as medical device or food packaging, formal installation, operational and performance qualification and a measurement system analysis may be required. Even where they are not, the discipline pays off.
Connect It to the Line
An inspection result that nobody acts on is only a report. The system should send a reject signal to the line controller so the part is diverted or the line stops after a set number of consecutive failures. Results should also flow to your MES or quality system with a part ID, timestamp, image and defect class. When that data feeds statistical process control, you stop sorting defects and start preventing them: a rising rate of one defect type at one station points to a worn tool or a drifting setting. Our look at real-time quality control with IoT in Illinois manufacturing shows how that loop works in practice.
Keep It Accurate Over Time
Lenses get dirty, lights dim, tooling wears and materials change. Build a routine: a daily golden-part check, a monthly review of false rejects and escapes, and a defined process for retraining when the product changes. Running the model close to the camera helps keep response times low, as we explain in edge AI for Illinois factories.
A Metal Stamping Scenario
Consider a stamping shop in the Rockford area making brackets for agricultural equipment. Customers complain about burrs and missing holes, which cost the shop returns and rework. The team defines three defects with size limits, builds a shrouded station with a diffused ring light and a mid-resolution camera, and collects two weeks of images across both shifts. In shadow mode, the system catches the missing holes immediately but struggles with burrs, so the team adds a side light that raises the burr edge. After the change, escapes fall sharply and false rejects settle at a level the quality manager accepts. Only then does the station get wired to the reject chute. The lesson is that the lighting change, not a smarter model, solved the hardest problem. See more local shops on the Rockford Manufacturing IoT page.
Common Challenges
Changing Products
Shops running many part numbers need quick recipe changes. Choose a system that stores setups per part and makes retraining straightforward.
Unclear Standards
If the written standard is vague, the system will reflect the confusion. Update photo standards before training.
Privacy Around Cameras
Point cameras at parts, not people. If a station can see workers' faces, review Illinois biometric privacy requirements first, as outlined in our guide to HIPAA and BIPA considerations.
What's Coming Next
Expect inspection systems that need fewer defect examples to get started, better handling of shiny and transparent parts, and tighter links between inspection results and machine settings so the line adjusts itself. Expect smaller shops to adopt vision as prices fall and setup tools become easier to use.
Explore More
Browse more Manufacturing IoT articles, see the Chicago Manufacturing IoT directory, and read about smart manufacturing in Illinois.
Frequently Asked Questions
What is the most common reason a machine vision project fails?
Poor lighting and unclear defect definitions. If the camera cannot see the defect clearly or the team has not agreed on what counts as a defect, no model can fix that.
How many defect images do I need to train a model?
It depends on the method. Supervised models usually need many examples of each defect type, while anomaly-detection approaches can start with mostly good parts. Collect images across shifts and lots, not just one session.
What is a false reject, and why does it matter?
A false reject is a good part wrongly flagged as bad. It lowers yield and adds rework cost, so it needs to be tracked alongside the escape rate, which counts bad parts that slip through.
Should I replace my human inspectors?
Usually not entirely. Most plants move inspectors from repetitive checking to handling flagged parts, reviewing borderline cases and improving the standard, where human judgment is still more valuable.
Can machine vision work on shiny or dark parts?
Yes, but lighting becomes more important. Diffused, polarized or angled lighting is often needed to avoid glare and bring out defects on reflective or very dark surfaces.
How long does it take to validate a new inspection station?
A simple station can be validated in a few weeks of shadow running. Complex or regulated applications take longer because they need formal qualification and testing across more conditions.
