System designGuide

Scoping a machine vision system before you call an integrator

Scope a machine vision system before calling an integrator: define defects, calculate optics and resolution, and agree on sourcing responsibilities.

LumaSpec Vision10 min read Share on LinkedIn

On this page 9 sections
  1. 01Write the specification before the shopping list
  2. 02Field of view and working distance come first
    1. Worked example
  3. 03From defect size to camera resolution
  4. 04Lighting is where projects are won
  5. 05Sizing the processing: sensor, smart camera or controller
  6. 06What to source yourself and what to hand over
  7. 07Checks before you order
  8. 08When the usual answer is wrong
  9. 09Questions

A machine vision project can fail at the scope stage before programming begins. Camera, lens and lighting choices depend on three things: the part, the smallest defect you must catch, and where the camera can physically sit. This guide is for engineers and buyers who are about to request quotes or order components. Work through the numbers here and you will be better prepared to source parts yourself or hand an integrator a specification that makes quotes comparable and reduces disputes about scope.

Write the specification before the shopping list

Start with one page that states the physical facts, not the solution:

  • The part: dimensions, material, surface finish (matte, shiny, reflective), and how it arrives (conveyor, fixture, robot gripper).
  • The defect or feature list, each with the smallest size in millimetres that must cause a reject.
  • The required accuracy: detection only, or measurement with a tolerance in millimetres.
  • Line speed or cycle time: parts per second, and whether the part moves during exposure.
  • The mechanical envelope: maximum working distance, mounting angle, space for lights.
  • The interfaces: PLC protocol, robot, MES, and the pass/fail signal the line expects.

If you cannot fill in the smallest defect size, stop and measure real parts first. Every downstream resolution calculation divides by that value. Vague scopes produce quotes that differ wildly, because each integrator assumes a different difficulty. A clear scope also tells you whether the project is a one-camera check you can own or a multi-camera cell that needs a vision controller and professional programming. For a view of how the work splits between your team and an outside firm, this article on integrator work scope and split-team models is a useful reference when you define contracts and responsibilities.

Field of view and working distance come first

The field of view is the part size plus margin for positioning tolerance. If the part is 40 mm wide and its centre can shift 10 mm either side of nominal, the minimum field of view is 60 mm: 40 + (2 × 10) = 60 mm. Allow additional clearance where needed and verify the result with real parts.

FOV = part size + 2 × positioning margin m = sensor width / FOV f ≈ WD × m / (1 + m)

Here m is magnification, WD is working distance and f is the estimated focal length. The focal length expression is a thin-lens estimate; actual coverage depends on lens construction and how working distance is referenced. Use the calculator below for an initial selection, then verify coverage at the intended mounting position.

How sensor width, working distance and field of view set the focal length Rays from the edges of the sensor pass through the lens and spread to the edges of the field of view. The ratio of sensor width to field of view is the magnification m.CameraField of view (FOV)Working distance (WD)≈ fsensor width slensm = s / FOVf = WD × m / (1 + m)
How sensor width, working distance and field of view set the focal length. Rays from the edges of the sensor pass through the lens and spread to the edges of the field of view. The ratio of sensor width to field of view is the magnification m.
Lens focal length, field of view and working distance
Units
Solve for
Focal length
– mm
Field of view
– mm
Working distance
– mm
Magnification
– x
Angle of view
– °
Pixel on the part
– mm

Thin-lens model: m = sensor width / field of view, f = WD × m / (1 + m). Accurate to a few percent above about 150 mm; check the lens's minimum object distance.

Find lenses with this focal length Open the full calculator

Worked example

You inspect a 40 mm aluminium fitting for a missing O-ring groove. The groove is 1.2 mm wide. The camera must sit 200 mm away because a gripper passes underneath.

  1. Field of view: a 40 mm part plus 10 mm positioning margin on each side gives 60 mm.
  2. Assume an active sensor width of 5.1 mm, confirmed from the candidate camera's data sheet. Then m = 5.1 / 60 = 0.085.
  3. f ≈ 200 × 0.085 / 1.085 = about 16 mm.

