Phone: 0 (552) 380 25 25  |  Weekdays 10:00–18:00 · Technical support 24/7

🇹🇷 TR

Digital Bridge Blog

Artificial Intelligence

Computer Vision Quality Inspection: How to Build a System That Catches Defects on the Line

Computer vision quality inspection catches scratches, cracks, missing parts and label errors at line speed. Camera, lighting, model and pilot steps.

9 min read  · Digital Bridge Engineering Team
Computer Vision Quality Inspection: How to Build a System That Catches Defects on the Line

Computer vision quality inspection is a system that images every product on the line and uses AI or rule-based software to check it instantly for scratches, cracks, colour deviation, missing parts and label errors. Defective items are rejected and logged with their image. Success depends on the right camera, lighting and a pilot measured on your own products.

The limit of manual inspection is the end of the shift

In many plants, final inspection still depends on an operator's eyes. Operators start the shift alert, but as the hours pass, the line speeds up and the product mix changes, that level of attention cannot be sustained. Two operators may judge the same defect differently. Defective parts get shipped, and the problem surfaces at the customer's goods-in inspection or as a complaint.

The second weakness of manual inspection is the record. The operator removes the bad part but rarely logs why, how many were removed at what time, or which machine they came from. Without data, root-cause analysis becomes guesswork.

That is why AI is finding a place on the shop floor. According to TurkStat's AI Statistics 2025, 41.1% of Turkish enterprises using AI apply it to production or service processes. Adoption varies sharply by size, though: the same release shows AI in use at 6.6% of enterprises with 10-49 employees but 24.1% of those with 250 or more. Because its results are easy to measure, visual inspection is one of the most common first projects when starting with AI in business.

What an escaped defect costs

The cost of a quality failure multiplies depending on where it is found. A part caught on the line is scrap or rework. A batch caught in the warehouse means sorting and re-inspection labour. A defect found by the customer means returns, penalties, an 8D report and lost trust; in automotive supply, it hits your supplier rating directly.

In sectors such as food, a visual error can become a public-health issue: a wrong label, a missing allergen warning or foreign matter. Sorting and grading produce from the field is covered in AI in agriculture.

The EU's Rapid Alert System for Food and Feed (RASFF) received 5,250 notifications about non-compliances posing public-health risks in 2024, up 12% on 2023. (European Commission Alert and Cooperation Network 2024 Annual Report)

For Turkish manufacturers exporting to Europe, such notifications can mean rejected consignments and additional checks.

AI projects do not create value by themselves either. In BCG's AI Adoption in 2024 study of executives in 59 countries, 74% of companies had yet to show tangible value from AI. In computer vision the most common reason is a model that works well in the lab but breaks down when it meets real line conditions: changing light, dust, vibration and product variety. The framework below exists to reduce that risk.

What a vision inspection system is made of

It is not just software; it is a chain in which hardware and process work together:

  • Camera and lens: defect size, product speed and field of view determine resolution, exposure time and lens choice. Motion blur on fast-moving products is the most common mistake.
  • Lighting: half of machine vision is light. A scratch on shiny metal only becomes visible with backlighting or low-angle light, and because ambient light changes through the day, controlled lighting is essential.
  • Triggering: a sensor fires the camera when the product arrives, so every item is imaged in the same position.
  • Processing unit: the model usually runs on an industrial PC next to the line. When decisions are needed within milliseconds, images are not sent to the cloud.
  • Decision software: rule-based measurement, deep-learning classification or anomaly detection, and in most projects a mix of them.
  • Reject mechanism: an air jet, a pusher or a signal that stops the line. A decision needs a physical consequence.
  • Logging and integration: each decision, with its image, is written to the quality system, MES or traceability record.

Which method suits which defect?

MethodHow it worksBest suited toWatch out for
Rule-based machine visionRules such as edges, dimensions, colour thresholdsDimensional checks, presence/absence, barcode and label readingRules break when the product or lighting changes
Deep-learning classificationModel trained on labelled good and bad examplesScratches, stains, cracks and other variable-looking defectsNeeds enough examples of each defect type
Anomaly detectionTrained only on good parts; flags "deviation from normal"Lines where defects are rare and hard to define in advanceDoes not name the defect type; the false-alarm threshold needs care

We cover the anomaly approach in more detail in our anomaly detection guide. If off-the-shelf models do not recognise your defect types, you need a defect-specific model trained on your own labelled images; our custom AI model training guide walks through the process from data preparation to deployment.

Step by step: from pilot to production

  1. Build a defect catalogue. Agree with the quality team which defects to look for and where the accept/reject limit sits for each. Do not start training until limit samples (the worst acceptable part) have been photographed.
  2. Pick one station. Start where defects cost the most or where manual inspection struggles most. Covering the whole line at once makes the pilot hard to measure.
  3. Set up the imaging. Test camera, lens and lighting under real line conditions. At this stage, image quality is signed off before any model is trained.
  4. Collect and label data. Gather images across different shifts, batches and raw-material conditions. Labelling is done by a quality specialist; the model learns their judgement.
  5. Measure two errors separately. A missed defect (calling a bad part good) and a false reject (scrapping a good part) carry different costs. The threshold is set according to which is more expensive for you.
  6. Run in shadow mode. For a period, the system logs decisions without rejecting anything, and you compare them with the operator's calls. Once trust is established, the reject mechanism is switched on.
  7. Connect to the quality system. A reject should open a non-conformance record, with defect type and image tied to the batch. That way SPC and Cp/Cpk analysis and 8D problem solving run on real data.
  8. Keep the model alive. New products, raw materials or moulds affect the model. Wrong decisions are collected and fed back through regular retraining.

