1 Introduction

Multimedia network technology has enabled us to share information through digital images conveniently. While handling of the images, there are chances of images getting degraded due to limited dynamic range, an undesirable or insufficient ambient lighting and poor weather conditions; and these factors may cause low contrast, dark/bright spots, bad illumination, etc. in images. Figure 1 shows few such images which are degraded due to poor lighting conditions.

Fig. 1
figure 1

Few example images with non-uniform and poor illumination

It becomes very challenging to extract and use information from degraded images in subsequent analysis. Therefore, image enhancement becomes very essential for improving the image quality. An image enhancement technique must take care of multiple visual characteristics such as bad contrast, very dark and very bright regions, and narrow dynamic range while improving the quality of an image.

Most of the enhancement techniques in the literature are based on enhancement of details in the image. However, in this process, output enhanced images may show unnatural look. In order to satisfy human image quality perception, technique in [2] has proposed few important characteristics for image enhancement techniques which are as follows. First, ambience of image should not be changed greatly after enhancement, second, enhancement should not introduce a new light source in the image, and third, halo and blocking effects should not be introduced in enhanced image. Keeping all these characteristics in mind and preserving naturalness in enhanced images, we propose an image enhancement technique to enhance images with non-uniform illumination. The proposed technique includes two major contributions. First, it proposes a bad illumination pass filter (BIPF) to locate bad illumination areas in the image. Second, it proposes an adaptive logarithm based enhancement technique to insert proper amount of brightness in images with non-uniform illumination.

The rest of the paper is organized as follows. Section 2 presents review of the related literature on image enhancement. The proposed technique is discussed in Sect. 3. Experimental results of the proposed technique are discussed in Sect. 4. Finally, paper is concluded in Sect. 5.

2 Literature survey

In this section, we briefly review state-of-the-art techniques used in enhancing quality of degraded images. Conventional histogram equalization (HE) [6] is widely used enhancement technique; however, it results into over enhancement. Many techniques have been proposed to overcome drawbacks of HE such as brightness preservation [8, 24] and contrast limitation [19]. A technique proposed in [24] has partitioned the smoothed histogram based on its local maximums and then a new dynamic range has assigned to each partition. Further, histogram equalization is applied to all partitions based on new dynamic range. A technique [8] has estimated target histogram by maximizing the entropy of the image. Over enhancement is prevented in the technique called contrast limited adaptive histogram equalization (CLAHE) [19]. These techniques ([8, 19, 24]) do not properly enhance images with non-uniform illumination. A technique presented in [7] has proposed GMM-based gradient mapping in which gradient of a reference image is transferred to the source image. In this technique, an enhanced image is obtained by solving a Poisson equation defined by the altered gradient. Recently, the adaptive height-modified histogram equalization [11] is proposed; however, this technique does not represent sufficient perceptual contrast. Perceptual contrast enhancement technique is proposed in [27]. This technique has constructed a perceptual contrast map (PCM) based on the modified difference of Gaussian (DOG) algorithm to sharpen the contrast of the image and suppress high-frequency noise. The drawback of this technique is that it removes small details present in bright regions. A brightness-enhancement function for real-time reverse tone mapping of images and videos has been proposed in [12] to enhance brightness in an image. This technique has used bilateral filter to preserve the boundaries in the image. Volumetric unsharp masking has been utilized in technique presented in [23] to enhance features. This technique modulates the current radiance at each sample point of the ray in order to enhance local contrast by adding scaled difference between the current radiance and the smoothed radiance. An automatic image equalization technique is proposed in [1]. This technique has utilized Gaussian mixture modeling to perform nonlinear mapping for computing enhanced images. Another technique named gray-level grouping (GLG) is presented in [3]. Firstly, this technique has grouped the histogram components into a proper number of bins and then uniformly redistributed them to get enhanced image. An adaptive tone-preserved technique for image detail enhancement is proposed in [15]. This technique has used multi-scale image decomposition method based on domain transform to enhance an image.