A nominal 16 mm lens is therefore a starting candidate, not a guarantee of coverage. If the calculation lands between standard focal lengths, the shorter one generally provides a wider field of view but fewer pixels across the defect. Moving the camera back also widens coverage. When perspective and magnification changes threaten your measurement error budget, the telecentric lens for gauging article explains when a different optical approach is needed.

From defect size to camera resolution

Resolution starts with a division. Take the field of view, divide by the smallest defect, and multiply by the pixels you want on that defect. This estimates sampling requirements; it does not prove that the defect will be detectable.

pixels needed = (FOV / smallest defect) × pixels per defect

Continue the example: 60 mm field of view, 1.2 mm smallest feature, and 4 pixels per feature gives (60 / 1.2) × 4 = 200 pixels across the inspected direction. Many industrial cameras exceed that sampling requirement, but contrast, focus and lighting still need validation.

The opposite case is common too: a 0.05 mm scratch in a 60 mm field at 4 pixels per defect needs 4,800 pixels across that direction. Check the actual horizontal or vertical pixel count rather than selecting by total megapixels alone. The camera resolution calculator below runs this arithmetic for your inspection dimensions.

Camera resolution for the smallest feature
Units
Pixels needed
–
Sensor size
– MP
Smallest sensor that fits
–
Pixel on the part
– mm
Pixels across the feature, that sensor
–

Pixels needed = field / feature × pixels per feature on each axis (field incl. margin). The lens must resolve the pixels too: Nyquist = 1000 / (2 × pixel µm) lp/mm.

Find cameras with enough pixels Open the full calculator

When the numbers point to a compact one-task inspection, a vision sensor keeps the project small.

Smart cameras & vision sensorsHikrobot MV-SC3050XC-16M-ATN-H 5 MP color vision sensorMV-SC3050XC-16M-ATN-H
Interface
Fast Ethernet
Resolution
5 MP
Sensor format
1/1.45"
Shutter
Global
$1,809.00View part

A smart camera with an M12 lens mount is another candidate for a stable, single-view check.

Smart cameras & vision sensorsHikrobot MV-SC5060XM-08M-WBN SC5000X series Smart Camera, 6 MP, Mono, 8 mm focal length, M12-mountMV-SC5060XM-08M-WBN
Interface
GigE
Resolution
6-10 MP
Sensor format
1/2.4"
Shutter
Rolling
$1,629.00View part

Compare the catalog specifications before selecting the inspection hardware.

Specification MV-SC3050XC-16M-ATN-H MV-SC5060XM-08M-WBN LS-SMC-0063
Solution capacity Supports importing and exporting project, up to 32 projects can be stored – Supports project import/export with a maximum storage capacity of 32 projects.
Communication protocol RS-232, TCP, UDP, FTP, PROFINET, Modbus, EtherNet/IP, MELSEC/SLMP, FINS, Keyence KV TCP, UDP, Modbus, Serial Port, PROFINET, EtherNet/IP, Fins, MC, FTP, etc. –
Sensor type CMOS, global shutter CMOS, rolling shutter –
Pixel size 3.45 μm × 3.45 μm 2 μm × 2 μm –
Sensor size 1/1.45" 1/2.4" –
Resolution 2432 × 2048 3200 × 1920 1440x1080
Max. frame rate 40 fps 15 fps 60 fps
Gain 0 dB ~ 15 dB 0 dB to 34 dB –
Exposure time 6 μs ~ 1 sec 72 μs to 150 ms –
Pixel format RGB 8, Mono 8 Mono 8 –
Mono/color Color Mono –
Data interface Fast Ethernet (100 Mbit/s) Gigabit Ethernet (1000 Mbit/s) GigE
Price $1,809.00 $1,629.00 $1,110.00

Values as printed in each product's data sheet; open a part for its drawing and full specifications.

