선정목록으로
An Algorithmic Analysis of Variational Models for Perceptual Local Contrast Enhancement
필름·전자재료 · (15) 디스플레이 패널재료
기본 정보
- 저자
- DOI
- 10.5201/ipol.2015.131
- 저널
- Image Processing On Line
- 발행년도
- 2015
- 발행기관
- Image Processing On Line
- 피인용수
- 16
- 라이선스
- cc-by-nc-sa
- 논문 유형
- –
- 언어
- –
- 원문 페이지
- https://doi.org/10.5201/ipol.2015.131
- 토픽
- Color Science and Applications
- OpenAlex ID
- W1190397220
평가 내용
- 관련도
- 사업분야
- 필름·전자재료 · (15) 디스플레이 패널재료
- 부 분야
- –
- R&D 측면
- –
- 확신도
- –
- 근거 용어
- –
- 판단 근거
- LLM(gemma-4-26b-a4b-it) 평가로 '필름·전자재료 > 디스플레이 패널재료' 분야에 선정된 논문입니다.
- R&D 활용 포인트
- –
- 평가 입력
- –
초록
Color cast cancellation and local contrast enhancement are very important problems in computer vision. In this paper we review the algorithm proposed by Palma-Amestoy et al. [A perceptually inspired variational framework for color enhancement, IEEE Transactions on Pattern Analysis and Machine Intelligence, 21 (2009), pp. 458–474], present results and evaluate the impact of a change in the parameters.
본문 47,278자
본문 펼치기
Published in Image [Processing](https://doi.org/10.5201/ipol) On Line on 2015–07–29.
Submitted on 2015–03–02, accepted on 2015–06–01.
ISSN 2105–1232 _⃝_ c 2015 IPOL & the authors [CC–BY–NC–SA](http://creativecommons.org/licenses/by-nc-sa/3.0/)
This article is available online with supplementary materials,
software, datasets and online demo at
```
https://doi.org/10.5201/ipol.2015.131
# An Algorithmic Analysis of Variational Models for Perceptual Local Contrast Enhancement
## S. Ferradans 1, R. Palma-Amestoy 2, E. Provenzi 3
```
1 ENS, CNRS, PSL, Paris, France ( `sira.ferradans@ens.fr` )
2 Woodtech Measurement Systems, Santiago, Chile ( `ropalma@ing.uchile.cl` )
3 Laboratoire MAP5 (UMR CNRS 8145), Universit´e Paris Descartes, Paris, France
( `edoardo.provenzi@parisdescartes.fr` )
_Communicated_ _by_ Jose-Luis Lisani _Demo_ _edited_ _by_ Jose-Luis Lisani
Abstract
Color cast cancellation and local contrast enhancement are very important problems in computer
vision. In this paper we review the algorithm proposed by Palma-Amestoy et al. [A perceptually
inspired variational framework for color enhancement, IEEE Transactions on Pattern Analysis
and Machine Intelligence, 21 (2009), pp. 458–474], present results and evaluate the impact of a
change in the parameters.
Source Code
The code implements the algorithm presented by Palma-Amestoy et al. [7], with a precomputation of the polynomials. These polynomials are inputted from text files which are also
provided.
The reviewed source code and documentation for this algorithm are available from the web
page of [this](https://doi.org/10.5201/ipol.2015.131) article <sup>1</sup> . Compilation and usage instruction are included in the `README.txt` file of
the archive.
Supplementary Material
As supplementary material, a reference dataset is provided, and the Matlab code to generate
the polynomial approximation, although it is not necessary to execute it to test the algorithm.
Keywords: color constancy; contrast enhancement; Weber-Fechner contrast; visual adaptation; human visual system.
1 `[https://doi.org/10.5201/ipol.2015.131](https://doi.org/10.5201/ipol.2015.131)`
S. Ferradans, R. Palma-Amestoy, E. Provenzi, _An Algorithmic Analysis of Variational Models for Perceptual Local Contrast Enhancement_,
# 1 Introduction
In this paper, we will consider the problem of local contrast enhancement inspired by human perception and its consequences on color cast removal. More specifically, given any digital image, acquired
under general illumination conditions, we will try to modify its chromatic attributes so that the
resulting image is as close as possible to the human perception of the scene photographed in the
picture.
This kind of algorithms are of great importance in different fields that need an illuminationindependent representation of the scene such as object recognition, calibration, image segmentation
or tracking. They have also proven necessary in computational photography and flickering reduction,
to quote but two applications.
In [7] the authors built a general variational framework to perform perceptual color correction.
Their work is based on the selection of energy functionals through suitable constraints related to
phenomenological properties of the Human Visual System (HVS).
This variational framework allows to embed existing perceptual color correction algorithms and
clarify more easily the main similarities and differences among them. The usefulness of this result
relies in the fact that the direct equations of these algorithms are very distant from each other, but
not the energies they minimize.
The plan of this paper is the following: in Section 2, we introduce the perceptual laws and the
mathematical model behind the algorithm. In Section 3, we detail the numerical scheme and present
the final algorithm. Finally, in Section 4, we present some results and how they vary when changing
the default parameters.
# 2 A General Variational Framework for Perceptual Color Correction
In this section, we will introduce the basic results of paper [7]. First of all, we will introduce and
discuss the meaning of an important result on the variational interpretation of histogram equalization
(HE), which is strongly related to the framework proposed in [7]. Then, we will briefly recall four
basic HVS features, and, finally, we will show how to modify the energy function of HE in order to
take into account these HVS characteristics, which is one of the main results of [7].
Before going through this description, we introduce the notation that will be used in the rest
of the paper. Let us denote with Ω _⊂_ R <sup>2</sup> the _spatial_ _domain_ of a digital image, with _|_ Ω _|_ its area
and with _x_ _≡_ ( _x_ 1 _, x_ 2) and _y_ _≡_ ( _y_ 1 _, y_ 2) the coordinates of two arbitrary pixels in Ω. We will always
consider a _normalized_ _dynamic_ _range_ in [0 _,_ 1], so that a _RGB_ _image_ _function_ will be denoted with
_I_ : Ω _−→_ [0 _,_ 1] _×_ [0 _,_ 1] _×_ [0 _,_ 1]
_x_ _�→_ ( _IR_ ( _x_ ) _, IG_ ( _x_ ) _, IB_ ( _x_ )) _,_
where each scalar component _Ic_ ( _x_ ) defines the intensity level of the pixel _x ∈_ Ωin the red, green and
blue channels, respectively.
We stress that we will perform every computation on the scalar components of the image, thus
_treating_ _each_ _chromatic_ _component_ _separately_ . Therefore, we will avoid the subscript _c_ and write
simply _I_ ( _x_ ) to denote the intensity of the pixel _x_ in a given chromatic channel.
## 2.1 Variational Interpretation of Histogram Equalization
One of the main inspirations of paper [7] was the following result about the variational interpretation
of histogram equalization [11].
220
_Theorem_ _1_ : Histogram equalization can be implemented by minimizing the following energy
��
Ω <sup>2</sup> <sup>_|I_</sup> <sup>(</sup> <sup>_x_</sup> <sup>)</sup> <sup>_−_</sup> <sup>_I_</sup> <sup>(</sup> <sup>_y_</sup> <sup>)</sup> <sup>_| dxdy._</sup> (1)
�2
<u>1</u>
_dx_ _−_
_|_ Ω _|_
- _I_ ( _x_ ) _−_ <sup><u>1</u></sup>
2
_E_ hist eq( _I_ ) _≡_ 2
Ω
Let us write the HE energy functional as follows: _E_ hist eq( _I_ ) = _D_ <u>12</u> <sup>(</sup> <sup>_I_</sup> <sup>)</sup> <sup>_−_</sup> <sup>_C_</sup> <sup>(</sup> <sup>_I_</sup> <sup>),</sup> <sup>where</sup> <sup>the</sup> <sup>two</sup>
functional terms _D_ <u>12</u> <sup>(</sup> <sup>_I_</sup> <sup>)</sup> <sup>and</sup> <sup>_C_</sup> <sup>(</sup> <sup>_I_</sup> <sup>)</sup> <sup>are</sup>
Let us write the HE energy functional as follows: _E_ hist eq( _I_ ) = _D_ <u>12</u>
<u>12</u> <sup>(</sup> <sup>_I_</sup> <sup>)</sup> <sup>and</sup> <sup>_C_</sup> <sup>(</sup> <sup>_I_</sup> <sup>)</sup> <sup>are</sup>
<u>12</u> <sup>(</sup> <sup>_I_</sup> <sup>)</sup> <sup>_≡_</sup> <sup>2</sup>
- _I_ ( _x_ ) _−_ <sup><u>1</u></sup>
�2
_dx,_ (2)
_D_ <u>12</u>
Ω
- _I_ ( _x_ ) _−_ <sup><u>1</u></sup>
2
and
_C_ ( _I_ ) _≡_ <sup><u>1</u></sup>
_|_ Ω _|_
��
Ω <sup>2</sup> <sup>_|I_</sup> <sup>(</sup> <sup>_x_</sup> <sup>)</sup> <sup>_−_</sup> <sup>_I_</sup> <sup>(</sup> <sup>_y_</sup> <sup>)</sup> <sup>_| dxdy._</sup> (3)
The minimization of _E_ hist eq( _I_ ) = _D_ <u>12</u> <sup>(</sup> <sup>_I_</sup> <sup>)</sup> <sup>_−_</sup> <sup>_C_</sup> <sup>(</sup> <sup>_I_</sup> <sup>)</sup> <sup>is</sup> <sup>achieved</sup> <sup>through</sup> <sup>the</sup> <sup>_minimization_</sup> <sup>_of_</sup> <sup>_D_</sup> <sup>(</sup> <sup>_I_</sup> <sup>)</sup> <sup>and</sup>
_−C_ ( _I_ ) (i.e. the _maximization_ _of_ _C_ ( _I_ )).
Dispersion term. _D_ <u>12</u> <sup>(</sup> <sup>_I_</sup> <sup>)</sup> <sup>is</sup> <sup>called</sup> <sup>_global_</sup> <sup>_quadratic_</sup> <sup>_dispersion_</sup> <sup>term</sup> <sup>around</sup> <sup>the</sup> <sup>middle</sup> <sup>gray</sup> <sup>level</sup>
1 _/_ 2 and it is minimized when _I_ ( _x_ ) _≡_ 1 _/_ 2 for all _x_ _∈_ Ω, i.e. the minimization of this term tends to
turn _I_ into a uniform gray image.
Contrast term. _C_ ( _I_ ) is called _global_ _contrast_ term and its maximization corresponds to the intensification of the global contrast of the image _I_, measured through the absolute differences _|I_ ( _x_ ) _−I_ ( _y_ ) _|_ .
Optimization. The main result of paper [11] is that, if _I_ <sup>_∗_</sup> = argmin _I E_ hist eq( _I_ ), then _I_ <sup>_∗_</sup> has
equalized histogram, i.e. all the intensity levels have the same occurrence probability in the image.
In [11], the authors prove this result by showing that, if we denote by _H_ the cumulative histogram,
then the image function _I_ <sup>_∗_</sup> satisfies the equation _H_ ( _I_ <sup>_∗_</sup> ( _x_ )) = _I_ <sup>_∗_</sup> ( _x_ ), for all _x ∈_ Ω, which implies the
flatness of the histogram of _I_ <sup>_∗_</sup>, see e.g. [4].
The minimization of _E_ hist eq( _I_ ) can be achieved through gradient descent. With respect to this,
another important result of [11] is that, if _I_ 0 represents any input image, then the initial value
problem
_∂tI_ = _−δE_ hist eq( _I_ )
_,_ (4)
_I_ (0) = _I_ 0
has only one solution, where _t_ is the evolution parameter of the iterative gradient descent scheme
and the symbol _δ_ represents the first variation of the functional.
Interpretation. The argmin of _E_ hist eq( _I_ ) is the image corresponding to the optimal balance between _two_ _opposite_ _effects_ : on one side, the minimization of _D_ <u>12</u> <sup>(</sup> <sup>_I_</sup> <sup>)</sup> <sup>tends</sup> <sup>to</sup> <sup>_set_</sup> <sup>_all_</sup> <sup>_the_</sup> <sup>_levels_</sup> <sup>_to_</sup> <sup>_the_</sup>
_average_ _gray_ 1 _/_ 2 but, on the other side, the minimization of _−C_ ( _I_ ) tends to _spread_ _the_ _intensity_
_levels_ _apart,_ _as_ _far_ _as_ _possible_ _from_ _each_ _other_ .
So, the intrinsic meaning of the variational description of histogram equalization is that _the_
_equilibrium_ _among_ _two_ _conflicting_ _actions,_ _control_ _of_ _the_ _intensity_ _dispersion_ _around_ _the_ _middle_ _gray_
_level_ _and_ _contrast_ _enhancement,_ _induces_ _histogram_ _equalization_ .
One practical consequence of this result is that, applying for example the gradient descent technique to minimize _E_ hist eq( _I_ ), one can stop the minimization process before reaching the complete
equalization, thus realizing a _partial_ _equalization_ that can nonetheless be useful to avoid the typical
over-enhancement of low-key images (see [4] for more details).
221
However, for the purposes of color image processing, the most important consequences of Theorem
1 are theoretical: in fact, as we will see in the next section, we can modify the functional _E_ hist eq( _I_ )
in such a way that the basic principle of histogram equalization, i.e. the balance between dispersion
control and contrast enhancement, is preserved but we can change the analytical form of the terms
_D_ <u>12</u> <sup>(</sup> <sup>_I_</sup> <sup>)</sup> <sup>and</sup> <sup>_C_</sup> <sup>(</sup> <sup>_I_</sup> <sup>)</sup> <sup>taking</sup> <sup>inspiration</sup> <sup>from</sup> <sup>human</sup> <sup>visual</sup> <sup>perceptual</sup> <sup>features.</sup> <sup>The</sup> <sup>argmin</sup> <sup>image</sup> <sup>_I_</sup> <sup>_∗_</sup>
of the modified functional is a color-corrected version of the original image driven by perceptual
properties of the HVS.
## 2.2 A Basic Set of Four Basic HVS Properties
The HVS is an extraordinarily complex system, nowadays still far from being fully understood. As it
would be impossible to provide an even approximate description, here we will just recall the _four basic_
_phenomenological_ _mechanisms_ _of_ _color_ _vision_ that will be used to select perceptual functionals. As
a general reference for the following subsection, the reader can refer to the very complete book [13].
2.2.1 Adaptation to the Average Luminance Level
The absortion of a photon by one of the three _L, M, S_ _cones_ activates a photo-chemical transduction
process which transforms the electromagnetic energy of the photon to a difference of electric potential
of the photoreceptor’s membrane.
The empirical law that describes this transduction, see e.g. [12], is known as _Michaelis-Menten’s_
_equation_ (or _Naka-Rushton’s_ _equation_ when the coefficient _n_ is unitary)
<u>∆</u> _<u>V</u>_
_r_ ( _L_ ) =
∆ _V_ max
_<u>L</u>_ <sup>_n_</sup>
=
_S_
_L_ <sup>_n_</sup> + _L_ <sup>_n_</sup> _S_
_,_ (5)
where ∆ _V_ max is the highest difference of potential that can be generated, _n_ is a constant (measured
as 0.74 for the rhesus monkey), _L_ is the luminance of the viewed object and _LS_ is the luminance
at which the photoreceptor response is half maximal, called the _semisaturation_ _level_, and which
is usually associated with the _level_ _of_ _adaptation_ . Each type of cone _L, M, S_ is most sensitive in a
particular waveband and the semisaturation constant depends on the amount of light in the particular
waveband that is absorbed, not on the global luminance of the light source.
Equation 5 has a sigmoid-like behavior that can be interpreted as follows: the photoreceptors
response has an intensity _threshold_, below which their output is null, then they _respond fairly linearly_
and, finally, the response _saturates_ as we approach large values of luminance.
The ‘center’ of this behavior is the semisaturation value _LS_, which is mapped to 1 _/_ 2, in this sense
the retinal cells ‘adapt’ to each scene average luminance, allowing us to perceive modulations of light
intensity around _LS_ . This adaptive capacity of retinal cells is of paramount importance for human
vision, without it we simply would not be able to see when passing from a dim light environment to
a very intensely illuminated one, and viceversa.
2.2.2 Local Contrast Enhancement
The HVS operates a local contrast enhancement, with the primary (but not the only) effect of
improving edge perception, as proven by visual effects as simultaneous contrast or Mach bands, see
e.g. [4]. Edges contain the most important part of the visual information, so it is not surprising that
the HVS has developed a way to improve their perception. The most important feature that must
be underlined here is that edge enhancement is _local_, i.e. it depends on the local distribution of light
intensity around each point.
222
2.2.3 Color Constancy
If light adaptation is the HVS ability to adapt to different light _intensities_, _color_ _constancy_ may be
described at first glance as the ability to adapt to different light _spectral_ _content_, in order to perceive
colors as constant as possible to changes in illumination. This feature is so intrinsically hardwired in
our visual system that we often take it for granted. However, whenever we take two pictures of the
same scene with two different illuminants, we see that we must perform a very careful white balance
to obtain two images that produce similar color sensations. The psycho-physiological details that
allow color constancy are beyond the scopes of this work, for more details see e.g. [5].
Color constancy will be essential for the selection of the analytical form of the contrast enhancement term of perceptual functionals.
2.2.4 Weber’s Law
Weber’s psychophysical experiments to test contrast perception consist in what follows: a darkadapted human observer is put in a dim room in front of a white screen on which a narrow beam of
light is thrown in the center of the visual field. The luminous intensity _I_ of the beam is increased
very slowly and the observer is asked to tell whether he/she can perceive an intensity change. The
least perceptible intensity change ∆ _I_ is generally called _JND_ for _Just_ _Noticeable_ _Difference_ .
Weber found that the JND increases proportionally with the luminous intensity, i.e. ∆ _I_ = _K · I_,
or, as it is in general reported
<u>∆</u> _<u>I</u>_
_≃_ _K._ (6)
_I_
Equation (6) is called _Weber’s law_ and _K_ Weber’s constant. Weber’s law says that, as we increase the
background light _I_, the difference ∆ _I_ must increase proportionally in order to be able to appreciate
_I_ + ∆ _I_ as different from _I_ .
## 2.3 Variational Perceptually-Inspired Color Correction of Digital Im- ages
In [7] the perceptual features recalled in Subsection 2.2 have been used to modify the histogram
equalization functional described in Subsection 2.1 as reported in the next theorem.
_Theorem_ _2_ : The only class of energy functionals complying with all the four HVS features discussed
in Section 2.2 is the following
_Eµ,I_ 0 _,w,ϕ_ ( _I_ ) = _Dµ,I_ 0( _I_ ) + _Cw,ϕ_ ( _I_ ) _,_ (7)
where
- _I_ 0( _x_ ) log <sup>_<u>I</u>_</sup> <sup><u>0(</u></sup> <sup>_<u>x</u>_</sup> <sup><u>)</u></sup>
_I_ ( _x_ )
<sup><u>0(</u></sup> <sup>_<u>x</u>_</sup> <sup><u>)</u></sup>
_I_ ( _x_ ) <sup>_−_</sup> <sup>(</sup> <sup>_I_</sup> <sup>0(</sup> <sup>_x_</sup> <sup>)</sup> <sup>_−_</sup> <sup>_I_</sup> <sup>(</sup> <sup>_x_</sup> <sup>))</sup>
��
_dx,_ (8)
- _<u>µ</u>_ _µ_ log _I_ ( _x_ ) <sup>_−_</sup> <sup>(</sup> <sup>_µ −_</sup> <sup>_I_</sup> <sup>(</sup> <sup>_x_</sup> <sup>))</sup> + _β_
_α_
_Dµ,I_ 0( _I_ ) =
and
where:
Ω
_dxdy,_ (9)
- <u>min</u> _<u>{I</u>_ <u>(</u> _<u>x</u>_ <u>)</u> _<u>, I</u>_ <u>(</u> _<u>y</u>_ <u>)</u> _<u>}</u>_
max _{I_ ( _x_ ) _, I_ ( _y_ ) _}_
_Cw,ϕ_ ( _I_ ) =
��
Ω <sup>2</sup> <sup>_w_</sup> <sup>(</sup> <sup>_x, y_</sup> <sup>)</sup> <sup>_ϕ_</sup>
_•_ _I_ 0 is a given channel of the original image function;
_•_ _µ_ is the average value of _I_ 0;
223
_•_ _α, β_ _>_ 0 are real coefficients which control the attachment to _µ_ and to the original image
function values _I_ 0, respectively;
_•_ _w_ : Ω _×_ Ω _→_ R <sup>+</sup> is a spatial kernel, which depends only on the Euclidean distance _∥x −_ _y∥_
between two generic pixels _x, y_ _∈_ Ωand it is monotonically decreasing with the distance itself,
i.e. _w_ ( _x, y_ ) := _g_ ( _∥_ _x −_ _y_ _∥_ ) where _g_ : R <sup>+</sup> _→_ R is monotonically decreasing;
_•_ _ϕ_ : [0 _,_ 1] _→_ R is a monotonically increasing differentiable function.
Contrast Term and Color Constancy. To understand the motivation for the analytical shape
of the contrast term _Cw,ϕ_ ( _I_ ) let us consider the basic image formation model, i.e. _I_ ( _x_ ) = _ρ_ ( _x_ ) _· λ_,
where _ρ_ ( _x_ ) represents the reflectance of a point _x_ and _λ_ represents the illuminant (supposed to be
constant all over the scene). Since _Cw,ϕ_ ( _I_ ) is written in terms of a ratio, it is evident that it is
independent from illuminant changes, thus it is coherent with the color constancy feature. Moreover,
as proven in [7], this analytical form is the only one in which color constancy and Weber’s law can
be combined.
Function _ϕ_ represents a degree of freedom and it is chosen to be monotonically increasing to
prevent contrast reversion between pixels.
Contrast Term and Local Contrast Enhancement. Finally, notice that the minimization of
_Cw,ϕ_ ( _I_ ) indeed induces a contrast enhancement. In fact, the ratio min _{I_ ( _x_ ) _, I_ ( _y_ ) _}/_ max _{I_ ( _x_ ) _, I_ ( _y_ ) _}_
is minimized when the lowest value between two pixels is decreased and the highest is increased,
which, of course, corresponds to an intensification of contrast. The enhancement is spatially local
due to the presence of the weighting function _w_ . Typically _w_ is a Gaussian kernel with center in
_x_, its standard deviation _σ_ can be set by the user to increase or decrease the locality of contrast
enhancement. Small values of _σ_ push the effect towards _sharpening_, large values of _σ_ instead push
towards a global enhancement.
Dispersion Term. The choice of the dispersion term has been guided by dimensional coherence
with the contrast term, which has dimension 0 with respect to _I_ . The easiest meaningful candidate
is the _entropy_ _functional_ _Dµ,I_ 0, whose minimization produces a reduction of entropy, i.e. disorder,
around the average value _µ_ (which can be different in each chromatic channel) and around the
original image _I_ 0. This last attachment is introduced to avoid an excessive departure from the
original intensity values and can be modulated via the coefficients ratio _α/β_ . To understand why
_Dµ,I_ 0 complies with the tasks of a dispersion term, we note that the abstract analytical form of the
integrand can be written as _f_ ( _s_ ) = _a_ log <sup>_<u>a</u>_</sup> _s_ <sup>_−_</sup> <sup>(</sup> <sup>_a −_</sup> <sup>_s_</sup> <sup>)</sup> <sup>[1],</sup> <sup>where</sup> <sup>_s_</sup> <sup>_∈_</sup> <sup>(0</sup> <sup>_,_</sup> <sup>1]</sup> <sup>is</sup> <sup>a</sup> <sup>generic</sup> <sup>normalized</sup>
integrand can be written as _f_ ( _s_ ) = _a_ log <sup>_<u>a</u>_</sup> _s_ <sup>_−_</sup> <sup>(</sup> <sup>_a −_</sup> <sup>_s_</sup> <sup>)</sup> <sup>[1],</sup> <sup>where</sup> <sup>_s_</sup> <sup>_∈_</sup> <sup>(0</sup> <sup>_,_</sup> <sup>1]</sup> <sup>is</sup> <sup>a</sup> <sup>generic</sup> <sup>normalized</sup>
intensity level and _a >_ 0 can represent either _µ_ or _I_ 0( _x_ ). The first derivative of _f_ ( _s_ ) is _ds_ <sup>_<u>df</u>_</sup> <sup>(</sup> <sup>_s_</sup> <sup>) = 1</sup> <sup>_−_</sup> <sup>_<u>a</u>_</sup> _s_ <sup>,</sup>
intensity level and _a >_ 0 can represent either _µ_ or _I_ 0( _x_ ). The first derivative of _f_ ( _s_ ) is _ds_ <sup>_<u>df</u>_</sup> <sup>(</sup> <sup>_s_</sup> <sup>) = 1</sup> <sup>_−_</sup> <sup>_<u>a</u>_</sup> _s_ <sup>,</sup>
so _ds_ <sup>_<u>df</u>_</sup> <sup>(</sup> <sup>_s_</sup> <sup>)</sup> <sup>=</sup> <sup>0</sup> <sup>if</sup> <sup>and</sup> <sup>only</sup> <sup>if</sup> <sup>_s_</sup> <sup>=</sup> <sup>_a_</sup> <sup>.</sup> <sup>Moreover,</sup> <sup>the</sup> <sup>second</sup> <sup>derivative</sup> <sup>is</sup> <sup>_<u>d</u>_</sup> _ds_ <sup>2</sup> <sup>_<u>f</u>_</sup> <sup>2</sup> <sup>(</sup> <sup>_s_</sup> <sup>)</sup> <sup>=</sup> _sa_ <sup>2</sup> <sup>_>_</sup> <sup>0,</sup> <sup>_∀s_</sup> <sup>.</sup> <sup>This</sup>
_ds_ <sup>_<u>df</u>_</sup> <sup>(</sup> <sup>_s_</sup> <sup>)</sup> <sup>=</sup> <sup>0</sup> <sup>if</sup> <sup>and</sup> <sup>only</sup> <sup>if</sup> <sup>_s_</sup> <sup>=</sup> <sup>_a_</sup> <sup>.</sup> <sup>Moreover,</sup> <sup>the</sup> <sup>second</sup> <sup>derivative</sup> <sup>is</sup> <sup>_<u>d</u>_</sup> _ds_ <sup>2</sup> <sup>_<u>f</u>_</sup> <sup>2</sup>
_ds_ <sup>_<u>df</u>_</sup> <sup>(</sup> <sup>_s_</sup> <sup>) = 1</sup> <sup>_−_</sup> <sup>_<u>a</u>_</sup> _s_
so _ds_ <sup>_<u>df</u>_</sup> <sup>(</sup> <sup>_s_</sup> <sup>)</sup> <sup>=</sup> <sup>0</sup> <sup>if</sup> <sup>and</sup> <sup>only</sup> <sup>if</sup> <sup>_s_</sup> <sup>=</sup> <sup>_a_</sup> <sup>.</sup> <sup>Moreover,</sup> <sup>the</sup> <sup>second</sup> <sup>derivative</sup> <sup>is</sup> <sup>_<u>d</u>_</sup> _ds_ <sup>2</sup> <sup>_<u>f</u>_</sup> <sup>2</sup> <sup>(</sup> <sup>_s_</sup> <sup>)</sup> <sup>=</sup> _sa_ <sup>2</sup> <sup>_>_</sup> <sup>0,</sup> <sup>_∀s_</sup> <sup>.</sup> <sup>This</sup>
implies that the value _s_ = _a_ is a global minimum for _f_ ( _s_ ). Hence, _minimizing_ _Dµ,I_ 0 _corresponds_ _to_
_an_ _attachment_ _to_ _µ_ _and_ _around_ _the_ _original_ _data_ _I_ 0( _x_ ).
## 2.4 Relationship with Existing Perceptually-Inspired Color Correction Models
If we compare _E_ hist eq with _Eµ,I_ 0 _,w,ϕ_ ( _I_ ), we can infer that _a_ _perceptually-inspired_ _color_ _correction_
_can_ _be_ _interpreted_ _as_ _a_ _suitable_ _local_ _and_ _non_ _linear_ _version_ _of_ _histogram_ _equalization_ . Moreover,
within this framework, it is possible to link two well-known models for perceptually-inspired color
correction ACE [10] and Retinex [6]. As previously said, this result is quite remarkable, since the
original equations of ACE and Retinex seem to be very distant from each other, see [8] and [9] for
224
more details. This can be done simply by selecting two different analytical expressions of the function
_ϕ_ . In [3] and [2], respectively, it has been proved that:
_•_ If _ϕ ≡_ log, then the minimization of _Eµ,I_ 0 _,w,_ log( _I_ ) leads to the so-called ACE algorithm formulated in [10];
_•_ If _ϕ ≡_ id, then the minimization of _Eµ,I_ 0 _,w,_ id( _I_ ) leads to the continuous symmetrized version of
the original Retinex algorithm [6].
In the test section, apart from the identity and the logarithmic function, we will also consider
:=
11+ _−_ <u>max(</u> <sup><u>min(min(</u></sup> <sup>_<u>II</u>_</sup> _<u>I</u>_ <sup><u>((</u></sup> <u>(</u> <sup>_<u>xx</u>_</sup> _<u>x</u>_ <sup><u>))</u></sup> <u>)</u> <sup>_<u>,I,I</u>_</sup> _<u>,I</u>_ <sup><u>((</u></sup> <u>(</u> <sup>_<u>yy</u>_</sup> _<u>y</u>_ <sup><u>))))</u></sup> <u>))</u> _I_ ( _x_ )+ _I_ ( _y_ ) <sup>,</sup> <sup>which</sup> <sup>corre-</sup>
max( _I_ ( _x_ ) _,I_ ( _y_ )) <sup>_≡_</sup> <sup>_<u>|I</u>_</sup> <sup><u>(</u></sup> <sup>_<u>x</u>_</sup> <sup><u>)</u></sup> <sup>_<u>−I</u>_</sup> <sup><u>(</u></sup> <sup>_<u>y</u>_</sup> <sup><u>)</u></sup> <sup>_<u>|</u>_</sup>
the following choice of _ϕ ≡−M_, where _M_
sponds to a novel algorithm.
# 3 Algorithm
- <u>min(</u> _<u>I</u>_ <u>(</u> _<u>x</u>_ <u>)</u> _<u>,I</u>_ <u>(</u> _<u>y</u>_ <u>))</u>
max( _I_ ( _x_ ) _,I_ ( _y_ ))
## 3.1 Stability of the Numerical Scheme for the Minimization of Percep- tual Functionals
The Euler-Lagrange equations of _Eµ,I_ 0 _,w,ϕ_ ( _I_ ), i.e. _δEµ,I_ 0 _,w,ϕ_ ( _I_ ) = 0, are integral equations that cannot
be solved analytically. Moreover, the perceptual functionals are not convex, so we cannot easily find a
global minimum. However, in [7] it has been proved that, if we substitute the null values of the input
image with 1 _/_ 255 (the smallest non-zero value in the normalized dynamic range), and we consider
_α, β_ _>_ 1, then the gradient descent scheme with respect to log _I_, i.e.
_∂t_ log _I_ = _−δEµ,I_ 0 _,w,ϕ_ ( _I_ ) _,_ (10)
_converges_ _to_ _a_ _unique_ _image_ _function_, that we can consider the perceptually-inspired color-corrected
one. The gradient descent is written in terms of log _I_ because the logarithmic derivative, i.e. _∂t_ log _I_ =
_I_ <u>1</u> <sup>_∂tI_</sup> <sup>allows</sup> <sup>re-writing</sup> <sup>the</sup> <sup>gradient</sup> <sup>descent</sup> <sup>equation</sup> <sup>as</sup> <sup>follows</sup>
_∂tI_ = _−I_ _· δEµ,I_ 0 _,w,ϕ_ ( _I_ ) _,_ (11)
the right-hand side of this equation has dimension 0 (which is the correct perceptual dimension),
since _δEµ,I_ 0 _,w,ϕ_ ( _I_ ) has dimension <sup>2</sup> -1 in terms of _I_ . Moreover, notice that, as proved in [1], the effect
of taking the logarithmic image is simply to change the speed of convergence of the gradient descent
scheme and not its final result.
Discretization. Defining a finite evolution step ∆ _t_ and setting _Ik_ +1( _x_ ) = _Ik_ ∆ _t_ ( _x_ ) for _k_ = 0 _,_ 1 _,_ 2 _, . . ._,
from (11) we obtain the following minimization scheme
_Ik_ +1( _x_ ) = <sup>_Ik_</sup> <sup>(</sup> <sup>_x_</sup> <sup>) + ∆</sup> <sup>_t_</sup>
- _αµ_ + _βI_ 0( _x_ ) + <u>2</u> <sup><u>1</u></sup>
_,_ (12)
1 + ∆ _t_ ( _α_ + _β_ )
<u>2</u> <sup><u>1</u></sup> <sup>_C_</sup> _<u>w,k</u>_ <sup>_ϕ_</sup> <sup>(</sup> <sup>_x_</sup> <sup>)</sup>
where
_Cw,k_ <sup>_ϕ_</sup> <sup>(</sup> <sup>_x_</sup> <sup>) =</sup>
_y∈_ Ω
_w_ ( _∥x −_ _y∥_ ) _ϕ_
- <u>min</u> _<u>{Ik</u>_ <u>(</u> _<u>x</u>_ <u>)</u> _<u>, Ik</u>_ <u>(</u> _<u>y</u>_ <u>)</u> _<u>}</u>_
_._ (13)
max _{Ik_ ( _x_ ) _, Ik_ ( _y_ ) _}_
2In general, the first variation of a homogeneous functional of degree _n_ is a homogeneous functional of degree _n_ _−_ 1,
in our case _Eµ,I_ 0 _,w,ϕ_ ( _I_ ) has degree 0, so its first variation has degree -1.
225
## 3.2 Complexity Reduction of the Contrast Term
The computational complexity of these algorithms is _O_ ( _N_ <sup>2</sup> ), _N_ being the number of pixels in the
image. This high complexity is due to the contrast term: its first variation generates the integral
term _Cw,k_ <sup>_ϕ_</sup> <sup>(</sup> <sup>_x_</sup> <sup>) in the Euler-Lagrange equations.</sup> <sup>We present now the approximation technique proposed</sup>
in [7] to reduce the computational complexity to _O_ ( _N_ log _N_ ).
The basis of the complexity reduction technique is to write _Cw_ <sup>_ϕ_</sup> <sup>as</sup> <sup>an</sup> <sup>expression</sup> <sup>that</sup> <sup>separates</sup>
the dependence between _I_ ( _x_ ) and _I_ ( _y_ ). Let us drop the dependence on the iteration _k_ in this section
for the sake of simplicity. We rewrite the generic contrast term in the following way
_Cw_ <sup>_ϕ_</sup> <sup>(</sup> <sup>_x_</sup> <sup>) =</sup> <sup>_f_</sup> <sup>(</sup> <sup>_I_</sup> <sup>(</sup> <sup>_x_</sup> <sup>))</sup>
_y∈I_
_w_ ( _∥x −_ _y∥_ ) _g_ ( _I_ ( _y_ )) _._ (14)
By definition, the sum in the previous formula is a convolution, thus we just need to find the functions
_f_ and _g_ . Let _p_ be a generic polynomial of order _n_ on the variables _I_ ( _x_ ) _, I_ ( _y_ )
_j_
_m_ =0
_n_
_j_ =0
_fj_ ( _I_ ( _x_ )) _I_ ( _y_ ) <sup>_j_</sup> _,_ (15)
_p_ ( _I_ ( _x_ ) _, I_ ( _y_ )) =
_n_
_j_ =0
_pj−m,mI_ ( _x_ ) <sup>_j−m_</sup> _I_ ( _y_ ) <sup>_m_</sup> =
setting _g_ ( _I_ ( _y_ )) = _I_ <sup>_j_</sup> ( _y_ ), we can express the contrast term as
_C_ ˜ _w_ <sup>[</sup> <sup>_ϕ,n_</sup> <sup>]</sup> ( _x_ ) =
_n_
_j_ =0
_fj_ ( _I_ ( _x_ ))( _w ∗_ _I_ <sup>_j_</sup> )( _x_ ) _,_ (16)
where _fj_ ( _I_ ( _x_ )) = <sup>�</sup> _m_ <sup>_n−_</sup> =0 <sup>_j_</sup> <sup>_pm,jI_</sup> <sup>_m_</sup> <sup>(</sup> <sup>_x_</sup> <sup>),</sup> <sup>and</sup> <sup>_∗_</sup> <sup>is</sup> <sup>the</sup> <sup>convolution</sup> <sup>operator.</sup> <sup>We</sup> <sup>compute</sup> <sup>the</sup> <sup>coefficients</sup>
_fj_ of the polynomial of order _n_ by solving _p_ ˜ <sup>[</sup> <sup>_ϕ,n_</sup> <sup>]</sup> ( _I_ ( _x_ ) _, I_ ( _y_ )) = argmin _p_ _∥p −_ _ϕ∥_ 2, i.e. _p_ ˜ <sup>[</sup> <sup>_ϕ,n_</sup> <sup>]</sup> is the
polynomial of order _n_ with _minimal_ _quadratic_ _distance_ with respect to the function _ϕ_ .
Numerical Algorithm. Note that the coefficients _fj_ depend on the intensity of the pixel thus
they can be precomputed for a meaningful discrete number of values. See Algorithm 1 for more
details. The degree _n_ of the polynomial is a parameter that controls the precision of the polynomial
approximation. For all numerical tests, it was set to _n_ = 9 which amounts to a number of coefficients
_C_ = 55.
## 3.3 Final Algorithm
The numerical scheme (12) accelerated with the complexity reduction approach is detailed in Algorithm 2. In practice, this algorithm is applied to each color component independently.
Restrictions on the parameters _α, β_ . Regarding the parameters ∆ _t_, _α_ and _β_, it is important to
analyze their restrictions to guarantee the algorithm convergence. Let us set ∆ _t ∈_ [0 _,_ 1] and _µ_ = <sup><u>1</u></sup> 2 <sup>.</sup>
The basic condition for convergence is to keep _Ik_ +1( _x_ ) _∈_ [0 _,_ 1] at each step, which can be done by
analyzing the boundary intensity values of Equation (12). The minimal value of the pixel _Ik_ +1( _x_ ) is
obtained when all the equation components are minimal
∆ _t_
_Ik_ +1( _x_ ) =
- <u>12</u> <sup>_α −_</sup> <sup><u>1</u></sup> <u>2</u>
1 + ∆ _t_ ( _α_ +2 _β_ ) <sup>_≥_</sup> <sup>0</sup> <sup>_,_</sup> (17)
which leads to the condition _α_ _≥_ 1, since _β_ _≥_ 0. The analysis on the maximal value _Ik_ +1( _x_ ) _≤_ 1
confirms this condition on _α_ .
226
<u>Algorithm</u> <u>1:</u> <u>Polynomial</u> <u>coefficients</u> <u>computation</u>
Input: Type of contrast _c_ = id _,_ log _, −M_ .
Output: _p_ ˜ <sup>[</sup> <sup>_ϕ,n_</sup> <sup>]</sup> = _{p_ ˜ <sup>_c_</sup> _i_ <sup>_}C_</sup> _i_ =0 <sup>,</sup> <sup>where</sup> <sup>_C_</sup> <sup>is</sup> <sup>the</sup>
<sup>_c_</sup> _i_ <sup>_}C_</sup> _i_
Output: _p_ ˜ <sup>[</sup> <sup>_ϕ,n_</sup> <sup>]</sup> = _{p_ ˜ <sup>_c_</sup> _i_ <sup>_}C_</sup> _i_ =0 <sup>,</sup> <sup>where</sup> <sup>_C_</sup> <sup>is</sup> <sup>the</sup> <sup>number</sup> <sup>of</sup> <sup>coefficients</sup> <sup>of</sup> <sup>the</sup> <sup>polynomial</sup> <sup>of</sup> <sup>degree</sup>
_n_ = 9.
1. Range _x_ = _{_ 255 <sup><u>1</u></sup> <sup>_,_</sup> 2552 <sup>_, . . .,_</sup> <sup><u>255</u></sup> 255 <sup>_}_</sup> <sup>and</sup> <sup>_y_</sup> <sup>=</sup> <sup>_{_</sup> 255 <sup><u>1</u></sup> <sup>_,_</sup> 2552 <sup>_, . . .,_</sup> 255 <sup><u>255</u></sup> <sup>_}_</sup>
2. Approximation of the sign function _sϵ_ ( _z_ ) = arctan (1 <sup><u>arctan(</u></sup> <sup>_<u>z/ϵ</u>_</sup> _/ϵ_ <sup><u>)</u></sup> ) <sup>,</sup> <sup>where</sup> <sup>_ϵ_</sup> <sup>= 1</sup> <sup>_/_</sup> <sup>20.</sup>
3. Set contrast function _ϕ_
_•_ if _c_ = id then _ϕ_ <sup>_id_</sup> ( _x, y_ ) = _maxxyϵ_ ( _x,y_ ) <sup>_sϵ_</sup> <sup>(</sup> <sup>_x −_</sup> <sup>_y_</sup> <sup>)</sup>
_•_ if _c_ = log then _ϕ_ <sup>log</sup> ( _x, y_ ) = _sϵ_ ( _x −_ _y_ )
_•_ if _c_ = _−M_ then _ϕ_ <sup>_−M_</sup> ( _x, y_ ) = ( _x_ <u>2+</u> _<u>xyy</u>_ ) <sup>2</sup> <sup>_sϵ_</sup> <sup>(</sup> <sup>_x −_</sup> <sup>_y_</sup> <sup>)</sup>
4. Fit coefficients Solve the following least squares problem:
_p_ ˜ <sup>[</sup> <sup>_ϕc,n_</sup> <sup>]</sup> = arg min _p ∥_ <sup>�</sup> <sup>_n_</sup> _j_ =0 - _jm_ =0 <sup>_pj−m,mxj−lyl −_</sup> <sup>_ϕc_</sup> <sup>(</sup> <sup>_x, y_</sup> <sup>)</sup> <sup>_∥_</sup> <sup>2.</sup>
_j_ =0
- _jm_ =0 <sup>_pj−m,mxj−lyl −_</sup> <sup>_ϕc_</sup> <sup>(</sup> <sup>_x, y_</sup> <sup>)</sup> <sup>_∥_</sup> <sup>2.</sup>
<u>Algorithm</u> <u>2:</u> <u>Contrast</u> <u>enhancement</u>
Input:
- _I_ 0( _x_ ) _∈_ [0 _,_ 1]: input image, where _x ∈_ Ωis the number of pixels.
- _c_ : type of contrast id _,_ log _, −M_
- _σ_ : weight parameter,
- _α ≥_ 1 _, β_ _≥_ 0: importance of the attachment to <sup><u>1</u></sup> 2 <sup>and</sup> <sup>_I_</sup> <sup>0,</sup> <sup>respectively.</sup>
Output: _I_ <sup>_k_</sup>
1. Compute Polynomials: Find _p_ ˜ <sup>[</sup> <sup>_ϕc,n_</sup> <sup>]</sup> with Algorithm 1 with _c_ as the parameter.
2. Weighting function: Precompute _wσ_ ( _x, y_ ) with equations (18) or (19)
3. Set constants: ∆ _t_ = 0 _._ 02, _µ_ = <sup><u>1</u></sup> 2 <sup>and</sup> <sup>proj[</sup> <sup>_a,b_</sup> <sup>](</sup> <sup>_x_</sup> <sup>) = max(min(</sup> <sup>_x, b_</sup> <sup>)</sup> <sup>_, a_</sup> <sup>)</sup>
4. Optimization: Iterate until convergence: while _∥I_ <sup>_k_</sup> <sup>+1</sup> _−_ _I_ <sup>_k_</sup> _∥_ <sup>2</sup> _> ϵ_
_•_ Precompute: _Wk_ <sup>_j_</sup> <sup>=</sup> <sup>_w ∗_</sup> <sup>_I_</sup> _k_ <sup>_j,_</sup> <sup>for</sup> <sup>_j_</sup> <sup>=</sup> <sup>_{_</sup> <sup>1</sup> <sup>_, . . ., n}_</sup>
_•_ For every pixel _x ∈_ Ω:
- _nm−_ =0 _j_ <sup>_p_</sup> <sup>˜</sup> <sup>_c_</sup>
– _C_ <sup>˜</sup> _w,k_ <sup>[</sup> <sup>_ϕc,n_</sup> <sup>]</sup> ( _x_ ) = proj[ _−_ 1 _,_ 1]
�� _n_
_j_ =0
<sup>_j_</sup> _k_ <sup>(</sup> <sup>_x_</sup> <sup>)</sup>
_m,j_ <sup>_c_</sup> <sup>_Ik_</sup> <sup>(</sup> <sup>_x_</sup> <sup>)</sup> <sup>_mW j_</sup> _k_
��
2 <sup><u>1</u></sup> <sup>_C_</sup> <sup>˜</sup> _w,k_ <sup>[</sup> <sup>_ϕc,n_</sup> <sup>]</sup> ( _x_ )
– _I_ <sup>_k_</sup> <sup>+1</sup> ( _x_ ) = proj[0 _,_ 1]
- _I_ <sup>_k_</sup> ( _x_ )+∆ _t_
- _αµ_ + _βI_ 0( _x_ )+ 2 <sup><u>1</u></sup>
1+∆ _t_ ( _α_ + _β_ )
Note that it has been assumed that the contrast component <sup>�</sup> _j_ <sup>_n_</sup>
Note that it has been assumed that the contrast component <sup>�</sup> _j_ <sup>_n_</sup> =0 - _nm−_ =0 _j_ <sup>_pm,jIk_</sup> <sup>(</sup> <sup>_x_</sup> <sup>)</sup> <sup>_m_</sup> <sup>(</sup> <sup>_w ∗_</sup> <sup>_I_</sup> _k_ <sup>_j_</sup> <sup>)(</sup> <sup>_x_</sup> <sup>)</sup> <sup>_∈_</sup>
[ _−_ 1 _,_ 1]. Due to numerical inaccuracies, it could be necessary to fix this function to ensure that
_j_ =0
- _nm−_ =0 _j_ <sup>_pm,jIk_</sup> <sup>(</sup> <sup>_x_</sup> <sup>)</sup> <sup>_m_</sup> <sup>(</sup> <sup>_w ∗_</sup> <sup>_I_</sup> _k_ <sup>_j_</sup>
227
(a) (b)
Figure 1: Two implemented kernels setting _σ_ = 3 (a) linear (b) Gaussian.
_Ik_ +1( _x_ ) stays in the correct interval, which is done by projecting _Ik_ +1( _x_ ) into [0 _,_ 1] and _C_ <sup>˜</sup> _w,k_ <sup>[</sup> <sup>_ϕc,n_</sup> <sup>]</sup> ( _x_ ) into
[ _−_ 1 _,_ 1] (function proj[ _a,b_ ]( _x_ ) in Algorithm 2).
Weighting kernel _w_ . The spatial kernel focuses the contrast increase of the contrast term around
zero. The area of influence of the kernel is related to the final level of contrast enhancement. The
more narrow the kernel, the more local the contrast increase. Here, we propose the use of two very
different kernels:
_•_ Euclidean:
_wσ_ ( _x, y_ ) = _C_ (1 _−_ _σ_
~~�~~ _x_ <sup>2</sup> + _y_ <sup>2</sup> ) (18)
_•_ Gaussian:
_wσ_ ( _x, y_ ) = _C_ exp
_−_ <sup>_<u>x</u>_</sup> <sup>2 +</sup> <sup>_<u>y</u>_</sup> <sup>2</sup>
2 _σ_ <sup>2</sup>
(19)
where the constant _C_ is set so the overall mass of the kernel adds to 1. Note that the effect of changing
_σ_ is opposite in both kernels. A bigger value of _σ_ for the Euclidean kernel produces a narrower kernel,
while incrementing it in the Gaussian kernel produces a wider kernel. In the implementation, to ease
its use, we normalize this behaviour by inverting the _σ_ value (the input value of _σ_ is redefined as
1 _/σ_ ) for the _Gaussian_ kernel. An example of both kernels can be observed in Figure 1.
Complexity of the final algorithm. The minimization process has now been reduced to a pixelwise set of operations. Note that, for each _k_ -iteration, there is no need to compute the convolution
for each pixel _x_ . On the contrary, the _n_ convolutions _w ∗_ _Ik_ <sup>_j_</sup> <sup>can</sup> <sup>be</sup> <sup>_pre-computed_</sup> <sup>through</sup> <sup>the</sup> <sup>FFT</sup>
(Fast Fourier Transform). Thus, the overall complexity of the algorithm drastically decreases to
_O_ ( _N_ log _N_ ).
# 4 Results
In this section, we present some results obtained with the described algorithm, as well as the influence
of the different parameters. We start with the parameters related to the contrast term, described in
Section 3.2. Then, we detail the balancing terms _α, β_ and finally, we describe a known problem of
the algorithm, that is, the over-enhancement of noise when dealing with images acquired with low
light intensity.
## 4.1 Parameters of the Contrast Term
Polynomial approximation. The first important parameter of the algorithm is the contrast function type, defined as parameter _c_ in Algorithm 1. In Figure 2, we can see the three 2D-functions
_ϕ_ <sup>log</sup> _, ϕ_ <sup>_−M_</sup>, and _ϕ_ <sup>id</sup> that the polynomial needs to approximate, as described in Section 3.2. The main
228
(a) (b) (c)
Figure 2: Surfaces obtained with Algorithm 1 for (a) _c_ = log (b) _c_ = _−M_ (c) _c_ = id.
difference between the functions relies in the extremes of the intensity range. In Figure 3 we show
the impact on the same images of changing the polynomial.
Weighting function diameter _σ_ . The impact of the contrast term _C_ <sup>˜</sup> _w,k_ <sup>[</sup> <sup>_ϕc,n_</sup> <sup>]</sup> depends on the area
of influence of the kernel, which is defined by _σ_ . As we increase _σ_, the contrast augments locally.
Numerically, the values of _σ_ are normalized to be adapted to the size of the input image. In Figure 4
we can see the effect, on the output images, of changing the kernel _w_ and the parameter _σ_ . The first
row corresponds to the original images, and the outputs are shown in the following rows.
On the first image set, we would like to point out how the algorithm is reproducing a well known
perceptual illusion known as “Mach bands” effect. In the original image, all bands are flat, but our
visual system perceives them as having an “overshoot” to “undershoot” next to the intensity edges.
This effect is reproduced by the output of the algorithm for _σ_ = 1 for both kernels. This process
implies that our perception is changing the intrinsic geometry of the image, since it is introducing
new level lines. In fact, if we continue narrowing the kernel ( _σ_ = 3), the order of the level lines gets
inverted, and the algorithm starts introducing an artifact called “sharpening”. This same behavior
can be observed in a more subtle way on the results of the tree, specially on its leaves. The final set
of images shows how the algorithm is able to discard a very strong color cast successfully with both
types of kernels, due to the independent application of the algorithm to each color channel.
## 4.2 Global Parameters: α, β
The parameters _α, β_ balance the influence of the attachment to the mean value and original input
image, respectively. The bigger the values the more influence their term has in the final output, as
can be observed in Figure 5. Note that for small values of _α_ and _β_, the contrast term becomes more
important.
## 4.3 Possible Artifacts
This algorithm increases locally the contrast of an image. Intrinsically, this process can introduce
two types of artifacts:
229
(a) (b) (c)
Figure 3: Results obtained with the polynomials that approximate (a) _c_ = log (b) _c_ = _−M_ (c)
_c_ = id. Note how the blue area of the book is rendered differently in the first set of images, as well
as the contrast on the leaves and clouds on the tree images.
_•_ Noise enhancement: When applied to pictures taken under very dim conditions or with strong
_jpeg_ blocking, these artifacts can become visible, as can be observed on the first row of Figure 6.
_•_ Sharpening: As explained previously, it consists in inverting the order of the level lines as
shown in Figure 5 or Figure 6. This effect should not necessarily be considered as an artifact,
but rather as the result of the deliberate application of an non-realistic style.
# 5 Conclusions
In this article, we have presented a thorough explanation and test of the algorithm presented in [7].
This algorithm enhances contrast locally and improves the visibility of details in the input image.
An interesting consequence of this process is that the global color cast produced by a colored light is
removed from the image. The algorithm is able to successfully do these tasks because it implements
several perceptual mechanisms developed by the human visual system: light adaptation, local contrast enhancement and color constancy. Although the method relies on a set of parameters, whose
influence has been explored in this document, they can be set in a way that gives good results for
most images.
# Image Credits
Edoardo Provenzi, CC-BY-SA 3.0
Wiktionary (http://en.wiktionary.org/wiki/oak ~~t~~ ree) CC-BY-SA 3.0
Kobus Barnard, SFU Computational Vision Laboratory <sup>3</sup>
Source image courtesy of albatros11, licensed by Getty images <sup>4</sup>
3 `[http://www.cs.sfu.ca/~colour/data/](http://www.cs.sfu.ca/~colour/data/)`
4 `[https://www.flickr.com/photos/albatros11/2509508972](https://www.flickr.com/photos/albatros11/2509508972)`
230
_σ_ = 0 _._ 1 _σ_ = 1 _σ_ = 2
Figure 4: Results obtained by setting _c_ = log in Algorithm 1, and _α_ = 1 _._ 1 and _β_ = 1 in Algorithm 2.
Note that the algorithm can produce an inversion of the level lines usually related to the sharpening
effect, specially visible for _σ_ = 2.
231
_α_ = 1 _._ 1 _α_ = 2 _α_ = 3
Figure 5: Changes in the output as _α_ and _β_ change. Note that for small values of _α_ and _β_ the strong
term is the contrast term _C_ <sup>˜</sup> _w,k_ <sup>[</sup> <sup>_ϕc,n_</sup> <sup>]</sup> ( _x_ ) in Equation (12). Increasing _α_ ensures the global condition that
the mean is close to _µ_ . Increasing _β_ forces the result to be closer to the original image, which in this
case is dark and with a blue color cast. For all these results, _c_ = id, _σ_ = 1 and _w_ is Gaussian.
(a) (b)
Figure 6: (a) Original image. (b) Result obtained with _c_ = id, _α_ = 1 _._ 1, _β_ = 1, _w_ is Gaussian and
_σ_ = 0 _._ 5 for the first row and _σ_ = 3 for the second row. This in an example where the noise and the
jpeg blocks are made visible, or a sharpening is produced after using the described algorithm.
232
# References
[1] L.A. Ambrosio, N. Gigli, and G. Savar´e, _Gradient_ _flows_ _in_ _metric_ _spaces_ _and_ _in_ _the_ _space_
_of_ _probability_ _measures_, Lectures in Mathematics, Birkhauser, 2005.
[2] M. Bertalm´ıo, V. Caselles, and E. Provenzi, _Issues about the retinex theory and contrast_
_enhancement_, International Journal of Computer Vision, (2009). `[http://dx.doi.org/10.1007/](http://dx.doi.org/10.1007/s11263-009-0221-5)`
`[s11263-009-0221-5](http://dx.doi.org/10.1007/s11263-009-0221-5)` .
[3] M. Bertalm´ıo, V. Caselles, E. Provenzi, and A. Rizzi, _Perceptual_ _color_ _correction_
_through_ _variational_ _techniques_, IEEE Transactions on Image Processing, 16 (2007), pp. 1058–
1072. `[http://dx.doi.org/10.1109/TIP.2007.891777](http://dx.doi.org/10.1109/TIP.2007.891777)` .
[4] R.C. Gonzalez and R.E. Woods, _Digital_ _image_ _processing_, Prentice Hall, 2002.
[5] D.H. Hubel, _Eye,_ _Brain,_ _and_ _Vision_, Scientific American Library, 1995.
[6] E.H. Land and J.J. McCann, _Lightness_ _and_ _Retinex_ _theory_, Journal of the Optical Society
of America, 61 (1971), pp. 1–11.
[7] R. Palma-Amestoy, E. Provenzi, M. Bertalm´ıo, and V. Caselles, _A_ _perceptually_
_inspired_ _variational_ _framework_ _for_ _color_ _enhancement_, IEEE Transactions on Pattern Analysis
and Machine Intelligence, 31 (2009), pp. 458–474. `[http://dx.doi.org/10.1109/TPAMI.2008.](http://dx.doi.org/10.1109/TPAMI.2008.86)`
`[86](http://dx.doi.org/10.1109/TPAMI.2008.86)` .
[8] E. Provenzi, L. De Carli, A. Rizzi, and D. Marini, _Mathematical definition and analysis_
_of the Retinex algorithm_, Journal of the Optical Society of America A, 22 (2005), pp. 2613–2621.
`[http://dx.doi.org/10.1364/JOSAA.22.002613](http://dx.doi.org/10.1364/JOSAA.22.002613)` .
[9] E. Provenzi, C. Gatta, M. Fierro, and A. Rizzi, _Spatially_ _variant_ _white_ _patch_ _and_
_gray_ _world_ _method_ _for_ _color_ _image_ _enhancement_ _driven_ _by_ _local_ _contrast_, IEEE Transactions on
Pattern Analysis and Machine Intelligence, 30 (2008), pp. 1757–1770. `[http://dx.doi.org/10.](http://dx.doi.org/10.1109/TPAMI.2007.70827)`
`[1109/TPAMI.2007.70827](http://dx.doi.org/10.1109/TPAMI.2007.70827)` .
[10] A. Rizzi, C. Gatta, and D. Marini, _A_ _new_ _algorithm_ _for_ _unsupervised_ _global_ _and_ _local_ _color_
_correction_, Pattern Recognition Letters, 24 (2003), pp. 1663–1677. `[http://dx.doi.org/10.](http://dx.doi.org/10.1016/S0167-8655%0x2802%0x2900323-9)`
`[1016/S0167-8655(02)00323-9](http://dx.doi.org/10.1016/S0167-8655%0x2802%0x2900323-9)` .
[11] G. Sapiro and V. Caselles, _Histogram_ _modification_ _via_ _differential_ _equations_, Journal of
Differential Equations, 135 (1997), pp. 238–268. `[http://dx.doi.org/10.1006/jdeq.1996.](http://dx.doi.org/10.1006/jdeq.1996.3237)`
`[3237](http://dx.doi.org/10.1006/jdeq.1996.3237)` .
[12] R. Shapley and C. Enroth-Cugell, _Visual_ _adaptation_ _and_ _retinal_ _gain_ _controls_, vol. 3,
1984, pp. 263–346.
[13] G. Wyszecky and W. S. Stiles, _Color_ _science:_ _Concepts_ _and_ _methods,_ _quantitative_ _data_
_and_ _formulas_, John Wiley & Sons, 2000.
233
섹션 본문
섹션 본문이 없습니다.
참고문헌 14건
- Gradient Flows: In Metric Spaces and in the Space of Probability Measures 2005
- Color Science Concepts and Methods 1982
- Mathematical definition and analysis of the Retinex algorithm Journal of the Optical Society of America A · Optica Publishing Group · 2005 10.1364/josaa.22.002613
- Issues About Retinex Theory and Contrast Enhancement International Journal of Computer Vision · Springer Science+Business Media · 2009 10.1007/s11263-009-0221-5
- Histogram Modification via Differential Equations Journal of Differential Equations · Elsevier BV · 1997 10.1006/jdeq.1996.3237
- Chapter 9 Visual adaptation and retinal gain controls Progress in Retinal Research · Elsevier BV · 1984 10.1016/0278-4327(84)90011-7
- A Perceptually Inspired Variational Framework for Color Enhancement IEEE Transactions on Pattern Analysis and Machine Intelligence · IEEE Computer Society · 2009 10.1109/tpami.2008.86
- A new algorithm for unsupervised global and local color correction Pattern Recognition Letters · Elsevier BV · 2003 10.1016/s0167-8655(02)00323-9
- Perceptual Color Correction Through Variational Techniques IEEE Transactions on Image Processing · Institute of Electrical and Electronics Engineers · 2007 10.1109/tip.2007.891777
- Lightness and Retinex Theory Journal of the Optical Society of America · Optica Publishing Group · 1971 10.1364/josa.61.000001
- A Spatially Variant White-Patch and Gray-World Method for Color Image Enhancement Driven by Local Contrast IEEE Transactions on Pattern Analysis and Machine Intelligence · IEEE Computer Society · 2008 10.1109/tpami.2007.70827
- Color Science: Concepts and Methods, Quantitative Data and Formulas The American Journal of Psychology · University of Illinois Press · 1968 10.2307/1420820
- Color Science, Concepts and Methods. Quantitative Data and Formulas Physics Bulletin · Institute of Physics · 1967 10.1088/0031-9112/18/10/010
- Digital Image Processing Leonardo · The MIT Press · 1981 10.2307/1574313