Most vision projects fail on lighting and selection, not algorithms. Getting the five building blocks in the right order, detection task, then lighting and imaging, then camera and processing, decides the outcome before a single line of code is written.
The five blocks are lighting (LED ring, backlight, coaxial, bar light), optics (fixed focal FA, telecentric, zoom), camera (area scan CMOS as the default, line scan for continuous webs), processing (industrial PC with frame grabber, or an all in one smart camera) and interfaces (IO, Ethernet, robot comms). The order is fixed: define the task first, whether dimension, defect, presence or code reading; settle lighting and imaging next, which decides seventy percent of success; size camera and lens last from field of view, accuracy and cycle time. Algorithms come last. Reversing the order wastes everything upstream.
Do the arithmetic before quoting. Resolution: minimum detectable feature must span 3 to 5 pixels. Detecting a 0.3 mm defect needs 0.06 to 0.1 mm per pixel, so a 200 mm field fits inside a 5 MP sensor at 2448 by 2048. Frame rate: cycle time times 1.5 margin, so 2 parts per second is comfortable at 30 fps. For continuous webs compute the line rate as web speed divided by line height; area scan cameras photograph static frames and continuous motion needs line scan. Telecentric lenses hold magnification error under 0.1 percent and belong on every dimensional task.
Field consensus says lighting is half the project. Coaxial or dome light for shiny metal, backlight silhouette for contours, low angle ring for scratches, direct red light for character recognition since CMOS favours red. Solve ambient light with an enclosure, ten times more reliable than fighting it in software. Then handle the plant realities: IP67 in oil mist, air purge on lenses, and rigid mounting because vibration blurs images. Vision is optics, mechanics, electronics and software at once; missing one block on site doubles the cost of recovery.
| Task | Lighting scheme | Camera and optics |
|---|---|---|
| Dimensional measurement | Backlight silhouette | Area camera plus telecentric lens |
| Surface defects | Low angle ring or dome | Area camera plus FA lens |
| Presence and assembly check | Bar or ring light | Smart camera suffices |
| Code reading | Direct red light | Code reader or low rate camera |
| Shiny metal parts | Coaxial or dome plus polariser | Polarisation as needed |
| Continuous web inspection | Backlight or coaxial | Line scan with matched line rate |
Use this table for first pass vision proposals and quotation reviews. Match lighting and camera class to the task, compute resolution and frame rate from field of view and cycle time, then check mounting space and environmental protection. Always prove the lighting on samples before freezing the design; skipping that trial is the top cause of rework.
The quantities and component characteristics discussed here follow current national standards and the corresponding IEC documents: General practice aligned with GB/T 5226.1 and IEC 60204-1 for equipment safety and wiring. Always check the device datasheet and the product design file for ratings and derating.
Locate the issue with the approach above, then confirm with measurements; safety-related circuits must follow the standards and manufacturer requirements.