Full search page →

IP 05 · Why does undoing a blur amplify the noise?

IntermediateIP 05 · Image Restoration and ReconstructionImage lab

Description

Blur a real photo with a Gaussian PSF, add a little noise, then divide by the blur in the frequency domain. See the plain inverse filter fail, and find the Wiener constant K that rescues it.

Try this: Leave the noise at 0.005 and raise log10 K from −7 in small steps. The restored PSNR climbs, peaks, then falls: where is the peak, and what does the image look like on each side of it? Then set the noise to 0: is K = 0 still a disaster? Finally raise the noise to 0.02 and see where the best K moves.

Predict first

The camera image is blurred (σ = 2) and a barely visible amount of noise is added (0.005, about one gray level in 255). The plain inverse filter (K = 0) divides every frequency by the blur’s transfer function. What does the result look like?

Hints

The chapter section that uses this lab:

Explanation

Answer the prediction first, or open the explanation when you are ready.

Show the explanation

Blur makes the transfer function tiny at high frequencies, so dividing by it multiplies whatever is there by a huge number, and noise is spread evenly over all frequencies. With this noise the blurred image scores 23.95 dB, almost the same as without noise (23.98 dB), while the plain inverse scores 4.79 dB: worse than the blurred image, and it looks like random black and white dots. On a noise-free image the same filter reaches 34.94 dB, and noise of only 0.00001 already drops it to 6.1 dB. The failure comes from the noise, not from the blur.

Lab · IP 05 · Why does undoing a blur amplify the noise?

Predict first

The camera image is blurred (σ = 2) and a barely visible amount of noise is added (0.005, about one gray level in 255). The plain inverse filter (K = 0) divides every frequency by the blur’s transfer function. What does the result look like?

Loading image…

Original (known)
Blurred, plus noise
Restored with H*/(|H|² + K)
PSNR of the restored image against K (the same blur and noise)

Try this: Leave the noise at 0.005 and raise log10 K from −7 in small steps. The restored PSNR climbs, peaks, then falls: where is the peak, and what does the image look like on each side of it? Then set the noise to 0: is K = 0 still a disaster? Finally raise the noise to 0.02 and see where the best K moves.

Real 256 × 256 camera image. The degradation follows the chapter, G = H·F + N, in the frequency domain. H is the transform of a Gaussian PSF of standard deviation σ pixels, H = exp(−2π²σ²(u² + v²)) with u and v in cycles per pixel; the blur is periodic (circular), as in the chapter’s code, so the filter matches the blur exactly and no padding is used. N is a fixed seeded white Gaussian field scaled by the noise level (a standard deviation as a fraction of the 0 to 1 range, so 0.005 is about 1.3 gray levels of 255); it is added to the blurred image and not rounded to 8 bits. The restoration is the constant-K Wiener filter of the chapter, F̂ = H*/(|H|² + K) · G. Here K is a tuning constant that you choose, not an estimate of the noise-to-signal power ratio. K = 0 is the plain inverse 1/H, where frequencies with |H| below 10^−6 are set to 0 (the convention of the chapter’s code); that is why its peak gain stops at about a million and why no-noise restoration is not perfect for large σ. PSNR compares each image, clipped to 0 to 1, with the original. The gain is the largest value of |H|/(|H|² + K) over all frequencies; for K greater than 0 it never exceeds 1/(2√K).

Method and image sources

Open in the Playground →