The success of a vision project depends on which examples the model is trained on and how consistently they are labelled. We cover that preparation in data labelling for AI, and its use on a textile inspection machine in AI fabric defect detection.

How we do this at Digital Bridge

In our computer vision service, the same team builds the software and installs the hardware on site. That matters for quality inspection, because most problems arise in the gap between the model and the lighting, camera and mechanics.

  • Survey and feasibility: we assess your line on site and build the defect catalogue with your quality team. The technical feasibility study for hardware is free of charge, followed by a written proposal covering scope, phases and cost.
  • Starting with existing cameras: if your RTSP/ONVIF-capable IP cameras are suitable, we work with them; where line speed and defect size demand it, we install industrial cameras, lighting and processing units. For managing your wider camera estate, see our IP camera monitoring page.
  • Custom models: if your defect types cannot be caught by a generic model, we train a custom AI model on your own images.
  • Integration with quality software: we connect vision decisions to a quality management system, so when the camera detects a defect, a non-conformance record opens without operator intervention. Control plans, SPC, quarantine, 8D and calibration records stay linked in one system.
  • Linking to production data: to see each defect by machine, shift and raw-material batch, we deploy it alongside our MES production management and production traceability solutions.

Quality expectations differ between automotive supply, food, plastics, metalworking and packaging; our sector pages, such as automotive suppliers, address those differences separately. Manufacturing examples beyond quality are gathered in AI in manufacturing: examples.

Do not look at vision only for quality

The same camera and processing infrastructure can serve other needs on the line: counting missing items in a carton, verifying labels and barcodes, checking pallets at dispatch. Across the site, the same technology is used to check hard-hat and hi-vis use in production areas, which we cover in our article on AI PPE detection for workplace safety. Considering these uses at the planning stage helps you choose camera positions and processing capacity correctly.

The same technology works beyond the factory too: licence plate recognition reads vehicles at the gate, and drone NDVI analysis maps crop stress across a field.

Applied to people instead of products in retail, the same detection logic becomes footfall counting; we cover it in our guide to a retail people counting system. In agriculture the same counting approach is applied to trees and plants in drone imagery; see drone crop yield estimation for an example.

To turn defects caught on the line into nonconformance records and corrective actions, see our quality management system software guide.

Next step

To get started, pick a line and review the last three months of quality data: which defect escapes to customers most often, and which generates the most scrap? Prepare 20–30 photos of that defect and a few limit samples. Then contact us: we will assess your line on site, test imaging conditions and agree the scope of a measurable pilot with you. To judge the return on the investment, see our guide to measuring AI project ROI; for other use cases, browse our complete Artificial Intelligence guide.

Let us look at your case

Tell us about your process; after a needs analysis we send a written proposal with scope, phases and cost.

Request a Quote +90 552 380 25 25
Questions we hear most often

Frequently Asked Questions

How many defect samples does computer vision quality inspection need?

It depends on the method. Deep-learning classification needs enough examples of each defect type, captured under different conditions. On lines where defects are rare, anomaly detection trained only on good parts is preferred. The pilot determines which method fits the samples you have.

Are our existing IP cameras good enough for quality inspection?

For tasks such as post-packing counts or label checks, existing RTSP/ONVIF cameras are often sufficient. Small surface defects and fast lines usually need industrial cameras, the right lens and controlled lighting. An imaging test on the line settles the question.

Will false alarms stop production?

No. The decision threshold is tuned to balance missed defects against false rejects, and the system first runs in shadow mode, logging decisions without rejecting parts. Once rejection is enabled, flagged items can be diverted for a second check rather than stopping the line. False rejects are collected and fed back into retraining.

Can a vision inspection system talk to our MES or ERP?

Yes. Each reject can be written with defect type, image, time and batch to the quality management system, MES or traceability record, and a non-conformance record can open automatically when the camera finds a defect. The defect data then feeds SPC, 8D and root-cause analysis, not just sorting.

What does a computer vision quality inspection system cost?

Cost is driven by the number of inspection stations, the cameras and lighting that line speed and defect size require, whether existing cameras can be reused, the reject mechanism, any custom model training and integration with your MES or quality system. Digital Bridge carries out the hardware feasibility study free of charge, then provides a written proposal covering scope, phases and cost.

Does the model need retraining when the product changes?

It may, when a new product, mould or raw material changes the appearance. Because the system collects its wrong decisions, the update is done by retraining the existing model with new examples, not by starting from scratch. When a product change is planned, sample images of the new product are collected and validated in shadow mode before go-live.

Have a different question? Ask Us

Talk to an Engineer

Tell us what you need to solve. We'll come back with a written proposal.