BookNotesSlidesP-sets Syllabusdraft · v0.2.49.1
💬Comments welcome. To leave a note, select any text and click the note / highlight button that pops up — or open the panel with the tab at the top-right (‹). Notes are visible only inside our private review group.
Computational Photography, an AI-powered Slopendium — 24 Illumination and reflection
expand to📖 Full book outline1 parts · 5 chapters · 22 sections · 5 figures embedded · 4 placeholders · double-click a figure to enlarge
▸Part 24 ILLUMINATION AND REFLECTION⧉
<!--uid: illumination-and-reflection-->
⬜ figure not yet created
`fig-intrinsic-decomp` (one photo → its **reflectance** layer (flat albedo) × **shading** layer (smooth illumination, no texture)) fig-intrinsic-decomp
fig-retinex-thresholding
fig-retinex-thresholding · Retinex: threshold the log-gradient (small steps = shading, large steps = reflectance edges), then re-integrate 🟨
⬜ figure not yet created
`fig-multi-illuminant-wb` (a scene lit warm tungsten on one side, cool window light on the other → one global white balance leaves *one* half wrong fig-multi-illuminant-wb
fig-hdr-merge-antelope
fig-hdr-merge-antelope · the HDR merge on a REAL bracket (Antelope Canyon): two exposures (short/long) + their per-pixel reliability weight maps → reliability-weighted radiance average → tone-mapped result; both sun and shadows readable ✅
fig-reflection-removal-cues
fig-reflection-removal-cues · cues that separate a window reflection from the transmitted scene — ghosting/double-image, polarization, focus difference 🟨
fig-dichromatic-model
fig-dichromatic-model · the dichromatic reflection model: observed color = a body (diffuse) component + a specular (illuminant-colored) component — a plane in color space 🟨
A single photograph mixes things the eye effortlessly keeps apart: it instantly reads a white shirt in shadow as *white-and-shadowed*, not as a gray shirt. The camera can't — it records the **product**, $I = R\cdot S$, illumination times surface (**L2.6**). This chapter is the project of **un-mixing** that product from one image — separating light from surface, or one layer of light from another. And it is the same story as super-resolution and deblurring: the un-mixing is **under-determined**, so a **prior** does the work (**L5.4**). The unifying frame is the **intrinsic-image decomposition**; everything else here is a special case of it. (These are the *single-image* methods; their easier *multi-image* cousins — flash/no-flash, a rotating polarizer, a light stage — live in **Computational illumination (Advanced)**.)
💡 **Big lesson (recurrence of L2.6 + L5.4):** because the world is **multiplicative** — what you measure is light **×** surface — recovering *either factor* from one image is **ill-posed**: a dark patch can be a dim surface in bright light or a bright surface in dim light, and the pixel can't tell you which. So separating illumination from reflectance (or a reflection from a transmission, a shadow from a stain, a highlight from a color) always needs a **prior** about how surfaces, light, and natural images behave — not a tuning knob but the load-bearing part of the method. (→ see **L2.6** · multiplicative world, FUNDAMENTALS; → see **L5.4** · the prior is not optional, [[#Super-resolution]].)
equations
**image as product** $I(x) = R(x)\,S(x)$ — log makes it additive $\log I = \log R + \log S$ (**L2.6/L2.19**)
**Retinex / gradient classification** — assign $\nabla(\log I)$ to $\nabla R$ if $|\nabla\log I| > \tau$ (sharp = reflectance) else to $\nabla S$ (smooth = shading), then **Poisson-integrate** each layer (**L6.3**)
**layer superposition (reflection)** $I = T + R$ (transmitted + reflected), under-determined → priors
**dichromatic model** $I(x) = m_d(x)\,\Lambda_{\text{body}} + m_s(x)\,\Lambda_{\text{illum}}$ (diffuse in the **surface** color direction + specular in the **illuminant** color direction — two color vectors, separable per pixel)
▸24.2 Mixed-lighting white balance⧉
24.2.1 Why a global gain must fail⧉
24.2.2 Estimating the per-pixel mixture: an under-determined inverse problem⧉
24.2.3 Correcting each region for its own light⧉
24.2.4 What came after⧉
▸24.3 Dehazing⧉
⬜ figure not yet created
`fig-dark-channel` (hazy photo, its dark channel, recovered transmission map, dehazed result) fig-dark-channel
Haze isn't a deblurring problem — light is **scattered**, not convolved — but it's the same *idea* as the previous chapter in a new costume: an image-formation model that is **under-determined**, made solvable by **one well-chosen statistical prior**.
equations
**haze image model** $Y(x)=t(x)\,X(x) + A\,(1-t(x))$ (transmission $t=e^{-\beta d}$, airlight $A$, depth $d$, scattering coeff $\beta$)
**dark channel** $X^{\text{dark}}(x)=\min_c \min_{x'\in\Omega(x)} X_c(x')$
▸24.4 Intrinsic images with time lapse⧉
⬜ figure not yet created
`fig-intrinsic-timelapse-stack` (a fixed-camera day sequence: shadows sweep across a constant scene fig-intrinsic-timelapse-stack
fig-intrinsic-weiss-median
fig-intrinsic-weiss-median · noisy per-frame log-gradient maps with moving shadow edges, their per-pixel median over time giving clean reflectance gradients, then a Poisson integration to a flat-lit reflectance plus residual shading (Weiss) 🟨
💡 **Big lesson (L11.2 · Capture the full set, decide later — time/illumination axis):** one image can't separate **reflectance** from **shading** (the split is ambiguous — L5.4). A **time-lapse stack under changing light** breaks the tie: record the **whole sequence** and decide per-pixel afterward — **what stays constant is reflectance, what varies is shading**. Same defer-the-decision move as HDR (exposure), focal stacks (focus), hyperspectral (wavelength) and light fields (aperture) — here the deferred axis is **time / illumination**. (→ see Big lesson **L11.2**, [[Big Lessons]]; and **L5.4**, the prior-not-optional ambiguity this resolves.)
equations
image model $I(x,y,t)=R(x,y)\cdot S(x,y,t)$ (reflectance constant in $t$, shading varies)
in **log** $\log I = \log R + \log S$ (product → sum, L2.6/L2.19)
spatial gradient $\nabla\log I(t)=\nabla\log R+\nabla\log S(t)$
**Weiss estimator** $\widehat{\nabla\log R}(x,y)=\operatorname{median}_t\,\nabla\log I(x,y,t)$ (shading gradients vary/cancel, reflectance gradient persists)
recover $\log R$ by **gradient-domain reconstruction** (Poisson, $\nabla^2\log R=\operatorname{div}\,\widehat{\nabla\log R}$)
then $\log S(t)=\log I(t)-\log R$.
24.4.3 Passive and controlled illumination⧉
▸24.5 Colorization⧉
24.5.1 One channel in, three channels out⧉
24.5.2 A spectrum of priors: scribbles, references, and learned models⧉
24.5.3 The multimodality trap: why naïve colorization goes muddy⧉
24.5.4 Closing the loop: learned priors with a human's hints⧉
24.5.5 Plausible is not correct⧉
24.5.6 Where it sits⧉