Blog

2026.10.14

AI Color Difference Inspection for Thai Factories: A Practical Guide

AI Color Difference Inspection for Thai Factories: A Practical Guide

When a manufacturer plans to introduce AI for color difference or color mottle inspection, the first decision is the quality rule, not the model. Which surface of which product is unacceptable, under which viewing and measurement conditions? A camera classifier and a calibrated color measurement system solve different problems. Without controlled lighting, cameras and references, a result achieved on a lab bench may not hold on a Thai production line. This guide turns the requirement into a sample plan, an RFP, factory acceptance testing (FAT), site acceptance testing (SAT) and daily control.

Separate the types of color defect before selecting technology

“Wrong color” can describe at least three things. The whole product may differ from a reference color. One region may contain a streak, patch or gradient. Or a change in gloss, metallic reflection, transparent backing or texture may make the surface appear different even when a simple color reading does not capture the complaint. These cases have different causes, inspection units and measurement methods. A single “color defect rate” cannot tell a supplier what to detect.

A resin part with a yellowish batch shift is primarily a reference comparison problem. A pale streak in a printed label is a location and area problem. A painted corner that looks different may reflect coating color, curvature or specular reflection. Record part number, color code, inspected face, excluded edge or marking, and the person who owns the decision. Do not pool images from unlike products and acquisition conditions and then present one average accuracy as evidence of line readiness.

The purpose matters as well. In-line sorting of every unit, early warning of process change, and final shipment release against a customer limit sample require different throughput and records. A process alarm may seek an early signal; a shipment decision must show which approved rule stopped a specific item. Even if the same AI sees the images, its alarm and reject gate should be specified separately.

ΔE is useful, but a number alone is not an acceptance rule

CIELAB L*, a* and b* coordinates and color difference metrics help make color comparisons numerical. CIE publishes recommendations covering standard observers, illuminants, viewing and illumination geometry, and color difference calculations. ISO/CIE 11664-6:2022 defines CIEDE2000, a formula intended to better correspond to perceived color differences. A purchase specification that merely says “ΔE” leaves open the formula, illumination, observer, instrument condition and measured location. Those conditions must be agreed before numbers are compared. Follow the applicable customer specification first and use CIE 015:2018 and ISO/CIE 11664-6:2022 as technical references.

There is no universal pass threshold for every product. The acceptable difference depends on customer requirements, color region, affected area, adjacent components, gloss, texture and viewing conditions. A thin, visible streak may be unacceptable even when the average color difference is small. An average shift may be acceptable under a particular approved application. This guide intentionally gives no generic ΔE limit. Quality assurance should approve good-limit and bad-limit physical samples and document product-specific rules.

Do not equate the RGB values of an ordinary camera with readings from a colorimeter or spectrophotometer. Camera RGB depends on the sensor, filters, lens, illumination, exposure and image pipeline. The International Color Consortium explains how device profiles relate device values to a standard color space. Raw RGB distance therefore cannot simply replace a customer ΔE tolerance. If an image system is intended to measure color, test its relationship to a reference instrument on real parts; document calibration, uncertainty and the range of materials for which the result is valid.

Assign separate jobs to AI classification and calibrated measurement

If the requirement is “how far is this defined location from the approved color?”, first consider a calibrated measurement method. If location, shape and coverage of cloudy mottling or irregular patches matter, image processing or AI classification may help. A combined system can apply a measured color difference rule to selected regions and an image segmentation rule to local mottle. These outputs should remain distinct. An AI confidence score is not a ΔE measurement.

AI can classify complex spatial patterns when acquisition conditions and labels are stable. If every training image is labelled only “OK” or “NG,” a model may learn the date, shift or light setting instead of the quality criterion. Quality staff should examine the physical part and distinguish color shift, mottle, dirt, reflection and uncertain cases. For numerical disputes, retain the measured value and reference version. For spatial disputes, retain the marked image region. This makes it possible to distinguish a model error from an unstable ground truth.

Boundary units are especially likely to produce disagreement between quality, production and customer teams. Have different reviewers assess the same physical samples. Do not force disputed samples into a supposedly definitive training set. Define a hold route, a remeasurement owner and a customer escalation rule. In production, a low-confidence item needs a physical holding path and a record; it must not silently become an accepted unit. AI operates an agreed standard under controlled input. It does not create the standard.

AI Color Difference Inspection for Thai Factories: A Practical Guide - figure 1

Treat lighting, camera and color target as one controlled acquisition system

