Adaptive Image Rendering Using a Nonlinear Mapping-Function-Based Retinex Model

This paper introduces an adaptive image rendering using a parametric nonlinear mapping-function-based on the retinex model in a low-light source. For this study, only a luminance channel was used to estimate the reflectance component of an observed low-light image, therefore halo artifacts coming from the use of the multiple center/surround Gaussian filters were reduced. A new nonlinear mapping function that incorporates the statistics of the luminance and the estimated reflectance in the reconstruction process is proposed. In addition, a new method to determine the gain and offset of the mapping function is addressed to adaptively control the contrast ratio. Finally, the relationship between the estimated luminance and the reconstructed luminance is used to reconstruct the chrominance channels. The experimental results demonstrate that the proposed method leads to the promised subjective and objective improvements over state-of-the-art, scale-based retinex methods.


Introduction
The high performance and miniaturization of image sensors make it possible for image information to be used in various applications, such as mobile platforms, recognition systems, and security systems [1,2]. However, low contrast coming from an absent light source leads to the degradation of image quality, so the performance of the application system may be unsatisfactory [3]. In order to solve the low-contrast problem, many simple approaches, such as histogram equalization, gamma correction, and auto exposure, have been widely used [4]. However, they limit performance because they do not account for human visual perception [5].
Many efforts have been made to formalize human visual systems (HVSs). Among them, retinex theory has attracted attention as a useful way to estimate the human sensation derived from an observed scene. For example, Land et al. presented a model of HVS color perception. It explains how an HVS, as a combination of processes, supposedly taking place in both the retina and the cortex, is capable of adaptively coping with illumination that varies spatially in both intensity and color [6].
Enhancements of low-contrast images using the retinex model are aimed at estimating illuminance and reflectance under various assumptions. According to the mathematical formulation and implementation-of-cost function, these can be classified as modified retinex methods [7][8][9], scale-based methods [10][11][12][13][14][15], variational methods [16][17][18], and deep learning-based methods [19,20]. The modified retinex methods use a reset and threshold mechanism to estimate illuminance based on the pixel intensity of a given random path. These methods are robust against additive noise. However, they are limited in improving the contrast ratio because they do not account for the statistical distribution of low-light images. The variational methods, which model appropriate energy functions, have led to promising results. However, their performance is very sensitive to tuning function. In addition, they require very expensive computational costs, so the scope of their applications is limited. Recently, statistical distribution of low-light images. The variational methods, which model appropriate energy functions, have led to promising results. However, their performance is very sensitive to tuning function. In addition, they require very expensive computational costs, so the scope of their applications is limited. Recently, the deep learning-based methods have been exploited to enhance the contrast ratio. Most of the schemes are based on the property of the linear retinex model. Therefore, in order to improve the performance of the deep learning approaches, based on the retinex model, it is necessary to study the retinex model that reflects HVS.
A single-scale retinex (SSR) method has been introduced, in which a center/surround Gaussian filter is used to extract the reflectance from an observed image in accordance with the Werber-Fachner Law and based on the nonlinearity of human visual perception. This leads to an enhancement of the contrast range [11]. However, the performance is very sensitive to the choice of parameters for the Gaussian filter. A multi-scale retinex (MSR) model and an MSR with color restoration (MSRCR) model have been presented to resolve the filter dependency problem [12]. They have the capability to effectively enhance contrast ratios with less filter dependency, but they also increase the number of halo artifacts, which is visually annoying. The artifacts increase, as the number of filters increase.
An adaptive MSR (AMSR) [21] was created to improve the contrast ratio and reduce the color distortion; in this system, luminance is used to estimate the reflectance from an observed image. The estimated reflectance is used to reconstruct reflectance via linear stretching assisted by a weighted map. Although the AMSR improves the contrast ratio and reduces computational complexity, it increases the number of halo artifacts because the statistical properties of the extracted reflectance are not incorporated into the reconstruction process.
The bottlenecks of the existing scale-based retinex methods are summarized as follows: (1) the number of halo artifacts due to the use of multiple center/surround Gaussian filters, (2) color distortion due to independent processing of color channels, and (3) loss of signal distribution characteristics due to not considering the statistics of the observed images. This paper presents an image rendering method via an adaptive, scale-based retinex model using a parametric, nonlinear mapping function of statistical characteristics of luminance and reflectance for low-light images. In order to reduce the number of halo artifacts, a center/surround Gaussian filter is only applied to the luminance channel in the YCbCr color space to estimate the reflectance. The statistical characteristics of the captured image are distributed differently according to the brightness and direction of the light source. Therefore, it is necessary to incorporate these statistical characteristics into the reconstruction process of the reflectance. This paper introduces a nonlinear reflectance reconstruction function that is defined as a function of the skewness of the luminance of a low-light image, so the contrast ratio is adaptively controlled. In addition, a new determination of the gain and offset of the nonlinear function is addressed to adaptively clip the dynamic range of the reflectance. Finally, the chrominance channels are reconstructed by the ratio between the estimated luminance and the reconstructed luminance. Figure 1 depicts the overall flowchart of the proposed method.  This paper is organized as follows. Section 2 briefly describes the MSR for low-light contrast enhancement. Section 3 describes the proposed scale-based retinex method using a new parametric, nonlinear function for enhancing low-light images. The determination of parameters, the gain, and the offset of the nonlinear function using the statistical characteristics are explained in this section as well. We analyze the experimental results in Section 4, and finally, describe the conclusions derived from the results in Section 5.

