6 min read · Machine vision

A line that changes product model often, for example pouches of different sizes or different labels, must change what the camera inspects too: the inspection position, the lighting values, and the pass and fail criteria. If this is forgotten or only partly changed, the camera inspects with the previous model's recipe, which may let defects through or reject good product.
The examples in this article are hypothetical. All figures are made up to explain the reasoning. They are not results from a real factory or a customer project.
One model, one recipe
An inspection recipe is the full set of settings the camera system uses for one product model, such as the inspected region, lighting values, reference image and decision criteria. Storing these as clearly named recipes lets you change model by selecting a recipe, instead of adjusting values one by one by hand every time.
- Name the recipe by product code (SKU) and version, for example product code v3
- Keep every value that affects the decision in the same recipe, and do not leave some values on another settings screen
- Keep an image of the standard sample for that model together with the recipe. See the concept in Golden Sample
- Record the date, the person and the reason every time a recipe is changed
- Keep old versions and do not overwrite them, so you can roll back and audit
Who can edit a recipe
A recipe that anyone can edit on the floor screen is a risk, because a small edit can change the criteria without anyone knowing. Separate the permissions clearly.
| Task | Done by | What must accompany it |
|---|---|---|
| Select a recipe when changing model | Line operator | Select from a list, with no values to edit |
| Edit values in a recipe (thresholds, lighting, region) | Engineer or quality supervisor who has been assigned | Personal user ID, a recorded reason, and a new version issued |
| Approve a new recipe version before use | Quality supervisor | Test with sample parts, and sign or record the approval in the system |
| Review the edit history | Quality supervisor or auditor | Check the log for who changed what and when |
The idea of change control applies to camera recipes just as it does to changes in any other system: know what changed, who approved it and when.
First-piece check after a model change
After a recipe change, do not let the line run at full speed straight away. Check the first piece first, to make sure the camera has selected the right recipe and decides correctly.
- Select the recipe for the new model, and have a second person confirm the name and version on the screen.
- Feed a good sample part of the new model. The system must judge it as pass.
- Feed a sample part with a known defect. The system must judge it as fail, and the rejecter must operate.
- If the results do not match, stop the line and check the recipe and lighting. Do not start production until it passes.
- Record the first-piece result, the time and the inspector's name.
- Start normal production, and keep spot-checking through the initial period as agreed.
The first-piece check after a model change in the wider picture, beyond the camera, is covered in the article on Changeover and First Good Part.
Record which lot used which recipe
When a customer reports a problem, the first question is which recipe inspected that lot. Without a record, it cannot be answered. The system should always record the recipe name and version against the lot number, as part of lot traceability. See the article on Lot Traceability.
- Record the lot number, recipe name, version, and the start and end time of each lot
- Record when a recipe is changed in the middle of a lot, and the reason
- Review the records periodically, for example monthly, to see which lots have no recipe record
Another thing to watch alongside this is that an AI model used in the recipe may degrade when the product or raw material changes. See the article on AI Model Drift.
Hypothetical example: monthly recipe history review
Suppose a plant packs pouches of 3 models on one line, and ran 20 lots last month. The quality supervisor opens the records and finds that 19 lots have a complete recipe name and version, and 1 lot has no recipe record. That is 19 ÷ 20 = 95% of lots with complete records. The missing lot must be investigated to see whether the operator selected the wrong recipe or only forgot to record it, and the procedure should be fixed so the system forces a recording before a lot starts.
As for the 20th lot, if the investigation finds that the wrong model's recipe was really used, the person responsible for quality must assess whether the product that passed the camera during that period needs re-inspection. All of these figures are hypothetical examples.
Limitations and cautions
Having recipes and a first-piece check reduces the chance that the camera inspects the wrong model, but it does not remove all errors. A person can still select the wrong recipe, and the camera can still misjudge. Spot checks by people and periodic reviews are needed. The figures in this article, such as 3 models, 20 lots, 19 lots and 95%, are hypothetical examples to explain the reasoning. They are not results from a real factory or a BT San project. Quality systems and record-keeping requirements differ by factory and industry, so consult your auditor or the person responsible for quality.
Starting references
- Wikipedia — Change control
- Wikipedia — Configuration management
- Wikipedia — Traceability




