Imagine an independent print studio using a camera to check whether the correct batch label is on a glossy carton. The system works through a demonstration set, then starts flagging good cartons on the packing table. The operator tilts one of them and the label becomes readable. When it goes flat again, a white reflection covers the last two characters. Before paying for more training images, look at the frame the model was asked to read.
Lighting can change both what the camera sees and what the inspection means. A reflection may cover a character you want to recover. On another job, a reflection may be the easiest way to reveal a crease. The practical question is what the camera needs to see. Once you can describe that detail, you can test whether changing the light is a better first move than changing the model.
Follow the reflection
A glossy surface can return a concentrated reflection of the light source towards the lens. On the carton, that reflection can compete with the pattern made by ink and paper. Move the light or change its angle and the bright patch may move away from the label. That simple comparison often tells you more about the failure than another run of the same image through the model.
In their 1997 paper on separating reflection components, Shree K. Nayar, Xi-Sheng Fang and Terrance Boult describe how bright reflections can interfere with several computer vision tasks. Their method combines colour and polarisation information to separate components of reflected light. That is evidence that reflections can change the information available to vision algorithms. It does not establish how any particular modern model will perform on a glossy print run.
Try crossed filters when you control the lighting
A linear polarising filter preferentially passes light along one orientation. In a crossed arrangement, one filter sits in front of the light source and another in front of the lens, with their transmission axes at right angles. If the bright reflection largely retains the orientation set by the first filter, the lens filter can suppress much of it. Some light scattered from the surface can still reach the camera. The Edmund Optics guide to polarisation illustrates reductions in glare with polarising filters, including a setup with a filter over the illuminator and another over the lens.
This is an option for a controlled setup, not a promise that every shiny object will behave the same way. Try moving the lamp, shading the station from a window, or changing the size of the light source before committing to additional optics. If the carton only fails when the window is reflected in it, filtering the studio lamp will not control the light from the window. A system that works on one finish may need to be checked again when the packaging supplier changes the coating.
Filters can also reduce the light available to make the image. Check the actual exposure you need to read the label. If you compensate by leaving the shutter open for longer, see whether moving cartons start to blur. A still test on a bench is useful for diagnosing the reflection; it does not show what will happen at production speed.
Compare what each image lets you decide
Start with the same carton and keep its distance and position consistent. Photograph it under the current lighting, after moving the light, and with crossed filters if you have them. Record the exposure settings so you can interpret the comparison. If the camera adjusts exposure automatically, note where it changed and confirm that a brighter picture did not simply trade one missing detail for another.
- Include cartons that pass and cartons that should fail. A wrong label, a faint final digit and a correctly printed label beneath a bright highlight give the inspection different problems to solve.
- Vary one feature at a time. Use a few angles and finishes that reflect the real packing line. Check whether the troublesome highlight stays away from the label across those cases.
- Score the result on the task. Record whether the label was readable, whether the model made the right decision and whether it rejected a usable frame. A pleasing photograph is only useful if it preserves the evidence the inspection needs.
Suppose staff also want to find wrinkles in the clear wrap. The plain image may show a crease as a bright line, while the filtered image makes the printed label easier to read. Two views under different lighting may solve that problem better than a compromise that obscures both signals. If you can only afford one view, decide which inspection you need it to support and how the other defect will be checked.
Our article on why a depth camera can round a sharp corner deals with a different optical mechanism, but it suggests the same order of work: inspect the measurement before blaming the decision made from it. If you can make the missing characters reappear by changing the light, you have evidence about where to invest next. If they are consistently legible in the images and the system still gets them wrong, the model or the reading rules are a more useful place to investigate.
Sources
- Nayar, Fang and Boult: Separation of Reflection Components Using Color and Polarization, International Journal of Computer Vision (1997).
- Edmund Optics: Introduction to Polarization (technical guide).
One thought on “Computer Vision: Test the Glare Before You Retrain the Model”