Related Work
The human visual model has been well studied in regard to solving low-light and back-light problems. Land, et al. experimentally proved that the human visual model can be expressed by the reflection coming through an object and the illuminance coming from a light source [6]. According to their research, perceptual intensity can be expressed as where I, R, and L represent the perceptual intensity of human eyes, the reflectance, and the illuminance, respectively. Equation (1) implies that the illuminance and the reflectance can be arithmetically obtained. Based on the retinex theory, many approaches have been presented to obtain better results by reconstructing the reflectance or the illuminance. The SSR method aimed to correct the reflectance of an object by applying center/surround Gaussian filters to an observed image as follows [11]: where * denotes the two-dimensional convolution operator, and G represents a Gaussian filter. The Gaussian filter of the (x, y)-th pixel is defined as follows: where K and c denote a normalization constant and standard deviation, respectively, and S represents a two-dimensional support region to which the Gaussian filter is applied. The above expression means that the density of light concentrates around the light source, and the correlation of light decreases as the distance from the center increases. It was verified that the SSR method is very sensitive to the choice of standard deviation c [22]. In order to solve this problem, an MSR method was proposed in which N center/surround Gaussian filters are applied to each channel of an input color image and weights are applied to each result to reduce the dependency of the filter. The reflection of the i-th color channel is estimated as follows [12]: for i ∈ {R, G, B}. In equation (4), N = 3 is generally used because the computational cost increases as N increases. It has been shown that w n = {0.3, 0.1, 0.6} and c n = {5, 30, 240} are effective for obtaining a reasonable result [23]. The estimated reflectance, R MSR i , includes distorted color and illuminance components, so a gain/offset is set to reconstruct the reflection as follows: where R MSR i,max and R MSR i,min represent the maximum and the minimum, respectively, of the estimated reflectance and are determined using statistical characteristics as follows: where α represents a constant to clip the dynamic range. In addition, m i and σ i denote the mean and standard deviation of R MSR i , respectively. For an image represented by k bits per pixel, each pixel is reconstructed as follows:Î It has been shown that MSR methods have the capability of reducing filter dependency, but they also increase the number of halo artifacts caused by the independent processing of the center/surround Gaussian filters to RGB channels. In addition, there is a limit to improvements to the contrast ratio because the statistical characteristics of the energy density of the observed low-light image are not considered.

