Cameras & sensorsExplainer

Measure laser intensity with a camera: calibrate first

Calibrate the camera with gamma off, sum the spot's grey values against a power meter, and the image measures laser intensity in milliwatts.

LumaSpec Vision10 min read Share on LinkedIn

On this page 9 sections
  1. 01Can a camera measure laser intensity at all?
  2. 02Should I use the peak pixel, the mean or the sum?
  3. 03Why does gamma ruin the measurement?
  4. 04How do I build the calibration curve?
  5. 05Which camera settings must stay fixed?
  6. 06How large should the laser spot be on the sensor?
  7. 07Which camera should you use for laser-spot measurement?
  8. 08When does a camera answer the wrong laser question?
  9. 09Questions

You have an image with a laser spot in it and a number to deliver: how strong is the beam? A camera cannot read milliwatts straight off its pixels — it reports grey counts, and those counts track power only when the response is linear and you know the scale factor. The workflow that works is short: find the spot, threshold it into a mask, sum the grey values inside, then convert counts to power with a calibration curve built against a power meter at fixed exposure and gain. This guide gives the method, a worked calibration with the arithmetic shown, and the camera settings that quietly ruin the result if you leave them on. It is written for engineers adding beam-power or spot-strength monitoring to a station built from standard area scan cameras.

Can a camera measure laser intensity at all?

Yes — as a relative measurement straight away, and as absolute power once you calibrate: a mono sensor with gamma off converts photons to counts linearly, so the grey-value sum over the spot tracks beam power, and one slope factor turns counts into milliwatts.

During an exposure, each pixel integrates the optical flux that lands on it. Double the power at the sensor and every count doubles, provided no pixel saturates and no gamma curve bends the values. That is the whole physical basis: the camera is a flux integrator, and the spot's total count is a proxy for the optical power it receives.

What the camera cannot do is name the units by itself. Pixel values are converter output, not watts — the walkthrough of what camera pixel values represent traces the chain from sensor voltage to grey count. And the flux the camera sees is the flux after your optics and attenuation, not the irradiance at the workpiece; separating pixel counts from physical units such as lux is its own subject, covered in the guide to converting pixel values to lux. Calibrated, the camera inherits the accuracy of your power meter; uncalibrated, it still tracks relative changes well enough for drift and alignment work.

Should I use the peak pixel, the mean or the sum?

Use the background-subtracted sum of the grey values inside a thresholded mask: the sum grows in proportion to power, while the peak hits full scale first and the mean falls as the spot spreads over more pixels.

Threshold the frame so the spot separates from the background, grow the mask by a pixel or two so the halo stays inside, then add up every grey value in the mask and subtract an equal-area patch of background taken from the same frame:

S = (sum of grey values in the spot mask) − (mask pixels × mean background grey value) P = S / k

k is the calibration slope in counts per milliwatt, built in the calibration section below. The peak fails because the spot's centre reaches full scale first and every count above it is lost, so the reading flattens exactly when the beam gets brighter. The mean fails because it divides by mask area, and the area grows with the beam. Only the sum rises in strict proportion to the flux on the sensor. Guard the top end as well: keep the brightest pixel below about 90% of full scale — 230 of 255 in an 8-bit image — and discard any frame that clips, because clipped counts are lost counts.

Why does gamma ruin the measurement?

Turn gamma off — set it to 1 — before you collect a single calibration frame: gamma is a display curve that bends the counts, so at a typical gamma of 2.2 a pixel that should read 128 arrives as 186, about 45% high, and sums stop tracking power.

A raw image sensor is linear: twice the photons, twice the charge, twice the count. Gamma exists to encode luminance for displays and eyes, not for measurement — the gamma correction reference covers the curve and its history. With gamma applied, equal steps in power produce shrinking steps in counts, so a straight line no longer fits the curve and two-point interpolation fails.

Put a number on it: a linear mid-value of 128 in 8 bits, passed through a gamma of 2.2, encodes as 255 × (128/255)^(1/2.2) ≈ 186 — a 45% lift at that pixel, with a different distortion at every level. Gamma hides in two places. A camera-side gamma setting genuinely bends the stored counts; a display lookup table only repaints the preview, as the image display intensity scaling reference shows for the viewer side. Set the camera's gamma to 1 and leave it there for calibration and measurement alike.

How do I build the calibration curve?

