You are on page 1of 6

Image enhancement using hybrid shock filters

C. Luduşan1,2, O. Lavialle2, R. Terebeş1, M. Borda1, S. Pop1


1
Technical University of Cluj-Napoca, {cosmin.ludusan, romulus.terebes, monica.borda, sorin.pop}@com.utcluj.ro
2
Bordeaux 1 University, cosmin.ludusan@etu.u-bordeaux1.fr, olivier.lavialle@ims-bordeaux.fr

Abstract-We present a new approach based on Partial Differen- tive given by the imaginary part of the image function. In order
tial Equations (PDEs) and shock filter theory for image enhance- to accomplish this, the image definition domain needs to be
ment in “Gaussian Blur (GB) + Additive White Gaussian Noise changed from the real one to the more general domain, the
(AWGN)” scenarios. The main disadvantage of classic shock fil- complex one, thus adding a new dimension to the work space.
ters, inability of successfully filtering noisy images, is overcome by
The major improvement brought by this edge detector consists
the introduction of a complex domain shock filter framework.
Furthermore, the proposed method allows for better control and in its robustness to noise, even when dealing with low signal-
anisotropic, contour-driven shock filtering, via its control func- to-noise ratio (SNR) images. On the other hand, this edge de-
tions f1 and f2. The main advantages of our method consist in the tector presents, as well, a noticeable drawback due to the fact
ability of successfully enhancing GB+AWGN images while pre- that the edge detector will continuously evolve over time, lead-
serving a stable-convergent time behavior. ing to a divergent effect of the filtered result instead of reach-
ing a steady-state solution (as in the case of the classic shock
I. INTRODUCTION filter).
Our hybrid shock filter model aims at combining the stability
The reasoning behind our approach is based on the limita- and image enhancement properties (in GB scenarios) of the
tions presented by the classic shock filter described in [1] as classic shock filter described in [1] with the image enhance-
well as on its later developments, such as the one presented in
ment properties (in GB, AWGN or GB+AWGN scenarios) of
[5]. The main shortcoming of the classic model consists in the
the complex shock filter described in [5].
fact that in the presence of AWGN the filtering is at best mi-
nimal - this minimal filtering effect is mainly due to the numer- II. THEORETICAL BACKGROUND
ical scheme employed in its implementation. The aforemen-
As previously stated, the main weakness of traditional shock
tioned numerical scheme is based on the minmod function, de-
filters is the presence of AWGN as contamination source of the
fined in [1] and used in computing the gradient norm in each
useful signal. Since traditional shock filters were initially de-
point of the image function, restricting large value variations in
signed to deal exclusively with GB signal corruption, the more
neighboring pixels (such being the case of noise-corrupted im-
general scenario GB+AWGN proves to be too complex for a
ages). Another important shortcoming of the classic shock fil-
classic shock filter, such as the one described in [1]. The
ter resides in its edge detector, based on the 2nd order direction-
GB+AWGN scenario represents a complex perturbation with
al derivative that, in GB+AWGN scenarios, fails to correctly
multiple characteristics, difficult to filter by simple means, re-
detect edges and contours, thus blocking the shock filter’s natu-
quiring either complex processing models or successive filter-
ral time evolution.
ing for removing each distortion at a time.
By knowing these a priori limitations of the classic model, a
The qualitative level of the filtering also depends to a great
series of steps towards improving its overall performance were
extent on the discretization method used for the mathematical
taken over time. Noteworthy results were described in [2], [4]
model. An alternative discretization scheme to the classic ones,
and [6], where the edge detector and its robustness were their
described in [4], allows the classic shock filter to perform well
main focus, somehow neglecting the global GB+AWGN scena-
even in AWGN scenarios, but only for large SNR values, i.e.
rio. This generalized scenario was approached in [3] and [5]
small AWGN signal corruption.
where the useful signal, affected by both GB and AWGN, was
When dealing with just AWGN perturbations, the usual ap-
part of the problem’s statement.
proach using the PDEs formalism is the use of diffusion filters;
The starting point of our approach is represented by the work
this type of filters performs a controlled GB filtering based on
described in [5] that contains a series of innovative ideas at the
the principle of heat dissipation described in Physics. The con-
level of contour detection as well as image definition domain.
trolled GB filtering is behaviorally similar to the GB distortion,
Nevertheless, handling both contamination sources at the same
hence it can be inferred that the noise removal GB filtering in
time implies a series of compromises either processing quality
the AWGN scenario can be approximated to the GB distortion
wise, noise removal wise or edge enhancement wise. In the
in the GB perturbation scenario. Therefore, in the case of the
case of the method described in [5], in order to surpass the in-
generalized GB+AWGN scenario, the separate filtering of each
herent classic edge detector’s limitations, a new approach is
distortion is performed with filters opposite in nature, leading
proposed: an approximation of the 2nd order directional deriva-
to a complex problem. This problem is discussed in [3] and [5] Another way to address the AWGN problem is to consider a
leading to an elegant solution by defining a series of connect- more complex approach to the shock filter formalism. Such an
ing terms between the filtered image and the input image in approach would combine a deblurring method with a noise
order to preserve coherency and avoid the filtered image’s di- removal method: for the isotropic regions of the image a noise
vergence (absence of a steady-state solution), induced by the removal will take care of the AWGN distortion as for the ani-
opposite nature of the two filtering processes. sotropic regions, such as edges and contours, a local, image
The novelty of the idea described in [5] arises from the pur- geometry-driven deblurring will take care of the GB distortion.
pose of the method: to use a shock filter for processing AWGN Such an approach is presented in [2] and proposes coupling a
corrupted images not just for GB corrupted ones. In order to diffusion filter with a shock filter:
attain this desideratum the edge detector needs to be rethought,
since the classic edge detector is not adequate in handling I t = − sign (Gσ ∗ Iηη ) ⋅ ∇I + cI ξξ . (5)
AWGN corrupted signals, as previously stated. The solution
given in [5] consists in redefining the definition domain of the
σ is the standard deviation of the Gaussian kernel G and c is a
image function, from the real one to the complex one. By doing
positive constant; ξ defines the direction orthogonal to the gra-
so, the use of the imaginary part of the image function as an
dient vector. A more complex mathematical model is described
edge detector proves to be an elegant and efficient solution in
in [3]:
overcoming the classic edge detector’s problem.
The general 1D shock filter equation is the following:
I t = α r ⋅ ( hτ Iηη + I ξξ ) − α e ⋅ (1 − hτ ) ⋅ sign (Gσ ∗ Iηη ) ⋅ ∇I . (6)
I t = − I x ⋅ F ( I xx ) . (1)
Where:
With F satisfying the following constraints: hτ = hτ ( Gσ ∗ ∇I ) = 1 if Gσ ∗ ∇I < τ and 0 otherwise.
In order to improve the filtering capacity, [5] firstly proposes
⎧ F ( 0) = 0 . changing the sign function F (2) to allow taking into account
⎨ (2) not only the 2nd order derivative’s direction but also its magni-
⎩ F ( s ) ⋅ sign ( s ) ≥ 0 . tude. This way the inflexion points (the regions close to con-
tours where the 2nd order derivative has a higher magnitude)
By choosing F ( s ) = sign( s ) one obtains the classic shock filter will not have equal weights, which translates into a higher deb-
expression: lurring speed near edges and contours than in the isotropic re-
gions of the image.
I t = − sign ( I xx ) ⋅ I x . (3)
2
F (s ) = arctan(as ) . (7)
When dealing with images, we usually work in a 2D or higher π
framework. For the 2D case, (3) becomes:
In (7) a is the parameter that controls the steepness of the 2nd
I t = − sign ( Iηη ) ⋅ ∇I . (4) order derivative’s slope near 0.
Finally, [5] proposes a complex shock filter model that em-
ploys the sign function (7), having the following expression:
η represents the gradient vector’s direction.
An important role in the discretization of (4) is played by the
2 ~ (8)
way in which the gradient norm | ∇I | is computed in order to It = − arctan(a ⋅ Im(I θ )) ⋅ ∇I + λIηη + λ I ξξ .
avoid the algorithm’s instability - caused by the approximation π
of the 1st order derivatives, when computing the gradient vec- ~
tor. A way around this problem is proposed in [1] where the Where λ = reiθ is a complex scalar, λ is a real scalar
gradient norm | ∇I | is computed using a slope limiter minmod and θ ∈ (− π 2 , π 2) .
function in order to minimize the sudden signal variations. For small values of θ ( θ → 0 ), the imaginary part can be re-
The classic shock filter from (4) combined with its discreti- garded as a smoothed 2nd order derivative of the initial signal
zation using the minmod function is extremely sensitive to factored by θ and the time t as was mathematically proven in
AWGN perturbations as also stated in [1]. The filtering of a [15]. The implementation of (8) is done by the same standard
GB corrupted signal with overlaid AWGN or just of an AWGN discrete approximations used in [1], except that all computa-
corrupted one using the shock filter (4) will amplify the tions are performed in the complex domain.
AWGN instead of successfully processing it. If we consider the
image function over a continuous domain, the noise amplifica- III. HYBRID SHOCK FILTERS
tion can lead to an infinite number of inflexion points, thus Although the complex shock filter described in [5] proves to
leading to the image function’s rapid divergence from a steady- be a viable alternative to the classic one in circumventing the
state solution. noise problem in the generalized scenario of GB+AWGN inter-
ference, it presents at the same time a series of shortcomings,
the most important of them being its numerical implementa- ⎧ 1, i < TI1
tion, which becomes unstable after a sufficiently large number ⎪⎪ i − T i = 0....N −1,
of iterations. This translates into the method’s dependency on f1(TI1,TS1) = ⎨1− I1
, TI1 ≤ i < TS1,
⎪ TS1 − TI1 TI1,TS1 ∈(0; N −1)
the human supervised control, the algorithm’s stopping crite-
⎪⎩ 0, i ≥ TS1 (11)
rion being tied to its input parameters and sensitive to the na-
ture of the input image. ⎧ 0, i < TI 2
These shortcomings along with the ones presented by the ⎪⎪ i − T i = 0....N −1,
classic model represent the premises of our hybrid shock filter. f2 (TI 2 ,TS 2 ) = ⎨ I2
, TI 2 ≤ i < TS 2 ,
⎪TS 2 − TI 2 TI 2 ,TS 2 ∈(0; N −1)
Our goal is to combine the advantages of both models without
preserving their disadvantages. So far our hybrid model solves ⎩⎪ 1, i ≥ TS 2
the inability to efficiently process AWGN of the classic shock
filter as well as the divergent character of the complex one, Where TI 1 , TS1 , TI 2 , TS 2 are threshold parameters used to define
thus resulting a shock filter capable of image enhancement in the complementary behavior of f1 and f2; f1,f2 : [0;N-1]→[0;1]
GB+AWGN scenarios that is both efficient and stable. Another as exemplified in Fig. 1:
advantage of this method resides in its modularity, allowing the
use of multiple sets of functions, useful in the filter’s behavior-
al analysis over a large variety of input images.
The mathematical expression of the hybrid shock filter is the
following:

