Feature size
Define the smallest defect, edge or code width you must detect or measure reliably.
Knowledge · Fundamentals
The smallest feature you must see, the available space and the lens together decide whether your sensor has ‘enough pixels’, not the megapixel claim alone.
Decision
Resolution only matters once you know how many pixels you want across the smallest critical feature width, and whether lighting and motion keep those pixels usable.
Define the smallest defect, edge or code width you must detect or measure reliably.
Rule of thumb: several pixels across that width, more for gauging, fewer for coarse presence. Always validate.
FOV must cover the part (plus margin) at the available WD. Lens + sensor size close that triangle.
Approach
Keep depth of field, lens distortion and mount angle in the same conversation, otherwise the geometry works on paper but not on the line.
Measure the real mount position and clearance, not the ideal catalogue WD.
Pick a sensor size and focal length that deliver FOV at that WD, with room for focus and depth.
Compute pixels/mm or pixels across the feature; check whether gauging or detection needs that density.
Samples under line conditions: motion blur, glare and depth of field can make ‘enough pixels’ useless.
Limits
No universal megapixel table. No substitute for lens calculation or feasibility testing on real parts.
Sub-pixel gauging needs different margins than presence/absence.
Sometimes another lens or a second camera beats a more expensive sensor.
Thicker parts or tilt need DOF awareness, resolution alone will not fix it.
Send feature size, FOV sketch and available WD, we check whether the stack holds.