Low-Light Image Enhancement Using Adaptive Digital Pixel Binning

This paper presents an image enhancement algorithm for low-light scenes in an environment with insufficient illumination. Simple amplification of intensity exhibits various undesired artifacts: noise amplification, intensity saturation, and loss of resolution. In order to enhance low-light images without undesired artifacts, a novel digital binning algorithm is proposed that considers brightness, context, noise level, and anti-saturation of a local region in the image. The proposed algorithm does not require any modification of the image sensor or additional frame-memory; it needs only two line-memories in the image signal processor (ISP). Since the proposed algorithm does not use an iterative computation, it can be easily embedded in an existing digital camera ISP pipeline containing a high-resolution image sensor.


Introduction
As the demand for mobile devices increases, the density of a CMOS image sensor is rapidly growing. However, if the size of each pixel in the high-density image sensor becomes smaller, low-sensitivity and noise amplification problems occur, especially in low-light images. To solve this problem, many image signal processors (ISPs) adopt digital image enhancement algorithms. Since a OPEN ACCESS simple intensity amplification algorithm results in various undesired artifacts, sensor-based pixel binning [1][2][3][4] algorithms with noise reduction function in the image signal processor (ISP) [5][6][7] have been proposed in the literature. More specifically, a basic sensor-based pixel binning method groups multiple neighboring pixels into one to increase the sensitivity of the resulting pixel at the cost of reduced spatial resolution. In order to reduce the side effect of brightness amplification, various noise reduction algorithms were also proposed to separate noise from the original image before brightness amplification. However, a basic sensor-based pixel binning method cannot avoid loss of spatial resolution, and noise reduction is still an open problem in the imaging sensor technology. The proposed work extends the digital pixel binning algorithm in a context-adaptive manner to prevent undesired artifacts including noise amplification, intensity saturation, and loss of resolution.
This paper is organized as follows. A novel image degradation model for low-light image acquisition and the related background theory are presented in Section 2, and the proposed adaptive digital pixel binning algorithm is presented in Section 3. Experimental results are given in Section 4, and Section 5 concludes the paper.

Theoretical Background
Sensor-based pixel binning is designed to increase the sensitivity of an image sensor by combining multiple photodiodes into one bin at the cost of decreasing the spatial resolution as shown in Figure 1a. On the other hand, digital pixel binning can accumulate multiple pixel values without losing the spatial resolution as shown in Figure 1b. Since the sensor-based pixel binning method does not reuse combined pixels as shown in Figure 1a, it decreases the spatial resolution inversely proportional to the bin size. On the other hand, the digital pixel binning method reuses pixels used for adjacent bins as shown in Figure 1b. The result of digital pixel binning can be considered a low-pass filtered version of the input image whose intensities are multiplied by the bin size. For this reason, spatial resolution is preserved in the pixel binning process while the details are smoothed by low-pass filtering.

Image Degradation Model for Low-Light Image Acquisition
The proposed image degradation model under low-light conditions is shown in Figure 2  The degraded image under low-light conditions can be expressed as: Since ( , ) g x y is a low-light version, a simple intensity amplification by factor α yields: has an amplified intensity, it results in intensity saturation because of the limited bit range, and also amplifies the sensor noise.

Digital Pixel Binning
The digital pixel binning process is expressed as: where ( ) , b h x y represents the binning kernel, and * represents the convolution operation. For example, the kernel of 2 × 2 pixels binning plays a role of average filtering as: where 4 α = . Given a specific value of α , the result of pixel binning in Equation (3) is rewritten as: x h x y x y η = * η . In ( ) , g x y , the high frequency detail of the low-light degraded version, that is ( ) , f x y , is suppressed by the average filtering, and then amplified by the ratio α . The distribution of random noise in ( ) , g x y is concentrated toward zero by the average filtering, and will not be affected by the following amplification by the ratio α since most samples has become close to zero.
The digital pixel binning function in the conventional ISP for surveillance is shown as Figure 3. Digital pixel binning amplifies the intensity value before auto exposure (AE). The rest of the ISP functions, including noise reduction and image enhancement, can be used together with digital binning.
The digital pixel binning algorithm can be easily implemented using additional line memories. However, simple digital pixel binning algorithm results in image degradation as given in Equation (5). The proposed binning algorithm has been devised to avoid image degradation and additional hardware.