As a selection rule, start with monochrome sensors for defect detection and measurement, and choose colour when colour itself carries the information. Prefer a global shutter when the part moves. A rolling shutter can suit stationary parts, but motion during sensor readout can distort the image. Our industrial camera specifications buyer's guide goes deeper on reading data sheets, and the smart cameras category page filters by resolution, shutter and mount.

Lighting is where projects are won

A defect is visible only if the lighting makes it differ from the good part. Before choosing hardware, classify your task:

  • Geometry and presence: test bright-field illumination; low-angle illumination can help when edges or raised features matter.
  • Scratches and embossed marks on flat surfaces: test dark field, with light grazing across the surface.
  • Print, labels, contrast marks: test diffuse bright field to reduce glare.
  • Shiny, curved parts: test a dome or another diffuse source, with polarising filters where appropriate.

Budget as much engineering time for lighting as for the camera choice. Choosing a light after the mechanical design is fixed can leave no room for the angle the defect actually needs. If your inspection is glossy or reflective, read the glass bottle defect detection article: the fix-lighting-first method there applies to other specular parts, and the fabric defect detection guide covers continuous web inspection. Browse the machine vision lighting finder by shape and wavelength once you know the geometry you need.

Sizing the processing: sensor, smart camera or controller

Processing hardware follows from the number of cameras and the algorithm, not the other way round.

  • One simple check with deterministic tools: a vision sensor or smart camera, no separate processing computer required.
  • Multiple cameras, custom logic, PLC communications and logging: consider a vision controller.
  • AI classification or segmentation: check supported tools, deployment format and measured inference time. Some smart cameras can handle these tasks; other applications need a controller, with training planned separately.

For a multi-camera cell, port count and light channels are practical differentiators.

Vision controllersHikrobot MV-VC3301H-128G66 I3-8100, 8GB+128G SSD, No PoE, PCIe expansion supported, Incl. VM6200Pro licenseMV-VC3301H-128G66
LAN ports
5+ LAN ports
USB 3 ports
3-4 USB 3 ports
Light outputs
4 built-in channels
Memory
8 GB
$2,419.00View partBuild a system with it

For more demanding processing, compare controller resources against measured application requirements rather than assuming that a larger controller will meet the cycle time.

Vision controllersHikrobot MV-VC5525-256G70-NN VC5000 Vision Controller, 12th-I5, 32GB+256G SSD, Supported PCIEMV-VC5525-256G70-NN
LAN ports
5+ LAN ports
USB 3 ports
3-4 USB 3 ports
PoE
PoE camera ports
Light outputs
8 built-in channels
$4,479.00 · quotedView and quoteBuild a system with it

If your application leans on trained models, plan the deployment format early. The ONNX anomaly detection article shows how detection maps become pass/fail decisions in practice, and the open source machine vision software guide explains what you take on when you build on non-commercial tools. Use the vision system configurator to plan the component selection.

What to source yourself and what to hand over

You can own these decisions with the arithmetic above: field of view, focal length, resolution, shutter type, lighting geometry, and the camera or controller family. Order samples, set the parts on a bench, and confirm the defect is visible with the light you chose. A bench test with a C-mount camera, a lens and a lamp can answer questions that component specifications alone cannot resolve.

An integrator should own the agreed integration deliverables: cycle-time guarantees, mechanical mounting and guarding, the PLC or robot handshake, and acceptance criteria written as measurable pass/fail performance. Machine safety responsibilities and validation must be explicitly assigned to qualified parties. When you request quotes, attach your one-page specification and ask each bidder to state assumed defect contrast and assumed part positioning. Missing assumptions need clarification before you compare proposals. Before any integration meeting, our article on vision system diagnostics to PLC is worth reading, because the alarm and status mapping you agree on early helps keep the cell serviceable later.

Checks before you order

