Creating new images from old ones: HDR imaging, super-resolution, image matting, texture synthesis, and inpainting.
Your camera captures what is there. Computational photography creates what could be there. It uses algorithms to overcome hardware limitations and produce images that no single exposure could capture.
Examples you use every day:
Before combining images, you need to understand how your camera converts light into pixel values. This mapping is not linear.
The radiometric response function g maps scene irradiance E to pixel intensity I:
where Δt is exposure time. Recovering g is essential for HDR, because you need to convert pixel values back to physical irradiance before merging.
Other calibration targets:
| Effect | What It Is | How to Correct |
|---|---|---|
| Vignetting | Brightness falloff toward image edges (lens geometry) | Divide by measured falloff pattern |
| Noise | Signal-dependent (Poisson) + read noise (Gaussian) | Noise level function: σ2 = aI + b |
| Optical blur | Point spread function varies across the field | Deconvolution (inverse filtering) |
A real scene can have a brightness range of 10,000:1 or more (sunlit window vs. shadowed corner). A standard camera captures maybe 256:1. HDR imaging recovers the full range by merging multiple exposures.
The pipeline:
Three exposures capture different parts of the dynamic range. The merge recovers the full range.
An HDR radiance map may have a 100,000:1 range. But your display shows at most 1,000:1. Tone mapping compresses the HDR range into a displayable range while preserving visual detail.
| Approach | How It Works | Character |
|---|---|---|
| Global | Apply the same curve to every pixel (log, gamma, Reinhard) | Fast, simple, may lose local contrast |
| Local | Adapt compression based on local neighborhood (Durand bilateral, exposure fusion) | Preserves local detail, can create halos |
| Exposure fusion | Blend the original exposures directly (no HDR merge), weighted by quality metrics | No response function needed. Practical. |
Different curves compress the HDR range differently. Notice how each preserves or sacrifices detail.
Super-resolution increases image resolution beyond what the sensor captured. Classical methods combine multiple shifted low-resolution images. Modern methods use deep learning to hallucinate plausible high-frequency detail from a single image.
| Approach | How It Works | Limitation |
|---|---|---|
| Multi-image SR | Align and fuse multiple slightly shifted captures | Needs multiple images; limited gain |
| Example-based SR | Learn LR → HR patch mappings from training data | Limited to trained domains |
| Deep SR (SRCNN, EDSR) | End-to-end CNN: input LR, output HR | May hallucinate incorrect detail |
| Diffusion-based SR | Use a generative model conditioned on the LR image | Photorealistic but not always faithful |
Deblurring is related: given a blurred image, estimate the blur kernel and recover the sharp original. Blind deconvolution (unknown kernel) is ill-posed, but deep networks (like DeblurGAN) learn to invert common motion and defocus blurs.
Image matting extracts a foreground object with a soft alpha matte — not just a binary mask, but a per-pixel opacity value between 0 and 1. This captures semi-transparent elements like hair, fur, smoke, and glass.
The compositing equation:
Given the observed image I, we want to recover the foreground color F, background color B, and alpha α at each pixel. That is 7 unknowns per pixel (RGBA_F + RGB_B) from just 3 observations (RGB_I) — massively underdetermined.
For natural image matting (no controlled background), the user provides a trimap: definite foreground, definite background, and an unknown transition region. The algorithm estimates α only in the unknown region. Modern deep learning methods (e.g., ViTMatte) can predict alpha mattes from minimal user input or even automatically.
Texture synthesis generates arbitrarily large images from a small example patch, maintaining the visual appearance and statistical properties of the original.
Classic approaches:
Watch a small texture patch grow into a larger region by copying and blending patches.
Inpainting fills in missing or removed regions of an image with plausible content. Think of it as the reverse of matting: instead of extracting an object, you remove it and fill the hole.
Evolution of inpainting:
Simulate merging three exposures into an HDR image. Adjust the exposure slider to see how each capture covers a different brightness range.
Each bar represents a scene region's brightness. Different exposures capture different ranges.
| Concept | Used In |
|---|---|
| HDR / tone mapping | Ch 2 (photometric image formation), photography, display technology |
| Super-resolution | Ch 5 (deep learning), satellite imaging, medical imaging |
| Image matting | Ch 6 (segmentation), Ch 14 (IBR), film VFX |
| Texture synthesis | Ch 13 (texture maps), Ch 14 (rendering), game development |
| Inpainting | Ch 6 (semantic understanding), photo editing, restoration |
| Neural style transfer | Ch 5 (CNNs), Ch 14 (neural rendering), artistic tools |