Brightness alone is insufficient for color inspection. A change in the light source’s spectral characteristics changes the camera response to the same part. Ambient light can alter the image across shifts or when neighboring equipment is switched on. Automatic white balance, automatic exposure and image enhancement may remove the very shift the system should detect. Record source type, distance, angle, diffuser, enclosure, exposure, gain, white balance, lens, aperture and processing. Define which settings are locked in production and the tolerated range of variation.

For a comparison of illumination geometries, see our AI visual inspection lighting guide. The present task is to control the source as part of color measurement. “White light” does not mean that different sources share the same spectral distribution. Glossy parts require control of viewing angle; matte parts need uniform illumination; transparent parts also require a controlled background. Imaging to measure color and imaging to reveal a scratch have different aims and may need separate optical paths or recipes.

A color target or physical reference is not permanently correct merely because it is present. Specify its position, orientation, replacement and inspection for dirt or fading, storage conditions and periodic check against a reference instrument. Link the customer-approved reference version to copies used on the floor. If camera correction is used, store the target ID, date, acquisition recipe and correction version with image records. Good performance on a few target patches does not establish accurate measurement across every material and color of the inspected product.

When selecting an industrial camera, examine sensitivity, noise, linearity, nonuniformity and built-in processing as well as pixel count. EMVA 1288 is a standard for measuring and presenting machine vision sensor and camera characteristics. Its datasheet values do not, by themselves, guarantee color inspection performance on a particular product. Compare complete camera, lens, light and workpiece configurations. A system that performs well on a flat target still needs tests on curved coatings or reflective metal. Write repeatability on real parts into the specification, not just a camera model number.

Work backward from line speed to capture and rejection

Capturing a stationary sample is different from inspecting every moving product. Put maximum line speed, pitch, part movement, trigger location, available exposure, transfer time, color correction, inference, decision, PLC output and mechanical rejection on one timing diagram. Nominal camera frame rate alone does not prove whole-line coverage. A larger field of view reduces spatial detail per pixel and can average out small mottle. Shorter exposure may increase noise unless light and optics are redesigned.

The RFP should require full-face capture at maximum speed, linkage between image ID and workpiece ID, and records for “hold” and failed rejection. For several faces, show each camera or rotation stage and its trigger timing. Do not rely only on a claim that the model tolerates arbitrary tilt. Define allowed pose by fixture and conveyor design. Removing physical variation can be more effective than endlessly adding training images.

At the Thai site, test day and night ambient light, door opening, post-cleaning camera position, air blow, local temperature and humidity, and replacement LEDs. These are site acceptance questions, not phenomena unique to Thailand. Thailand’s Board of Investment encourages industrial upgrades, but an incentive does not establish the economics or quality performance of an individual inspection project. Real-part tests under the intended operating conditions should drive the decision.

AI Color Difference Inspection for Thai Factories: A Practical Guide - figure 2

Bind product and color changeovers to inspection recipes

On a mixed-model line, an image can be captured correctly yet judged against the wrong color standard. Treat part number, color code, customer specification, limit-sample version, measurement condition, light and camera settings, AI model, included and excluded faces, and reject destination as one recipe. If a production order or barcode selects the part, confirm it against the physical label or fixture. Hold unknown or mismatched parts instead of silently passing them. For manual selection, log the operator and time and require a reference-sample check immediately after changeover.

When similar colors run consecutively, check that no previous parts remain on the conveyor. If the camera and reject gate are apart, a decision at the changeover boundary could be applied to the next product. Store the recipe ID with every workpiece ID in PLC and image logs, and trace several units on each side of the changeover during FAT and SAT. A correct production schedule does not prove that the physical workpiece matches it; the system needs a safe hold response to disagreement.

Do not copy the previous color’s thresholds and masks unchanged when adding a variant. Use approved limit and actual samples to check measurement positions, numerical color rules and mottle regions, then release a new recipe version. Include product-specific image and target check frequency if it differs. Recipe control may not appear in a model accuracy score, but it prevents the system from accurately executing the wrong quality standard.

Build a sample plan for both color difference and mottle

Collecting many good images and a few bad images is not a complete plan. Inventory samples by part number, color, material lot, coating or ink lot, equipment, shift, date, speed, before and after cleaning, good limit, bad limit and actual defect type. Do not treat many rotated photos of one part as independent units in both training and evaluation. Hold out dates or lots for final evaluation and include variation expected in production.

Check whether different reviewers can reproduce an allegedly obvious visual decision under the agreed viewing condition. Mark instrument measurement positions where needed. For mottle, retain location, extent and local contrast, not only the mean color. Version the mask that excludes edges, gates, logos and molding marks. Deliberately collect limit and uncertain samples, because these are the units most likely to cause operational disputes.