Run through this list with your specification in hand:

  1. Field of view includes the worst-case part position, verified with a physical mock-up or at least the stroke dimensions of the conveyor or fixture.
  2. Resolution calculation uses the smallest defect, not the average one. Treat 3-5 pixels per defect and 20-50 percent additional resolution as starting estimates, then validate with representative samples.
  3. Working distance fits the mechanical envelope with room to focus and to fit the light.
  4. Lighting geometry is proven on sample parts, good and bad, on a bench before anything is mounted.
  5. Exposure is short enough to limit motion blur. For less than one pixel of travel, exposure must be shorter than object-space pixel size divided by speed. At 100 mm/s and 0.05 mm/pixel, that is under 0.5 ms.
  6. Interface agreed: protocol, handshake, and what happens on a timeout, documented before delivery.
  7. Spare capacity: consider one unused camera port on the controller and mechanical space for one more light where expansion is likely.

When the usual answer is wrong

Three scope patterns should change your plan:

  • The defect has no visual signature. Hidden internal cracks, some coating-thickness requirements or torque errors may need a different sensing method. More image pixels cannot reveal a hidden property; define the observable measurement and consult a specialist before buying cameras.
  • The part position is uncontrolled by more than the field of view. Fix the part or add a wider field of view and more resolution; do not plan on software finding a part that can sit outside the image.
  • The line runs faster than the inspection allows. Check acquisition, exposure, transfer and processing separately. Pixel count × frame rate gives pixel throughput; multiply by transmitted bytes per pixel to estimate image payload rate. Continuous web inspection may suit line scan, but changing camera type does not automatically remove processing limits. The line scan line rate calculator below helps estimate the required acquisition rate.
Line-scan camera line rate
Units
Pixel on the part
– mm
Line rate needed
– kHz
Longest exposure
– µs
Data rate
– MB/s
Lines per metre
–
Encoder setting
–

Square pixels: line rate = speed / pixel on the part; the exposure must end within one line period. Encoder: lines per pulse = (π × roller diameter / pulses per revolution) / pixel on the part.

Find line scan cameras Open the full calculator

Finally, resist scoping by camera megapixels. A well-lit image with adequate sampling is more useful than a higher-resolution image that hides the defect in glare or blur. The lighting, lens and mechanics you specify today determine whether the inspection can meet its acceptance criteria.

Bring your specification and representative good and bad samples to our applications support team before finalising the component list.

Questions

What information does a vision integrator need for a quote?

At minimum: part dimensions and material, defect types and the smallest one that must be caught, line speed or cycle time, required detection performance, mounting space and working distance, lighting conditions on site, and the interface to the PLC or robot. These details support an initial proposal. Representative samples and a site assessment may still be needed before performance commitments are agreed.

How many pixels do I need per defect?

As an initial sampling estimate, allow 3-5 pixels across the smallest feature, then validate with actual defects. Measurement requirements may demand substantially more. Divide the field of view by the smallest defect size and multiply by the chosen sampling target. A 50 mm field with a 0.5 mm defect at 4 pixels per defect needs 400 pixels across that direction; lighting and optics must still make the defect distinguishable.

Can I build the vision system myself instead of hiring an integrator?

Yes, for single-camera checks with a clear pass/fail rule: presence, orientation, barcode verification or simple gauging. Suitable smart cameras run those inspections on the device. Consider an integrator for multiple cameras, robot guidance, tight cycle times or difficult defect definitions. A middle path is common: you buy and own the components, while the integrator writes the application and accepts an agreed performance target.

Should I choose a smart camera or a camera plus controller?

A smart camera suits a self-contained inspection when its tools, processing time and communications meet the requirements. A camera-plus-controller setup can suit multiple cameras, custom algorithms or shared logging. AI alone does not determine the choice: check supported models and benchmark the actual inspection. Select the architecture from measured cycle time, camera count and integration requirements.

How much margin should I leave in the resolution calculation?

An additional 20-50 percent above the calculated pixel requirement is a useful planning allowance, not a performance guarantee. Production defects may have lower contrast, softer edges or more positional variation than your initial samples. Validate the allowance with representative parts before fixing the mechanics, because changing coverage or sampling later may require different optics or mounting.