The most widely used image enhancement technique based on human visual system (HVS) is Retinex [9]. Retinex theory states that the amount of light reaching to human eye depends on the product of reflectance and illumination. Most of the Retinex-based techniques focus on details (reflectance) enhancement by removing illumination; however, it causes an unnatural look in enhanced images. Few techniques which are based on retinex theory include in [9, 10] which propose single-scale Retinex (SSR), multi-scaleRetinex (MSR), and MSR with color correction (MSRCR) algorithms. These techniques produce halo artifacts in very bright and very dark regions. To overcome this problem, there are few techniques such as bilateral filtering (BF) [5, 14] and adaptive filtering (AF) [16] are proposed. Two specially tailored bilateral filters are utilized in technique [5] in which the first filter evaluates the illumination and the second is used for the computation of the reflectance. A technique presented in [14] has implemented multi-scale Retinex for an outdoor application. A technique proposed in [16] is based on center-surround Retinex model. This technique has utilized an adaptive filter and first component of a principal component analysis to compute the enhanced image. However, these techniques have failed to preserve the naturalness.

For better enhancement, some techniques have attempted to preserve naturalness in enhanced images. Recently, balanced color contrast enhancement technique is proposed in [26] which enhances images which are degraded due to bright and dark spots; however, mid-tone are still sacrificed which results insufficient global contrast and flatten appearance [13]. In [25], a naturalness preserved enhancement technique for non-uniform images is proposed and this technique has used bright pass filter to improve image quality. This technique has only considered bright pixels for illumination estimation; however, both bright and dark pixels are responsible for bad illumination in the image. Due to improper illumination estimation, artifacts and noises are produced when there are extremely dark regions in images. The techniques proposed in [4, 18] have decomposed image into high-frequency term and low-frequency term. These frequencies have been processed and integrated to get final enhanced image. However, these techniques cannot properly establish trade off between details and naturalness.

The proposed technique enhances details as well as retains good illumination. It inserts proper amount of brightness in non-uniform and low light images to preserve naturalness in enhanced image.

3 Proposed technique

In this section, we propose an enhancement technique for improving the quality of images which have non-uniform illumination. The framework of the proposed technique is shown in Fig. 2. The technique includes following steps to improve the quality of the image. In the first step, it proposes a bad illumination pass filter (BIPF) to locate badly illuminated areas in the image. In the second step, the proposed technique has utilized an illumination-based image quality estimation technique [21] to analyze the quality of input as well as the enhanced images. In the third step, it proposes an adaptive logarithm enhancement (ALE) technique to insert required amount of brightness in the image in non-uniform illuminated areas.

Mainly the proposed technique performs two parallel tasks. In the first task, it generates an intermediate enhanced image with the help of BIPF which does enhancement by locating image areas containing details and good illumination. In the second task, it computes another enhanced image from the input image by using quality of the image and by applying the ALE logarithm. Finally, output images of these two tasks are fused to get the final enhanced image. This proposed process preserves the naturalness in the enhancement image in the areas which earlier had non-uniform illumination.

The proposed technique enhances both grayscale as well as color images. In order to enhance a color image given in RGB space, it is first converted to HSV (Hue, Saturation, Value) color space and then the “Value” component in HSV space is enhanced using the proposed technique. Further, enhanced Value component is combined with original Hue and Saturation components to get final enhanced color image. The technique enhances grayscale images without any transformation.

Fig. 2
figure 2

Framework of the proposed technique

3.1 Extraction of details (reflectance) and good illumination

In order to achieve enhancement in an image, bad illumination needs to be located in the image and should be subsequently removed keeping the good illumination present in the image intact. We propose bad illumination pass filter (BIPF) to locate bad illuminated areas in the image and enhance the image keeping details and good illumination intact.

3.1.1 Bad illumination pass filter (BIPF)

The basic idea in designing of BIPF is that a pixel gets badly illuminated due to the effect of its adjacent neighboring pixels [10]. The proposed filter considers a \(n \times n\) window around each pixel and computes the presence of bad or good illumination at it. BIPF is defined as the weighted average of adjacent pixels with the weight related to the frequency of bad illumination pixels, and it is given as:

$$\begin{aligned} I_f(I(x_c,y_c)) = \sum _{(i,j)\in win}^{}[f(i,j).I(i,j)].F(I(i,j)) \end{aligned}$$
(1)

