Chapter 7 Noise Modeling and Denoising
One-Sentence Goal
In the radiometric linear domain, establish a unified noise convention combining Poisson–Gaussian statistics with PRNU/DSNU; provide reproducible VST transforms and single-/multi-frame denoising workflows and contracts; and ensure denoising is auditable and stable while preserving MTF and chromatic consistency.
I. Scope & Targets
- Inputs
- Linear images from Chapter 4: I_lin, along with calibrated gain g, black B, flat/dark frames, operating point exposure, T_cam.
- From Chapter 5: MTF_sys; from Chapter 6: sampling info pixel_pitch, CFA(pattern), binning_mode.
- Optional video sequence { I_t } with tau_mono alignment metadata offset/skew/J.
- Outputs
- Denoised result I_dn (RAW or RGB); noise parameters NLF = { alpha, beta }; fixed-pattern maps DSNU b(x,y), PRNU k(x,y).
- Frequency-domain measures NPS(f), SNR; detail-preservation metrics and the contract report assert_report.denoise; manifest.imaging.denoise.
- Boundaries
- Denoising is performed by default in the RAW linear domain; if operating in RGB/YCbCr, declare cross-channel covariance and color-space transforms.
- Learning-based methods must register reproducibility via { model_id, weights_sha256, preproc_id }.
II. Terms & Variables
- Observation vs. truth
- I_obs, I_true: observed vs. radiometric ground-truth (linear).
- Additive noise n_add, multiplicative noise n_mult, black level B, gain g.
- Heteroscedastic noise & convention
- Var( n | I_true ) = alpha * I_true + beta (Poisson–Gaussian approximation), NLF = { alpha, beta }.
- Fixed pattern: DSNU b(x,y) (additive bias), PRNU k(x,y) (multiplicative gain).
- Frequency-domain measures
- Noise power spectrum NPS(f) = ( 1 / A ) * | F{ n * w } |^2, with window w and area A.
- Signal-to-noise ratio SNR = 10 * log10( P_signal / P_noise ).
- Transforms
- Variance-stabilizing transform (VST): z = V(y; alpha, beta), commonly Generalized Anscombe.
- Inverse V^{-1}: map z back to the linear domain.
III. Axioms P207- (Noise & Denoising Baseline)*
- P207-1 (Linear-domain modeling): Fit noise models and parameters on I_lin; unit(I_lin) and dim(I_lin) follow Chapter 4.
- P207-2 (Heteroscedastic explicit): Publish NLF = { alpha, beta } and the fit quality r2_nlf.
- P207-3 (Fixed-pattern decomposition): Sensor noise decomposes as I_obs = ( 1 + k ) * I_true + b + n_res, with E[k]=0, E[b]=0.
- P207-4 (Causal multi-frame alignment): Any cross-frame denoising aligns on tau_mono and records offset/skew/J plus sub-pixel warp_i.
- P207-5 (MTF fidelity): Denoising may only introduce a controlled MTF_proc attenuation; composed response must satisfy MTF_sys' ≈ MTF_sys * MTF_proc.
- P207-6 (Color-channel correlation): If denoising in CFA or RGB, publish cross-channel covariance Sigma_cc'.
- P207-7 (Reproducibility): Persist { algo, params, model_id, seed } and verify via hash_sha256.
IV. Minimal Equations S207-*
- S207-1 (Observation model)
I_obs = ( 1 + k(x,y) ) * I_true + b(x,y) + n_add, with Var( n_add | I_true ) = alpha * I_true + beta. - S207-2 (NLF fitting)
From flat-field block statistics, least-squares fit Var( y ) = alpha * E( y ) + beta to obtain alpha_hat, beta_hat, r2_nlf. - S207-3 (Generalized Anscombe)
z = 2 * sqrt( alpha * y + beta + 3/8 * alpha^2 );
inverse approximation: y_hat = ( z^2 / 4 - beta - 3/8 * alpha^2 ) / alpha. - S207-4 (Wiener filtering in frequency)
H_w(f) = S_x(f) / ( S_x(f) + S_n(f) ), x_hat = F^{-1}{ H_w(f) * Y(f) }. - S207-5 (TV variational denoising)
x_hat = argmin_x ( 0.5 * || y - x ||_2^2 / sigma^2 + lambda * TV(x) ), with TV(x) = ∑ || ∇x ||. - S207-6 (Non-local means weights)
w_{ij} = exp( - || P_i - P_j ||_2^2 / h^2 ), x_hat(i) = ( ∑_j w_{ij} y(j) ) / ( ∑_j w_{ij} ). - S207-7 (Multi-frame weighted fusion)
x_hat = ( ∑_i w_i * warp_i^{-1}( y_i ) ) / ( ∑_i w_i ), with w_i = 1 / sigma_i^2. - S207-8 (PRNU/DSNU estimation)
b(x,y) = I_dark - mean( I_dark ); k(x,y) = I_flat / mean( I_flat ) - 1. - S207-9 (Noise power spectrum)
NPS(f) = ( 1 / A ) * | F{ ( y - y_lp ) * w } |^2, where y_lp is a low-pass structural estimate.
V. Denoising Workflow M70-*
- M70-1 Linearization & black level: From Chapter 4 obtain I_lin; compute I_0 = max( I_lin - B , 0 ).
- M70-2 Fixed-pattern calibration: Using dark/flat, estimate b(x,y), k(x,y) and build I_corr = ( I_0 - b ) / ( 1 + k ).
- M70-3 NLF fitting: On I_corr, blockwise estimate alpha, beta, r2_nlf; if below threshold, fall back to a global empirical curve.
- M70-4 Domain & algorithm selection: domain ∈ { RAW, RGB, YCbCr }, algo ∈ { Wiener, NLM, BM3D, TV, Deep }; register kernel_id / model_id.
- M70-5 VST preprocessing: If alpha > 0, compute z = V( I_corr ) and the stabilized variance sigma_z.
- M70-6 Multi-frame (optional): Align on tau_mono, estimate warp_i and confidences; perform robust fusion before refinement.
- M70-7 Multi-resolution strategy: Denoise top-down on the Chapter 6 pyramid { G_l }, recording MTF_proc(l) by level.
- M70-8 Inverse & clipping: Compute I_hat = V^{-1}( z_hat ) or output from frequency/variational solver; clip to the dynamic range.
- M70-9 Metrics: Estimate sigma_in, sigma_out, NPS, SNR_gm (gradient-domain SNR), and delta_color.
- M70-10 Contract & persistence: Run assert_contract.denoise and write manifest.imaging.denoise, signed.
VI. Contracts & Assertions
- assert nlf_fit: r2_nlf ≥ tol_r2, alpha ≥ 0, beta ≥ 0.
- assert variance_reduction: sigma_out^2 ≤ rho_var * sigma_in^2, with rho_var ∈ (0,1).
- assert bias_bound: | mean( I_dn ) - mean( I_corr ) | ≤ tol_bias.
- assert mtf_preserve: max | MTF_sys' - MTF_sys * MTF_proc | ≤ tol_mtf.
- assert color_consistency: delta_E ≤ tol_deltaE (when operating in a color space).
- assert nps_suppression: ∫_{Ω_hi} NPS_out dΩ ≤ rho_nps * ∫_{Ω_hi} NPS_in dΩ.
- assert dynamic_range: min(I_dn) ≥ 0, max(I_dn) ≤ sat_level.
- assert reproducible: hash_sha256( algo_bundle ) matches the manifest.
VII. Implementation Bindings I70-*
- I70-1 estimate_dsnu_prnu(dark, flat) -> b_map, k_map
- I70-2 fit_nlf(I_corr, patches, method) -> alpha, beta, r2_nlf
- I70-3 vst_forward(y, alpha, beta) -> z, sigma_z ; vst_inverse(z, alpha, beta) -> y_hat
- I70-4 register_multiframe(seq, sync) -> { warp_i }, { sigma_i }, J
- I70-5 denoise_wiener(z, sigma) -> z_hat
- I70-6 denoise_nlm(z, sigma, h) -> z_hat
- I70-7 denoise_bm3d(z, sigma) -> z_hat
- I70-8 denoise_tv(y, lambda, sigma) -> y_hat
- I70-9 denoise_deep(model_id, z, sigma, params) -> z_hat
- I70-10 nps_estimate(n, window) -> NPS, bands
- I70-11 validate_denoise_contract(metrics, contracts) -> assert_report.denoise
- I70-12 emit_manifest_denoise(params, metrics, hashes) -> manifest.imaging.denoise
VIII. Cross-References
- Radiometric linearization, units, and dimensions: this volume’s Chapter 4; check_dim per Methods.Cleaning v1.0, Chapter 4.
- Optical MTF_sys and pixel MTF_pixel: this volume’s Chapter 5 for mtf_preserve verification.
- Sampling & pyramids: this volume’s Chapter 6; apply anti-aliasing before downsampling and denoising afterward.
- Masks, missingness, and imputation: Methods.Cleaning v1.0, Chapter 7.
- Anomaly & drift metrics (noise drift, banding): Methods.Cleaning v1.0, Chapter 8.
- Streaming & backpressure (online denoiser nodes): Methods.Cleaning v1.0, Chapter 11.
IX. Quality Metrics & Risk Control
- Indicators
- sigma_in, sigma_out, SNR, PSNR, SSIM (if reference available), band-integrated NPS, GMR = ||∇I_dn||_2 / ||∇I_corr||_2, delta_E.
- u(metric) with confidence intervals; record estimation method and windows.
- Risk playbooks
- Over-smoothing: if GMR < tol_gmr, reduce regularization lambda or increase conservativeness in sigma estimation.
- Texture artifacts / gridding: inspect NPS peaks and alias bands; switch kernel_id or enable frequency-domain suppression.
- Color cast / false color: operate in RAW or add cross-channel coupling penalties; on violation, downgrade publication and annotate q_score.
- Temporal flicker: if rho_temporal = Var( I_dn(t+1) - I_dn(t) ) exceeds limit, enable temporal regularization and consistency constraints.
- Model drift: when alpha, beta drift beyond tol_drift, trigger re-calibration and rollback to the last freeze_release.
Summary
Using a unified Poisson–Gaussian + PRNU/DSNU noise convention, this chapter specifies VST transforms, single-/multi-frame denoising, and dual contracts in frequency and color. By asserting NLF, NPS, MTF_proc, and delta_E, it guarantees that denoising remains metrologically sound and visually faithful, with results that are reproducible, auditable, and revertible.