2
Re( I t ) = − arctan(a ⋅ Im(I ) θ ) ⋅ f1 ⋅ ∇I − sign (Re( Iηη )) ⋅ f 2 ⋅ ∇I
π
~
+ f1 ⋅ (Re(λ ) ⋅ Re( Iηη ) − Im(λ ) ⋅ Im(Iηη ) + λ Re( I ξξ )) .
(9)
~
Im(I t ) = Im(λ ) ⋅ Re(Iηη ) − Re(λ ) ⋅ Im(Iηη ) + λ Im(Iξξ ) .

The parameters of (9) have the following significance:


Figure 1. Graphical representation of f1 and f2 (11) for
• a is the parameter that controls the slope of the edge detec- TI 1 = 200; TS 1 = 500 TI 2 = 100; TS 2 = 700
tor’s sign function (arctan).
• θ is an input parameter. When θ→0, Im( I ) θ can be ap- The hybrid model described in (9) can be further improved
proximated to the 2nd order directional derivative of the by using different sign functions as multiplying terms in front
image function I. of f1 and f2, in this case by using the signed function described
• | ∇I | represents the gradient norm of function I, computed in [6] as multiplying term in front of f2:
using the minmod function as defined in [1].
• λ = re iθ is a complex scalar parameter, computed based σ
F ( s ) = − sign( I ww ). (12)
on the input parameter θ ∈ (− π 2 , π 2 ) .
~
• λ is a real scalar input parameter. I σ = Gσ ∗ I and w is the dominant eigenvector of matrix Jρ,
• f1 and f2 are two complementary functions that represent J ρ (∇I ) = Gρ ∗ (∇I ⋅ ∇I T ) . In this way the hybrid model (9)
the core of the hybrid shock filter formulation (9). Their
purpose is to control the nature of the hybrid shock filter, acquires another important characteristic, that of coherence
i.e. to control the transition rate of the filter’s behavior enhancement.
from an exclusively complex one to an exclusively real The hybrid shock filter has a combined behavior, weighted
one. These functions are defined as follows: by its control functions f 1 and f 2 that could be summarized as
follows:
⎧ f1 ( w) = cos(w) a) When f1=1 and f2=0 the filter behaves exclusively as a
π i (10)
⎨ ,w= ⋅ , i = 0....N − 1 complex shock filter (described in [5]). This behavior is
f
⎩ 2 ( w) = sin( w) 2 N −1 required in order to effectively deal with the AWGN per-
turbation that can be approached using the complex shock
N represents the number of time iterations, correlated with the filter paradigm. Thus, the hybrid shock filter relies on its
mathematical model’s time parameter t (t = dt·N). An alterna- edge detector (imaginary part of the image function I) in
tive definition of the two control functions f1 and f2 is the fol- correctly detecting edges and contours in GB+AWGN
lowing: conditions.
b) Following its time evolution, after a certain number of
iterations the AWGN will be filtered enough to use the
classic shock filter component of the hybrid shock filter.
This is the case when f1 ∈ [0;1) and f2 ∈ [0;1), translating in- Mean-Square-Error (RMSE) measurement and as a subjective
to a simultaneous evolution of both hybrid shock filter’s quality assessor the visual comparison between the unaltered
components. test image and the filtered results. For the above test scenario,
c) Finally, at the end of the filtering process, f1=0 and f2=1 ~
the test parameters were the following: θ = 0.00001, λ = 0.5 , a
allowing the hybrid shock filter to properly act as an edge = 0.55, λ = 0.5 dt = 0.1 and N = 1000 leading to a theoretical
enhancement filter (filtering the GB perturbation) through
its classic shock filter component. evolution time of t = 100 seconds. It needs to be stressed that
Depending on the choice of input parameters for f1 and f2 from the classic shock filter only uses 2 parameters (dt and N) while
(11) other sub-behaviors can be obtained, some of them useful the complex and hybrid shock filters use the same parameters
in specific test scenarios, others translating simply into a com- with the remark that for the hybrid shock filter the function set
plex shock filtering followed by a classic shock filtering (beha- (10) was used.
~
vior also achievable by independent successive filtering). Further on, our next experimental setting ( λ = 0.5 , a = 0.55,
It also needs to be mentioned that the use of f1 and f2 from λ = 0.5 dt = 0.1 and N = 1000) was designed to study the in-
(10) confers a more fluid, more “natural” behavior to the hybr-
fluence of θ on the divergence of the complex shock filter
id shock filter at the expense of versatility and better control.
model. The values of θ, as stated in [5], need to be as small as
IV. EXPERIMENTAL RESULTS possible in order to approximate the 2nd order directional deriv-
ative of the image function I.
In order to carry out the performance analysis, as well as the
comparative study of the hybrid shock filter, we first need to
define the experimental setting: a test image distorted with a
GB+AWGN type distortion with the following parameters: GB
with σ = 5 and AWGN of amplitude A = 10. Fig. 2 represents
the experimental setting as well as the filtered results:

