원시데이터 수집 시스템
선정목록으로

Center/Surround Retinex: Analysis and Implementation

관련 필름·전자재료 · (13) 프리즘 필름

기본 정보

저자
  1. José-Luis Lisani — Universitat Illes Balears, Spain
  2. Ana-Belén Petro — Universitat Illes Balears, Spain
  3. Catalina Sbert — Universitat Illes Balears, Spain
DOI
10.5201/ipol.2021.391
저널
Image Processing On Line
발행년도
2021
발행기관
Image Processing On Line
피인용수
2
라이선스
cc-by-nc-sa
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.5201/ipol.2021.391
토픽
Color Science and Applications
OpenAlex ID
W4200301688

평가 내용

관련도
관련
사업분야
필름·전자재료 · (13) 프리즘 필름
부 분야
–
R&D 측면
–
확신도
–
근거 용어
–
판단 근거
임베딩 유사도 기반 평가로 '필름·전자재료 > 프리즘 필름' 분야에 선정된 논문입니다.
R&D 활용 포인트
–
평가 입력
–

초록

The Retinex perception theory tries to mimic the human ability to cope with the high dynamic range of natural scenes. In 1986 E. Land proposed a formulation of this model in terms of a Center/Surround operation involving two steps, a local adaptation and a global transform. This model gave rise to the so-called Center/Surround tone-mapping algorithms. In this paper we unify the different Center/Surround algorithms proposed in the literature using a common framework and analyze several possibilities for the local and global operations involved.

본문 31,586자