Adaptive Digital Pixel Binning
Although digital pixel binning can produce a brighter image without noise amplification in low-light conditions, the resolution of the resulting image decreases because of the low-pass filtering nature of the binning kernel. Furthermore, the intensity of the bright region is saturated when the pixel binning uses a fixed ratio. To solve these problems, the proposed algorithm performs the binning process in an adaptive manner according to the brightness, context, noise, and anti-saturation. Figure 4 shows the block diagram of the proposed adaptive digital pixel binning algorithm.

Brightness Adaptive Binning Ratio
The ordinary digital pixel binning method amplifies the brightness of entire image using a fixed amplification ratio. For this reason, the dark region of image is enhanced to be brighter, while the bright region becomes saturated. To solve the saturation problem of conventional digital binning algorithms, the proposed algorithm changes the amplification ratio according to the brightness of the neighboring region in a spatially adaptive manner. The optimal amplification ratio at each pixel using the converted gray channel and the 3 × 3 average filter to suppress noise can be determined as follows: where 3 3 h × represents the 3 × 3 average filter, ( ) the converted gray cannel image, and max{} ⋅ the operation that selects the maximum value in the argument. As a result, ( ) , t x y has the value in [0,1], and the order of relative brightness is preserved. The optimal binning ratio is defined using ( ) , t x y as: where b R represents the maximum binning ratio. ( ) , r x y takes the value 1 or higher. If ( ) , t x y becomes close to 0, ( ) , r x y approaches to its maximum value b R . For example, if b R is set to 4, the proposed algorithm uses the maximum of four pixels.

Context-Adaptive Binning
The pixel averaging process in the binning algorithm decreases the resolution of the resulting image. To minimize such degradation, the proposed algorithm uses weighted summation based on the relationship between the pixel and its neighbor. At the pixel position ( , ) x y , a p p × window generates the sorted difference vector 2 ,  represents the integer part of / 2 p , and {} sort · represents the vector whose elements are rearranged in the ascending order of the absolute value such that Based on the definition in Equation (8) x y x y s g x y d = − The result of the context-adaptive binning is obtained from the weighted sum of similar pixels in the sorted vector as: where the weighting vector s r is defined using the optimal binning ratio given in Equation (7) as: The pixel order q represents the labeling of each sorted pixel in the p p × window. For example, a 3 3 × window is shown in Figure 5, where 3 p = and ( , ) 100 g x y = . The corresponding , The binning result is then finally given as: The kernel of the adaptive binning is expressed in matrix form as: Since three pixel values 110, 100, 120 in the diagonal edge are similar as shown in Figure 5, only summation of the three pixels can preserve the edge without being mixed with uncorrelated pixels, and the fourth similar pixel value, that is 60, is combined with smaller weight than the first three. × window with ( , ) 100 g x y = at the center.
The ordinary digital pixel binning sums up pixel values in the pre-defined binning kernel throughout the input image. For this reason, details of the image cannot be preserved. On the other hand, the proposed algorithm can flexibly change the binning kernel based on the correlation of neighboring pixels. As a result, it is possible to minimize the degradation of edge details in the input image.

Noise-Adaptive Pixel Binning
Although the proposed context adaptive pixel binning can preserve the details in the image, it cannot suppress noise if the current pixel contains a noisy component. For this reason, uniform binning is effective in a noisy region as: where u r represents the uniform pixel binning coefficient vector whose elements are defined as: The unity value of q implies the current pixel whose position coefficient is equal to 1. However, coefficients of other pixels are determined by the number of total pixels to reduce the noise effect.
3.4 r x y = , the uniform binning kernel is expressed in matrix form as: The low-pass filtering performance of this kernel is higher than ordinary four-pixel digital pixel binning because its kernel has greater support. The result of the proposed binning is computed as: where ( ) s q represents the mean value of the local window, and λ a constant for the sensitivity of noise suppression. In this work, 1 λ = was used for empirically best result.