where win is the window centered at pixel location \((x_c,y_c)\) and, F(I(ij)) and f(ij) are two functions. Function F is used to decide if a pixel (ij) of image I is badly illuminated or not and is given as:

$$\begin{aligned} F(I(i,j))= {\left\{ \begin{array}{ll} 1, &{} \quad \text {if}\ I(i,j)<T_1 \ \text {or} \ I(i,j)>T_2 \\ 0, &{} \quad \text {otherwise} \end{array}\right. } \end{aligned}$$

where \(T_1\) and \(T_2\) are lower and upper thresholds, respectively, to decide whether a pixel is badly illuminated or not. A pixel is considered very dark if its intensity falls below threshold \(T_1\) and considered very bright if it is more than threshold \(T_2\). Both dark and bright pixels are the cause of bad illumination (dark and bright spots). Further, function f is used to count the number of pixels with bad illumination around pixel (ij) and it is defined as:

$$\begin{aligned} f(i,j) = \sum _{(k,l)\in win}^{} F(k,l) \end{aligned}$$

In Eq. 1, \(I_f\) is the filtered image in which bad illumination is located. This image is again filtered using Gaussian function G with standard deviation \(\sigma \) (Retinex theory [10]) in order to fully concentrate on illumination part as follows:

$$\begin{aligned} I_{f_{G}} = I_f * G \end{aligned}$$

3.1.2 Computation of image with good illumination (\(I_{GI}\))

Details and good illumination are two significant factors which are responsible for making an image of good quality. Details and good illumination are obtained with the help of BIPF as follows. According to Retinex theory [10], an image is characterized by two components: reflectance and illumination. As we discussed in the previous section, BIPF locates areas in the image with non-uniform illumination. If we eliminate these areas with bad illumination from the input image then areas with details (reflectance) and good illumination are only left. The resultant image can be utilized to compute final enhanced image. The image with good illumination (\(I_{GI}\)) is obtained as follows:

$$\begin{aligned} I_{GI} =log(I)-log(I_{f_{G}}) \end{aligned}$$

where I is an input image and \(I_{f_{G}}\) is the BIPF filtered image containing only bad illumination. Figure 3 shows few examples of images with bad illumination and their corresponding enhanced images which contain good illumination. It is clear from the figure that the proposed technique efficiently removes bad illumination from the input images.

Fig. 3
figure 3

Few example images with non-uniform illumination and their corresponding enhanced images (\(I_{GI}\)). Images a, c are input images with bad illumination and b, d are corresponding enhanced images contain good illumination

3.2 Insertion of brightness

Good quality images (images with good illumination) contain good amount of brightness, whereas images with dark regions lack in this. We propose a method to insert proper amount of brightness in dark images to enhance them and achieve pleasing perceptual quality. This method requires the characteristics of the degraded images. For this, the proposed technique first estimates the quality of the image based on illumination and uses this quality information to insert required amount of brightness in the images with non-uniform illumination.

3.2.1 Bad illumination-based quality estimation

The proposed technique computes quality based on illumination (actually utilizing the dark regions of the image) by coding each pixel based on its neighbors [21]. Code at pixel location \(c = (x_c, y_c) \) (provided \(I_c < T_1\)) is defined as:

$$\begin{aligned} code(x_c,y_c) = \sum _{(x_c, y_c)\in win}^{} \frac{E(I_p-I_c)}{(N-1)} \end{aligned}$$
(2)

where win is the window centered at pixel \((x_c,y_c)\) and N is number of pixels falling under the window. \(I_p\) and \(I_c\) define intensity values at pth neighboring pixel and central pixel (for which code is being computed), respectively. \(T_1\) is a threshold, used to detect dark regions in the image. Function E(.) is defined as follows:

$$\begin{aligned} E(D)= {\left\{ \begin{array}{ll} 1, &{} \text {if}\ abs(D) > \epsilon \\ 0, &{} \text {otherwise} \end{array}\right. } \end{aligned}$$

where \(\epsilon \) is a difference parameter. The value of E(D) for pth neighbor is assumed to be 1 if difference in intensity (\(I_c\)) of the center pixel c and intensity (\(I_p\)) of its pth neighbor is greater than threshold \(\epsilon \), else it is assumed to be 0. In the dark regions of the image, difference in intensities of neighboring pixels is found to be very less. Equation 2 gives code value (\(code(x_c,y_c)\)) between 0 to 1 for a pixel with intensity value below threshold \(T_1\) (dark intensity pixel), whereas pixels with intensity value above \(T_1\) are coded as 1. The pixels coded as 1 are assumed to be very good, whereas the ones coded with 0 are assumed to be a bad pixel. Overall illumination-based quality is obtained by computing the sum of all codes, i.e., 

$$\begin{aligned} Q_I = \frac{\sum _{i=1}^{M} \sum _{j=1}^{N} code(x_i,y_i)}{W*H} \end{aligned}$$

where W and H are the width and the height of the input image, respectively. Figure 4 shows a few examples of bad illuminated images (due to dark spots in images) with their estimated quality.

Fig. 4
figure 4

Few example images with bad illumination (degraded due to dark spots) with their estimated quality score. a\(Q_{I} = 0.2328\), b\(Q_{I} = 0.4348\), c\(Q_{I} = 0.7312\) and d\(Q_{I} = 0.6287\)

Above-estimated quality (\(Q_I\)) helps in insertion of required amount of brightness in the images. This quality estimation is based on one threshold \(T_1\) (lower threshold). However, in order to achieve proper enhancement, both dark and bright regions should not be present in final enhanced images. Hence, quality estimation of final enhanced images must include both parameters \(T_1\) and \(T_2\) for estimating quality based on dark and bright regions. For an effective quality assessment of the final enhanced images, we also code bright pixels along with dark pixels in the image and for this, an upper threshold \(T_2\) is included. With new constraint, a pixel is coded using Eq. 2 provided \(I_c < T_1\) and \(I_c > T_2\). This means an image which has either very bright or very dark regions is considered having bad illumination and obtains a low quality score. The quality thus estimated using thresholds \(T_1\) and \(T_2\) is the quality for final enhanced image (\(Q_{FEI}\)).

Fig. 5
figure 5

Effect of choosing value of brightness parameter e in adaptive logarithm enhancement: image a is an input image, and images be are enhanced images using adaptive logarithm. b\(e = 1\), c\(e = 0.1\), d\(e = 0.01\) and e\(e = 0.001\)

3.2.2 Adaptive logarithm enhancement

Dynamic range of an image is compressed by replacing each pixel value in the image with its logarithm. It is observed that compression of dynamic range helps in enhancement of the image. However, each image has different level of degradation so just taking the logarithm of the image is not enough for proper compression of dynamic range. There is a need of an adaptive logarithm which takes image characteristics into account. We propose an adaptive logarithm enhancement based on input image quality score for enhancement of the image. We utilize this adaptive logarithm to insert required amount of brightness in images with non-uniform illumination for enhancing the images and getting pleasing perceptual appearance. Adaptive logarithm enhancement is defined as below.

$$\begin{aligned} I_{ALE} = log(I+ e) \end{aligned}$$

where I is the input image and e is an adaptive brightness parameter which varies from 0 to 1. It decides how much brightness is to be inserted in an image to achieve pleasing naturalness. Low value of e leads to high compression of dynamic range (more brightness insertion) and vice versa. For example, if input image is dark then e is set close to 0 to insert greater amount of brightness, whereas if input image is found to be bright enough, then e is set close to 1 in order to insert less amount of brightness. It is observed that we need to choose the value of brightness parameter e carefully. This is evident from Fig. 5 which shows different enhanced images for different values of e.

Fig. 6
figure 6

Few examples of enhancement of images shown in Fig. 4 using proposed adaptive logarithm enhancement technique. a\(e = 0.002\), b\(e = 0.05\), c\(e = 0.4\) and d\(e = 0.4\)

Fig. 7
figure 7

Examples of enhanced images by the proposed technique: Column 1, input images; Column 2, enhanced images

Image in Fig. 5a is a dark input image, and there is a need to insert more brightness (low value of e) for proper enhancement. Figure 5b–e represents enhanced images using proposed adaptive logarithm enhancement. As we can see, proper enhancement is not achieved in images shown in Fig. 5b, c due to setting of high values for e. Comparatively, Fig. 5d, e shows better enhanced images (presence of superior brightness) due to use low value of e. This shows that selection of e plays an important role, and a proper enhancement is achieved only by choosing proper value of e. We make use of the quality of the image in deciding the optimum value of e and set it as follows.

$$ \begin{aligned} e= {\left\{ \begin{array}{ll} 1, &{} \text {if}\ Q_I \ge 0.85 \\ 0.4, &{} \text {if}\ Q_I \ge 0.60 \,\, \& \ \ Q_I< 0.85 \\ 0.05, &{} \text {if}\ Q_I \ge 0.40 \,\, \& \ \ Q_I< 0.60 \\ 0.002, &{} \text {if}\ Q_I < 0.40 \\ \end{array}\right. } \end{aligned}$$

where \(Q_I\) is the estimated quality score. We classify the images into 4 categories, namely normal images (\(Q_I \ge 0.85\)), shadow images (\( Q_I \ge 0.60 \& \ \ Q_I < 0.85\)), dark images (\( Q_I \ge 0.40 \ \& \ \ Q_I < 0.60\)) and very dark images (\(Q_I < 0.40\)) and assign a value e to each class. For example, high amount of brightness is needed in the images which are very dark (quality score \(Q_I<0.4\)); hence, a low value of e (\(e=0.002\)) is chosen to insert more brightness. Similarly, images are bright enough (have high quality score \(Q_I \ge 0.85\)) and do not need more brightness, a relatively high value of e (e close to 1) is set. Figure 6 shows the examples of enhanced images for the input images shown in Fig. 4 using the proposed adaptive logarithm enhancement algorithm. As we can see, since image in Fig. 4a is quite dark (estimated quality score \(Q_I=0.2328\)), it needs more brightness in achieving pleasing naturalness and hence setting the value of e to 0.002 works well.

It is noted that for the categorization of each class, images are first manually classified into the classes based on their histogram curves as suggested in [20]. Further, threshold value is decided based on estimated quality of images for each class. For example, all images in normal class (manually classified) having quality score are greater than or equal to 0.85. So we set 0.85 as threshold to classify normal images while experimentation.

3.3 Computation of final enhanced image

The proposed technique generates two enhanced images, that is, image with good illumination (\(I_{GI}\)) and image (\(I_{ALE}\)) obtained after the use of adaptive logarithm enhancement. Image \(I_{GI}\) contains details (reflectance) and good illumination, whereas the image obtained after adaptive logarithm enhancement contains proper amount of brightness. Final enhanced image (\(I_E\)) is obtained by combining images \(I_{GI}\) and \(I_{ALE}\) as follows.

$$\begin{aligned} I_E = I_{GI} + I_{ALE} \end{aligned}$$

It is noted that \(I_E\) is normalized after fusion of \(I_{GI}\) and \(I_{ALE}\). Figure 7 shows a few examples of images enhanced using the proposed technique. As it can be observed, dark images are properly enhanced and do not produce any artifacts. Also we can see that the enhanced images have a pleasing perceptual quality and naturalness.

4 Experimental results

The proposed technique has been evaluated on 100 images of different sizes (\(720 \times 480\) to \(3264 \times 2448\)) obtained from [25]. We have limited our analysis to these images as there exist no large public database of natural images affected due to illumination. The technique is compared with AHE [17], Zhang [27], MSRCR [9], AINDANE [22], Swang [25] and SGNE [13]. First, we do subjective comparison which shows robustness of the proposed technique in terms of image enhancement and naturalness preservation. Further, we objectively evaluate the performance using lightness-order-error (LOE) [25] and the quality estimation measure [21] in this paper.

4.1 Discussion on parameters

Various parameters used in the proposed technique are presented in this section. In all our experiments, thresholds \(T_1\) and \(T_2\) are set to 43 and 212 (intensity values), respectively. Standard deviation value used in Gaussian function is set to 100. The difference parameter \(\epsilon \) is set to value 12. Window size win is set to \(3 \times 3\). We have set the parameters \(T_1\), \(T_2\) and \(\epsilon \) based on LOE indicator. Further, we have set the value of e using quality estimation based on illumination in the proposed technique. Detailed process of tuning parameters is explained below.

In Sect. 3.1.1, parameters \(T_1\) and \(T_2\) are required in BIPF function in order to compute an image with good illumination (\(I_{GI}\)). \(T_1\) is the lower threshold for finding dark pixels in an image. \(T_1\) should be such that it only covers dark pixels. It should not include good pixels in its range. Similarly, \(T_2\) is the upper threshold and it should cover only bright pixels. Again, \(T_2\) should also not include good pixels in its range. For setting the values of \(T_1\) and \(T_2\), 15 random images with bad illumination are used. For different pairs of ( \(T_1\) and \(T_2\)), an \(I_{GI}\) image is generated for all 15 images. Once for a given pair of ( \(T_1\) and \(T_2\)) 15 enhanced images are obtained, LOE values for all 15 enhanced images are computed and their average is obtained. The pair ( \(T_1\) and \(T_2\)) for which average LOE value is found to be the least is chosen in the proposed technique. Table 1 shows top 5 experimentation results of the proposed technique using average LOE values of 15 images for various values of \(T_1\) and \(T_2\). This is clear from the table that the proposed technique performs the best with \(T_1\) as 43 and \(T_2\) as 212. Figure 8 shows enhanced images for various pair of ( \(T_1\) and \(T_2\)). We can see from Fig. 8e that input very dark image is enhanced properly with \(T_1\) as 43 and \(T_2\) as 212. (These values of thresholds are used in the proposed technique.)

Fig. 8
figure 8

Examples of enhanced images for various pairs of \(T_1\) and \(T_2\). a Input image, b\(T_1 =2 \) and \(T_2 = 252\), c\(T_1 = 5\) and \(T_2 = 247\), d\(T_1 = 20\) and \(T_2 = 232\) and e\(T_1 = 43\) and \(T_2 =212 \)

Table 1 Average LOE values for different values of \(T_1\) and \(T_2\) on selected 15 random images

An adaptive brightness parameter e is required to be set in the proposed technique to achieve proper brightness in the enhanced image (\(I_{ALE}\)). We have set the value of e using quality estimation. The value of e is set for all four classes, viz. normal images, shadow images, dark images and very dark images, separately. We consider 10 images with bad illumination for each class (except normal class, normal class having good quality images) and compute their corresponding \(I_{ALE}\) images for different values of e. Subsequently, quality of each \(I_{ALE}\) image is computed. For a class, the value of e for which the average quality of all 10 enhanced images in that class is the highest is chosen in the proposed technique for insertion of brightness. Table 2 shows top 5 experimentation results of the proposed technique using average quality score of 10 images of each class for various values of e. This is clear from the table that the proposed technique performs the best with e as 1 for normal images, e as 0.4 for shadow images, e as 0.05 for dark images and e as 0.002 for very dark images. Figure 9 shows enhanced images for various values of e. We can see from Fig. 9d that input dark image is properly enhanced and preserved the naturalness with e as 0.05. (This value of threshold is used in the proposed technique.) It is also observed from Fig. 9e that it looks brighter than the output of the proposed technique (shown in Fig. 9d); however, it has unnatural look. A difference parameter \(\epsilon \) used in quality estimation in the proposed technique. We set value of \(\epsilon \) based on the lowest average value of LOE values of enhanced images obtained by the proposed technique for 15 random images.

Table 2 Average quality score \(Q_I\) for different values of adaptive brightness parameter e for 10 images of each class
Fig. 9
figure 9

Few examples of enhanced images for various values of e. a Input image, b\(e = 1\), c\(e = 0.1\), d\(e = 0.05\) and e\(e = 0.001\)

Fig. 10
figure 10

Demonstration of image enhancement results: a original image and different results of image enhancement obtained by techniques of b AHE [17], c AINDANE [22], d MSRCR [9], e Swang [25], f Zhang [27], g SGNE [13] and h the proposed technique

Fig. 11
figure 11

Demonstration of image enhancement results: a original image and different results of image enhancement obtained by techniques of b AHE [17], c AINDANE [22], d MSRCR [9], e Swang [25], f Zhang [27], g SGNE [13] and h the proposed technique

4.2 Subjective assessment

To assess the superiority of the proposed technique subjectively, we have considered two images and have enhanced them by various existing techniques along with our proposed technique. Figures 10 and 11 present enhancement results for these images by various image enhancement techniques. Figure 10 shows results for a very dark image captured in daytime, whereas Fig. 11 shows results for an image captured at nighttime with some bright spots. From Fig. 10, it is clearly seen that the techniques AHE [17], AINDANE [22] and MSRCR [9] have failed to enhance this very dark image. Techniques Zhang [27] and SGNE [13] have over enhanced the original image and have resulted in some bright and dark spots in the enhanced images. Technique Swang [25] performs well and produces good enhancement; however, pleasing perceptual quality is not achieved in the enhanced image as appealing as obtained by the proposed technique. Moreover, the proposed technique not only effectively enhances the quality of the original image but also preserves naturalness of the image to get pleasing perceptual quality.

Figure 11 elucidates that the techniques such as AHE [17], AINDANE [22] and Swang [25] have over enhanced the original image. In MSRCR [9] technique, it has not much improved the original image. The techniques Zhang [27] and SGNE [13] have performed relatively better; however, some artifacts can be observed in the cloud area. The proposed technique has effectively enhanced the original image and has not produced any kinds of artifacts.

Fig. 12
figure 12

Box plot of LOE values of 100 images for different techniques (on each box, the central mark is the median, and the edges of the box are the 25th and 75th percentiles)

4.3 Objective assessment

We have included lightness-order-error (LOE) and quality estimation technique proposed in [21] for objective evaluation of the proposed enhancement technique. LOE is proposed in [25], where smaller value of LOE shows better preservation of lightness order and natural pleasing appearance. The box plot of LOE values of all 100 images is displayed in Fig. 12 for all the techniques used in comparison along with the proposed technique. The average LOE values for these techniques are presented in Table 3. It is clearly seen from Fig. 12 that the proposed technique mostly maintains lower LOE value as compared to all other techniques for all 100 images. In this figure, maximum, median and minimum value (LOE value) of the proposed technique in the box plot is lower than the other techniques. We also observe from Table 3 that the proposed technique has obtained the lowest average LOE value as compared to all other techniques. This in turn shows that the proposed technique preserves lightness order better as compared to other existing techniques.

Table 3 Average LOE value for different techniques

Table 4 shows average illumination-based image quality of final enhanced images (\(Q_{FEI}\)) obtained after enhancement of all 100 images of the database. It is clear from Table 4 that the images enhanced by the proposed technique possess higher image quality score as compared to other enhancement techniques. It indicates that the proposed technique has enhanced images with non-uniform illumination in a better way as compared to other existing state-of-the-art techniques.

Table 4 Average quality value of enhanced images for different techniques

It should be noted that usually a natural image contains a balanced mixture of intensities and does not contain too bright or too dark regions. However, if any such region (too much or too less illuminated region) is naturally the part of the image, the proposed technique would treat it as badly illuminated region. This is the limitation of the proposed technique.

5 Conclusion

Most of the retinex theory-based image enhancement techniques remove illumination and consider only reflectance component of the image while producing the final enhanced image. However, it is observed that naturalness of an image cannot be preserved without illumination. In this paper, we have proposed an image enhancement technique which enhances details of an image by keeping good illumination present in the image intact. For images with poor illumination, the proposed technique has inserted required amount of brightness in non-uniform and low lighting regions of the image to get pleasing perceptual quality and to maintain naturalness in the image. This paper has two major contributions. First, it has proposed a bad illumination pass filter (BIPF) to isolate badly illuminated areas in an image. Second, it has proposed an adaptive logarithm transformation based on estimated image quality to insert required brightness in the image. The proposed technique has preserved natural image appearance in a better way and has produced enhanced images with superior perceptual quality as compared to number of state-of-the-art techniques.