7.5 Section 7: Sensor Calibration Engine

Tone response

How your phone turns light into pixels, so a bright or dark spot reads what it really is.

Where to find it

Settings Calibration Tone response

Summary

Every phone renders light through its own tone curve. The meter turns pixels back into light through that curve: the one the phone reports, or one measured on the phone with a 15 second exposure sweep in Calibration. Without either, Pro and Auto-pro spot readings walk the exposure until the spot sits on middle grey, which needs no curve at all.

How it works

What it does

A phone does not record light the way a light meter's cell does: it bends it through a tone curve to make pleasing pictures, and every model bends it differently. To read a spot, the meter has to turn the pixel back into light through that same curve. Many Android phones report their curve, and the meter uses it on its own. On phones that do not, and on every iPhone, measure it here once.

How to measure

Open Calibration, point the camera at a still scene with both bright and dark areas, and tap Measure tone response. Hold the phone steady for about 15 seconds while the exposure steps through nine stops. The result is saved for this camera and is used by every reading straight away. Measure again after a system update.

Without a measurement

Pro and Auto-pro spot readings are still exact: they adjust the exposure until the spot itself sits on middle grey, so they need no curve, at the cost of half a second or so per reading. Fast readings, the whole-frame modes and False Color use a standard conversion, which can be a stop or more off on bright and dark tones.

Good to know

A flat scene (a blank wall, the sky) cannot be measured: it needs a range of tones. Under mains lighting the meter matches its exposures to the flicker of the lamps. If the phone reports its own curve, this section just says so and there is nothing to do.

Implementation notes (for developers)
model/LumaResponse (Table, sources TONEMAP_CURVE / LEARNED / SHIPPED), model/ToneResponseFit (median curve from a -5..+4 stop sweep in thirds, per-sample crossing of Y 118), CameraRepository.measureToneResponse (NullSpotPlan's time/ISO split with flicker snapping, grid per step) saved in SharedPreferences tone_response keyed by camera id and Build.FINGERPRINT, loaded when a camera reports no curve. The fit refuses a sweep whose auto-exposure frames before and after differ by more than 8 code values on average (moved framing; the check frame waits for AE to come back within a quarter stop) or where over 8% of samples drop by more than 40 codes between steps; each step uses a frame whose capture result matches the requested settings and is placed by that frame's own exposure. model/NullSpotPlan for curve-free Pro spots (band Y 108..129, two frames per step, best sample when a flickering source never settles). Verified on the Xperia 5 III with the reported curve ignored: the learned table matched the reported one within 0.06 stop above grey and 0.21 at Y 33; null metering read 0.09 to 0.16 stop under the curve reading at ISO 3000 at night (auto versus manual frames; 0.04 to 0.27 in an earlier run) and fixed a lamp the shipped maths read 1.34 stops dark. Test: androidTest ToneResponseDeviceTest and MeteringResponseDeviceTest on the side-by-side build (tmp/fix_qa/build_test2.sh). iOS: same on ZoneCore (UserDefaults per lens and OS version); iPhones report no curve, so Pro null-meters until the curve is measured.

Search documentation