Figure 3. θ and the complex shock filter’s divergent time evolution.


a) b)
The influence of the input parameter θ (Fig. 3) will be taken
into account for the hybrid shock filter as well, analogous to
the case of the complex shock filter.

c) d)

e) Figure 4. RMSE evolution of the three shock filters:


Figure 2. Experimental setting: a) Original test image; b) Distorted test im- GB(σ=5)+AWGN(A=40).
age – GB (σ = 5) + AWGN (A = 10); c) Classic shock filter result; d) Complex
shock filter result; e) Hybrid shock filter result. Fig. 4 represents the RMSE/time evolution of the three fil-
ters, according to the experimental setting presented in Fig. 2
The comparative analysis between the three types of filters (with the exception that the AWGN is of amplitude A = 40);
(classic, complex and hybrid shock filter respectively) will be the RMSE measurement was performed between the unaltered
performed using as an objective quality assessor the Root-
image and each of the three filtered results. As it can be noted, suited than the one described by (10) since it allows for better
the hybrid shock filter possesses the advantages of both the control irrespective of the time parameters.
classic shock filter (stable time evolution, steady-state solution) The following test scenario is designed to demonstrate the
and the complex one (efficient AWGN filtering as well as GB stable time evolution of the hybrid shock filter compared to the
deblurring). Since any output image is considered to be infor- highly divergent behavior of the complex shock filter.
mation and according to the definition of information, it
represents an entity about which we do not possess any prior
knowledge, it is impossible to a priori know the minimum val-
ue of the RMSE obtained by filtering. Thus, the complex shock
filter lacks the ability of maintaining a stable behavior (that
leads to a steady-state solution) long enough to ensure that its
time evolution has reached the minimum RMSE value before
diverging.
The next experimental setting (same images, Fig. 2a and 2b)
will study the effect of the f1 and f2 functions from (11) over the
hybrid shock filter’s convergence and overall time evolution.