Keep raw images distinct from processed images. Aggressive color normalization may erase the shift being inspected. A raw file can still be altered by automatic camera settings. Connect settings, target checks, reference measurements, labels, reviewers and later adjudication to one sample ID. These records support error analysis and help locate the data that must be reevaluated when a customer limit sample changes.

In a PoC, inspect the boundary and repeatability, not only accuracy

A proof of concept should report false rejection of good parts, escape of defective parts and the hold rate by part and defect type. Separate near-limit color shifts, small mottle and samples whose appearance changes with reflection. Escapes affect customer quality; false rejects and holds affect yield and inspection labor. Quality assurance must decide the relative priorities and allowable levels before suppliers tune the system.

For repeatability, capture the same physical part repeatedly, remove and refit it, and capture it after cleaning, on another shift and after light replacement. Even if the pass/fail label stays the same, a measurement or score drifting toward the boundary has little margin. Keep distributions and failures, and distinguish measurement variation from product variation. When comparing an image measurement with a reference instrument, examine bias near the decision boundary, not correlation alone. Strong overall correlation can coexist with a problematic boundary bias.

Compare AI models with the same training and evaluation split, acquisition setup, ground truth and decision rule. Supplier demonstrations made on different days and samples are not comparable. Repeatedly tuning a threshold on the final evaluation set undermines independence. Use separate data to set a threshold and to test it; save versions. Passing a PoC supports the decision to proceed to FAT and SAT. It does not guarantee production performance.

Specify the color standard and responsibility boundaries in the RFP

Start the RFP with products, inspected faces, colors, line speed and site. Attach approved limit samples and specify the color measurement method, formula, viewing condition, measurement point and rules for mottle position and area. Assign an owner and due date to undecided points. Divide responsibility for color calculations, AI training, fixtures and enclosure, lighting, PLC and gate integration, and human adjudication.

Request an acquisition settings sheet, optical layout, target and reference management procedure, sample inventory, explanation of training and test separation, results by product and defect, boundary-sample results, hold flow, PLC signal map, image and measurement log schema, model and standard version control, FAT and SAT plans, maintenance and recalibration procedure. Include loss of network, stop and restart behavior. Name products and colors outside scope; do not silently include future variants in an unconditional promise.

Compare the total scope, not only camera and AI license prices. Include enclosure, lighting replacement, reference targets and instruments, fixtures, PLC changes, data retention, retraining and revalidation after limit changes. Ask a supplier who says “AI needs no calibration” or “one threshold fits all colors” to demonstrate that claim on the actual materials and conditions. An acceptance specification lets purchasing compare proposals on the same basis.

Add an evidence column to the proposal comparison, not merely a checkbox for each claimed capability. A color measurement claim should identify the colors, materials and points to be compared with a reference instrument. A mottle detection claim should name the limit samples used to test confusion with acceptable patterns. A rejection claim should specify a maximum-speed test matching image IDs to the actual rejected parts. This makes the award decision depend on demonstrable site performance.

FAT verifies the assembled system; SAT verifies site variation

During FAT, test the contracted cameras, lights, optics, fixtures, computer, PLC signals and reject or hold routes together. Use good-limit, bad-limit, actual-defect and reflection-sensitive samples, and report results by part and defect. Check image-to-part traceability, version records after setting changes, and the response when a target check falls outside its limit. A camera-only demonstration is not a complete FAT.

During SAT, check maximum and changing speeds, shift change, ambient light, vibration, climate, cleaning, restart and product changeover under agreed conditions. Match actual rejected or held parts against PLC and image logs. A correct image decision is insufficient if the gate removes the next part. Test the fail-safe response to an invalid reference condition, transfer to manual inspection and checks before restart.

Agree the FAT and SAT acceptance criteria in advance according to each product’s quality requirement, line rate, reinspection capacity and customer agreement. Moving the boundary after seeing the results defeats the comparison. Keep sample composition and count, raw images, measurement values, decision logs, failures, corrective actions and retests with the acceptance record. The item being accepted is an operable inspection system, not just model accuracy.

AI Color Difference Inspection for Thai Factories: A Practical Guide - figure 3

Monitor references, light, model and quality standards separately in production

If decisions begin to drift, do not immediately retrain the AI. First check the physical reference and target, light output and replacement, exposure and white balance, dirty optics, fixture position, part number and material lot. Retraining around a changed acquisition condition can hide the root cause. If the acquisition system is healthy, investigate process or material change, a revised customer limit and the model’s applicable range. All may appear as “drift,” but each has a different owner and remedy.

