Cameras & sensorsExplainer

Sensor active area from pixel size for camera calibration

How to compute a sensor's active area from pixel size for camera calibration: pitch times active pixels, a worked 20 MP example, and focal length in pixels.

LumaSpec Vision11 min read Share on LinkedIn

On this page 10 sections
  1. 01What sensor size does a camera calibration actually need?
  2. 02Why isn't a 1 inch sensor actually 1 inch?
  3. 03How do you compute the active area from pixel pitch and resolution?
  4. 04Which pixels count as active, and what happens if you use the total?
  5. 05Where do you find the pixel pitch and the active pixel count?
  6. 06How do you turn focal length in mm into focal length in pixels?
  7. 07What does the active area tell you about lens coverage and field of view?
  8. 08When does the pitch-times-pixels number stop being correct?
  9. 09Which checks settle it before you order?
  10. 10Questions

You are building the camera matrix for a calibration, and the paperwork in front of you gives a resolution, a format name and a package outline. None of them is the number the matrix needs. That number is the active sensor area, and you can compute it from two values the sensor data sheet always prints: pixel pitch and active pixel count. This guide works the multiplication through a 20 MP example with the arithmetic shown, explains why the format name and the package size both overstate the active area, converts a 16 mm focal length into 6667 pixels for the matrix, and lists the readout modes that break the shortcut. It is for anyone wiring a machine-vision camera into a calibration, from a conveyor gauge to a robot hand-eye set-up.

What sensor size does a camera calibration actually need?

Calibration needs the active area — pixel pitch multiplied by the active pixel count in each direction — because the camera matrix divides the focal length by that geometry: a 2.4 µm sensor with 5472 × 3648 active pixels is 13.13 × 8.76 mm.

The pinhole model behind every calibration stores the geometry as four numbers. fx and fy are the focal length measured in pixels, which you get by dividing the lens focal length in millimetres by the pitch in the same units. cx and cy start at the centre of the active array, half the active width and height in pixels. Everything you feed the solver therefore hangs on the active array, in millimetres for the optics and in pixels for the matrix. Neither the resolution label nor the mechanical drawing gives it to you directly; the multiplication below does.

Why isn't a 1 inch sensor actually 1 inch?

A format name is a nominal diagonal class, not a measurement: a 1 inch sensor has a diagonal near 16 mm, not 25.4 mm, and the name alone tells you neither the aspect ratio nor the active width your calibration needs.

The optical format label dates from vidicon television camera tubes, whose glass diameter set the name while the imaging area inside ran smaller; sensor makers kept the convention, and the encyclopedia entry on image sensor formats traces the history. One label spans several shapes. A 4:3 sensor on a 16 mm diagonal works out to 12.8 × 9.6 mm (16 × 4/5 and 16 × 3/5). A 3:2 sensor on the same diagonal is about 13.3 × 8.9 mm. The sensor in this guide is 3:2 — 5472 / 3648 = 1.5 — so its width differs from a 4:3 part of the same nominal format by half a millimetre, which is 4% of the width and 4% of fx if you guess.

We go through the class names in camera sensor size formats explained: what 1 inch means, and the matching lens side in lens sensor format: 1/1.8, 2/3 and 1 inch explained.

How do you compute the active area from pixel pitch and resolution?

Multiply the pixel pitch by the active pixel count in each direction, then take the diagonal of the result: 2.4 µm × 5472 = 13.13 mm and 2.4 µm × 3648 = 8.76 mm, so the active diagonal is √(13.13² + 8.76²) ≈ 15.8 mm.

w = p × Nx h = p × Ny d = √(w² + h²)

Here p is the pitch and Nx, Ny are the active pixel count in each direction; a pitch in µm gives an area in µm, so divide by 1000 once at the end for millimetres.

Worked example, with the arithmetic shown. The 20 MP sensor in this guide has a 2.4 µm pitch and 5472 × 3648 effective pixels. Width: 2.4 × 5472 = 13,132.8 µm = 13.13 mm. Height: 2.4 × 3648 = 8,755.2 µm = 8.76 mm. Diagonal: √(172.4 + 76.7) = √249.1 ≈ 15.8 mm. The type designation quotes a 15.86 mm diagonal, 0.5% above the computed active value — class rounding, not a missing row of pixels. A computed diagonal within about 1% of the type diagonal means your counts are right; a gap of several percent means one of them is wrong.

The ceramic package tells you none of this. It measures about 20 × 16.8 mm, half as much again as the active width, because it carries bond pads, a die border and the mounting face. Sizing anything optical from the package overstates the area by half.

