Keywords

1 Introduction

Digital cameras have a limited dynamic range which is smaller than one in the real world, so that it often takes overexposed/underexposed images that have bad visibility.

The HDR method synthesizes images with different exposure images into an image to improve visibility of a narrow dynamic range image. However, HDR has several limitations to get good images. One of them is difficult to take the appropriate multiple exposed images. Because When taking the multiple exposed images, the camera and object must not move to avoid the ghost effect. Because of the limitation, HDR cannot be applied directly images which are taken under dynamic scenes. It isn’t useful for users.

In this study, we propose the method that can improve the narrow dynamic range with a single image. In addition, it can avoid to generate ghost effect in the output image. High quality photos can be obtained easily for users who take photos.

2 The Proposed Method

The proposed method generates three of the pseudo multiple exposed images from a single image. In the process of generating pseudo high exposed and low exposed image, our method uses gamma correction to adjust luminance of input image. Gamma correction can enhance the difference between each color channel in the dark or bright area of the input image. Because of gamma correction, the contrast of the input image is properly improved. We use the Contrast Limited Adaptive Histogram Equalization (CLAHE) [1] to make the pseudo middle exposed image. Three types of pseudo exposed images obtained will be synthesized into an output image. Figure 1 shows a flowchart of the proposed method.

Fig. 1.
figure 1

A flowchart of the proposed method.

2.1 Generate Pseudo High Exposure Image

To obtain the pseudo high exposure image, we use gamma correction. Gamma correction is defined as follows:

$$ \;f\left( x \right) = 255 \times {\left( {\;\frac{x}{255}\;} \right)^{\left( {\;\frac{1}{\gamma }\;} \right)}} $$
(1)

where x is a value of each color channel, and γ(1 > γ) is value of gamma that adjusts correction strength. Pseudo high exposure image is generated by Gamma correction. Furthermore, determining the value of γ is important to generate an appropriate pseudo high exposure image. In general, best high exposure image has a lot of edges. Because an image including many edges has good visibility. Therefore, value of γ is determined by amount of edges. The flowchart for determining the appropriate γ value (1 > γ) is illustrated in Fig. 2. First, Dark area image is extracted from input. Next, the gamma collection increases luminous of the dark area image. After that, amount of edges in the dark area image which has been adjusted by gamma collection is calculated using the edge detection [1], and compare it with amount of edges in the original dark area image. If edges of adjusted dark area image are bigger than original one, γ will be subtracted, and the procedure of gamma collection is repeated. From the second edge counting, make a comparison between edges in dark area image adjusted by added γ and edges in dark area image adjusted by before γ(no-added γ). If it shows decrease, previous γ will be determined as the appropriate γ to generate pseudo high exposure image.

Fig. 2.
figure 2

A flowchart of determining γ value.

And then, the gamma collection for input using determined γ gives pseudo high exposure image. Figure 3 shows an input and a pseudo high exposure image.

Fig. 3.
figure 3

An input image and a pseudo high exposure image. (a) Input image, (b) Pseudo high exposure image

2.2 Generate Pseudo Low Exposure Image

The inverse gamma collection (1 < γ) applies for input image to generate the low exposure image. Determining the appropriate value of γ is necessary. The procedure for determining the appropriate γ is similar to the one for making pseudo high exposure image. The generation of pseudo low exposure image extracts the bright area from the input image firstly. The appropriate γ(1 < γ) is determined by same procedure for pseudo high exposure image. After that, input image is adjusted by inverse gamma collection using the determined γ to make pseudo low exposure image. The pseudo exposure image is shown in Fig. 4.

Fig. 4.
figure 4

Pseudo low exposure image from Fig. 3(a)

2.3 Generate Pseudo Middle Exposure Image

The pseudo middle exposure image is generated by using Contrast Limited Adaptive Histogram Equalization (CLAHE) method [2]. The method can equalize the luminance of image. We generate pseudo middle exposure image by applying this method. Figure 5 shows the generated pseudo middle exposure image.

Fig. 5.
figure 5

Pseudo middle exposure image from Fig. 3(a)

2.4 HDR Synthesis

The three of generated pseudo exposure images are synthesized into one pseudo HDR image by the HDR method [3]. A synthesized image is shown in Fig. 6.

Fig. 6.
figure 6

An output image of the proposed method from Fig. 3(a)

3 Experimental Result

Images by the proposed method and input images are shows in Fig. 7.

Fig. 7.
figure 7

Input and Output of the proposed method. (a), (c), (e) Three test images and (b), (d), (f) compensated images by the proposed method.

Figure 7 shows experimental results by the proposed method on three test images. The left column shows the three test images that have underexposed or/and overexposed problems, while the right column exhibits compensated images by the proposed method. It is evident that the proposed method can improve the quality of the images. Figure 8 shows the differences between a common HDR method and the proposed method. An important feature of the proposed method is that it can be applied to a single image, whereas the HDR method is generally based on multiple images. Figure 8 also shows that the proposed method is free from the ghost effect.

Fig. 8.
figure 8

An example of ghost effect on active scene. (a) Middle exposure image (one of inputs for (d)), (b) high exposure image (one of inputs for (d)), (c) Low exposure image (one of inputs for (d)), (d) synthesized by typical HDR method using (a) and (b) and (c) as inputs, (e) compensated by the proposed method using (b) as an input, (f) compensated by the proposed method using (c) as an input.

Comparison of Fig. 8(d), (e) and (f) shows that the proposed method which uses a single image is able to improve visibility of image as same as HDR which uses multi-exposure images. And the comparison also shows that the proposed method can avoid generating ghost effect.

4 Conclusion

We proposed a method for exposure compensation from a single image. The proposed method generates pseudo high/low exposure images using edge amount and gamma collection. Also, the CLAHE method is applied to generate the middle exposure image. Finally, the proposed method synthesizes pseudo multi-exposure images into one image which has good visibility using the Mertens’s HDR method. Experimental results show that the proposed method can improve visibility as same as HDR without ghost effect. Therefore, users can take high quality images without taking multi-exposure photos. The proposed method gives the user an image similar to the HDR image in various scene.