Take frames at three to five known powers, read the spot sum from each and fit a straight line: the sums 51,850, 103,700 and 207,400 counts at 1, 2 and 4 mW give a slope of 51,850 counts per mW, and the ratios come out at 2.00 and 4.00.

  1. Fix the exposure, gain, aperture and optics, and write them down — they are now part of the instrument.
  2. Pick off a constant fraction of the beam with a wedge or splitter so the camera sees a small, fixed share, and leave that hardware in place for every future measurement.
  3. Set a power level, read it with the meter head where your camera path samples the beam — ideally behind the same splitter — and average the spot sums over 10 frames, which cuts random noise by about a factor of three.
  4. Repeat at three to five levels across the range you care about: 1, 2 and 4 mW in the example.
  5. Divide each averaged sum by its power. If the quotients agree, the response is linear and the shared value is k.
Meter reading (mW) Spot sum, background-subtracted (counts) Sum ÷ power (counts/mW)
1.0 51,850 51,850
2.0 103,700 51,850
4.0 207,400 51,850

All three quotients land on 51,850 counts per mW, so k = 51,850 counts/mW and the sensor is linear across the range. An unknown spot that returns S = 129,625 counts then reads:

P = S / k = 129,625 counts ÷ 51,850 counts/mW = 2.50 mW

That is the whole measurement — the same counts-to-engineering-units move as raw thermal counts to temperature calibration: a slope measured in place, applied to raw counts. If you skip the background subtraction, fit a free intercept instead of forcing the line through the origin, so the offset is absorbed.

Which camera settings must stay fixed?

Exposure, gain, gamma, aperture, filters and the spot's position on the sensor must be identical between calibration and measurement: halving the exposure halves every count, so a slope taken at 10 ms is wrong by a factor of two at 5 ms.

Auto exposure and auto gain are the main offenders: they renormalize every frame, which is precisely what a measurement cannot tolerate. Turn them off — the guide to disabling camera auto tracking for stable machine vision covers where these controls live and what to set instead. Shoot uncompressed as well, because lossy compression rewrites grey values nonlinearly.

Exposure has the exact, correctable effect: counts scale in strict proportion to exposure time, so the slope scales with it. A slope of 51,850 counts per mW measured at 5 ms becomes 103,700 counts per mW at 10 ms — double the exposure, double the slope. Keep the spot on the same patch of sensor, and recalibrate whenever you change optics, filters, wavelength or attenuation.

How large should the laser spot be on the sensor?

Size the optics so the spot mask spans at least about 100 pixels and stays inside the frame: for a 3 mm spot that means a field of view near 30 mm, and at a 200 mm working distance on a 1/1.8" sensor that is about a 35 mm lens.

A mask of a hundred pixels or more averages sensor noise down and keeps the sum steady when the threshold moves by a count. Leave margin around it too: the halo and any pointing drift need room, so a tenth of the frame width for the spot itself is a comfortable target.

Worked through with the example numbers: a spot 3 mm across, a target field of view of 30 mm, a working distance of 200 mm and a 1/1.8" sensor about 7.2 mm wide. Magnification m = 7.2 mm ÷ 30 mm = 0.24, so f = WD × m ÷ (1 + m) = 200 mm × 0.24 ÷ 1.24 ≈ 39 mm. The nearest standard lens below, 35 mm, gives m = 35 ÷ (200 − 35) = 0.212 and a field of view of 7.2 mm ÷ 0.212 ≈ 34 mm. The 3 mm spot then fills 3 ÷ 34 ≈ 9% of the frame width — close to the tenth aimed for, with the halo inside the frame.

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

Which camera should you use for laser-spot measurement?

A mono, C-mount area camera with manual exposure, gamma-off control and enough bit depth is the right tool: mono avoids the colour filter array that would scale your laser's wavelength differently from channel to channel, and the lens mount gives you optics sized to the spot.

A colour sensor hides a different filter behind each pixel, so a red or infrared beam lights the channels unevenly and the sum turns wavelength-sensitive in a way that is hard to correct afterwards. Mono counts every pixel identically. Beyond that, the practical differences are interface, sensor size and resolution:

Specification MV-CT0MG0060/R/NN/NN MV-CT0MU0060/R/NN/NN MV-CS200-10UM
Sensor model Sony IMX178 Sony IMX178 Sony® IMX183
Sensor size 1/1.8" 1/1.8" 1"
Resolution 3072 × 2048 3072 × 2048 5472 × 3648
Max. frame rate 19.5 fps @ 3072 × 2048 Mono 8 60.9 fps @ 3072 × 2048 Mono 8 19.2 fps @ 5472 × 3648 Mono 8
Dynamic range 71.3 dB 66.2 dB 65.5 dB
SNR 41.3 dB 41.4 dB 41.5 dB
Exposure time 25 μs to 3.1 sec 8 μs to 1 sec 44 μs to 0.83 sec
Exposure mode Off/Once/Continuous exposure mode, supports Rolling and Global Reset Off/Once/Continuous exposure mode, supports Rolling and Global Reset Off/Once/Continuous exposure mode, supports Global Reset and Rolling
Reverse image Supports horizontal and vertical reverse image output Supports horizontal and vertical reverse image output Supports horizontal and vertical reverse image output
Data interface Gigabit Ethernet (1000 Mbit/s), compatible with Fast Ethernet (100 Mbit/s) USB 3.0, compatible with USB 2.0 USB3.0, compatible with USB2.0
Data interface type RJ45 connector Type-C interface –
Control interface Not supported Not supported –
Price $909.00 $969.00 $759.00

All 3 share: Sensor type CMOS, rolling shutter; Pixel size 2.4 μm × 2.4 μm; Gain 0 dB to 24 dB; Pixel format Mono 8/10/10Packed/12/12Packed; Mono/color Mono; Binning Supports 1 × 1, 2 × 2, 4 × 4; Decimation Supports 1 × 1, 2 × 2, 4 × 4; Lens mount C-mount. Values as printed in each product's data sheet; open a part for its drawing and full specifications.

The two 1/1.8" options differ in interface, GigE against USB3, while the 1" sensor covers wider beams with more headroom above the noise floor. When the spot is tight — a focused beam a fraction of a millimetre across — resolution earns its keep, putting roughly 40% more pixels across the same field when you step from a 6 MP to a 12 MP sensor, and that steadies the sum.

The 12 MP GigE camera fits the small-spot role.

Area scan cameras12 MP GigE area scan camera, IMX226, 1/1.7" rolling shutter, 9 fps (LS-CMR-0053)LS-CMR-0053
Sensor format
1/1.7"
Lens mount
C-mount
Interface
GigE
Resolution
12 MP
$560.00View partBuild a system with it

For a broad beam, or when the power swings over an order of magnitude, a 1" mono sensor buys that range.

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
Interface
USB3
Resolution
16-25 MP
$759.00View partBuild a system with it

When does a camera answer the wrong laser question?

When the question is not the power arriving at the sensor: irradiance at the workpiece, beam quality, or a wavelength the sensor barely sees — silicon responsivity falls off past roughly 1000 nm, so a 1064 nm beam yields far fewer counts per milliwatt than a red one.

Three cases to route elsewhere. Irradiance at the part, in W/m², needs the spot's area as well as its power, so pair this calibration with a spatial calibration of the field of view. Beam quality and mode structure need a dedicated beam profiler: a camera shows the shape at one plane, not an M² value. And if the task is really spot presence or position — is the beam on, where does it land — skip the calibration entirely, because a threshold and a centroid answer that with no reference meter.

For drift, alignment and dose over time, the calibrated camera is the right instrument: it stays in place, it reads in milliwatts once k is known, and it costs far less per station than a dedicated meter head on every line. Build the chain the ordinary way — the camera finder filters mono area cameras by sensor and interface, the camera step of the configurator assembles camera, lens and mount, and the cameras topic page gathers the neighbouring guides. If your wavelength or spot geometry is unusual, tell us the set-up and we will help you size the optics.

Questions

Does the laser's wavelength change the measurement?

Yes. Sensor responsivity varies with wavelength, and a calibration curve built at one wavelength does not transfer to another. Calibrate with the actual laser you will measure; if the process changes wavelength, or you add a filter in front of the lens, take three fresh meter points and rebuild k.

Can I skip the power meter and use the sensor datasheet?

You can report relative changes without any meter, but absolute milliwatts need a reference measured in your own set-up. Datasheet responsivity is a typical curve at the maker's test conditions; your optics, filters and wavelength shift it. Three meter readings take minutes and remove the guesswork.

Is an 8-bit image good enough?

Usually, yes. With attenuation, an 8-bit sum has all the precision the shot noise allows: 0-255 per pixel sounds coarse, but a mask of hundreds of pixels sums smoothly. Choose a 10- or 12-bit camera when you cannot control brightness, or when low powers bury the signal in 8-bit noise.

The spot still saturates at minimum exposure - what now?

Add attenuation: a neutral-density filter or a beam splitter that sends a fixed fraction to the camera. Defocusing also works for a sum measurement, because spreading the spot does not change its total counts, but attenuation keeps the spot sharp if you also need its position.