Image Blending for Anti-Saturation
Although the brightness-adaptive procedure adjusts the binning ratio, the binning algorithm itself simply amplifies the brightness and results in saturation in the processed image. In order to prevent saturation, the proposed algorithm combines the input low-light and the binning result given in Equation (19) using the image blending method.
The blending image is computed by combining the amplified image ( , ) b x y and the input ( , ) g x y as: where the blending weighted coefficient is defined as: In Equation (9)

Experimental Results
Three test images were acquired using two different types of camera for the experiment. A digital camera with a 20 megapixel CMOS image sensor was used to acquire two groups of test images: (1) a resolution chart; and (2) a parking garage. A commercial surveillance camera with a full high-definition (1920 × 1080) CMOS image sensor was also used to capture the outdoor scene. In order to obtain images with different exposure values (EVs), multiple ISO values were used with a fixed aperture and shutter speed. For evaluation of the performance of noise suppression, entropy and variance values are computed in a flat region of images. In order to acquire input test images, auto white balance (AWB) and AE parameters are fixed, and edge enhancement and color suppression functions are bypassed. In order to evaluate the independent performance of digital pixel binning, noise reduction functions were turned off, and only gamma correction is applied as shown in Figure 3.
In order to evaluate the performance of brightness enhancement, the proposed algorithm is compared with ordinary digital pixel binning, Kim's clipped histogram equalization [8], and Jiang's image enhancement [9]. Each amplification ratio of image enhancement algorithms was set to preserve the same brightness as the reference value. However, the average brightness of output images is not exactly the same because of the different properties of each amplification algorithm. (d) enhanced image of (b) using Kim's algorithm; (e) enhanced image of (b) using Jiang's algorithm; and (f) enhanced image of (b) using the adaptive four-pixel digital pixel binning. Figure 6 shows the experimental results of enhancing the ISO 12233 resolution chart image under 15 lux illumination. Three test images are acquired using different ISO values including 3200 and 1600, fixed aperture size F11, and shutter speed 1/16 s. Figure 6a,b respectively show the normal and one-step lower exposure images. Figure 6c shows the enhanced image of Figure 6b  respectively. Figure 6f shows the enhanced image of Figure 6b using the proposed algorithm with a maximum binning ratio of 4. For clearer visual comparison, the magnified region of the red box in Figure 6 is shown in Figure 7. (c) enhanced image of (b) using ordinary two-pixel digital pixel binning; (d) enhanced image of (b) using Kim's algorithm; (e) enhanced image of (b) using Jiang's algorithm; and (f) enhanced image of (c) using adaptive eight-pixel digital pixel binning.
The red arrows in Figure 7 indicate the position where lines can be just resolved with the differential intensity value over 20. Figure 7d is so severely distorted that it is not possible to find a position that has difference of 20 or larger. As shown in Figures 7d-f, the proposed binning algorithm can better preserve vertical edges and suppress noise than existing ordinary image enhancement algorithms.
For evaluating the performance of noise suppression, Table 1 summarizes the entropy [10] and variance values of a 400 × 400 flat region in the blue dotted box in Figure 6a. The mean value represents the average luminance of the image, and variance the average value of squared difference between the pixel intensity and the corresponding local mean. As shown in Table 1, the higher the ISO value, the more noise in the acquired image. As shown in Table 1 both ordinary binning and Kim's algorithms (c and d) significantly amplify the noise. On the other hand, the proposed algorithm (f) gives lower entropy and variance values. Although Jiang's algorithm has a noise filtering function, the noise suppression performance is lower than the proposed algorithm. Noise-adaptive uniform pixel binning can also better suppress noise than ordinary digital pixel binning. Table 1. Mean, entropy, and variance values of six images in Figure 6.    Figure 8f shows the brightness-enhanced image of Figure 8b using the proposed algorithm with the maximum binning ratio of 4. For clearer visual comparison, the magnified version of Figure 8 is shown in Figure 9.
(e) (f) Figure 9. The magnified version of the red box shown in Figure 8a: (a) The reference image with ISO 3200 (EV = +1); (b) one-step lower exposure image using ISO 800 (EV = −1); (c) enhanced image of (b) using ordinary 2 × 2 digital pixel binning; (d) enhanced image of (b) using Kim's algorithm; (e) enhanced image of (b) using Jiang's algorithm; and (f) enhanced image of (b) using the adaptive 2 × 2 digital pixel binning algorithm.
As shown in Figure 9, the proposed binning algorithm can better preserve details in the saturated region than ordinary algorithms. To evaluate the performance of noise suppression, Table 2 summarizes the entropy and variance values of a 400 × 400 flat region in the blue dotted box in Figure 8a. As shown by the experimental results in Table 2, the higher the ISO value, the more noise in the acquired image. As shown in Table 2, existing enhancement algorithms (c-e) cannot avoid noise amplification. On the other hand, the proposed algorithm (f) produces lower entropy and variance values. Figure 10 shows the experimental results of enhancing a typical low-light image acquired by a survaillence camera under low illumination of 3 lux. Two input test images are acquired using different analog front end (AFE) gain of 12 dB and 18 dB, fixed aperture size F1.4, and shutter speed 1/30 s. (e) enhanced image of (b) using Jiang's algorithm; and (f) enhanced image of (b) using the adaptive four-pixel digital pixel binning algorithm. Figure 10a,b respectively show 18 dB and 12 dB AFE gain images. Figure 10c shows the brightness-enhanced image of Figure 10b using the ordinary digital pixel binning with the 1 2 × horizontal binning kernel. Figure 10c,d show brightness enhanced images of Figure 10b using Kim's and Jiang's algorithms, respectively. Figure 10f shows the brightness-enhanced image of Figure 10b using the proposed algorithm with a maximum binning ratio of 4. For clearer visual comparison, the magnified versions of Figure 10 are shown in Figure 11.
As shown in Figure 10, the proposed binning algorithm can better preserve details in the saturated region than the ordinary algorithms.
To evaluate noise suppression performance, Table 3 summarizes the entropy and variance values of a 100 × 100 flat region in the blue dotted box in Figure 10a. As shown in Table 3, the higher the AFE gain, the more noise in the acquired image. As shown in Table 3, existing enhancement algorithms (c-e) cannot avoid noise amplification. On the other hand, the proposed algorithm (f) gives lower entropy and variance values.
(e) (f) Figure 11. The magnified version of the red box shown in Figure 10a: (a) The reference image with 18 dB gain; (b) underexposed image with 12 dB gain; (c) enhanced image of (b) using ordinary two-pixel digital pixel binning, (d) enhanced image of (b) using Kim's algorithm; (e) enhanced image of (b) using Jiang's algorithm; and (f) enhanced image of (b) using the adaptive four-pixel digital pixel binning algorithm. Table 3. Mean, entropy, and variance values of four images in Figure 10.

Conclusions
This paper proposed an adaptive digital pixel binning algorithm in terms of brightness, context, noise, and anti-saturation. In order to solve the noise amplification problem encountered with ordinary brightness amplification methods, the proposed algorithm performs digital pixel binning in an adaptive manner in various aspects. As shown in the experiment, noise-adaptive uniform pixel binning can better suppress noise than the ordinary enhancement methods. Moreover, incorporation of context-adaptive pixel binning can successfully preserve the resolution of high-frequency details in an image.
The proposed algorithm consists of simple, fundamental arithmetic operations and sorting. The computational complexity depends on the sorting algorithm, which dominates the computational complexity of the entire algorithm. When using the general sorting algorithm, the complexity is ( ) log O n n , where 2 n p = represents the number of pixels in the window. Since the proposed algorithm neither requires a frame-memory nor an iterative computation, it is suitable to be embedded in a general image signal processor. Since the proposed algorithm does not affect existing noise reduction or contrast enhancement algorithms, it is very efficient to implement the algorithm along with ISP functions. Future work will combine existing noise reduction algorithms by sharing the hardware to reduce computational complexity.