The Proposed Method
In order to solve the problems of the existing scale-based retinex methods, this paper presents an adaptive scale-based retinex model based on a nonlinear function using the skewness characteristics of luminance and reflectance. The luminance channel (Y) in the YCbCr color space is suitable to represent the perceptual information and to include the relationships between RGB channels. Therefore, reflectance can be estimated by applying the center/surround Gaussian filter to only the luminance. Therefore, the number of halo artifacts and computational complexity can both be reduced. Skewness has been used to statistically represent the degree of bias of energy density. In this paper, a nonlinear function, defined as a function of the mean, variance, and skewness of the estimated reflectance and luminance, is presented to improve the contrast ratio and reduce the number of halo artifacts.
In the study, an observed low-light RGB image is transformed to the YCbCr image, and the reflectance of Y channel is obtained in a similar way to MSR methods as follows: where Y and G denote the luminance channel and the center/surround Gaussian filter, respectively. In addition, N = 3 is used with w n = {0.3, 0.1, 0.6} and c n = {5, 30, 240} in the same way as the MSR.
As mentioned, the conventional scale-based retinex methods have limited performance because they do not incorporate the statistical characteristics of the energy density of an observed image into the reconstruction process. In this study, skewness is used to represent the bias degree of the energy density. For a U × V-sized image, the skewness of the luminance and the estimated reflectance can be written as follows [24]: where m Y and σ Y denote the mean and the standard deviation, respectively, of the luminance, and m R and σ R represent the mean and standard deviation of the estimated reflectance, respectively. As shown in Figure 2, the skewness increases as the luminance becomes darker. In addition, the skewness is equal to 0 when the distribution is symmetrical. As the amount of the available light-source lessens, there is a distortion of the illuminance and the estimated reflectance [11,12]. Therefore, it is necessary to compensate for the distortion. In conventional approaches, the linear compensation in equation (5) is used, but there is a limit to the ability to correct the distortion with this equation because the statistical characteristics of the observed image are not reflected. Therefore, a new reconstruction function is used as follows: where R max and R min are the maximum and minimum for the gain and offset of the estimated reflectance, respectively. In order to improve the contrast ratio, reflectance should be expanded by setting µ to be larger, as the image becomes darker. Conversely, µ is set to decrease, as the image gets brighter so the reflectance becomes compressed. The relationship between µ and Sk Y can be written as follows: where satisfying equation (11) with µ can be justified in various ways. In this study, µ is defined as a function of Sk Y as follows: where α is a constant.
an adaptive scale-based retinex model based on a nonlinear function using the skewness characteristics of luminance and reflectance. The luminance channel (Y) in the YCbCr color space is suitable to represent the perceptual information and to include the relationships between RGB channels. Therefore, reflectance can be estimated by applying the center/surround Gaussian filter to only the luminance. Therefore, the number of halo artifacts and computational complexity can both be reduced. Skewness has been used to statistically represent the degree of bias of energy density. In this paper, a nonlinear function, defined as a function of the mean, variance, and skewness of the estimated reflectance and luminance, is presented to improve the contrast ratio and reduce the number of halo artifacts.
In the study, an observed low-light RGB image is transformed to the YCbCr image, and the reflectance of Y channel is obtained in a similar way to MSR methods as follows: where and denote the luminance channel and the center/surround Gaussian filter, respectively. In addition, As mentioned, the conventional scale-based retinex methods have limited performance because they do not incorporate the statistical characteristics of the energy density of an observed image into the reconstruction process. In this study, skewness is used to represent the bias degree of the energy density. For a × -sized image, the skewness of the luminance and the estimated reflectance can be written as follows [24]: , .
where and denote the mean and the standard deviation, respectively, of the luminance, and and represent the mean and standard deviation of the estimated reflectance, respectively.
As shown in Figure 2, the skewness increases as the luminance becomes darker. In addition, the skewness is equal to 0 when the distribution is symmetrical. As the amount of the available light-source lessens, there is a distortion of the illuminance and the estimated reflectance [11,12]. Therefore, it is necessary to compensate for the distortion. In conventional approaches, the linear compensation in equation (5) is used, but there is a limit to the ability to correct the distortion with this equation because the statistical characteristics of the observed image are not reflected. Therefore, a new reconstruction function is used as follows: In the MSR, the gain and offset in equation (6) are determined only by the mean and standard deviation of the estimated reflection, under the assumption that the estimated reflection has a bilateral symmetrical distribution. However, the distribution of the estimated reflection is not symmetrical because the estimated reflectance may contain a distorted component that is dependent on light intensity. Therefore, it is necessary to set the gain and offset by the degree of asymmetry of the reflectance. In this study, they are defined as follows: where β is a constant to scale the skewness. In addition, the constant, T, is chosen such that (T + β × Sk R ) is greater than 0. Equations (10) and (13) have the following properties. When the skewness of the estimated reflection is positive, the estimated reflection is concentrated in a lower-than-average reflectance region. In this case, R max and R min are determined to expand the concentrated reflectance region. Conversely, R max and R min are chosen to expand a higher-than-average reflectance region when the skewness is negative. According to these properties, the dense and loose regions of the estimated reflectance are reconstructed in a balanced manner. Then, the luminance of a pixel represented by k bits is reconstructed in the following manner: The chrominance channels corresponding to the reconstructed luminance can be reconstructed in various ways. In this study, the chrominance channels are reconstructed by gains in luminance in order to maintain the correlation between the channels with the reduction of the computational cost. The gains in luminance can be defined as follows: where γ is a constant. Then, Cb and Cr are reconstructed as follows:

