The model can't fix a bad image
When a vision system misses defects or miscounts parts, people usually reach for a bigger model. Often the real problem is upstream: motion blur from a long exposure, a shallow focus that only covers half the part, or a frame rate the network cable can't carry. Getting the camera right is the cheapest accuracy you'll ever buy.
Aperture: light against depth
The aperture is the iris inside the lens. Opening it (a small f-number, like f/2.8) lets in more light but gives a shallow depth of field. Closing it (f/8, f/16) keeps more of the scene sharp but lets in less light: each full stop halves it. Close it too far and diffraction starts to blur fine detail anyway.
In the figure, each aperture step shows the trade in the readout: depth of field in millimetres, the fraction of light, and the size of the diffraction blur in pixels.
Exposure and motion
Exposure time is how long the sensor collects light. Longer means a brighter image but more motion blur: a part moving at 0.5 m/s travels 1 mm during a 2 ms exposure, which can be several pixels. On fast lines, the answer is usually short exposures and more light, not a longer exposure.
Global versus rolling shutter
Industrial cameras usually use a global shutter: every pixel starts and stops exposing at the same moment, so moving objects aren't skewed. Phone cameras often use a rolling shutter, exposing row by row, which bends fast-moving things. In the figure, the whole die charges at once and only then reads out row by row.
For measurement and inspection on moving lines, global shutter is almost always worth it.
The network cable sets the frame rate
A 5 MP frame at 8 bits is about 40 megabits. Gigabit Ethernet carries a bit under 1,000 megabits per second, so the camera can send roughly 23 frames per second, whatever the sensor could do on its own. USB3 or 10GigE raises that ceiling; a smaller region of interest or a lower bit depth does too.
This is one of the first numbers I check when designing a system, because it decides camera choice, cabling, and how many cameras one computer can take.
What I set before training anything
- Working distance and lens, so the part fills the frame at the resolution the task needs.
- Lighting, so exposure can be short and consistent across shifts.
- Aperture, so the whole part is in focus without diffraction blur.
- Trigger timing, so every part is captured in the same spot.
- Interface and bandwidth, so the frame rate holds with every camera running.