Two catalog cameras use exactly this sensor, the IMX183:

Area scan camerasHikrobot MV-CS200-10GC 20 MP Area Scan Camera, GigE, IMX183, Color, BasicMV-CS200-10GC
Sensor format
1"
Lens mount
C-mount
$739.00View part
Area scan camerasHikrobot MV-CS200-10UM 20 MP Area Scan Camera, USB3.0, IMX183, 2nd Gen., MonoMV-CS200-10UM
Sensor format
1"
Lens mount
C-mount
$759.00View part

The MV-CS200-10GC carries it in color over GigE, the MV-CS200-10UM in mono over USB3.0; both are 20 MP on the 1" format with a C-mount. The 20 MP label comes from the effective count: 5472 × 3648 = 19.96 MP.

Which pixels count as active, and what happens if you use the total?

Count only the effective pixels the image uses: this sensor's full array is 5640 × 3710 against 5472 × 3648 effective, and calibrating from the total inflates the focal length by 3.1% horizontally and 1.7% vertically.

The difference is real silicon. Light-shielded optical black columns give the readout its black-level reference and dummy rows pad the edges; neither ever carries image. Here the gap is 5640 - 5472 = 168 columns, which at 2.4 µm is 0.40 mm of width, and 3710 - 3648 = 62 rows, or 0.15 mm of height.

The error follows directly. 5640 / 5472 = 1.031, so fx computed from the total runs 3.1% high; 3710 / 3648 = 1.017, so fy runs 1.7% high. On a 10 mm measurement that 3.1% alone is a 0.31 mm bias before any lens distortion enters.

The resolution label will not warn you. The effective array works out to 19.96 MP and the full array to 20.9 MP, so both deserve the '20 MP' tag and the label cannot tell you which count a listing used. Effective counts, total counts and pitch sit one level down, in the sensor's data sheet.

Where do you find the pixel pitch and the active pixel count?

Read the sensor's own data sheet, which lists pixel pitch and effective pixels separately from the total, and cross-check the pitch from the diagonals: 15.86 mm / 6576.5 pixels = 0.00241 mm, which rounds to the printed 2.4 µm.

The 6576.5 in that check is the pixel-count diagonal, √(5472² + 3648²); dividing the type diagonal by it recovers the pitch from published numbers alone. In practice the path runs: the camera product page names the sensor and the resolution, the sensor data sheet lists the pitch and both pixel counts, and many SDKs expose the pitch again as sensor metadata. A page such as the MV-CS200-10UM gives you the sensor designation and the resolution to start from.

On the shop side, the area scan cameras pages and the camera finder filter by sensor format and resolution, so a shortlist takes minutes. Open each product page, read off the sensor, then step down to the sensor data sheet for the pitch.

How do you turn focal length in mm into focal length in pixels?

Divide the focal length in millimetres by the pixel pitch in the same units: a 16 mm lens on the 2.4 µm sensor gives 16 mm / 0.0024 mm = 6667 px, and because the pixels are square, fx and fy start equal.

fx = fy = f / p cx = Nx / 2 cy = Ny / 2

For the example: fx = fy = 16 / 0.0024 = 6666.7, entered as 6667 px. The principal point starts at the array centre: cx = 5472 / 2 = 2736 px, cy = 3648 / 2 = 1824 px, skew 0.

Matrix entry Starting value Arithmetic
fx, fy 6667 px 16 mm / 0.0024 mm
cx 2736 px 5472 / 2
cy 1824 px 3648 / 2

Lenses carry a focal-length tolerance and the mounted back-focus distance shifts the effective value slightly, so treat 6667 px as the initial estimate. The checkerboard solver measures fx from your images and lands close to it, and a start near the truth converges fast. Why the focal length comes out in pixels at all is its own story; why focal length in pixels: the mm times pixels unit mystery walks through the convention.

What does the active area tell you about lens coverage and field of view?

The active diagonal sets the minimum image circle — 15.8 mm here, so the glass must be rated for at least the 1" format — and the field of view follows from the active width: 13.13 mm × 300 mm / 16 mm ≈ 246 mm at a 300 mm working distance.

Both numbers come from the same array. Coverage: a 15.8 mm active diagonal needs an image circle that clears it with margin, which is why 2/3-inch lenses, with their 8-11 mm class circles, vignette on this sensor. Field of view: the thin-lens estimate FOV ≈ sensor width × WD / f treats the working distance as the lens-to-part spacing and ignores distortion, close enough for sizing a station. At 300 mm WD the 16 mm lens frames 13.13 × 300 / 16 ≈ 246 mm across.

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.