Figure 6. Complex shock filter’s and hybrid shock filter’s time evolution.

~
The test parameters are the following: θ = 0.00001, λ = 0.5 ,
a = 0.55, λ = 0.5 dt = 0.1 TI 1 = TS 1 = 60 TI 2 = 60; TS 2 = 500
and N = 10000 with a GB (σ = 5) and an AWGN (A = 40).
As a further development of the hybrid model, our next test
scenario will compare the results yielded with three filters hav-
ing as input a strongly oriented image, presenting elongated
structures. To suit this purpose, we have chosen as input a fin-
gerprint image (Fig. 7a). The input was distorted using the ge-
neralized GB+AWGN scenario with σ = 10 and A = 25 and the
Figure 5. Influence of the control functions f1 and f2 (11) over the hybrid
shock filter’s time evolution. hybrid shock filter was modified to accommodate the use of the
sign function described in (12), thus acquiring the coherence
The test parameters are the following: GB with σ = 5 and enhancing property introduced in [6].
~
AWGN of amplitude A = 40, θ = 0.00001, λ = 0.5 , a = 0.55,
λ = 0.5 dt = 0.1 and N = 1000 while the parameters for f1 and
f2 in each of the four test scenarios are presented in Table 1:

TABLE I
f1 AND f2 TEST PARAMETERS
Param. TI1 TS1 TI2 TS2
Test #
Test 1 150 250 200 1000
Test 2 50 100 100 900
Test 3 300 400 300 900
Test 4 300 320 300 1000

