## 3 Proposed Approach
### EDR2 HDR by Cumulative Histogram Learning  
To produce a 12-bit HDR image from a 12-bit EDR image (EDR2 HDR), we introduce a cumulative histogram learning technique based on deep neural networks. The basic idea is to learn pixel intensity distribution changes from EDR-HDR image pairs. To learn the intensity distribution of HDR images, we first convert 16-bit ground-truth HDR images into their 12-bit representations using proportional normalization as ground truths for histogram learning. Figure 3 demonstrates the histograms and CDFs of 12-bit EDR and HDR images, respectively. From the histogram of the EDR image, dark areas accumulate a large number of pixels, resulting in low contrast in the areas. The histogram of the HDR image is relatively flat and spreads out a wider range of pixel intensities to provide better contrast and details. Therefore, if we can change the pixel distribution of an EDR image such that its histogram is similar to the histogram of an HDR image, we can generate an HDR image with good contrast and details. Figure 1: Flowchart of the proposed two-stage approach. Depending on the scene environment and camera settings, distributions of image histograms can be different. Therefore, it cannot formulate closed-form conversions between 12-bit EDR and HDR images. In the proposed approach, we introduce a technique for learning histogram transformations using deep neural networks. Due to the diversity of image histograms, learning directly from the intensity distributions cannot provide stable data for network training. However, the cumulative distribution histogram (or cumulative histogram) has simplicity and monotonically increasing properties. It is also within a fixed range, which facilitates data normalization and is suitable for model training. Nevertheless, the image intensity distribution can be reconstructed from the predicted cumulative histogram. The proposed cumulative histogram learning architecture uses a fully connected neural network with four hidden layers. Both the input and output layers have 4096 neurons covering \(2^{12}\) different intensity values. Each hidden layer contains 8192 neurons and uses a rectified linear unit (ReLU) as the activation function. We added dropouts to the last two hidden layers and the dropout rate is set to 0.5. Although the model is relatively simple,  
Figure 3: Histogram and its CDF of 12-bit EDR and HDR images. (**a**) histogram and its cumulative distribution of 12-bit EDR image; (**b**) histogram and its cumulative distribution of 12-bit HDR image. Figure 2: LDR2 EDR process for dynamic range expansion. (**a**) original input histogram and its cumulative distribution; (**b**) histogram of the upsampled image and its cumulative distribution; (**c**) histogram of the downsampled image and its cumulative distribution. it can effectively avoid overfitting and improve generalization ability. An issue related to the network output is the necessity of monotonically increasing, which guarantees nonnegative values appearing in the image histogram. To ensure that this characteristic is maintained, the output cumulative curves are smoothed by a Savitzky-Golay filter [18] and then adjusted to produce monotonic constraints. Figure 4 shows the cumulative histogram results using curve smoothing and monotonic constraint. Figure 4a is the original output CDF and the corresponding histogram. The accumulation curve smoothed by the Savitzky-Golay filter and its image histogram are shown in Figure 4b. Although the slight jitter in the original curve prediction is alleviated, the histogram still contains negative values. To incorporate the monotonically increasing constraint, we force the first-order derivative of the curve to be nonnegative at any point. For two consecutive bins, if the cumulative value on the right is smaller, it is replaced by the cumulative value on the left. The processed curve is then used as the cumulative histogram and converted back to an image histogram.