How the camera sees edge scum on a cosmetic carton
To see edge scum on a cosmetic carton, the edge must be in focus. If it is soft, you will call a normal edge dirty. If you cannot see it, change the light or the resolution first. Do not loosen the threshold first.
To see edge scum on a cosmetic carton, the edge must be in focus. If it is soft, you will call a normal edge dirty. If you cannot see it, change the light or the resolution first. Do not loosen the threshold first.

Fix the optics first
The dirt is only a ring around the image edge. The middle of the blank is clean. If the picture cannot separate it, loosening the threshold only paints the brand colour red. The edge must be in focus. If it is soft, you will call a normal edge dirty.
Optics
| Need | Enough | Not enough |
|---|---|---|
| The edge must be in focus. If it is soft, you will call a normal edge dirty. | The dirt is only a ring around the image edge. The middle of the blank is clean. | Only a blurred circle left |
| About 3 pixels across | It stays | It comes and goes, and you still write that it can be caught |
| the brand colour in the field of view | The critical place is seen | Only the decorative edge is lit |
Try it on a sample
- Confirm the picture can separate it: The dirt is only a ring around the image edge. The middle of the blank is clean.
- Count about how many pixels it covers.
- If you cannot see it, change the light or the focus. Do not change the threshold.