The conclusion drawn from the test presented in Fig. 5 is


that the hybrid shock filter performs better in the generalized
scenario of GB+AWGN when f1 has a short transient evolution
from values different from 0, followed by a decreasing charac- a) b)
teristic to its inferior limit, 0. The f2 function on the other hand,
having a complementary time characteristic, will exclusively
control the filter’s real part without affecting the imaginary part
(that remains unchanged), that acts as an edge detector.
Another important remark that needs to be made is that in
low SNR scenarios the function set defined by (11) is better
The mathematical model allows further improvements, from
minor tweaks in control function definition to increasing the
filtering capacity as well as the convergence speed towards a
steady-state RMSE value.
The experimental results and comparative analysis were
promising, establishing the premises for future shock filter
theory paradigms.
ACKNOWLEDGMENT
This work was supported by CNCSIS-UEFISCSU, project
number PNII-IDEI code 908/2007.
REFERENCES
[1] S. Osher and L. Rudin, “Feature-oriented image enhancement using
shock filters”, SIAM Journal on Numerical Analysis, Vol. 27, pp: 919-
c) d) 940, 1990.
[2] L. Alvarez and L. Mazorra, “Signal and image restoration using shock
filters and anisotropic diffusion” SIAM Journal on Numerical Analysis,
Vol. 31, pp: 590-605, 1994.
[3] P. Kornprobst, R. Deriche and G. Aubert, “Image coupling, restoration
and enhancement via PDEs”, International Conference on Image
Processing, Proceedings, Vol. 2, pp: 458-461, 1997.
[4] L. Remaki and M. Cheriet, “Numerical Schemes of Shock Filter Models
for Image Enhancement and Restoration”, Journal of Mathematical Im-
aging and Vision, Vol. 18, pp: 129-143, 2003.
[5] G. Gilboa, N. A. Sochen and Y. Y. Zeevi, “Regularized Shock Filters and
Complex Diffusion” European Conference on Computer Vision 2002,
Lecture Notes in Computer Science, Vol. 2350, pp: 399-413, 2002.
[6] J. Weickert, “Coherence-Enhancing Shock Filters”, Lecture Notes in
Computer Science – Pattern Recognition, Vol. 2781, pp: 1-8, 2003.
[7] D. Tschumperle and R. Deriche, “Constrained and Unconstrained PDEs
for Vector Image Restoration”, 12th Scandinavian Conference on Image
Analysis, June 11-14, Bergen, Norway, pp: 153-160, 2001.
[8] A. Buades, B. Coll and J.M. Morel, “Image enhancement by non-local
reverse heat equation”, Preprint CMLA 2006-22, 2006.
e) [9] L. Rudin, “Images, numerical analysis of singularities and shock filters”,
Figure 7. a) Original test image; b) Distorted image (σ = 10;A = 25); PhD Thesis, California Institute of Technology, Pasadena CA, 1987.
c) Coherence Enhancing Shock Filter [6] result; d) Complex shock filter result [10] D. Barash, “One-Step Deblurring and Denoising Color Images Using
(N = 1000); e) Hybrid shock filter result (N = 1000); Partial Differential Equations”, HP Laboratories Israel, 2001.
[11] M. Welk, D. Theis, T. Brox and J. Weickert, “PDE-Based Deconvolution
As it can be seen even after a subjective visual analysis, the with Forward-Backward Diffusivities and Diffusion Tensors”, Scale-
Space 2005, Lecture Notes in Computer Science, Vol. 3459, pp: 585-597,
results obtained with the hybrid shock filter (Fig. 7e) are best at 2005.
both GB+AWGN filtering as well as coherence enhancing (e.g. [12] S. Bettahar and A. B. Stambouli, "Shock filter coupled to curvature diffu-
structure completion along ridge direction). The coherence sion for image denoising and sharpening", Image and Vision Computing,
enhancing shock filter described in [6] suffers from the same Vol. 26 (11), pp: 1481-1489, 2008.
[13] A. Buades, B. Coll and J.M. Morel, “The Staircasing Effect in Neighbor-
shortcoming as the classic one, the inability to properly filter hood Filters and its Solution”, IEEE Transactions on Image Processing,
noisy images while at the same time deblur them. In Fig. 7d the Vol. 15 (6) pp: 1499-1505, 2006.
divergence problem of the complex shock filter can be clearly [14] G. Gilboa, “Super-resolution Algorithms Based on Inverse Diffusion-type
seen, thus underlining its instability after a sufficiently large Processes”, PhD Thesis, Technion-Israel Institute of Technology, Haifa,
2004.
number of iterations. [15] G. Gilboa, Y. Y. Zeevi and N. A. Sochen, “Complex Diffusion Processes
Based on an objective analysis the RMSE measured values for Image Filtering” Proceedings of the Third International Conference
are as follows: initial RMSE between Fig. 7a and 7b on Scale-Space and Morphology in Computer Vision 2001, Lecture Notes
RMSE = 63.41; Coherence Enhancing Shock Filter (Fig. 7c) in Computer Science, Vol. 2106, pp: 299-307, 2001.
RMSE = 62.9; Complex Shock Filter (Fig. 7d) RMSE = 65.55;
Hybrid Shock Filter (Fig. 7e) RMSE = 50.75.
V. CONCLUSIONS
While still a work in progress, the hybrid shock filter has
proven so far a step forward in shock filter theory, turning out
to be a viable alternative to the classic methods in both GB,
AWGN and GB+AWGN scenarios, presenting at the same
time a coherence-enhancing capability.

You might also like