Why Camera Choice Sets the Ceiling on Inline Defect Accuracy
In my experience, quality teams argue about inspection software for six weeks and then pick the camera in an afternoon. That order is backwards. The sensor decides what the model is allowed to see, and no amount of training data rescues an image where the defect was never captured in the first place.
The Ceiling Nobody Calculates
Start with arithmetic before opinions. If the smallest defect you must catch is 0.2 mm wide, and you want at least three pixels across it to survive compression and blur, you need roughly 0.07 mm per pixel at the part surface. Across a 300 mm field of view that means about 4,500 pixels on the horizontal axis. A 5 MP sensor gives you around 2,500. The gap is your accuracy ceiling, and it exists before a single line of code runs.
I have watched teams spend four months tuning a model against that ceiling. Accuracy crept from 82% to 87% and stalled, because the remaining misses were physically invisible in the source image.
Sensor Class Comes Before Model Class
Area scan, line scan and thermal sensors fail in completely different ways, so shortlisting hardware by megapixel count alone tends to produce an expensive mistake. Reading a breakdown of what each machine vision camera class does on a real production line is worth an hour before anyone requests a quote, because the failure mode you care about usually maps to one class and rules out the other two.
Board level cameras suit tight enclosures. Time of flight sensors handle height and volume checks that a 2D image cannot resolve. A thermal unit finds a seal problem that looks perfect under white light.
Where Area Scan Runs Out
Area scan works beautifully when the part stops, or nearly stops, in front of the lens. Give it a conveyor running at 60 metres per minute and you need exposure in the low hundreds of microseconds, which forces the aperture open, which collapses your depth of field to a few millimetres. Parts that wobble on the belt drift straight out of focus.
The Vibration Problem Everyone Underestimates
Mounting matters more than most specification sheets suggest. A camera bolted to the same frame as a pneumatic actuator inherits every cycle of that actuator. The images look acceptable in a static test at the vendor bench and degrade the moment the line runs at rate.
Isolate the mount, or accept that a percentage of your frames will be unusable and size the inspection window accordingly.
Lighting Is Part of the Camera Decision
Sensor and illumination are one decision made twice. Dome lighting kills specular glare on curved metal. Dark field lighting makes surface scratches jump out and hides everything else. Backlighting turns a dimensional check into a simple silhouette measurement and removes the texture problem completely.
Budget for the light at the same time as the camera, at roughly 20% to 40% of the sensor cost for industrial grade units.
What Good Optics Gives You Downstream
Once the optics are stable, the software layer stops fighting the image and starts doing useful work. A properly framed, evenly lit, consistently focused frame is what makes an AI defect detection deployment converge in weeks rather than quarters, because the model sees the same scene every cycle and can spend its capacity on the defect instead of on lighting variance.
This is also where false positive rates fall. Inconsistent images generate phantom defects, operators start overriding the system, and trust disappears within a fortnight.
A Practical Order of Operations
Measure the smallest defect. Calculate pixels per millimetre. Fix the field of view and working distance to the mechanical constraints of the line. Choose the sensor class that matches the motion profile. Pick the lighting geometry that makes your defect type visible. Only then compare brands and prices.
Teams that follow that sequence usually spend less on hardware overall, because they stop buying resolution to compensate for a lighting problem.
Get the physics right and the software becomes a tuning exercise. Get it wrong and you are paying data scientists to guess at pixels that were never there.