This paper aims to improve the quality of underwater image by increasing the contrast, details, and visibility in underwater image. The proposed method also tends to reduce the noise in the output image as comparison to the images produced by ICM and UCM, which is mentioned previously. As the proposed method applies the histogram modification technique which is identical to the ICM and UCM, the comparison of the results will be focused between these methods.
The proposed method applies the idea of histogram stretching in different manner from that used in the ICM and the UCM. The proposed image enhancement method is based on two main steps: first step is the contrast correction and the second step is the color correction. Figure 4 shows the process of the proposed method. In the contrast correction step, the modified Von Kries theory (Iqbal et al. 2010) is applied to each channel after the channel decomposition. Then, the global histogram stretching is applied to the image histogram. After that, the stretched histogram is divided into lower and upper sides based on the average value of corresponding color channel. After the division, the lower and upper sides of the histogram are independently stretched with respect to Rayleigh distribution to the entire dynamic range. Division and stretching processes will produce two different histograms. The images produced from these processes will have two different intensities: one is under-saturated image with low intensity value and another one is over-saturated image with high intensity value. These images are then combined by means of average value to produce an output image which has better contrast.
In the second step, the image is further processed by increasing the color performance, where the image is first converted into hue-saturation-value (HSV) color model. In the HSV color model, the S and the V components are stretched over the whole dynamic range of [0,255]. As the final step, the image is converted back into RGB color model.
The idea of dividing the image into two different intensity images is obtained by considering the bright and dark areas appear after the image processing especially by stretching the histogram. Underwater image usually consists of bright and dark areas. Overall image contrast can be increased by the global stretching of the image. The contrast of the image needs to be improved to increase the brightness of darker areas. However, global stretching also leads to an increase in the brightness of the bright areas, resulting in over-enhancement of the bright areas. These over-enhanced areas cause image pixels to become too bright, resulting in loss of image details. The same problem occurs when global stretching is applied to the darker areas. Applying global stretching to low-intensity image produces under-enhanced areas as the global stretching tends to shift the low-intensity pixel values of the image towards the smaller intensity values of the dynamic range. Thus, low-intensity pixel values of the image will have smaller intensity values which results in producing under-enhanced areas. These under-enhanced areas results in loss of image details.
3.1 Modified of Von Kries hypothesis
After the decomposition, image channels are applied with modified Von Kries hypothesis. Originally, Von Kries hypothesis keeps the dominant color cast channel constant (Iqbal et al. 2010). Based on this color cast, the two gain factors are calculated and multiplied with the other two color channels in order to balance the color channel correctly (Iqbal et al. 2010). However, by using the dominant color cast as the reference channel, the lowest intensity channel will have to multiply with a bigger number of multiplier. This bigger number of multiplier could lead to wrong interpretation of image color, where the object’s color in the image is deviated from their original color. Therefore, instead of using the highest intensity color channel, the proposed method used the median intensity color channel as reference channel. Hence, multipliers are not too big from the reference value and the image color will be not false interpreted. The calculated gain factors are also based on this median value.
First of all, the average values of each channel, R
avg
, G
avg
, B
avg
are calculated (Iqbal et al. 2010; Barnard et al. 2002):
(1)
(2)
(3)
M x N indicates the number of pixels in a channel and I
X
(i,j) is the pixel value of respective channel at position of (i,j).
The median value is determined from these three average values and used as the reference or target value. The remaining color channels are determined with multipliers (A and B) in order to produce a balanced image. The equation (4) and (5) are used to calculate the multipliers for maximum and minimum average values, respectively.
(4)
(5)
Based on the calculation in equations (1)–(3), the color channel with a minimum intensity value is multiplied with multiplier A whereas the color channel with a maximum intensity value is multiplied with multiplier B.
After multiplication with these multipliers, image channels will have balanced intensity values. As the next process, image channels will be stretched. This will be explained in detail in the next subtopic.
3.2 Global histogram stretching
In order to spread the pixels values of the image, the histogram of the image channels are applied with global stretching, where the histogram are stretched over the whole dynamic range of [0, 255]. This is also as preparation of the next step where the histogram will be divided into two regions based on its average value. The stretched-histogram will provide a better pixel distribution of the image channels and thus gives a more accurate average value of the channel which represents the average value of the channel for the whole dynamic range.
The equation (6) is used to stretch the histogram of respective color channel to the whole dynamic range.
(6)
P
in
and P
out
are the input and output pixels, respectively, and i
min
, i
max
, o
min
, and o
max
are the minimum and maximum intensity level values for the input and output images, respectively.
3.3 Division and stretching of image histogram with respect to Rayleigh distribution
After applying the global stretching to the image histograms, the average value of each histogram will be calculated. The formulas (1) – (3) are used to determine the average values of the image channels. In this step, the value of I
X
(i,j) is refer to the pixel value of the new stretched-histogram which are obtained after the global stretching.
The histogram is then divided into two regions based on this average value. By dividing the histogram at its average point, two regions are produced namely lower and upper regions. The lower region should have the intensity range between 0 to the average value of the image histogram whereas the upper region should have the intensity range between the average value to the maximum intensity range of 255.
For the next step, these two regions of histogram are stretched independently to produce two separated histograms. In addition to this step, these regions are stretched to follow the Rayleigh distribution over the entire dynamic range of [0, 255]. The lower region which has the intensity value between 0 to the average value will be stretched to the entire dynamic range of [0, 255]. The same process is applied to the upper region, where the initial range of the region, which lies from average value to 255 is stretched to the entire dynamic range of [0, 255]. Figure 5 shows an example of the original histogram and the histogram after the global stretching. The histogram is indicated with its average-point. This histogram is divided into two regions based on it average point and each region is stretched over the whole dynamic range with respect to Rayleigh distribution to produce two different histograms.
Rayleigh distribution is the best distribution for histogram of underwater images (Hitam et al. 2013; Eustice et al. 2002). Rayleigh distribution is refers to the bell-shaped distribution which concentrates most of the pixels at the middle of the intensity-level. The upper and lower sides of the intensity-level of the histogram will have the lowest amount of pixels. The probability distribution function of Rayleigh distribution is given by the equation (7).
(7)
where α is the distribution parameter of Rayleigh distribution and x is the input data which is, in this case, the intensity value.
In order to map the histogram to follow the Rayleigh distribution, the equation (6) is integrated with equation (7) to produce Rayleigh-stretched distribution as in equation (8).
(8)
The output histogram is stretched over the entire dynamic range of [0, 255]. Therefore, the values of o
max
and o
min
can be substituted with the values of 255 and 0, respectively. Thus, equation (8) can be simplified as equation (9):
(9)
where i
min
and i
max
indicate the minimum and maximum intensity level values for input image in each region, respectively.
For the lower region, i
min
indicates the minimum intensity level value of the image histogram, and i
max
indicates the maximum intensity level value in the region, which is equivalent to the average-value of the histogram. For the upper region, i
min
indicates the minimum intensity level value in the region which is equivalent to the average-value of the image histogram, and i
max
indicates the maximum intensity level value in the region which is equivalent to the maximum intensity level of the image histogram. The described processes are applied to all channels of RGB color model.
3.4 Image composition by means of average value
In the division and stretching processes, every channel of the RGB color model will produce two different histograms: lower-stretched histogram and upper-stretched histogram. For the next step, all of these histograms are combined to produce images in RGB color model. All lower-stretched histograms from these three channels of RGB color model are composed to produce an image and all upper-stretched histograms are also composed to produce another image. This process produces two different images with different contrasts. The lower-stretched histograms produce an under-enhanced image, whereas the upper-stretched histograms produce an over-enhanced image. These two images are then composed by means of average values between these two images.
In order to compose these two images, the images are stacked together. With the z-axis as reference, the images are aligned together so that the images are located perpendicular to the z-axis and the image plane itself. The under-enhanced image is then projected with the over-enhanced image. Each pixel of both images is compared at a particular pixel location, and the average value from these pixels is determined.
This process produces an improved image in terms of contrast, with the output image having better contrast. The resultant image has average values between the under- and over-enhanced images as well as excellent contrast and visibility. Figure 6 shows the visual contrast correction process of the proposed technique. The original image is applied with modified Von Kries hypothesis and global stretching. The image is then divided into two regions based on its average value resulting in producing two different intensities images. Finally, these images are combined by means of its average value to produce an enhanced-contrast output image.
3.5 Conversion into HSV color model: limited-stretching of S and V components
After the contrast correction in RGB color model, the image will undergo the color correction process. In this process, the underwater image is converted into hue-saturation-value (HSV) color model to improve the color performance. HSV color model is used to modify the image saturation and the value. Value in HSV color model is equivalent to the image brightness. Saturation and brightness in an image are the important parameters of clearness and visibility. Therefore, the objects in the image can be clearly differentiated from the background.
Firstly, the image is decomposed into respective channel. Then, the histograms of S and V components are stretched. To reduce the effects of the under- and over-saturated image, the stretching processes are limited to 1% from the lower and upper limits of the output histograms. Therefore, the stretching processes are applied to the both histograms of saturation and value at 1% to 99%.
Figure 7 shows the new limits of S and V components of HSV color model which is applied in the proposed method. The stretching process of the S and V components is limited at 1% of their minimum and maximum values.
After the stretching of S and V components, the H-S-V components are composed and the image is converted back into RGB color model.