that distort the visual information in an image. It can be introduced during image acquisition, transmission, or processing. • Additive noise: In = I + N • Multiplicative noise: In = I · (1 + N) • Nonlinear noise (e.g., salt and pepper): In = f (I) where I is the original image ; In is the noisy image ; N is the noise function. NHSM - 4th year: Digital Image Processing - Restoration (Week 14-15) - M. Hachama ([email protected]) 6/21
x(t) affected by noise n(t) is: SNR = Psignal Pnoise = 1 N N k=1 x[k]2 1 N N k=1 n[k]2 where Psignal and Pnoise are the signal and noise power. • The SNR in dB (decibels) for a discrete signal SNRdB = 10 · log10 N k=1 x[k]2 N k=1 n[k]2 • SNR for Images (image X and the noise N): SNRdB = 10 · log10 i,j X(i, j)2 i,j N(i, j)2 NHSM - 4th year: Digital Image Processing - Restoration (Week 14-15) - M. Hachama ([email protected]) 6/21
Squared Error (MSE) between the original image X and the reconstructed (or noisy) image ˆ X PSNRdB = 10 · log10 MAX2 I MSE where MAXI is the maximum possible pixel value of the image (255 for 8-bit image) and MSE = 1 MN M i=1 N j=1 X(i, j) − ˆ X(i, j) 2 NHSM - 4th year: Digital Image Processing - Restoration (Week 14-15) - M. Hachama ([email protected]) 6/21
quality of the image (including noise). Idegraded = h ∗ I(x, y) + N where: • h(x, y) is the degradation function, often a point spread function (PSF). • ∗ denotes the convolution operation. • I is the original image. • N is the noise added to the image. NHSM - 4th year: Digital Image Processing - Restoration (Week 14-15) - M. Hachama ([email protected]) 7/21
e.g., Exposure = the amount of light that reaches the camera’s sensor while taking a photo (fractions of a second or entire hours). NHSM - 4th year: Digital Image Processing - Restoration (Week 14-15) - M. Hachama ([email protected]) 7/21
when the neighbors pixels are ’very’ different. • Smoothing = making adjacent pixels similar • Example: Mean Filter • Each pixel receives the average of its neighbors. NHSM - 4th year: Digital Image Processing - Restoration (Week 14-15) - M. Hachama ([email protected]) 9/21
• Bilateral: neighboring pixels with similar intensities • NL-Means: pixels with similar neighborhoods NHSM - 4th year: Digital Image Processing - Restoration (Week 14-15) - M. Hachama ([email protected]) 12/21
(noise variance). • For each pixel, we calculate the local mean µL and the local variance σL , computed over a window W . • Reconstruction: J = µL + σ2 L σ2 L +σ2 (I0 − µL ) • σ = 0 : J = I0. No noise. • σL = 0 : J = µL . No noise. • σL >>= σ : J = I0. No regularization on boundaries. • σL ≈ σ : J = 1 2 (I + µL ).Pull the pixel value towards the mean of its neighbors in the ”normal regions”. • Estimation of σ from homogeneous regions. NHSM - 4th year: Digital Image Processing - Restoration (Week 14-15) - M. Hachama ([email protected]) 13/21
Modification of object morphologies • Clean up the segmentation result • Fill in holes, remove noise • Smooth the segmentation result • Characterization • a structuring element • transformations: erosion, dilation, opening (erosion-dilation), closing (dilation-erosion) Top: Opening Bottom: Closing NHSM - 4th year: Digital Image Processing - Restoration (Week 14-15) - M. Hachama ([email protected]) 19/21
object=1 • Slide the structuring element over the pixels • Other: Structuring elements do not necessarily have to be symmetric • Application of a transformation • Erosion: If any pixel in the mask is background (value 0), then the central pixel becomes background (i.e., min) • Dilation: If any pixel in the mask is part of the object (value > 0), then the central pixel becomes part of the object (i.e., max) • Others: Erosion followed by dilation (Opening); Dilation followed by erosion (Closing) Top: Opening Bottom: Closing NHSM - 4th year: Digital Image Processing - Restoration (Week 14-15) - M. Hachama ([email protected]) 19/21
+ η • Inverse Filter • Formulation f = h ∗ u , f = hu • Calculate 1/h. This is the simplest method and can yield good results for a noise-free image. However, it is not always possible to invert h because it may become zero. NHSM - 4th year: Digital Image Processing - Restoration (Week 14-15) - M. Hachama ([email protected]) 21/21
∗ u • Solution: Let ˆ g = 1 − ˆ h so that we formally obtain ˆ u = ˆ f 1 − ˆ g = +∞ k=0 ˆ gk ˆ f Let uo = f an ˆ un = n k=0 ˆ gk ˆ f for all n ̸= 1, we get ˆ un+1 = ˆ f + ˆ gˆ un = ˆ f + (1 − ˆ h)ˆ un, or equivalently un+1 = f + un − h ∗ un NHSM - 4th year: Digital Image Processing - Restoration (Week 14-15) - M. Hachama ([email protected]) 21/21