Experimental Setup
Several experiments were conducted with various low-contrast images, such as indoor/outdoor environments and single/multiple light sources. As shown in Figure 3, for the experiments, 20 images (A1-A20) were obtained from the Internet and 20 images (B1-B20) were acquired with a Nikon-Df camera using AF-S NIKKOR 50 mm f/1.8 G lens.
lower-than-average reflectance region. In this case, and are determined to expand the concentrated reflectance region. Conversely, and are chosen to expand a higher-than-average reflectance region when the skewness is negative. According to these properties, the dense and loose regions of the estimated reflectance are reconstructed in a balanced manner. Then, the luminance of a pixel represented by bits is reconstructed in the following manner: ( , ) = ( , ) × (2 − 1).
The chrominance channels corresponding to the reconstructed luminance can be reconstructed in various ways. In this study, the chrominance channels are reconstructed by gains in luminance in order to maintain the correlation between the channels with the reduction of the computational cost. The gains in luminance can be defined as follows: where is a constant. Then, Cb and Cr are reconstructed as follows:

Experimental Setup
Several experiments were conducted with various low-contrast images, such as indoor/outdoor environments and single/multiple light sources. As shown in Figure 3, for the experiments, 20 images (A1-A20) were obtained from the Internet and 20 images (B1-B20) were acquired with a Nikon-Df camera using AF-S NIKKOR 50 mm f/1.8 G lens.    The proposed method was compared to the state-of-the-art, scale-based retinex algorithms, such as the MSR [12], random spray retinex (RSR) [7], light RSR (LRSR) [8], and AMSR [21]. To evaluate the performance of the algorithms, contrast per pixel (CPP) [25] was used. For a × -sized color image, the CPP is defined as follows: where ( = 1,2,3) represents the -th reconstructed channel of an RGB color image. An Intel Core i7-3770 CPU 3.4GHz with 8 GB memory was used to examine the processing time, and MS C++ 2010 was used to simulate the algorithms. To evaluate subjective visual quality, a double-stimulus continuous quality scale (DSCQS) [26] was examined, with which a blind quality assessment was conducted by 20 individuals.
Several parameters were defined for the proposed method. and in equations (12) and (13) were used to reflect the contribution of the skewness of the luminance and the reflectance in the mapping function. As they increase, the contrast ratio of the reconstructed image showed an out-of-proportion increase as well. It was observed that 1.5 , 2.5 led to promising results, The proposed method was compared to the state-of-the-art, scale-based retinex algorithms, such as the MSR [12], random spray retinex (RSR) [7], light RSR (LRSR) [8], and AMSR [21]. To evaluate the performance of the algorithms, contrast per pixel (CPP) [25] was used. For a U × V-sized color image, the CPP is defined as follows: whereÎ k (k = 1, 2, 3) represents the k-th reconstructed channel of an RGB color image. An Intel Core i7-3770 CPU 3.4GHz with 8 GB memory was used to examine the processing time, and MS C++ 2010 was used to simulate the algorithms. To evaluate subjective visual quality, a double-stimulus continuous quality scale (DSCQS) [26] was examined, with which a blind quality assessment was conducted by 20 individuals. Several parameters were defined for the proposed method. α and β in equations (12) and (13) were used to reflect the contribution of the skewness of the luminance and the reflectance in the mapping function. As they increase, the contrast ratio of the reconstructed image showed an out-of-proportion increase as well. It was observed that 1.5 ≤ α, β ≤ 2.5 led to promising results, and α = β = 2 was used to reconstruct the image. Additionally, T in equation (13) was used to set the gain and offset of the mapping function. As T decreased, the degree of the saturation of the brightness increased. Conversely, as T increased, the contrast ratio of the reconstructed image decreased, so the saturation and the brightness were both reduced. In these experiments, T = 2 was used. In addition, the luminance gain, γ in equation (15), was used to reconstruct the Cb and Cr channels. As γ increased, the chrominance channels became more saturated. The experiments yielded 0.85 < γ < 0.95, which is a good range with respect to performance. In these experiments, γ = 0.9 was used.