본문 펼치기
Published in Image [Processing](https://doi.org/10.5201/ipol) On Line on 2021–12–19. Submitted on 2021–12–03, accepted on 2021–12–18. ISSN 2105–1232 _⃝_ c 2021 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.2021.391 # Center/Surround Retinex: Analysis and Implementation ## Jose-Luis Lisani, Ana-Bel´en Petro, Catalina Sbert ``` Universitat Illes Balears, Spain _{_ `joseluis.lisani,` `anabelen.petro,` `catalina.sbert` _}_ `@uib.es` _Communicated_ _by_ Jean-Michel Morel _Demo_ _edited_ _by_ Jose-Luis Lisani Abstract The Retinex perception theory tries to mimic the human ability to cope with the high dynamic range of natural scenes. In 1986 E. Land proposed a formulation of this model in terms of a Center/Surround operation involving two steps, a local adaptation and a global transform. This model gave rise to the so-called Center/Surround tone-mapping algorithms. In this paper we unify the different Center/Surround algorithms proposed in the literature using a common framework and analyze several possibilities for the local and global operations involved. Source Code The reviewed and documented source code and an online demo are available at the web page of this [article](https://doi.org/10.5201/ipol.2021.391) <sup>1</sup> . Compilation and usage instructions are included in the README.txt file of the archive. Keywords: Retinex theory; tone mapping; center/surround method; color enhancement # 1 Introduction The adaptation of the human visual system (HVS) to several orders of magnitude of light intensity permits us to perceive a wide spectrum of lights and contrasts which, in general, a camera is unable to capture. The reason is that the eye is a contrast detector, not an absolute detector like the sensor in a digital camera. Edwin Land proposed, in 1964, a complex algorithm involving image paths to compute relative lightness values from the absolute values captured by the camera [6]. Later, he published [7] an alternative formulation of the original algorithm in which the relative lightness was computed as the ratio between the value of a pixel and the weighted average of the surrounding values. This operation was followed by a logarithmic mapping of the ratios in order to mimic the non-linear behaviour of the HVS with respect to low and high values of the illumination. 1 `[https://doi.org/10.5201/ipol.2021.391](https://doi.org/10.5201/ipol.2021.391)` Jose-Luis Lisani, Ana-Bel´en Petro, Catalina Sbert, _Center/Surround_ _Retinex:_ _Analysis_ _and_ _Implementation_, Image Processing On Line, A generalization of this formulation leads to the following model for the computation of the image lightness _L_ _,_ (1) _L_ ( _x_ ) = _f_ - _<u>I</u>_ <u>(</u> _<u>x</u>_ <u>)</u> _F_ _∗_ _I_ ( _x_ ) where _I_ ( _x_ ) is the light intensity captured by the camera at pixel _x_ (we are considering here a single-channel image), _F_ is a surround radial kernel, and _f_ is a global scaling function. Equation (1) defines a Center/Surround model of image perception. In this paper we shall analyze different alternatives both for the kernel and the scaling function, and we will give algorithmical details of the implementation of the model. For a more detailed analysis we refer the reader to [10]. The paper is organized as follows: in Section 2 different alternatives for the kernel function are analyzed; similarly, several possible scaling functions are examined in Section 3. The main center/surround algorithm is described in Section 4, together with some technical details. Several experiments are displayed in Section 5, and some conclusions are drawn in Section 6. # 2 Kernel Functions Mathematically, two conditions should be imposed to the kernel: scale invariance and integrability. As proved in [14], the only radial kernel which is scale invariant is _F_ ( _r_ ) = _r_ <sup>_<u>K</u>_</sup> <sup>2</sup> <sup>,</sup> <sup>which</sup> <sup>is</sup> <sup>the</sup> <sup>(non-</sup> integrable) kernel proposed by Land in [7]. Several other radial kernels have been proposed in the literature [7, 13, 5, 4, 3, 12, 14, 17]. In [10] an exhaustive analysis of these kernels is performed, and some new ones are proposed. The authors unify all these kernels into five models, which are summarized in Table 1 and described next: _•_ _FAG_ is the generalization of the Gaussian kernel and a linearized version of the multiscale Retinex (MSR) [4]. It is a weighted average of Gaussian kernels at different scales and it is defined as _−_ <sup>_<u>r</u>_</sup> <sup>2</sup> 2 _σi_ <sup><u>2</u></sup> _,_ (2) _FAG_ ( _r_ ) = _N_ _i_ =1 _wiFG,σi_ = _N_ _i_ =1 _wi_ <u>1</u> 2 _πσi_ <sup>2</sup> _e_ where _N_ is the number of scales, _σi_ is the scale parameter of the _i_ -th kernel and _wi_ is its corresponding weight factor. Following [4], the scales are distributed following a geometric series _σi_ = _σ_ 1 _r_ <sup>_i−_</sup> <sup>1</sup> _._ The initial scale _σ_ 1 is a parameter. Since convolutions with Gaussians whose _σ_ is of the order of the image size or bigger yield a constant result, the final scale _σN_ can be chosen depending on the image dimensions _σN_ = _S ·_ min(image width _,_ image height) _,_ where _S_ is also a parameter. Finally, we propose to define the weights as _wi_ = _N_ <u>1</u> <sup>.</sup> In this way, we have reduced the parameters of the kernel to _N_, _σ_ 1 and _S_ . 435 _•_ _FIG_ was first introduced in [14] to find a compromise between scale invariance and integrability. It is a continuous average of Gaussians from scale _σ_ 1 to _σ_ 2. 2 _σ_ <u>1</u> <sup><u>2</u></sup> 4 _π_ log(1 _σ_ 22 _/σ_ 1) <sup>_,_</sup> _r_ = 0 _._ 2 _σ_ <u>2</u> <sup><u>2</u></sup> _−exp_ <u>1</u> _,_ _r̸_ = 0 _,_ _r_ <sup>2</sup> - _−_ <sup>_<u>r</u>_</sup> <sup>2</sup> _exp_ - _−_ <sup>_<u>r</u>_</sup> <sup>2</sup> (3) _FIG_ ( _r_ ) =          <u>1</u> 2 _π_ log( _σ_ 2 _/σ_ 1) _<u>σ</u>_ <u>1</u> <sup>_−_</sup> <sup>2</sup> <u>1</u> <sup>_−_</sup> <sup>2</sup> _<u>−σ</u>_ <u>2</u> <sup>_−_</sup> <sup>2</sup> where the initial scale _σ_ 1 is a parameter, and the final scale _σ_ 2 is chosen depending on the image size as in the previous case _σN_ = _S ·_ min(image width _,_ image height) _,_ where _S_ is also a parameter. _•_ _F_ 2 _,σ_ is the continuous version of the Land kernel _F_ ( _r_ ) = 1 _/r_ <sup>2</sup> _<u>C</u>_ _F_ 2 _,σ_ ( _r_ ) = _,_ (4) <u>�</u> _<u>r</u>_ <u>�2</u> + 1 _σ_ where _C_ is a normalization constant such that _•_ _FIE_ is a continuous average of exponentials _F_ 2 _,σ_ ( _r_ ) _dr_ = 1. Ω _<u>−e</u>_ _<u>σ</u>_ <u>1</u> _r̸_ = 0 _,_ _r_ _−_ <sup>_<u>r</u>_</sup> <u>1</u> _r_ = 0 _._ 2 _πσ_ 2 _σ_ 1 _−_ <sup>_<u>r</u>_</sup> <u>1</u> _<u>e</u>_ 2 _π_ ( _σ_ 2 _−σ_ 1) _<u>σ</u>_ <u>2</u> _<u>−e</u>_ _FIE_ ( _r_ ) =        (5) It is inspired by an early work by Moore et al. [13], which proposed an exponential kernel <u>1</u> _FE,σ_ ( _r_ ) = _σ_ _,_ (6) 2 _πσ_ <sup>2</sup> <sup>_e−_</sup> <sup>_<u>r</u>_</sup> that permitted a real-time implementation in analog VLSI. In _FIE_ the weight of the central point in the convolution kernel is of order _O_ ( _σ_ 11 _σ_ 2 <sup>)</sup> <sup>showing</sup> the inverse proportionality of both parameters. As is analyzed in [10], to obtain good results the product between _σ_ 1 and _σ_ 2 must be constant. Since the kernel is not scale invariant, the values of the initial and final scales _σ_ 1 and _σ_ 2 are chosen depending on the image size as _σ_ 1 = _s/_ min(image width _,_ image height) _,_ _σ_ 2 = _S ·_ min(image width _,_ image height) _,_ where _s_ and _S_ are parameters. _•_ _F_ 1 _,σ_ is the continuous version of the ACE kernel [17] _<u>C</u>_ _F_ 1 _,σ_ ( _r_ ) = <u>�</u> _<u>r</u>_ <u>�</u> (7) + 1 <sup>_,_</sup> _σ_ 436 where _C_ is a normalization constant such that Ω _F_ 1 _,σ_ ( _r_ ) _dr_ = 1. This kernel is not scale invariant, therefore the scale _σ_ is chosen depending on the image size as _σ_ = _s/_ min(image width _,_ image height) _,_ where _s_ is a parameter. <u>Kernel</u> <u>Parameters</u> _FAG_ ( _r_ ) = _FIG_ ( _r_ ) = _N_ _i_ =1      _C_   _wiFG,σi_ _N_, _σ_ 1, _S_ _σN_ = _S ·_ min. image dimension - _N_ <sup>_<u>i−</u>_</sup> _−_ <sup><u>1</u></sup> 1 _σi_ = _σ_ 1 - _<u>σN</u>_ _σ_ 1 <u>1</u> _,_ _r̸_ = 0 _r_ <sup>2</sup> - _<u>−r</u>_ <sup>2</sup> 2 _σ_ <u>1</u> <sup>2</sup> _exp_ - _<u>−r</u>_ <sup>2</sup> 2 _σ_ <u>2</u> <sup>2</sup> _−_ _exp_ _wi_ = _N_ <sup><u>1</u></sup> _<u>i</u>_ <u>= 1</u> _<u>, . . ., N</u>_ _σ_ 1 _, S_ _σ_ 2 = _S ·_ min. image dimension _s, S_ _σ_ 1 = _s/_ min. image dimension _σ_ 2 = _S ·_ min. image dimension _s_ _σ_ = _s/_ min. image dimension       <u>1</u> _C_ <sup>_<u>σ−</u>_</sup> <sup>2</sup> <u>1</u> _<u>−</u>_ _<u>σ</u>_ <u>2</u> <sup>_−_</sup> <sup>2</sup> <sup>_−_</sup> <sup>2</sup> <u>2</u> _r_ = 0 2 <u>1</u> _C_ = 2 _π_ log( _σ_ 2 _/σ_ 1) - _<u>−r</u>_ _σ_ 1 _−_ _exp_ _,_ _r̸_ = 0 _r_ _exp_ - _<u>−r</u>_ _σ_ 2 _FIE_ ( _r_ ) =      _C_     <u>1</u>  _,_ _r_ = 0 2 _πσ_ 2 _σ_ 1 <u>1</u> _C_ = 2 _π_ ( _σ_ 2 _−_ _σ_ 1) _<u>C</u>_ _F_ 1 _,σ_ ( _r_ ) = <u>�</u> _<u>r</u>_ <u>�</u> + 1 _σ_ _<u>C</u>_ _F_ 2 _,σ_ ( _r_ ) = _σ_ <u>�</u> _<u>r</u>_ <u>�2</u> + 1 _σ_ Table 1: The five models of surround kernels that summarize the state of the art. 437 ## Optimum Values of the Kernel Parameters In [10] the authors studied, in terms of some distortion measures, the range of values of the parameters of the different kernels. In this study they observed that kernels _FAG, FIG_ and _F_ 2 _,σ_, which are differentiable at _r_ = 0, produce more halo distortion than _FIE_ and _F_ 1 _,σ_ which are non-differentiable at _r_ = 0. This is because the halo becomes more visible as the size of the kernel decreases, and the non-differentiable kernels have a less local behavior. Table 2 presents the recommended parameter values. In Section 5 several examples illustrate how these parameters influence the obtained results. <u>Kernel</u> <u>Recommended</u> <u>parameter</u> <u>values</u> _<u>FAG</u>_ _<u>N</u>_ <u>= 5,</u> _<u>S</u>_ _<u>≥</u>_ <u>0</u> _<u>.</u>_ <u>5,</u> _<u>σ</u>_ <u>1</u> <u>indifferent</u> _<u>FIG</u>_ _<u>S</u>_ _<u>≥</u>_ <u>1,</u> _<u>σ</u>_ <u>1</u> _<u>≥</u>_ <u>0</u> _<u>.</u>_ <u>25</u> _<u>FIE</u>_ _<u>S</u>_ _<u>≥</u>_ <u>0</u> _<u>.</u>_ <u>5,</u> _<u>s ≥</u>_ <u>0</u> _<u>.</u>_ <u>5</u> _<u>F</u>_ <u>2</u> _<u>,σ</u>_ _<u>σ</u>_ _<u>≥</u>_ <u>0</u> _<u>.</u>_ <u>25</u> _F_ 1 _,σ_ _s ≥_ 0 _._ 1 Table 2: Recommended ranges of values of the parameters of the kernels that guarantee a minimum degree of visual distortion in the results. # 3 Scaling Functions The human visual system (HVS) is able to discount the effect of the illumination in the perception of the scenes. The Retinex theory tries to mimic the HVS, with the center/surround formulation. Moreover, Land in [8] observed that the function which relates reflectance with lightness sensation can be approximated by a logarithmic function. Naka and Rushton [15] were the first to model the contrast sensitivity as a sigmoid function. Reinhard in [16] noticed the mathematical properties of sigmoid functions to model the HVS. On the other hand digital images suffer several camera processes, such as gamma-corrections and white balance, which these mapping functions must take into account. In [10] different options for these mapping functions (also known as scaling functions) were analyzed. Table 3 summarizes them. Note that these functions are defined for single channel images. For color images they are applied on a channel-by-channel basis. In what follows, _Min_ and _Max_ refer to the minimum and maximum values of the range of the _<u>I</u>_ center/surround operation _F_ _∗_ _I_ <sup>,</sup> <sup>which</sup> <sup>shall</sup> <sup>be</sup> <sup>mapped</sup> <sup>to</sup> <sup>the</sup> <sup>usual</sup> <sup>[0</sup> <sup>_,_</sup> <sup>255]</sup> <sup>range.</sup> <u>Name</u> <u>Function</u> _<u>f</u>_ Linear _fL_ ( _x_ ) = 255 <u>�</u> _Maxx−Min−Min_ <u>�</u> Logarithmic _flog_ ( _x_ ) = log( _Max_ <u>255</u> _−Min_ +1) <sup>log(</sup> <sup>_x −_</sup> <sup>_Min_</sup> <sup>+ 1)</sup> - _α_ Power _fα_ ( _x_ ) = 255 - _<u>x−Min</u>_ _Max−Min_ <u>255(</u> _<u>A</u>_ <u>+1)(</u> _<u>x−Min</u>_ <u>)</u> Naka-Rushton _fNR_ ( _x_ ) = _A_ ( _Max−Min_ )+ _x−Min_ <u>1</u> _p_ +1 _dt_ Histogram based _fE_ ( _x_ ) = _C_ - _x_ _Min_ <sup>_h_</sup> <sup>(</sup> <sup>_t_</sup> <sup>)</sup> Table 3: Scaling functions reviewed in Section 3. 438 _•_ Linear mapping. It consists in just a linear stretching of the input range to the desired output range. - _<u>x −</u>_ _<u>Min</u>_ _fL_ ( _x_ ) = 255 _Max −_ _Min_ _._ (8) _•_ Logarithmic mapping. Inspired by the tone curve proposed by Drago et al. [1], which produces better results (less noisy in dark areas) than simply replacing the linear values by logarithms in Equation (8). <u>255</u> _flog_ ( _x_ ) = log( _Max −_ _Min_ + 1) <sup>log(</sup> <sup>_x −_</sup> <sup>_Min_</sup> <sup>+ 1)</sup> <sup>_._</sup> (9) _•_ Power function. - _<u>x −</u>_ _<u>Min</u>_ _fα_ ( _x_ ) = 255 _Max −_ _Min_ - _α_ (10) The parameter _α_ can take positive and negative values. In our implementation, we have the option to automatically fix _α_ so that the median of the input values is mapped to the center of the output range, i.e. 127 _._ 5 <sup>2</sup> . _•_ Naka-Rushton function. Naka and Rushton [15] modeled the contrast sensitivity in the human visual system as the sigmoid function _f_ ( _x_ ) = _x_ + _<u>x</u>_ _s_ <sup>,</sup> <sup>where</sup> <sup>_s_</sup> <sup>is the value which is mapped to 0</sup> <sup>_._</sup> <sup>5.</sup> We modify this function such that _Min_ is mapped to 0 and _Max_ is mapped to 255. <u>255(</u> _<u>A</u>_ <u>+ 1)(</u> _<u>x −</u>_ _<u>Min</u>_ <u>)</u> _fNR_ ( _x_ ) = _A_ ( _Max −_ _Min_ ) + _x −_ _Min_ <sup>_,_</sup> (11) where _A_ _>_ 0 is a constant that controls the steepness of the function. For large values of _A_ _fNR_ tends to a linear function _fL_ . In our implementation, we have the option to automatically fix _A_ so that the median of the input values is mapped to the center of the output range, i.e. 127 _._ 5 <sup>3</sup> . Note that this can only be achieved for positive values of _A_ when the median is below <sup>_<u>Min</u>_</sup> <sup><u>+</u></sup> <sup>_<u>Max</u>_</sup> . If this is not the case, 2 _A_ is fixed automatically to a large value, so _fNR_ becomes linear. _<u>I</u>_ _•_ Taking into account the shape of the histogram of the center/surround operation _F_ _∗_ _I_ <sup>,</sup> <sup>we</sup> consider a histogram-based function, which is adapted to the pixel distribution of the values. It is a generalization of the one proposed by Mai et al. [11]. The function is computed as the minimizer of the functional - _Max_ _<u>h</u>_ <u>(</u> _<u>x</u>_ <u>)</u> _g_ <sup>_′_</sup> ( _x_ ) <sup>_p_</sup> <sup>_dx,_</sup> min _g_ _Min_ subject to the condition - _Max_ _Min_ _g_ <sup>_′_</sup> ( _x_ ) _dx_ = 255 _,_ where _h_ denotes the normalized histogram and _p >_ 0 is a parameter. The closed-form solution of the minimizing problem is _fE_ ( _x_ ) = _C_ - _x_ _Min_ _h_ ( _t_ ) <u>1</u> _p_ +1 _dt._ (12) where _C_ is such that _fE_ ( _Max_ ) = 255. Observe that for _p_ = 0 _fE_ is a histogram equalization. In general, the parameter is fixed to _p_ = 2, as proposed in [11]. 2In our implementation, if the automatically computed _α_ is smaller than 0 _._ 3, then its value is clipped to 0 _._ 3, to prevent excessive enhancement of low input values. 3In our implementation, if the automatically computed _A_ is smaller than 0 _._ 1, then its value is clipped to 0 _._ 1, to prevent excessive enhancement of low input values. 439 Definition of _Min_ and _Max_ . The values defining the range of the center/surround operation _FI∗I_ <sup>could</sup> <sup>simply</sup> <sup>be</sup> <sup>computed</sup> <sup>as</sup> <sup>the</sup> <sup>minimum</sup> <sup>and</sup> <sup>maximum</sup> <sup>values</sup> <sup>of</sup> <sup>this</sup> <sup>operation.</sup> <sup>However,</sup> in order to increase the dynamic range of the final output, it is sometimes useful to clip to either 0 (black) or 255 (white) some of the lowest (resp. highest) values of the original range. Therefore, _Min_ and _Max_ are computed by selecting the percentages of image pixels that will be clipped to black ( _s_ black%) or white ( _s_ white%). Algorithm 1 describes how these values are computed. This algorithm is an adaptation of the algorithm for robust normalization proposed in [2], which itself is a variant of the simplest color balance algorithm proposed in [9]. Algorithm 1: Compute Min-Max (adapted from [2]) Input : input image _u_ with _N_ pixels Input : percentage of saturation in the white and the black, respectively _s_ white and _s_ black Output : Min, Max 1 if _u_ _is_ _color_ _image_ then 2 _u_ max _←_ max _{uR, uG, uB}_ `//Compute` `max` `channel` 3 _u_ min _←_ min _{uR, uG, uB}_ `//Compute` `min` `channel` 4 else 5 _u_ max _←_ _u_ 6 _u_ min _←_ _u_ 7 _<u>u</u>_ max _←_ _Sort_ ( _u_ max) `//Sort` `increasing` 8 _<u>u</u>_ min _←_ _Sort_ ( _u_ min) `//Sort` `increasing` 9 Min _←_ _<u>u</u>_ min( _⌊_ <sup>_<u>s</u>_</sup> <sup><u>black</u></sup> 100 <sup>_N_</sup> <sup>_⌋_</sup> <sup>)</sup> `//Find` `minimum` `value` 10 Max _←_ _<u>u</u>_ max( _⌈_ (1 _−_ <sup>_<u>s</u>_</sup> <sup><u>white</u></sup> <u>100</u> <sup>)</sup> <sup>_N_</sup> <sup>_−_</sup> <sup>1</sup> <sup>_⌉_</sup> <sup>)</sup> `//Find` `maximum` `value` # 4 Center/Surround Algorithm The complete algorithm for the computation of the center/surround operation on an image is presented in Algorithm 2. Computation of the convolution _I_ _∗_ _F_ . The convolution between the original image and the kernel function is computed in the Fourier domain. By using the FFT and IFFT functions of the FFTW software library <sup>4</sup> the original image is extended symmetrically across its sides, so that the extended image, which is four times bigger, becomes symmetric and periodic. In fact, with the FFTW library the symmetrization is implicit and performed directly as a cosine transform. By using these functions the convolution is computed as _I_ _∗_ _F_ = IFFT _{_ DFT( _I_ ) _·_ DFT( _F_ ) _}._ # 5 Experiments In a previous article [10], we carried out an analysis for different combinations of kernel and global mappings, using quantitative and qualitative criteria, over HDR images. For these images, most of the values were concentrated on the lower part of their dynamic range. This is not usually the case for the LDR images studied in the current paper. For this reason the conclusions of our analysis 4M. Frigo and S. G. Johnson. FFTW package. `[http://www.fftw.org/](http://www.fftw.org/)` 440 Algorithm 2: Center/Surround Retinex Algorithm Input : input image _u_ Output : processed image _v_ Parameters : kernel type _F_ _∈{F_ AG _, F_ IG _, F_ IE _, F_ 1 _, F_ 2 _}_ scaling function _f_ _∈{f_ L _, f_ log _, fα, f_ NR _, f_ E _}_, percentages of black and white saturated pixels ( _s_ black and _s_ white), parameters of kernels and scaling functions 1 for _each_ _image_ _channel_ _I_ _from_ _u_ do `//Compute` _I_ <sup>_′_</sup> = _I_ _∗_ _F_ 2 if _F_ _==_ _FAG_ then ``` //Compute weighted sum of Gaussian convolutions ``` 3 _I_ <sup>_′_</sup> _←−_ 0 4 for _each_ _i ∈{_ 1 _, . . ., N_ _}_ do 5 _I_ <sup>_′_</sup> _←−_ _I_ <sup>_′_</sup> + _wi · I_ _∗_ _FG,σi_ 6 else ``` //Compute convolution ``` 7 _I_ <sup>_′_</sup> _←−_ _I_ _∗_ _F_ ``` //Compute center/surround image ``` _<u>I</u>_ 8 _ICS_ = _I_ <sup>_′_</sup> + _ε_ `//Add` `small` `constant` `value` `(` _ε_ = 10 <sup>_−_</sup> <sup>8</sup> `)` `to` `avoid` `division` `by` `zero` `//Compute` `range` [ _Min, Max_ ] 9 Min _,_ Max _←−_ `Compute` `Min` `Max` ( _u, s_ 1 _, s_ 2) `//Algorithm` `1` `//Map` `range` [ _Min, Max_ ] `to` [0 _,_ 255] `using` `scaling` `function` _f_ 10 _v_ _←−∅_ `//Initialize` `output` `image` 11 for _each_ _image_ _channel_ _ICS_ do 12 _I_ out _←−_ _f_ ( _ICS_ ) 13 _v_ _←−_ _v ∪_ _I_ out `//Add` `processed` `channel` `to` `output` `image` 14 return _v_ are slightly different from the ones in [10]. In general, we have observed that, for these images, the recommended ranges of values of the parameters of the kernels, shown in Table 2, are correct, but some minimum values must be increased. In Figure 1 we compare the value of different parameters for the _FAG_ kernel, with a fixed scaling function ( _flog_ ). In this image, we can observe that we obtain better results with the number of scales greater or equal to 5. We also observe that values of _S_ smaller than 0.5 produce artifacts in the image. The tests show that the variation of the _σ_ 1 parameter does not produce meaningful changes in the results. In the case of the _FIG_ kernel, the minimum recommended value of the _σ_ 1 parameter in Table 2 is 0 _._ 125, however, for most LDR images it produces excessively bright results. A value greater or equal to 0 _._ 5 produces better results in this case. This fact can be observed in Figure 2. The recommended values for the parameters of the kernel _FIE_ in Table 2 are valid for the tested LDR images. However, the parameter of the kernel _F_ 1 _,σ_ must be increased. In Figure 3, we can observe that values smaller than 0 _._ 5 may enhance excessively the bright parts of the image. Finally, the _σ_ parameter for the kernel _F_ 2 _,σ_ should be set to values greater than 0 _._ 5, as it can be seen in the experiments of Figure 4. In Figure 5, we can compare the results obtained with the different kernels on the same input image and with a fixed scaling function ( _flog_ ). The parameters of the kernels are fixed to their optimum values according to the previous comments. We observe that the non-differentiable kernels, 441 _Calobra_ image _N_ = 2, _σ_ 1 = 0 _._ 5, _S_ = 1 _N_ = 5, _σ_ 1 = 0 _._ 5, _S_ = 1 _N_ = 10, _σ_ 1 = 0 _._ 5, _S_ = 1 _N_ = 5, _σ_ 1 = 1, _S_ = 0 _._ 125 _N_ = 5, _σ_ 1 = 1, _S_ = 0 _._ 5 _N_ = 5, _σ_ 1 = 1, _S_ = 2 Figure 1: Comparison between the different parameters with the _FAG_ kernel with _flog_ scaling function. _σ_ 1 = 0 _._ 125, _S_ = 1 _σ_ 1 = 0 _._ 5, _S_ = 1 _σ_ 1 = 1, _S_ = 1 _σ_ 1 = 4, _S_ = 1 Figure 2: Comparison between the different parameters with the _FIG_ kernel with _flog_ scaling function applied to the image _Calobra_ in Figure 1. 442 _s_ = 0 _._ 1 _s_ = 0 _._ 25 _s_ = 0 _._ 5 _s_ = 1 Figure 3: Comparison between the different parameters with the _F_ 1 _,σ_ kernel with _flog_ scaling function applied to the image _Calobra_ in Figure 1. _σ_ = 0 _._ 25 _σ_ = 0 _._ 5 _σ_ = 1 _σ_ = 2 Figure 4: Comparison between the different parameters with the _F_ 2 _,σ_ kernel with the _flog_ scaling function applied to the image _Calobra_ in Figure 1. _FIE_ and _F_ 1 _,σ_, obtain much better results, in terms of creation of halo artifacts. This is because the halo becomes more visible as the size of the kernel decreases, and the non-differentiable kernels have a less local behavior than the differentiable ones. Finally, in Figure 6, we can see another example. In this case, the halo artifacts are not detectable, but we can observe an excessive saturation in the window when using non-differentiable kernels. If we analyze the scaling functions and their parameters, we observe that most of them have no parameters, or these can be fixed automatically to obtain that the median of the values of the C/S output is mapped to 127 _._ 5. Some results obtained with different values of the parameters for 443 _Calobra_ image _FAG_ with _N_ = 5, _σ_ 1 = 1, _S_ = 1 _FIE_ with _S_ = 1, _s_ = 1 _FIG_ with _S_ = 1, _σ_ 1 = 1 _F_ 1 _,σ_ with _s_ = 1 _F_ 2 _,σ_ with _σ_ = 1 Figure 5: Comparison between the different kernels with the _flog_ scaling function. functions _fα_ and _fNR_ are displayed in Figure 7. Figures 8, 9 and 10 show results obtained with the different scaling functions (using the automatically estimated parameters when necessary) and three different kernels. In general, the results are brighter for _flog_ and _fNR_, and better contrasted for _fE_ . In some images (e.g. Figure 9) the results with the _fα_ scaling are excessively dark. # 6 Conclusions The center/surround formulation of the Retinex theory has been thoroughly analyzed in this paper. Several alternatives, both for kernel and scaling functions, have been considered. Experiments conducted on several images show that non-differentiable kernels at _r_ = 0 ( _FIE_ _F_ 1 _,σ_ ), being less local, produce fewer visual artifacts (e.g. halos) than differentiable ones ( _FAG_, _FIG_, _F_ 2 _,σ_ ). On the other hand, the rendition of image details is better for the latter. Regarding the scaling functions, _fE_ produces the better contrasted results. The reader is invited to test the different options with the online demo associated to the article. 444 _Cathedral_ image _FAG_ with _N_ = 5, _σ_ 1 = 1, _S_ = 1 _FIE_ with _S_ = 1, _s_ = 1 _FIG_ with _S_ = 1, _σ_ 1 = 1 _F_ 1 _,σ_ with _s_ = 1 _F_ 2 _,σ_ with _σ_ = 1 Figure 6: Comparison between the different kernels with _flog_ scaling function. 445 _Swam_ image _fα_ with automatic value _fα_ with _α_ = 0 _._ 5 _fα_ with _α_ = 2 _fNR_ with automatic value _fNR_ with _A_ = 2 _fNR_ with _A_ = 4 Figure 7: Comparison between the results obtained with different parameters for the _fα_ and _fNR_ scaling functions, with fixed _FIG_ kernel. 446 _Swam_ image _fE_ with _p_ = 2 _fL_ _flog_ _fα_ with automatic value _fNR_ with automatic value Figure 8: Comparison between the results obtained with different scaling functions, using a fixed _FIE_ kernel. _Horses_ image _fE_ with _p_ = 2 _fL_ _flog_ _fα_ with automatic value _fNR_ with automatic value Figure 9: Comparison between the results obtained with different scaling functions, using a fixed _FAG_ kernel. 447 _Horses_ image _fE_ with _p_ = 2 _fL_ _flog_ _fα_ with automatic value _fNR_ with automatic value Figure 10: Comparison between the results obtained with different scaling functions, using a fixed _F_ 1 _,σ_ kernel. 448 # Acknowledgements The authors have been partially sponsored by MINECO/AEI/FEDER, UE projects TIN2017-85572P, DPI2017-86372-C3-3-R, and by the Comunitat Autonoma de les Illes Balears through the Direcci´o General de Pol´ıtica Universit`aria i Recerca with funds from the Tourist Stay Tax Law ITS 2017-006 (PRD2018/26). # Image Credits A.B. Petro CC-BY. NASA Unknown author. # References [1] F. Drago, K. Myszkowski, T. Annen, and N. Chiba, _Adaptive_ _logarithmic_ _mapping_ _for_ _displaying_ _high_ _contrast_ _scenes_, Computer Graphics Forum, 22 (2003), pp. 419–426. `[http:](http://dx.doi.org/10.1111/1467-8659.00689)` `[//dx.doi.org/10.1111/1467-8659.00689](http://dx.doi.org/10.1111/1467-8659.00689)` . [2] C. Hessel, _An_ _Implementation_ _of_ _the_ _Exposure_ _Fusion_ _Algorithm_, Image Processing On Line, 8 (2018), pp. 369–387. `[https://doi.org/10.5201/ipol.2018.230](https://doi.org/10.5201/ipol.2018.230)` . [3] A.C. Hulbert, _Formal connections between lightness algorithms_, Journal of the Optical Society of America, 3 (1986), pp. 1684–1693. `[https://doi.org/10.1364/JOSAA.3.001684](https://doi.org/10.1364/JOSAA.3.001684)` . [4] D.J. Jobson, Z. Rahman, and G.A Woodell, _A_ _multiscale_ _retinex_ _for_ _bridging_ _the_ _gap_ _between_ _color_ _images_ _and_ _the_ _human_ _observation_ _of_ _scenes_, IEEE Transactions on Image Processing, 6 (1997), pp. 965–976. `[https://doi.org/10.1109/83.597272](https://doi.org/10.1109/83.597272)` . [5] D.J. Jobson, Z. Rahman, and G.A. Woodell, _Properties_ _and_ _performance_ _of_ _a_ _cen-_ _ter/surround_ _retinex_, IEEE Transactions on Image Processing, 6 (1997), pp. 451–462. `[https:](https://doi.org/10.1109/83.557356)` `[//doi.org/10.1109/83.557356](https://doi.org/10.1109/83.557356)` . [6] E.H. Land, _The_ _retinex_, American Scientist, 52 (1964), pp. 247–264. [7] E.H. Land, _An alternative technique for the computation of the designator in the retinex theory_ _of color vision_, in Proceedings of the National Academy of Science, vol. 83 of 10, 1986, pp. 3078– 3080. `[https://dx.doi.org/10.1073/pnas.83.10.3078](https://dx.doi.org/10.1073/pnas.83.10.3078)` . [8] E. H. Land, _The_ _retinex_ _theory_ _of_ _color_ _vision_, Scientific American, 237 (1977), pp. 108–128. [9] N. Limare, J.L. Lisani, J-M. Morel, A.B. Petro, and C. Sbert, _Simplest_ _Color_ _Bal-_ _ance_, Image Processing On Line, 1 (2011), pp. 297–315. `[https://doi.org/10.5201/ipol.](https://doi.org/10.5201/ipol.2011.llmps-scb)` `[2011.llmps-scb](https://doi.org/10.5201/ipol.2011.llmps-scb)` . [10] J.L. Lisani, J-M. Morel, A.B. Petro, and C. Sbert, _Analyzing_ _center/surround_ _retinex_, Information Sciences, 512 (2020), pp. 741–759. `[https://doi.org/10.1016/j.ins.2019.10.](https://doi.org/10.1016/j.ins.2019.10.009)` `[009](https://doi.org/10.1016/j.ins.2019.10.009)` . 449 [11] Z. Mai, H. Mansour, R. Mantiuk, P. Nasiopoulos, R. K. Ward, and W. Hei drich, _Optimizing_ _a_ _tone_ _curve_ _for_ _backward-compatible_ _high_ _dynamic_ _range_ _image_ _and_ _video_ _compression_, IEEE Transactions on Image Processing, 20 (2011), pp. 1558–1571. `[http:](http://dx.doi.org/10.1109/TIP.2010.2095866)` `[//dx.doi.org/10.1109/TIP.2010.2095866](http://dx.doi.org/10.1109/TIP.2010.2095866)` . [12] L. Meylan and S. S¨usstrunk, _Bio-inspired_ _color_ _image_ _enhancement_, in SPIE, vol. 5292, 2004, pp. 46–56. `[http://dx.doi.org/10.1117/12.526545](http://dx.doi.org/10.1117/12.526545)` . [13] A. Moore, J. Allman, and R. M. Goodman, _A real-time neural system for color constancy_, IEEE Transactions on Neural Networks, 2 (1991), pp. 237–246. `[https://doi.org/10.1109/](https://doi.org/10.1109/72.80334)` `[72.80334](https://doi.org/10.1109/72.80334)` . [14] J. M. Morel, A. B. Petro, and C. Sbert, _What_ _is_ _the_ _right_ _center/surround_ _for_ _Retinex?_, in IEEE International Conference on Image Processing (ICIP), 2014, pp. 4552–4556. `[https:](https://doi.org/10.1109/ICIP.2014.7025923)` `[//doi.org/10.1109/ICIP.2014.7025923](https://doi.org/10.1109/ICIP.2014.7025923)` . [15] K. I. Naka and W. A. H. Rushton, _S-potentials_ _from_ _colour_ _units_ _in_ _the_ _retina_ _of_ _fish_ _(cyprinidae)_, Journal of Physiology, 185 (1966), pp. 536–555. `[https://dx.doi.org/10.1113/](https://dx.doi.org/10.1113/jphysiol.1966.sp008001)` `[jphysiol.1966.sp008001](https://dx.doi.org/10.1113/jphysiol.1966.sp008001)` . [16] E. Reinhard, G. Ward, S. Pattanaik, and P. Debevec, _High_ _Dynamic_ _Range_ _Imaging:_ _Acquisition,_ _Display,_ _and_ _Image-Based_ _Lighting_ _(The_ _Morgan_ _Kaufmann_ _Series_ _in_ _Computer_ _Graphics)_, Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 2005. ISBN 0125852630. [17] 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. `[https://doi.org/10.1016/](https://doi.org/10.1016/S0167-8655%0x2802%0x2900323-9)` `[S0167-8655(02)00323-9](https://doi.org/10.1016/S0167-8655%0x2802%0x2900323-9)` . 450

섹션 본문 73문단 · 16,857자

(제목 없음)

1The Retinex perception theory tries to mimic the human ability to cope with the high dynamic range of natural scenes.In 1986 E. Land proposed a formulation of this model in terms of a Center/Surround operation involving two steps, a local adaptation and a global transform.This model gave rise to the so-called Center/Surround tone-mapping algorithms.In this paper we unify the different Center/Surround algorithms proposed in the literature using a common framework and analyze several possibilities for the local and global operations involved.Source CodeThe reviewed and documented source code and an online demo are available at the web page of this article 1 .Compilation and usage instructions are included in the README.txtfile of the archive.

Introduction

2The adaptation of the human visual system (HVS) to several orders of magnitude of light intensity permits us to perceive a wide spectrum of lights and contrasts which, in general, a camera is unable to capture.The reason is that the eye is a contrast detector, not an absolute detector like the sensor in a digital camera.Edwin Land proposed, in 1964, a complex algorithm involving image paths to compute relative lightness values from the absolute values captured by the camera [6].

3Later, he published [7] an alternative formulation of the original algorithm in which the relative lightness was computed as the ratio between the value of a pixel and the weighted average of the surrounding values.This operation was followed by a logarithmic mapping of the ratios in order to mimic the non-linear behaviour of the HVS with respect to low and high values of the illumination.

4where I(x) is the light intensity captured by the camera at pixel x (we are considering here a single-channel image), F is a surround radial kernel, and f is a global scaling function.Equation (1) defines a Center/Surround model of image perception.In this paper we shall analyze different alternatives both for the kernel and the scaling function, and we will give algorithmical details of the implementation of the model.For a more detailed analysis we refer the reader to [10].

5The paper is organized as follows: in Section 2 different alternatives for the kernel function are analyzed; similarly, several possible scaling functions are examined in Section 3. The main center/surround algorithm is described in Section 4, together with some technical details.Several experiments are displayed in Section 5, and some conclusions are drawn in Section 6.

Kernel Functions

6Mathematically, two conditions should be imposed to the kernel: scale invariance and integrability.As proved in [14], the only radial kernel which is scale invariant is F (r) = K r 2 , which is the (nonintegrable) kernel proposed by Land in [7].Several other radial kernels have been proposed in the literature [7,13,5,4,3,12,14,17].In [10] an exhaustive analysis of these kernels is performed, and some new ones are proposed.The authors unify all these kernels into five models, which are summarized in Table 1 and described next:

7• F AG is the generalization of the Gaussian kernel and a linearized version of the multiscale Retinex (MSR) [4].It is a weighted average of Gaussian kernels at different scales and it is defined as

8where N is the number of scales, σ i is the scale parameter of the i-th kernel and w i is its corresponding weight factor.

9Following [4], the scales are distributed following a geometric series

10The initial scale σ 1 is a parameter.Since convolutions with Gaussians whose σ is of the order of the image size or bigger yield a constant result, the final scale σ N can be chosen depending on the image dimensions

11where S is also a parameter.

12Finally, we propose to define the weights as w i = 1 N .In this way, we have reduced the parameters of the kernel to N , σ 1 and S.

13• F IG was first introduced in [14] to find a compromise between scale invariance and integrability.

14It is a continuous average of Gaussians from scale σ 1 to σ 2 .

154π log(σ 2 /σ 1 ) , r = 0.

16(

17where the initial scale σ 1 is a parameter, and the final scale σ 2 is chosen depending on the image size as in the previous case

18where S is also a parameter.

19• F 2,σ is the continuous version of the Land kernel

20where C is a normalization constant such that

21• F IE is a continuous average of exponentials

22It is inspired by an early work by Moore et al. [13], which proposed an exponential kernel

23that permitted a real-time implementation in analog VLSI.

24In F IE the weight of the central point in the convolution kernel is of order O( 1 σ 1 σ 2 ) showing the inverse proportionality of both parameters.As is analyzed in [10], to obtain good results the product between σ 1 and σ 2 must be constant.Since the kernel is not scale invariant, the values of the initial and final scales σ 1 and σ 2 are chosen depending on the image size as σ 1 = s/min(image width, image height),

25where s and S are parameters.

26• F 1,σ is the continuous version of the ACE kernel [17]

27where C is a normalization constant such that

28This kernel is not scale invariant, therefore the scale σ is chosen depending on the image size as

29where s is a parameter.

Kernel Parameters

30The five models of surround kernels that summarize the state of the art.

Optimum Values of the Kernel Parameters

31In [10] the authors studied, in terms of some distortion measures, the range of values of the parameters of the different kernels.In this study they observed that kernels F AG , F IG and F 2,σ , which are differentiable at r = 0, produce more halo distortion than F IE and F 1,σ which are non-differentiable at r = 0.This is because the halo becomes more visible as the size of the kernel decreases, and the non-differentiable kernels have a less local behavior.Table 2 presents the recommended parameter values.In Section 5 several examples illustrate how these parameters influence the obtained results.

32Kernel Recommended parameter values

Scaling Functions

33The human visual system (HVS) is able to discount the effect of the illumination in the perception of the scenes.The Retinex theory tries to mimic the HVS, with the center/surround formulation.Moreover, Land in [8] observed that the function which relates reflectance with lightness sensation can be approximated by a logarithmic function.Naka and Rushton [15] were the first to model the contrast sensitivity as a sigmoid function.Reinhard in [16] noticed the mathematical properties of sigmoid functions to model the HVS.On the other hand digital images suffer several camera processes, such as gamma-corrections and white balance, which these mapping functions must take into account.In [10] different options for these mapping functions (also known as scaling functions) were analyzed.Table 3 summarizes them.Note that these functions are defined for single channel images.For color images they are applied on a channel-by-channel basis.

34In what follows, M in and M ax refer to the minimum and maximum values of the range of the center/surround operation I F * I , which shall be mapped to the usual [0, 255] range.• Linear mapping.It consists in just a linear stretching of the input range to the desired output range.

35• Logarithmic mapping.Inspired by the tone curve proposed by Drago et al. [1], which produces better results (less noisy in dark areas) than simply replacing the linear values by logarithms in Equation (8).

36• Power function.

37The parameter α can take positive and negative values.In our implementation, we have the option to automatically fix α so that the median of the input values is mapped to the center of the output range, i.e. 127.52 .

38• Naka-Rushton function.Naka and Rushton [15] modeled the contrast sensitivity in the human visual system as the sigmoid function f (x) = x x+s , where s is the value which is mapped to 0.5.We modify this function such that M in is mapped to 0 and M ax is mapped to 255.

39where A > 0 is a constant that controls the steepness of the function.For large values of A f N R tends to a linear function f L .

40In our implementation, we have the option to automatically fix A so that the median of the input values is mapped to the center of the output range, i.e. 127.53 .Note that this can only be achieved for positive values of A when the median is below M in+M ax

2

41. If this is not the case, A is fixed automatically to a large value, so f N R becomes linear.

42• Taking into account the shape of the histogram of the center/surround operation I F * I , we consider a histogram-based function, which is adapted to the pixel distribution of the values.It is a generalization of the one proposed by Mai et al. [11].The function is computed as the minimizer of the functional

43where h denotes the normalized histogram and p > 0 is a parameter.

44The closed-form solution of the minimizing problem is

45where C is such that f E (M ax) = 255.Observe that for p = 0 f E is a histogram equalization.

46In general, the parameter is fixed to p = 2, as proposed in [11].

47Definition of M in and M ax.The values defining the range of the center/surround operation I F * I could simply be computed as the minimum and maximum values of this operation.However, in order to increase the dynamic range of the final output, it is sometimes useful to clip to either 0 (black) or 255 (white) some of the lowest (resp.highest) values of the original range.Therefore, M in and M ax are computed by selecting the percentages of image pixels that will be clipped to black (s black %) or white (s white %).Algorithm 1 describes how these values are computed.This algorithm is an adaptation of the algorithm for robust normalization proposed in [2], which itself is a variant of the simplest color balance algorithm proposed in [9].

48Algorithm 1: Compute Min-Max (adapted from [2]) Input : input image u with N pixels Input : percentage of saturation in the white and the black, respectively s white and s black Output : Min, Max The complete algorithm for the computation of the center/surround operation on an image is presented in Algorithm 2.

49Computation of the convolution I * F .The convolution between the original image and the kernel function is computed in the Fourier domain.By using the FFT and IFFT functions of the FFTW software library4 the original image is extended symmetrically across its sides, so that the extended image, which is four times bigger, becomes symmetric and periodic.In fact, with the FFTW library the symmetrization is implicit and performed directly as a cosine transform.By using these functions the convolution is computed as

Experiments

50In a previous article [10], we carried out an analysis for different combinations of kernel and global mappings, using quantitative and qualitative criteria, over HDR images.For these images, most of the values were concentrated on the lower part of their dynamic range.This is not usually the case for the LDR images studied in the current paper.For this reason the conclusions of our analysis are slightly different from the ones in [10].In general, we have observed that, for these images, the recommended ranges of values of the parameters of the kernels, shown in Table 2, are correct, but some minimum values must be increased.

51In Figure 1 we compare the value of different parameters for the F AG kernel, with a fixed scaling function (f log ).In this image, we can observe that we obtain better results with the number of scales greater or equal to 5. We also observe that values of S smaller than 0.5 produce artifacts in the image.The tests show that the variation of the σ 1 parameter does not produce meaningful changes in the results.

52In the case of the F IG kernel, the minimum recommended value of the σ 1 parameter in Table 2 is 0.125, however, for most LDR images it produces excessively bright results.A value greater or equal to 0.5 produces better results in this case.This fact can be observed in Figure 2.

53The recommended values for the parameters of the kernel F IE in Table 2 are valid for the tested LDR images.However, the parameter of the kernel F 1,σ must be increased.In Figure 3, we can observe that values smaller than 0.5 may enhance excessively the bright parts of the image.

54Finally, the σ parameter for the kernel F 2,σ should be set to values greater than 0.5, as it can be seen in the experiments of Figure 4.

55In Figure 5, we can compare the results obtained with the different kernels on the same input image and with a fixed scaling function (f log ).The parameters of the kernels are fixed to their optimum values according to the previous comments.We observe that the non-differentiable kernels, F IE and F 1,σ obtain much better results, in terms of creation of halo artifacts.This is because the halo becomes more visible as the size of the kernel decreases, and the non-differentiable kernels have a less local behavior than the differentiable ones.Finally, in Figure 6, we can see another example.In this case, the halo artifacts are not detectable, but we can observe an excessive saturation in the window when using non-differentiable kernels.

56If we analyze the scaling functions and their parameters, we observe that most of them have no parameters, or these can be fixed automatically to obtain that the median of the values of the C/S output is mapped to 127.5.Some results obtained with different values of the parameters for Calobra image F AG with N = 5, σ 1 = 1, S = 1 F IE with S = 1, s = 1 functions f α and f N R are displayed in Figure 7. Figures 8, 9 and 10 show results obtained with the different scaling functions (using the automatically estimated parameters when necessary) and three different kernels.In general, the results are brighter for f and f N R , and better contrasted for f E .In some images (e.g. Figure 9) the results with the f α scaling are excessively dark.

Conclusions

57The center/surround formulation of the Retinex theory has been thoroughly analyzed in this paper.Several alternatives, both for kernel and scaling functions, have been considered.

58Experiments conducted on several images show that non-differentiable kernels at r = 0 (F IE F 1,σ ), being less local, produce fewer visual artifacts (e.g.halos) than differentiable ones (F AG , F IG , F 2,σ ).On the other hand, the rendition of image details is better for the latter.Regarding the scaling functions, f E produces the better contrasted results.

59The reader is invited to test the different options with the online demo associated to the article.

1

60https://doi.org/10.5201/ipol.2021.391A generalization of this formulation leads to the following model for the computation of the image lightness L L(x) = f I(x) F * I(x) ,

2 ifF 3 I ′ ←− 0 4 for 5 I 6 else//Compute convolution 7 I 8 I 12 I

61percentages of black and white saturated pixels (s black and s white ), parameters of kernels and scaling functions1 for each image channel I from u do //Compute I ′ = I * F == F AG then //Compute weighted sum of Gaussian convolutions each i ∈ {1, . . ., N } do ′ ←− I ′ + w i • I * F G,σ i ′ ←− I * F //Compute center/surround image CS = I I ′ +ε //Add small constant value (ε = 10 −8 ) to avoid division by zero //Compute range [M in, M 9 Min, Max ←− Compute Min Max(u, s 1 , s 2 ) //Algorithm 1 //Map range [M in, M ax] to [0, 255] using scaling function f 10 v ←− ∅ //Initialize output image 11 for each image channel I CS do out ←− f (I CS ) 13 v ←− v ∪ I out //Add processed channel to output image 14 return v

1 N = 5 ,

62Calobra image N = 2, σ 1 = 0.5, S = 1 N = 5, σ 1 = 0.5, S = 1 N = 10, σ 1 = 0.5, S = σ 1 = 1, S = 0.125 N = 5, σ 1 = 1, S = 0.5 N = 5, σ 1 = 1, S = 2

Figure 1 :

63Figure 1: Comparison between the different parameters with the F AG kernel with f log scaling function.

σ 1 1 σ 1 = 1 , S = 1 σ 1 = 4 ,

64= 0.125, S = 1 σ 1 = 0.5, S = S = 1

Figure 2 :

65Figure 2: Comparison between the different parameters with the F IG kernel with f log scaling function applied to the image Calobra in Figure 1.

Figure 3 :

66Figure 3: Comparison between the different parameters with the F 1,σ kernel with f log scaling function applied to the image Calobra in Figure 1.

Figure 4 :

67Figure 4: Comparison between the different parameters with the F 2,σ kernel with the f log scaling function applied to the image Calobra in Figure 1.

Figure 5 :

68Figure 5: Comparison between the different kernels with the f log scaling function.

4 7:

69Swam image f α with automatic value f α with α = 0.5 f α with α = 2 f N R with automatic value f N R with A = 2 f N R with A = Comparison between the results obtained with different parameters for the f α and f N R scaling functions, with fixed F IG kernel.Swam image f E with p = 2 L f log f α with automatic value f N R with automatic value 8: Comparison between the results obtained with different scaling functions, using a fixed F IE kernel.Horses f E with p = 2 f L f log f α with automatic value f N R with automatic value

Figure 9 :

70Figure 9: Comparison between the results obtained with different scaling functions, using a fixed F AG kernel.

Figure 10 :

71Figure 10: Comparison between the results obtained with different scaling functions, using a fixed 1,σ kernel.

Table 2 :

72Recommended ranges of values of the parameters of the kernels that guarantee a minimum degree of visual distortion in the results.

Table 3 :

73Scaling functions reviewed in Section 3.

참고문헌 16건

  1. High Dynamic Range Imaging: Acquisition, Display, and Image-Based Lighting 2010
  2. S‐potentials from colour units in the retina of fish (Cyprinidae) The Journal of Physiology · Wiley · 1966 10.1113/jphysiol.1966.sp008001
  3. Simplest Color Balance Image Processing On Line · Image Processing On Line · 2011 10.5201/ipol.2011.llmps-scb
  4. An alternative technique for the computation of the designator in the retinex theory of color vision. Proceedings of the National Academy of Sciences · National Academy of Sciences · 1986 10.1073/pnas.83.10.3078
  5. What is the right center/surround for Retinex? 2022 IEEE International Conference on Image Processing (ICIP) · 2014 10.1109/icip.2014.7025923
  6. The Retinex Theory of Color Vision Scientific American · Springer Nature · 1977 10.1038/scientificamerican1277-108
  7. Formal connections between lightness algorithms Journal of the Optical Society of America A · Optica Publishing Group · 1986 10.1364/josaa.3.001684
  8. A new algorithm for unsupervised global and local color correction Pattern Recognition Letters · Elsevier BV · 2003 10.1016/s0167-8655(02)00323-9
  9. Properties and performance of a center/surround retinex IEEE Transactions on Image Processing · Institute of Electrical and Electronics Engineers · 1997 10.1109/83.557356
  10. A real-time neural system for color constancy IEEE Transactions on Neural Networks · Institute of Electrical and Electronics Engineers · 1991 10.1109/72.80334
  11. Optimizing a Tone Curve for Backward-Compatible High Dynamic Range Image and Video Compression IEEE Transactions on Image Processing · Institute of Electrical and Electronics Engineers · 2010 10.1109/tip.2010.2095866
  12. A multiscale retinex for bridging the gap between color images and the human observation of scenes IEEE Transactions on Image Processing · Institute of Electrical and Electronics Engineers · 1997 10.1109/83.597272
  13. Adaptive Logarithmic Mapping For Displaying High Contrast Scenes Computer Graphics Forum · Wiley · 2003 10.1111/1467-8659.00689
  14. Bio-inspired color image enhancement Proceedings of SPIE, the International Society for Optical Engineering/Proceedings of SPIE · SPIE · 2004 10.1117/12.526545
  15. An Implementation of the Exposure Fusion Algorithm Image Processing On Line · Image Processing On Line · 2018 10.5201/ipol.2018.230
  16. Analyzing center/surround retinex Information Sciences · Elsevier BV · 2019 10.1016/j.ins.2019.10.009