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 — 25 NPR and stylization
expand to📖 Full book outline1 parts · 2 chapters · 9 sections · 6 figures embedded · 1 placeholders · double-click a figure to enlarge
▸Part 25 NPR AND STYLIZATION⧉
<!--uid: npr-and-stylization-->
▸25.1 Style transfer⧉
fig-style-transfer-zoo
fig-style-transfer-zoo · the zoo of style transfer — patch/analogies, texture statistics (Gram), neural optimization, feed-forward, image-to-image GANs — same skeleton, swap the prior 🟨
⬜ figure not yet created
`fig-two-scale-tone-transfer` (a target photo given the *look* of a model photograph by transferring large-scale tone + detail/texture, after Bae 2006) fig-two-scale-tone-transfer
fig-neural-style-content-style
fig-neural-style-content-style · neural style: a content loss (deep feature match) balanced against a style loss (Gram-matrix match), summed into one objective 🟨
The thread of this chapter is one sentence: **match the *look* of a reference onto a target, keeping the target's content.** It runs from **classical** methods — match patches or low-order statistics by hand — to **learned** ones — match deep-feature statistics, or learn a whole image-to-image mapping. Several of these pieces appear as *models* in [[Deep learning]]; here they're gathered under the single idea of **style transfer**.
equations
(light) **neural style** objective $\min_{\hat I}\ \alpha\,\lVert\phi_\ell(\hat I)-\phi_\ell(I_{\text{content}})\rVert^2 + \beta\sum_\ell \lVert G_\ell(\hat I)-G_\ell(I_{\text{style}})\rVert^2$, with **Gram matrix** $G_\ell = \phi_\ell\phi_\ell^\top$ (style = feature correlations)
feed-forward variant trains a net to minimize the same **perceptual loss** in one pass
▸25.2 Non-photorealistic rendering⧉
fig-npr-painterly-layers
fig-npr-painterly-layers · painterly rendering in coarse-to-fine brush layers: big strokes lay the ground, smaller strokes add detail where it matters (Hertzmann 1998) 🟨
fig-npr-abstraction-pipeline
fig-npr-abstraction-pipeline · the Winnemöller abstraction pipeline: edge-preserving smooth → luminance quantize → Difference-of-Gaussians edges, composited 🟨
fig-npr-flow-dog
fig-npr-flow-dog · isotropic Difference-of-Gaussians lines vs flow-based coherent lines that follow the local edge tangent (Kang et al. 2007) 🟨
fig-npr-brush-pset
fig-npr-brush-pset · the brush-stroke problem-set figure: placing, orienting and sizing strokes from image gradients (course p-set) 🟨
Everything before this chapter tried to make images **truer** — sharper, cleaner, better-exposed. NPR does the opposite on purpose: it throws information **away** to make a photograph more like a **drawing or a painting** — to *communicate* rather than reproduce. The surprising lesson is that the tools are the **same** ones from EDGES MATTER: the operation that makes a good cartoon — **flatten the unimportant texture, keep and darken the meaningful edges** — is exactly the **edge-preserving / base–detail** decomposition (**L4.21**), used to *abstract* instead of *enhance*. A light chapter and a coda: *learned* stylization is in [[#Style transfer]] above and [[Deep learning]]; here we cover the **classical, structure-driven** core and the course **brush p-set**.
equations
(light) **stroke placement** — paint where the canvas differs from a **blurred reference** (error $> T$), stroke **orientation $\perp \nabla I$**, **size coarse→fine** across pyramid levels
**DoG edges** $D = G_{\sigma_1}*I - G_{\sigma_2}*I$, thresholded → ink lines
**abstraction** = **bilateral**-flattened (quantized) color **+** DoG edges overlaid