A dashboard should show counts by part and color, color difference and AI score distributions, hold rate, false rejects, escapes, target check results, and acquisition and standard versions. Watch the population near the boundary, not only the mean. Define what happens to shipment decisions if a target check fails. Reinspection can be limited to the affected window only when image ID, part ID, timestamp and equipment condition are linked.

Our guide to AI visual inspection model drift addresses the general image-model problem. Color inspection additionally depends on measurement conditions and the approved standard version. When a model changes, replay representative past images and limit samples, and document differences from the previous version. A customer standard change also requires updates to measurement rules, labels, work instructions and reinspection policy.

Create a one-page decision specification before ordering

In many factories, the physical reference is on a shelf, equipment requirements are in purchasing files and the actual rule is in an experienced inspector’s head. If these do not share a version, even a capable machine becomes disputed during acceptance. Make a one-page entry point. Put part, color, inspected and excluded faces, reference ID and customer approval date on the left. Put measurement positions, formula, conditions, limits and spatial mottle rules in the middle. Put hold, remeasurement, record and rejection owners on the right. Detailed files can be linked; the page identifies their current approved versions.

Include natural good-part variation such as resin lots, coating direction or the whiteness of a print substrate. Supply confusing but acceptable samples as well as real defects. Otherwise a vendor may stop every part near a defect pattern, producing excessive false rejects. Relaxing a threshold later without agreement may allow escapes. Quality cost and customer requirements should determine the trade-off before tuning.

State who can change the rule. A floor adjustment to light or exposure can make current color values or AI scores incomparable with older records. Define who may change settings, which samples must be rerun, and how the new recipe is released. A revised customer limit sample calls for reviewing past holds, measurement references and model evaluation data, not merely relabelling new images. A version history explains why a part passed last month and fails this month.

Set the post-installation operating team early

Assign the start-of-shift reference check, target replacement, inspection of dim images and dirty windows, remeasurement of holds, and monthly review of errors. Across shifts, staff should use the same checklist and decision rule. Define when to stop the line and how to find the lot interval since the last confirmed good check.

Daily checks must go beyond “the camera shows an image.” Run an approved reference sample in its specified orientation and verify the measured or reference image region, AI decision, PLC output and physical destination together. When a check fails, record which value departed from the reference and investigate it; do not simply loosen the threshold on the floor. A remeasured held part must still link to its original image and part identity.

A maintenance contract should describe the different treatment of light failure, camera replacement, faded target, added part, material change and customer standard change. Revisions to the quality limit need quality approval; an AI engineer alone cannot authorize them. Specify logs and images needed for diagnosis, what can be shared with the supplier, confidentiality and restoration expectations. Clear boundaries reduce investigation time when a production decision changes.

Frequently asked questions about AI color inspection

Can AI alone perform a color difference test?

AI can help classify local mottle and complex patterns. A customer requirement expressed as a ΔE tolerance needs a defined measurement condition, calibration and comparison with a reference. AI confidence is not ΔE. Separate numerical and image classification requirements and combine methods when appropriate.

What ΔE tolerance should a factory set?

There is no universal number. Agree it by product, color, surface, viewing condition, customer rule and adjacent component. Define formula, illuminant, observer, location, instrument and reference version. A PoC may begin while some criteria are being resolved, but acceptance requires a written pass/fail rule.

Does putting a color chart in view turn RGB into ΔE?

No. The target supports calibration; camera spectral response, light, lens, correction method and the workpiece material still matter. Compare on actual parts against a reference instrument, especially for glossy surfaces or unusual pigments. Manage target dirt and fading as well.

What comes first on a fast line?

Check maximum-speed exposure, spatial resolution, light, image transfer and inference time, PLC signal and reject position as one timing chain. Accuracy on still images cannot prove whole-line inspection. Test speed changes and part-to-image matching during SAT.

How should the project be priced?

No universal price covers different faces, colors, speeds, site constraints, reference equipment and PLC work. Compare equal scopes for optics, enclosure, fixtures, calibration, labelling, integration, FAT, SAT, maintenance and revalidation. If the rule is not settled, commission a limited physical-sample assessment and specification stage first.

Conclusion

AI color inspection connects quality rules, colorimetry, image classification and line control. Define the defect and limit samples first. Assign numerical ΔE and spatial AI decisions to appropriate methods. Control light, camera and reference together, then use boundary parts in the PoC, FAT and SAT. Keep versions and acquisition records after go-live so that a changed decision can be explained and affected products traced.

If you are considering color difference or mottle inspection in a Thai factory, contact TOMAS TECH once you have the workpiece, limit samples and current line speed. We can help define the measurement and AI roles and the acceptance conditions for an RFP.

Sources