StrataQuest Home StrataQuest Glossary Beer-Lambert law
Image Processing & Correction

Beer-Lambert law

Why chromogen intensity isn't linear in concentration — and the simple log-transform that makes it linear

Definition
Beer-Lambert relates the intensity of light transmitted through an absorbing sample to the concentration of the absorbing species and the path length the light traveled through the sample: I = I₀ · exp(−ε · c · l), where I₀ is the incident intensity, I is the transmitted intensity, ε is the molar extinction coefficient (a property of the absorbing molecule at the wavelength of interest), c is the concentration, and l is the path length. The relationship is exponential in concentration — doubling the chromogen concentration doesn't double the darkness of the resulting pixel; it squares the transmission ratio. Taking the negative logarithm produces Optical Density (OD): OD = −log(I/I₀) = ε · c · l. OD is linear in concentration, which is why every quantitative analysis of an absorbing stain converts to OD before measurement.
Intensity is exponential in concentration
Doubling the stain doesn't halve the brightness
OD is the right space for measurement
Linear in concentration, additive across stains
The reference is the empty slide
I₀ is what the camera sees with no absorber present
Beer-Lambert holds for absorption, not for fluorescence
Different physics, different math

Why the conversion to OD matters in practice

Picture two adjacent regions in a brightfield image of an IHC slide. One region has chromogen concentration c; the other has concentration 2c. In transmittance, the brighter region (concentration c) reads — say — 100 on an 8-bit pixel scale, and the darker region (concentration 2c) reads 25. The naïve average is (100 + 25) / 2 = 62.5, which corresponds to some intermediate concentration we'd compute by inverting Beer-Lambert on 62.5 — and that concentration is not 1.5c. It's higher than that, because the exponential weights the darker pixel more heavily.

Convert to OD first: the bright region has OD = −log(100/255) ≈ 0.41; the dark region has OD = −log(25/255) ≈ 1.01. The average OD is (0.41 + 1.01) / 2 = 0.71, and this average is the OD of 1.5c concentration (up to the path-length and extinction-coefficient constants). Average concentration computed correctly.

This isn't a small effect. The error from averaging RGB intensities instead of OD can be 20% or more when the underlying concentration distribution varies appreciably across the region — and quantitative IHC scoring routinely relies on per-region averages. The RGB-to-OD conversion engineLoading... is the standard preparation; running it before any region-averaging engine is what makes the measurements correspond to the biology.

Share This Term
Term Connections