Analyses of Experimental Results
The CPP has been used previously as a way to represent the degree of intensity variation between neighbor pixels, and it has been shown to decrease as the contrast ratio of an observed image decreases [23]. Table 1 shows the CPP comparisons for this study. With the conventional MSR method, improvements in CPP varied depending on the image. Conversely, the RSR and LRSR methods were very effective for noise reduction in the low-contrast region, but they were limited in improving CPP. AMSR outperformed the other methods in terms of the CPP in most cases. However, it was observed that the CPP improvement was caused by a halo artifact increase. Conversely, the proposed method outperformed the comparative methods, with the exception of AMSR. It was observed that the proposed method led to better, consistently guaranteed results with respect to CPP, regardless of the degree of contrast. In these experiments, the average CPP improvements for the low-light images, MSR, AMSR, RSR, LRSR, and the proposed method were 78.9%, 134.2%, 7.7%, 7.7%, and 113.1%, respectively. The comparisons of the processing times per pixel are presented in Table 2. In AMSR and the proposed method, the processing times for converting the RGB ground truth image into the YCbCr channels and converting the reconstructed YCbCr channels into the RGB image are included. The MSR required more computation than the proposed method due to the independent reconstruction processing for each channel. Additionally, the computational complexities of the RSR and LRSR were the most expensive due to the large number of random spray filters, and the filter window size applied to each pixel. The AMSR required less computation than the other comparative methods because it performed the Y-channel oriented processing. However, it spent a certain amount of processing time to reconstruct the chrominance channels, revealing marginally higher computational complexity than the proposed method. Conversely, it was confirmed that the proposed method consistently had the lowest computational cost of all the methods because it directly applied the statistical characteristics of an observed image to the mapping function. The processing time reductions of the proposed method over the MSR, AMSR, RSR, and LRSR were 100.4%, 14.3%, 249.3%, and 263.8%, respectively.
Visual comparisons are presented in Figures 4 and 5. The MSR was effective in improving the contrast ratio. However, there was signal saturation and color distortion because this method did not consider the statistical characteristics of the observed image in reconstructing the reflectance. Although the AMSR was better than the MSR in terms of the contrast ratio, the number of halo artifacts increased because the linear stretching assisted by a weighted map, without considering the asymmetry of the reflectance of the observed image. The RSR and LRSR were effective in color representation and they removed noise in low-contrast regions well. However, they were limited in their ability to enhance the contrast ratio. Conversely, the proposed method considered the distribution characteristics of the image, thereby improving the contrast ratio and effectively representing the color components. Table 3 illustrates the comparisons of the DSCQS for subjective quality assessment, in which the low-light image was assumed to be 5 points and 0-10 points were used to score the compared image. In most cases, the MSR scores were higher than the comparative methods, but there was a large difference in the evaluators' preferences, depending on the images. AMSR had the lowest score among the comparative methods due to the number of halo artifacts, although it outperformed the others in terms of CPP. These experiments verified that the number of halo artifacts was an important cause of visual inconvenience. RSR and LRSR had relatively low scores due to the performance limits in improving the contrast ratio. On the other hand, the proposed method adaptively improved the contrast ratio with the reduction of the color distortion, leading to it consistently outperforming the other methods.
among the comparative methods due to the number of halo artifacts, although it outperformed the others in terms of CPP. These experiments verified that the number of halo artifacts was an important cause of visual inconvenience. RSR and LRSR had relatively low scores due to the performance limits in improving the contrast ratio. On the other hand, the proposed method adaptively improved the contrast ratio with the reduction of the color distortion, leading to it consistently outperforming the other methods.   The experiments proved that, subjectively and objectively, promising results were obtained by incorporating the asymmetry of the extracted reflectance and the illuminance into the reconstruction process. The experiments confirmed that the objective performance evaluation, CPP, did not coincide with the subjective performance evaluation, such as the DSCQS, because CPP does not consider the halo artifacts and the color distortion. Therefore, it is necessary to study a quality assessment metric that reflects the elimination of the halo artifact and the improvement of color distortion, as well as the improvement of the contrast ratio. The experiments proved that, subjectively and objectively, promising results were obtained by incorporating the asymmetry of the extracted reflectance and the illuminance into the reconstruction process. The experiments confirmed that the objective performance evaluation, CPP, did not coincide with the subjective performance evaluation, such as the DSCQS, because CPP does not consider the halo artifacts and the color distortion. Therefore, it is necessary to study a quality assessment metric that reflects the elimination of the halo artifact and the improvement of color distortion, as well as the improvement of the contrast ratio.

Conclusions
This paper presents an adaptive image rendering method using the asymmetry of an observed image in a low-light environment. A new nonlinear mapping function, as determined by the asymmetry of the illuminance, and the extracted reflectance, was presented for reconstructing the reflectance. In addition, the determination of the gain and offset of the nonlinear mapping function was also introduced. The experimental results demonstrated that the proposed method leads to subjectively and objectively promising results. The proposed method can be used as a computational platform to provide the high-quality image in various vision-sensor-based intelligent systems, such as visual surveillance and vision assistant driving systems, in a low-light source environment.
In these experiments, halo artifacts were the main cause of increased CPP, but at the same time, the artifacts were very annoying to human viewers. Therefore, it is worth developing an objective image quality assessment to consider the elimination of the halo artifact and the color distortion, as well as the improvement of the contrast ratio. A new, high-order, norm-based, deep learning method assisted by asymmetrical characteristics is under development, and the newest method is expected to produce a more sophisticated formulation and achieve even better performance.