Bilateral Filtering Introduction to Digital Image Processing 1051.782 Carl Salvaggio Chester F. Carlson Center for Imaging Science College of Science Rochester Institute of Technology Spring Quarter 2009-2010 Carl Salvaggio Introduction to Digital Image Processing
20
Embed
Introduction to Digital Image Processing 1051 · Bilateral Filtering Noise Reduction I Noise typically presents itself in imagery as a random, high-frequency, uncorrelated modulation
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Bilateral Filtering
Introduction to Digital Image Processing1051.782
Carl Salvaggio
Chester F. Carlson Center for Imaging ScienceCollege of Science
Rochester Institute of Technology
Spring Quarter 2009-2010
Carl Salvaggio Introduction to Digital Image Processing
Bilateral Filtering
Noise Reduction
I Noise typically presents itself in imagery as a random,high-frequency, uncorrelated modulation in the signal level
I Typical methods for noise removal areI Spatial filtering with a blur kernelI Frequency domain filtering with a lowpass filterI Nonlinear filtering using a statistical filter such as the median
filter
I All of these method reduce the appearance of noise in theimage, but at the expense of other high-frequencyinformation, most notably edge detail
Carl Salvaggio Introduction to Digital Image Processing
Bilateral Filtering
Traditional Approaches
Original Image
Original Image + N(0, 10) Gaussian Filter (σ = 5) Median Filter (10x10)
Carl Salvaggio Introduction to Digital Image Processing
Bilateral Filtering
Bilateral Filtering for Gray and Color Images
“Bilateral filtering smooths images while preserving edges, bymeans of a nonlinear combination of nearby image values. Themethod is noniterative, local, and simple. It combines gray levelsor colors based on both their geometric closeness and theirphotometric similarity, and prefers near values to distant values inboth domain and range. In contrast with filters that operate onthe three bands of a color image separately, a bilateral filter canenforce the perceptual metric underlying the CIE-Lab color space,and smooth colors and preserve edges in a way that is tuned tohuman perception. Also, in contrast with standard filtering,bilateral filtering produces no phantom colors along edges in colorimages, and reduces phantom colors where they appear in theoriginal image.”[Tomasi & Manduchi, 1998]
Carl Salvaggio Introduction to Digital Image Processing
Bilateral Filtering
The Idea - Spatial Domain
A lowpass spatial domain filter applied to a multiband image f(x)produces a multiband response image as follows
h(x) =1
kd(x)
∫ ∞−∞
∫ ∞−∞
f(ξ)c(ξ, x)dξ (1)
where c(ξ, x) is a measure of geometric closeness between theneighborhood center x and a nearby point ξ. The normalizationfactor kd(x) is given by
kd(x) =
∫ ∞−∞
∫ ∞−∞
c(ξ, x)dξ (2)
If the filter is shift-invariant, c(ξ, x) is only a function of the vectordifference ξ − x and kd(x) is a constant.
Carl Salvaggio Introduction to Digital Image Processing
Bilateral Filtering
The Idea - Range Domain
Range (brightness) domain filtering is carried out similarly as
h(x) =1
kr (x)
∫ ∞−∞
∫ ∞−∞
f(ξ)s(f(ξ), f(x))dξ (3)
where s(f(ξ), f(x)) measures the photometric (brightness)similarity between the pixel at the neighborhood center and that ofa nearby point ξ.
The normalization factor in this case is
kr (x) =
∫ ∞−∞
∫ ∞−∞
s(f(ξ), f(x))dξ (4)
Note that the normalization factor in the range filtering case isdependent on the image f and as such nonlinear.
Carl Salvaggio Introduction to Digital Image Processing
Bilateral Filtering
The Idea - Bilateral Filter
Bilateral filtering simultaneously combines the spatial and rangedomain filters
h(x) =1
k(x)
∫ ∞−∞
∫ ∞−∞
f(ξ)c(ξ, x)s(f(ξ), f(x))dξ (5)
where the normalization factor is
k(x) =
∫ ∞−∞
∫ ∞−∞
c(ξ, x)s(f(ξ), f(x))dξ (6)
This process replaces the pixel at x with an average ofphotometric/radiometric similar and nearby pixel values.
Carl Salvaggio Introduction to Digital Image Processing
Bilateral Filtering
The Gaussian Case
The most common implementation of bilateral filtering utilizes theshift-invariant Gaussian filter for both the closeness, c(ξ, x), andthe similarity, s(f(ξ), f(x)) functions. These filters are Gaussianfunctions of the Euclidean distance between their arguments.
For the closeness function we have
c(ξ, x) = e− 1
2
“d(ξ,x)σd
”2
(7)
where d(ξ, x) is the Euclidean distance between x and ξ
d(ξ, x) = d(ξ − x) = ‖ξ − x‖ (8)
Carl Salvaggio Introduction to Digital Image Processing
Bilateral Filtering
The Gaussian Case (continued)
Analogously we have the similarity function
s(ξ, x) = e− 1
2
“δ(f(ξ),f(x))
σr
”2
(9)
where δ(φ, f) is the Euclidean distance between two suitableintensity measures φ and f, namely
δ(φ, f) = δ(φ− f) = ‖φ− f‖ (10)
which in the greyscale image case could simply involve imageintensity values.
Carl Salvaggio Introduction to Digital Image Processing
Bilateral Filtering
The Gaussian Case (continued)
Current Neighborhood Closeness Filter Similarity Filter Bilateral Filter
f(ξ) c(ξ, x) = e− 1
2
„d(ξ,x)σd
«2
s(ξ, x) = e− 1
2
„δ(f(ξ),f(x))
σr
«2
c(ξ, x)s(ξ, x)
σd = 5, σr = 50
Carl Salvaggio Introduction to Digital Image Processing
Bilateral Filtering
Bilateral Filter Visualization
Row 192Row 128Row 127
Carl Salvaggio Introduction to Digital Image Processing
Carl Salvaggio Introduction to Digital Image Processing
Bilateral Filtering
Color Image Filtering
When filtering true color images, the range/similarity filter is bestdefined in a CIE-Lab color space where Euclidean distance isproportional to perceptible color changes.
Carl Salvaggio Introduction to Digital Image Processing
Bilateral Filtering
RGB to CIE-Lab Conversion
This is a two-step process. First the RGB color triplet needs to beconverted to tristimulus values as
R =
{ (R+0.055
1.055
)2.4if R > 0.04045
R12.92 otherwise
G =
{ (G+0.055
1.055
)2.4if G > 0.04045
G12.92 otherwise
B =
{ (B+0.055
1.055
)2.4if B > 0.04045
B12.92 otherwise
(11)
Carl Salvaggio Introduction to Digital Image Processing