Machine Vision Lighting and Camera Selection Fundamentals
This article covers the lighting, lens, and camera choices that decide what contrast reaches a machine vision system's software in a plant handling station. UTEC Industrial designs, engineers, machines, fabricates, and installs custom material handling systems for aerospace and heavy industry from its Spokane Valley, WA facility, integrating Allen-Bradley PLC and motion control with in-house CNC machining, heat treating, and stress relief. It works through lighting goals and techniques, wavelength and filters, lens geometry and depth of field, sensor data sheets, line-scan cameras, and camera interfaces, then places the station in the build chain, design → engineering → parts machining → fabrication → assembly → weld fatigue → stress relief → drives → controls → tuning → monitoring, and covers the controls that trigger it.
What must machine vision lighting achieve before a camera is chosen?
Advanced Illumination's lighting guide, a 2013 white paper by a lighting supplier, sets three acceptance criteria for sample-appropriate lighting, to be met consistently:
- Maximize the contrast on the features of interest.
- Minimize the contrast elsewhere.
- Provide for a measure of tolerance to variation (a paraphrase of the paper's third criterion). The paper's example is that lighting meeting only the first two criteria can be effective only if there are no inconsistencies in part size, shape, orientation, placement, or environmental variables such as ambient light.
The paper's working method follows from those criteria. It says there is "quite often no substitute" for testing two or three light types and techniques on the bench and then on the floor where possible. When the vision inspection and the parts handling or presentation are designed from scratch, it says it is advantageous to put the lighting solution in place first and build the rest of the inspection around its requirements. As engineering reasoning, that order matters for a handling system, because the conveyor, nest, or robot that presents the part also fixes where a light can physically go. The Hornberg handbook's chapter on building a machine vision inspection puts its subsection "Concept: Maximize Contrast" under the choice of illumination; the category overview on what machine vision does in material handling summarizes the handbook's lighting chapter and is not repeated here (Martin 2013, Advanced Illumination, Introduction and Summary; Hornberg 2017, Ch. 2, §2.3.6.1).
What are the four cornerstones of vision illumination?
The Advanced Illumination guide names four cornerstones, the variables used to create and control contrast:
- Geometry: the 3-D spatial relationship among sample, light, and camera.
- Structure, or pattern: the shape of the light projected onto the sample.
- Wavelength, or color: how the light is differentially reflected or absorbed by the sample and its immediate background.
- Filters: differentially blocking and passing wavelengths or light directions.
On which to investigate first, the paper says there is no easy answer and that the priority is "usually highly sample and application-specific." It adds that, typically, geometry is more important for specular samples, and wavelength and filtering are more crucial for color and transparency applications. Its geometry example is a co-axial ring light that puts hot-spot glare on a semi-reflective bar code; moving the light off-axis moves the glare out of the camera's view. As engineering reasoning, the same geometry lever applies to a freshly machined steel or aluminum face, a polished casting, or a stamped code on a forging: changing the light's angle can remove a reflection that no software threshold can. The handbook's lighting-techniques section has a subsection on lighting systematics, with headings for the directional properties of the light, the arrangement of the lighting, and the properties of the illuminated field (Martin 2013, Advanced Illumination, The Cornerstones of Vision Illumination; Hornberg 2017, Ch. 3, §3.7.3).
Which lighting technique suits which surface: backlight, diffuse, bright field, or dark field?
The Advanced Illumination guide lists four illumination techniques and describes each one:
- Back lighting creates dark silhouettes against a bright background. The paper names its "most common uses" as presence or absence of holes and gaps, part placement or orientation, and measuring objects.
- Diffuse (full bright field) lighting, which the paper says is most commonly used on shiny specular or mixed-reflectivity samples where even, multi-directional light is needed. Dome lights are effective on curved specular surfaces; on-axis diffuse lights work on flat samples.
- Partial bright field, or directional, lighting, which the paper calls the most commonly used vision technique. It is a good choice for contrast and topographic detail but much less effective on-axis with specular surfaces, where it produces a hot spot.
- Dark field lighting, characterized by a low or medium angle of incidence. On a mirrored surface, much of the light is reflected away from the camera, and the small amount reflected back into it is light that caught the edge of a small feature, such as a scratch.
As engineering reasoning, working distance is a deciding constraint on a handling line. The paper states that diffuse lights, particularly domes, require close proximity to the sample, with the flat diffuse light the exception, which can be placed at any distance with the inverse square rule for intensity fall-off in mind. Dark field typically requires close proximity, particularly for circular light heads, and the paper notes that large objects "present an altogether different challenge for lighting." Its own example of a compromise: analysis may point to dark field while the environment requires the light to be remote from the part, and then a more intense linear bar light in a dark field configuration may create the contrast, perhaps with more image post-processing. As engineering reasoning, that is the situation on a wide board conveyor or a transfer car carrying a large weldment, where a dome cannot sit close to the part. The handbook's lighting-techniques section has subsections on diffuse, directed, telecentric, and structured bright field incident light, one subsection headed diffuse/directed dark field incident light, and several on transmitted lighting (Martin 2013, Advanced Illumination, Illumination Techniques, Issues to Consider and Summary; Hornberg 2017, Ch. 3, §3.7.4).
How do wavelength and filters control contrast and ambient light?
The Advanced Illumination guide says the presence of ambient light can have a tremendous impact on inspection quality and consistency, particularly with a multi-spectral source such as white light, and that "there are 3 active methods" for dealing with it: high-power strobing with short-duration pulses, physical enclosures, and pass filters. Each has a limit the paper names:
- Strobing overwhelms the ambient contribution but has disadvantages in ergonomics, cost, and implementation effort, and not all sources can be strobed; the paper's example is fluorescent.
- Pass filters work with narrow-wavelength sources. The paper's example is a red 660 nm band-pass filter matched to red LED light, which it calls very effective at blocking ambient light from overhead fluorescent or mercury sources on the plant floor.
- Enclosures are the paper's choice when strobing is not possible and a color camera needs white light, because a narrow pass filter would block much of that white light. The paper notes that there are exceptions to this rule of thumb; its example is the 700 nm short-pass filter, an IR blocker, which it says is standard in color cameras.
For sunlight, the paper's advice is to use an opaque housing. It also recommends matching the sensor's peak sensitivity to the light source's peak wavelength, notes that IR light can neutralize color-based contrast and penetrates polymers better than short wavelengths, and says the shallow penetration of blue light helps image shallow surface features. On polarizers, it warns that a pair can reduce the allowable light considerably, up to 2½ f-stops in its jar-top example, which could hurt high-speed, light-starved inspections. As engineering reasoning, a bay door, a skylight, or radiant glow from hot product in a mill is the kind of uncontrolled source these methods address. The handbook's filter section has subsections on daylight suppression, IR suppression, neutral density, and polarization filters, and its lighting-control section ends with the suppression of ambient and extraneous light (Martin 2013, Advanced Illumination, Vision Illumination Sources and Spectral Content, Ambient Light Contribution and Sample–Light Interactions; Hornberg 2017, Ch. 3, §3.6.5 and §3.8.4).
How is the lens chosen from field of view, working distance, and magnification?
Lens selection uses a few defined quantities. Edmund Optics' imaging guide defines them as follows:
- Field of view (FOV): the viewable area of the object, the portion that fills the camera's sensor.
- Working distance (WD): the distance from the front or first surface of the lens to the object.
- Sensor size (H): the size of the sensor's active area, which the guide calls important in determining the lens magnification needed for the desired FOV.
- Primary magnification (PMAG): the ratio of sensor size to FOV, written m = H ÷ FOV.
The handbook's optics chapter has a subsection titled "Focal Length, Lateral Magnification, and the Field of View," and its chapter on building a machine vision inspection has a lens-design subsection that includes focal length and lens diameter and sensor size. An illustrative calculation, with assumed numbers rather than values from any source: a camera with an assumed sensor width of 14.1 mm must see a 600 mm wide band across a conveyor.
- m = H ÷ FOV = 14.1 mm ÷ 600 mm = 0.0235.
Assumptions: one camera covers the full width with no margin, and the lens is used at the working distance that gives this magnification. As engineering reasoning, the working distance that results also has to fit the guarding, the conveyor frame, and the light, so the lens, the mount, and the light are chosen together. Pixel-level resolution across that field, worked from the smallest feature, is covered in the category overview's resolution answer (Hollows and James, Edmund Optics Imaging Resource Guide §1.2; Hornberg 2017, Ch. 4, §4.2.10 and Ch. 2, §2.3.5).
How do f-number and depth of field trade against resolution and light?
Edmund Optics' guide defines depth of field (DOF) as the maximum object depth that can be maintained entirely in acceptable focus, and says DOF "only makes sense if it is defined with an associated resolution and contrast." Its relations are:
- The smaller the detail, the higher the spatial frequency needed, and the smaller the DOF.
- The lower the f-number, the faster the blur cone expands, and the lower the DOF.
- Increasing the f-number always increases DOF, but the minimum resolvable feature size, even at best focus, increases, because the lens's limiting resolution is inversely proportional to f-number (the diffraction limit).
- In general, lenses focused at short working distances have limited DOF, and DOF increases at longer working distances.
The guide distinguishes DOF, which concerns a stationary lens as the object moves, from depth of focus, which concerns a stationary object and the sensor's position and tilt. It also notes that running at f/5.6 gives four times less light than f/2.8, which can be problematic in high-speed or line-scan applications. The next two sentences are engineering reasoning. Stopping down for more DOF therefore has to be paid for with a longer exposure or more light. On a handling station, the depth to hold in focus is the part's real height variation, such as boards of mixed thickness, castings on a pallet, or parts at varying heights in a fixture. The handbook's optics chapter has a subsection on geometrical depth of field and depth of focus, including the hyperfocal distance, and its wave-optics section has a subsection titled "Consequences for the Depth of Field Considerations," with parts on diffraction and the permissible circle of confusion and on the useful effective f-number (Hollows and James, Edmund Optics Imaging Resource Guide §1.2 and §3.4; Hornberg 2017, Ch. 4, §4.2.13 and §4.3.7).
Which sensor figures should a camera data sheet report?
The category overview describes what EMVA 1288 is for; this answer covers the quantities its Release 4.0 Linear document defines:
- Signal-to-noise ratio: SNR = (µy − µy.dark) ÷ σy, the mean gray value above the mean dark value divided by the temporal standard deviation of the digital signal (σy).
- Absolute sensitivity threshold: the mean number of photons required so that the SNR equals 1.
- Dynamic range: DR = µp.sat ÷ µp.min, saturation exposure over the absolute sensitivity threshold.
- Saturation capacity: the standard says it "must not be confused with the full-well capacity," and is normally lower, because the signal is clipped to the maximum digital value before the pixel physically saturates.
The standard leaves it to the publisher to decide whether to publish typical data, data of an individual component, guaranteed data, or guaranteed performance over the component's lifetime, but requires that the nature of the data be clearly indicated. A data sheet is EMVA 1288 compliant only if the results of all mandatory measurements from at least one camera are reported, and the license terms add that a compliant datasheet must also contain the mandatory graphs and the standardized summary datasheet. Table 1 lists the mandatory measurements as sensitivity, temporal noise and linearity, nonuniformity, defect pixel characterization, and dark current; temperature dependence of dark current and spectral measurements are optional. Release 4 Linear can be applied only if the camera can be described by its linear model; if preprocessing breaks its noise assumptions, with debayering, denoising, and edge sharpening given as typical examples, Release 4 Linear cannot be used, and the separate Release 4 General document covers wider classes of cameras. As engineering reasoning, a request for quotation can ask for the EMVA 1288 datasheet, its release, and whether the values are typical or guaranteed (EMVA 1288 Release 4.0-2021, Preface and About this Standard, §1.2, §2.6, §2.7, §5 and Table 1).
When does a line-scan camera fit better than an area camera?
As engineering reasoning, a line-scan camera images one row at a time and builds the picture as the part moves, which fits continuous-flow material such as boards, strip, or web. The lumber scanners article shows these choices inside board scanning and grading systems. EMVA 1288 states that line-scan sensors "are treated as if they were area-scan sensors" for characterization: at least 100 lines are acquired into one image, which is then evaluated as for area-scan cameras, except for the vertical spectrograms. The Hornberg handbook has subsections on resolution for a line-scan camera, the camera model for line-scan cameras, and line-scan processing, and line-scan entries under its legacy parallel digital camera buses and under choosing a camera bus.
The Advanced Illumination guide notes that inspection on high-speed lines may require intense continuous or strobed light to freeze motion.
An illustrative calculation, with assumed numbers: a conveyor moves at 1.0 m/s and the inspection needs 0.5 mm per line along the direction of travel.
- Line rate = speed ÷ pixel length = 1,000 mm/s ÷ 0.5 mm = 2,000 lines per second.
- Maximum exposure per line ≈ 1 ÷ 2,000 s = 0.5 ms.
Assumptions: constant belt speed and no overlap between lines. As engineering reasoning, an exposure that short calls for the intense or strobed light the Advanced Illumination guide describes, and a line rate driven from the conveyor's motion rather than a fixed clock, a point taken up in the controls answer below (EMVA 1288 Release 4.0-2021, §5; Hornberg 2017, Ch. 2, §2.3.3.5, Ch. 8, §8.2.3.4 and §8.3.5, Ch. 9, §9.9.2, and Ch. 10, §10.8.3; Martin 2013, Advanced Illumination, Immediate Inspection Environment).
How do GigE Vision and GenICam affect camera selection?
The Association for Advancing Automation (A3) describes GigE Vision as a global camera interface standard developed using the Gigabit Ethernet communication protocol. Its GigE Vision Technical Committee approved GigE Vision 3.0 on April 17, 2026; version 3.0 uses RoCEv2 (Remote Direct Memory Access over Converged Ethernet) and adds a new streaming protocol that can be used as an alternative to the existing GigE Vision Streaming Protocol (GVSP). A3 states that the GigE Vision specification relies on GenICam to describe the camera's features, through an XML device description file following GenICam's GenApi module, and that only registered compliant products can carry the logo.
The European Machine Vision Association (EMVA) states that the goal of GenICam is a generic programming interface for all kinds of devices, mainly cameras, whatever interface technology they use (GigE Vision, USB3 Vision, CoaXPress, Camera Link HS, Camera Link and others), and that the API "will be identical regardless of interface technology." Its Standard Features Naming Convention (SFNC) standardizes the name, type, meaning, and use of device features, so devices from different vendors use the same names for the same functionality. Both are used here at standard level only. The handbook's camera-interface chapter has subsections on GenICam, GigE Vision device discovery, control and stream protocols, packet loss and resends, and choosing a camera bus. As engineering practice, a specification names the interface and its version, asks for registered compliance, and keeps camera image traffic off the network segment that carries time-critical PLC and drive traffic (GigE Vision 3.0, A3, 2026; GenICam Package Version 2026.07, EMVA, 2026; Hornberg 2017, Ch. 8, §8.2.1.1, §8.2.9 and §8.3).
Where do lighting and camera choices sit in the build chain?
Lighting and cameras are part of the controls, tuning, and monitoring links, and each one depends on earlier links. The mapping below onto the chain is engineering reasoning; the checklist items and handbook headings it cites are the sources' own:
- Design and engineering set the working distance, the field of view, and the space each light needs, which the Advanced Illumination guide's checklist lists as the working volume and the minimum and maximum camera and lighting working distance and FOV.
- Parts machining sets how accurately brackets, lens mounts, and light rails hold position. The handbook's mechanical-interfaces section has a subsection on working distances.
- Fabrication, weld fatigue, and stress relief decide whether the frame carrying the camera stays straight. A frame that moves as residual weld stress relaxes shifts the field of view and the light angle the station was commissioned with.
- Drives create vibration and set part speed. The guide's checklist asks whether there are continuous or shock vibrations, and speed sets the exposure and line rate worked out above.
- Tuning and monitoring follow the light source over its life. The handbook has subsections on light-source lifetime, aging, and drift.
UTEC Industrial stress-relieves welded frames with automated vibratory stress relief and machines their mounting interfaces in house before a camera or light is fitted. Machining tolerances for camera brackets and dowels are covered in Machining Tolerances: What to Specify (Martin 2013, Advanced Illumination, Sequence of Lighting Analysis; Hornberg 2017, Ch. 3, §3.3.5 and Ch. 10, §10.5.2).
What controls and sensing does a lighting and camera station need?
As engineering practice, the camera exposure and the light pulse are started by the same event. The components are:
- Triggering. As engineering practice, a part-present sensor, an encoder, or a PLC output starts the exposure. The handbook's camera chapter, in its section on one maker's camera line, has subsections on acquisition and trigger modes, latency and jitter aspects, and action commands. As engineering reasoning, an encoder-driven line rate keeps the along-travel pixel size constant when the conveyor speed changes.
- Strobe synchronization. The Advanced Illumination checklist asks, for a strobed light, the expected pulse rate, on-time, and duty cycle, and lists safety related to strobing or intense lighting among its ergonomics questions. The handbook's lighting-control section has a subsection on temporal control (static, pulse, and flash) and one on considerations for the use of flash light.
- Laser line lights. IEC 60825-1:2014 is applicable to the safety of laser products emitting laser radiation in the wavelength range 180 nm to 1 mm; the laser-triangulation answer in the 2D vs. 3D vision article covers how a sensor's laser class is stated.
- PLC logic. Logix 5000 controller tasks can be configured as continuous, periodic, or event, and the controller manual's event-task trigger table lists the triggers; the category overview covers the produced/consumed-tag handshake that keeps a result from being used twice.
- Health monitoring. As engineering practice, trending image brightness or a reference-patch gray value flags light aging before rejects rise.
UTEC Industrial, a Rockwell Automation Recognized System Integrator, programs the Allen-Bradley ControlLogix and CompactLogix controllers and EtherNet/IP networks that sequence these stations (Hornberg 2017, Ch. 6, §6.4.4 and Ch. 3, §3.8.2.3–§3.8.2.4; Martin 2013, Advanced Illumination, Sequence of Lighting Analysis; IEC 60825-1:2014; Rockwell Automation 1756-RM094N-EN-P-2025, Ch. 5 pp. 39 and 43).
What should a lighting and camera specification define?
The Advanced Illumination guide's "Sequence of Lighting Analysis" gives a checklist that the paper says "is by no means comprehensive." Its headings, with the paper's own items, are:
- Immediate inspection physical environment: access for camera, lens, and lighting in the working volume; whether the sample is stationary, moving, or indexed, with speeds, feeds, and cycle time; strobing parameters; vibration; consistency of orientation and position; and potential ambient light.
- Sample–light interactions: reflectivity (diffuse, specular, or mixed), geometry, texture, topography, composition and color, transparency, and light contamination from overhead lighting or other stations.
- The features of interest.
- The four cornerstones: geometry, light pattern, color differences, and filters.
- Lighting techniques and types, including camera and sensor quantum efficiency and spectral range.
As engineering practice, a specification for a handling application adds three items from earlier answers: the depth of field needed over the real height variation of the parts, the EMVA 1288 data and its nature (typical or guaranteed), and the camera interface standard and version. The category overview's specification answer covers the system-level items. UTEC Industrial performs factory acceptance testing and on-site commissioning; as engineering practice, lighting performance on the full range of production parts can be written into the acceptance criteria and demonstrated at the factory acceptance test (Martin 2013, Advanced Illumination, Sequence of Lighting Analysis; EMVA 1288 Release 4.0-2021, About this Standard; GigE Vision 3.0, A3, 2026).
- 2D vs. 3D Vision: Structured Light, Laser Triangulation, Stereo, and ToF — the 2D and 3D methods lighting is chosen for
- Machine Vision in Material Handling: What It Does and How It Works — the imaging chain and resolution sizing this article builds on
- Rule-Based vs. Deep-Learning Inspection: When AI Wins — the inspection software that depends on the contrast lighting creates
- Vision-Guided Robotics and Hand-Eye Calibration Explained — camera mounting and calibration once lens and working distance are fixed
- Machining Tolerances: What to Specify and What They Cost — tolerances for the camera brackets and light mounts that hold the geometry
References
- Martin, D. A Practical Guide to Machine Vision Lighting. Advanced Illumination, 2013.
- Hornberg, A. (Ed.). Handbook of Machine and Computer Vision: The Guide for Developers and Users, 2nd ed. Wiley-VCH, 2017. ISBN 9783527413393
- Hollows, G., and N. James. Imaging Fundamentals (Imaging Resource Guide, Section 1.2). Edmund Optics (undated web documentation, accessed September 2026).
- Hollows, G., and N. James. Depth of Field and Depth of Focus (Imaging Resource Guide, Section 3.4). Edmund Optics (undated web documentation, accessed September 2026).
- EMVA 1288 Release 4.0-2021: Standard for Characterization of Image Sensors and Cameras (Release 4.0 Linear). European Machine Vision Association, 2021.
- GigE Vision 3.0: GigE Vision Standard. Association for Advancing Automation, 2026.
- GenICam Package Version 2026.07: GenICam (Generic Interface for Cameras) standard. European Machine Vision Association, 2026.
- IEC 60825-1:2014: Safety of laser products — Part 1: Equipment classification and requirements. International Electrotechnical Commission, 2014.
- Rockwell Automation 1756-RM094N-EN-P-2025: Logix 5000 Controllers Design Considerations. Rockwell Automation, 2025.
Ready to Discuss a Material Handling System?
UTEC Industrial designs, engineers, machines, fabricates, and installs custom material handling systems for heavy industry, from the stress-relieved structure and drives to the Allen-Bradley PLC controls, tuning, and monitoring that run them, at its Spokane Valley, WA facility. Send UTEC the application, loads, and duty cycle to start a system review.
Questions? Call (509) 922-1832 or email sales@utec.co