Resolution follows the pitch too: 1 / (2 × 2.4 µm) ≈ 208 lp/mm is the highest spatial frequency the sensor can sample, so the lens has to hold its MTF out to that level; the matching arithmetic is in sensor resolution in lp/mm: match lens MTF to pixel pitch.

You want an image circle above 15.8 mm with margin. A 16 mm lens rated for 20 MP sensors on the 1.1" format gives you that:

Machine vision lenses16 mm, 1.1", 20 MP, C-mount machine vision lens, F2.8-22, <0.3% distortion (LS-FFL-0567)LS-FFL-0567
Type
Machine vision fixed
Sensor format
1.1"
Mount
C-mount
Resolution
16-25 MP
$679.00View partBuild a system with it

The LS-FFL-0567 is a 16 mm C-mount lens for the 1.1" format at 20 MP, F2.8-22, with under 0.3% distortion. On this sensor at a 300 mm working distance it frames about 246 mm across. The chain from sensor width to focal length is in lens field of view: why sensor size and focal length set it, and the focal-length decision in how to choose a machine vision lens focal length. Run your own numbers in the focal length calculator:

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

When does the pitch-times-pixels number stop being correct?

It stays correct only for the readout mode you calibrate in: 2 × 2 binning doubles the effective pitch and halves fx to 3333 px, a cropped output mode changes the array you divide by, and rectangular pixels, rare in current sensors, would split fx and fy.

Binning sums neighbouring pixels before they leave the sensor, so the image pitch becomes 2 × 2.4 = 4.8 µm and fx = 16 / 0.0048 = 3333 px, exactly half. A cropped or reduced readout uses a smaller window than the full array, which moves cx and cy off the array centre by the window's offset. The frame-rate consequences of these modes are in 4x4 binning vs 2x2: sensor readout decides your frame rate. Output shape can crop as well: a video-shaped mode uses a smaller area than the active array, one more case the image sensor format reference catalogues.

The fix is the same in every case: calibrate in the exact mode you will run, and use the pitch multiplication as the referee that tells the solver what fx should be near.

Which checks settle it before you order?

Five checks settle the number before you calibrate: the pitch and the effective pixel count from the sensor data sheet, the diagonal cross-check, the readout mode, the initial matrix values, and a checkerboard fit to confirm them.

  • Sensor data sheet: pitch and effective pixel count, listed separately from the total. The total inflates fx by 3.1% in this example.
  • Diagonal cross-check: computed active diagonal within about 1% of the type diagonal. It catches a misread pitch in seconds.
  • Mode check: full readout, no binning, no crop. Binning halves fx; a crop moves the principal point.
  • Initial matrix: fx = fy = 6667 px, cx = 2736 px, cy = 1824 px, skew 0, rescaled to your lens and sensor.
  • Checkerboard fit: the solver's fx should land near the computed value. The images are the measurement; the arithmetic is the referee.

Pick the camera and the lens as one decision: the sensor sets the active area, the active area sets the image circle, and the image circle narrows the machine vision lenses list. The camera step of the configurator pairs the two for you, or send the set-up through the contact page.

Questions

Do fx and fy always come out equal?

They do whenever the pixels are square, which holds for current CMOS machine-vision sensors: fx = fy = focal length divided by pitch. Enter the same number in both slots as the starting value and let the solver refine each one independently. A small fx-fy difference after the fit usually means distortion is being absorbed into the matrix, not that the pixels are rectangular.

What goes in the camera matrix before the first checkerboard fit?

fx and fy at focal length divided by pitch, cx and cy at half the active width and height, and skew at zero: for the 16 mm, 2.4 µm example that is 6667, 6667, 2736, 1824 and 0. A start within a few percent converges quickly; the solver measures the exact values from your target images.

Does the sensor's ceramic package size matter for anything?

Not for calibration, which uses only the active array. The roughly 20 × 16.8 mm package around the example sensor exists for bond pads, the die border and mechanical mounting. It does matter for flange design: leave clearance so the lens's rear element cannot touch the sensor glass while you set focus.

How much does a pixel pitch error shift the focal length in pixels?

One for one, in opposite directions: fx divides by pitch, so a 1% error in pitch becomes a 1% error in fx. Sensor data sheets print pitch to a tenth of a micrometre, which keeps the arithmetic error to a fraction of a percent, well below the distortion terms the solver fits anyway.