Resolution in machine vision is a question of pixels on the part, not megapixels on a data sheet. Enter the field of view, the smallest feature you must see, how many pixels should land on it and a margin for part position. The calculator returns the pixel count on each axis and the smallest common sensor that delivers it, draws how the field fills that sensor, and checks thirteen common machine-vision sensors against your numbers.
How the resolution calculation works
Calculate both axes. A sensor has a fixed shape, so a long, narrow field can need more megapixels than its area suggests, and a square part wastes the sides of a wide sensor.
Reading the sensor table
Each row is a common sensor, from 0.4 MP to 24.5 MP, described by its pixel count and pixel size. "Pixel on the part" is the field divided by the pixels on the limiting axis, with the sensor turned 90° when that fits better. "Pixels across the feature" is what that sensor really delivers on your smallest feature; "Enough?" compares it with the number you asked for. The first row that says yes is the smallest sensor that works, and its "Cameras" link opens the camera finder at that resolution and above.
How many pixels per feature
The number of pixels across the smallest feature depends on the task, the contrast and how the feature is lit:
| Task | Pixels across the smallest feature | Why |
|---|---|---|
| Presence or absence | 2 | Enough to register a dark or bright spot against its background |
| Defect detection | 3-4 | Separates a real defect from noise, texture and edge blur |
| Character reading (OCR) | 3-5 per stroke width, characters 20-30 pixels high | Strokes must stay unbroken |
| 2D code reading | 2-4 per module (cell) | The decoder must resolve every module |
| Gauging and measurement | About 10, or a pixel near 1/10 of the tolerance band | Repeatable edge positions |
Sub-pixel edge tools locate a sharp, well-lit edge to a fraction of a pixel, typically 1/4 to 1/10. They help measurement, but only after a repeatability study on real parts confirms it, and never as a reason to start with fewer pixels.
Worked example: 0.2 mm defects on a 100 × 75 mm field
- Pixels across: 100 / 0.2 × 3 = 1500.
- Pixels down: 75 / 0.2 × 3 = 1125.
- Total: 1500 × 1125 = 1.69 million pixels.
- The smallest common sensor that covers both axes is 1920 × 1200 (2.3 MP). A 1440 × 1080 sensor (1.6 MP) has nearly the right total but too few pixels across.
Now add a position margin. If parts can arrive up to 7.5 mm off-centre sideways and 5.5 mm along the conveyor, the field grows to 115 × 86 mm. That needs 1725 × 1290 pixels, which no longer fits 1920 × 1200 in height, so a 2048 × 1536 (3.1 MP) sensor becomes the right choice. The margin changed the camera, which is why it belongs in the calculation from the start.
Common sensor resolutions and the field each covers
At 0.2 mm and 3 pixels per feature, each pixel covers 0.067 mm, so the largest field each sensor can cover is:
| Sensor | Pixels | Largest field at 0.067 mm per pixel |
|---|---|---|
| 0.4 MP | 720 × 540 | 48 × 36 mm |
| 1.6 MP | 1440 × 1080 | 96 × 72 mm |
| 2.3 MP | 1920 × 1200 | 128 × 80 mm |
| 3.1 MP | 2048 × 1536 | 137 × 102 mm |
| 5 MP | 2448 × 2048 | 163 × 137 mm |
| 8.8 MP | 4096 × 2160 | 273 × 144 mm |
| 12 MP | 4096 × 3000 | 273 × 200 mm |
| 20 MP | 5472 × 3648 | 365 × 243 mm |
| 25 MP | 5120 × 5120 | 341 × 341 mm |
For another feature size, scale the field in proportion: at 0.1 mm the fields halve, at 0.4 mm they double.
The lens has to resolve the pixels too
A sensor can only record detail the lens delivers. The finest pattern a sensor can sample is one line pair per two pixels, its Nyquist limit:
Pixels of 3.45 µm give 145 lp/mm, pixels of 2.2 µm give 227 lp/mm. A lens rated well below that number blurs the detail across several pixels, and the extra resolution of the camera is wasted. Small-pixel sensors of 12 MP and above need lenses designed for them; check the lens's rated resolution or megapixel class against the sensor.
Frame rate, data and the interface
Pixel count also sets the data rate. A 5 MP, 8-bit image is 5 MB; at 20 frames per second that is 100 MB/s, close to the limit of a single GigE link (about 115 MB/s usable). Faster lines or more pixels need USB3, 5 or 10 GigE, or CoaXPress. Exposure also gets harder with small pixels: they collect less light, so the lighting has to be brighter for the same exposure time.
Next steps
Browse area scan cameras in the camera finder by resolution, or let the configurator match a lens to the camera you pick. For long or moving parts, the line scan line rate calculator does the same job for line scan cameras. The screw thread inspection guide works through a full resolution decision on a real part.
Questions
How many pixels should cover the smallest defect?
At least 2 pixels to see that something is there, 3 to 4 to detect a defect reliably against normal surface variation, and about 10 when you measure its size. Low-contrast defects on textured surfaces need the higher end of each range, and a well-lit, high-contrast feature can work at the lower end.
Is a higher resolution camera always better?
No. More pixels mean smaller pixels or a bigger sensor, a lens that resolves more line pairs per millimetre, more data per image and often a lower frame rate. Choose the smallest sensor that meets the pixel count with margin, then check that the lens and the interface keep up.
How do I calculate the pixel size on the part?
Divide the field of view by the number of pixels on the same axis. A 100 mm field imaged on 1920 pixels gives about 0.052 mm per pixel. This object pixel size, not the megapixel count, tells you what the camera can see and measure.
What if no sensor is large enough?
Split the field between two or more cameras with a small overlap, move the part under one camera in steps, or use a line scan camera, which builds an image of any length line by line while the part moves. Line scan suits webs, sheets and long or cylindrical parts.