An optimization method for underwater images enhancement

— Underwater images suffer from absorption and scattering of light; underwater images have many issues, like blurriness, a lack of contrast, clarity, and lighting. To improve the quality of underwater images, a method based on the new metaheuristic algorithm, the CHIO algorithm, was proposed. In our work, we first read the images and convert the color system from RGB to HSV. Subsequently, applying the CHIO algorithm to the image finally converts the color system from HSV to RGB. Experiments on the standard benchmark dataset for underwater image optimization proved the method's effectiveness. At the same time, the performance of our algorithm is better than that of traditional optimization algorithms.


Introduction
The seas are rich in mineral resources and oil. Humans often think of exploiting these resources to sustain life on the planet. Therefore, many robots and underwater cameras were placed to explore this mysterious world. The need for clear, high-quality underwater images appeared to increase control of underwater vehicles, examine underwater infrastructure, conduct marine biological research, etc. But many problems have occurred in underwater images, such as color casting, image blurring, and low contrast. Therefore, it is helpful to continue researching how to apply image enhancement techniques to recover underwater image information and address various degradation problems [1], [2].

Print-ISSN: 2790-5233
Online-ISSN: 2790-5241 www.wjps.uowasit.edu.iq 341 A meta-heuristic is a specific heuristic-based approach created to tackle various issues without altering the algorithm's fundamental structure. Meta-heuristics optimization has recently been developed due to researchers' interest in inventing procedures that can tackle a wide range of problems in a general manner. They use several generic processes and abstractions designed to enhance a collection of possible solutions iteratively. [3].
Image adjacent (imadjust) and histogram equalization (HE) are standard enhancement methods. These algorithms were chosen for comparison with the proposed method because the first algorithm improves colors and Saturation. In contrast, the second algorithm improves image contrast [4], and since underwater images need an algorithm to improve these problems, they were chosen for comparison with the proposed method.

Proposed method
The proposed method, adapting the Coronavirus Herd Immunity Optimizer Algorithm for Underwater Image Enhancement (CHIO-UIE), as briefed in the overall flowchart of the proposed method as shown in Fig. 1, consists of the following four phases: The first phase is reading an underwater image from the database; the second phase is converting the color system from RGB to HSV; the third phase is finding the best vector to improve the image and then using it to find the enhanced image; and finally, the fourth phase is converting the system colors from HSV to RGB. The loading of an underwater color image is the first phase of the current proposal; the dataset is assembled from the Enhancing Underwater Visual Perception (EUVP) and Underwater Image Enhancement Benchmark (UIEB) datasets.
Calculate the values for underwater image features such as global mean, local mean, local standard deviation, and entropy metrics.
Equations 1 and 2 provide the mean and standard deviation. D is the global mean for the entire image, and Equation 1 can be used to compute D [5], [6].
Where ( , ) is an input image, and N and M are image dimensions. σ(i, j), the local standard deviation calculated at the neighborhood centered at (i, j), can be calculated using the following equation [5], [6]: (2)

Second phase: color space transformation from RGB to HSV
The color components of the RGB model are not separated, which makes it ineffective for the improvement procedure; in addition, it has problems taking sudden changes in brightness into account. These are the reasons for converting an underwater image from RGB to HSV [5], [7].
Hue, Saturation, and value (HSV) color space compared to the RGB color system, HSV is better at reconstructing images [7], [8].

Third phase: Apply CHIO-UIE
The adapting CHIO algorithm utilizes this to determine a maximum fitness value for a certain number of iterations; this value depends on the values for underwater image features such as global mean, local mean, local standard deviation, entropy metrics, the number of edges, and summation of the intensity value of the image using the Sobel detector, which includes the way of applying basic CHIO steps, as shown in Algorithm 1 [9]. For more information, please see the reference [9] Algorithm 1 CHIO   The following steps illustrate the adapting Coronavirus Herd Immunity Optimizer algorithm for solving underwater image enhancement problems: Step 1: Initialize the CHIO parameters The CHIO algorithm parameters must be initialized in this step. The CHIO parameters used in this paper are HIS = 30, BRr = 0.05, and Max age = 100. This parameter depended on stander CHIO [9].
Step 2: Generate a herd immunity population The HIP will be initialized in this step using the herd immunity size (HIS) and parameter range. It will adapt the CHIO method using four parameters (a, b, c, and k) to deal with the image enhancement problem. These parameters' ranges are as follows: [0,1.5], [0,0.5], [0,1], and [0.5,1.5] for a, b, c, and k, respectively [4], [10]. The HIP memory structure is displayed in Matrix 3, along with image enhancement parameters.
Applying the CHIO algorithm to underwater images at coordinates (i, j), where each pixel receives the following enhancement function [5], [6]: Where T is the transformation function, f(i, j) and g(i, j) are the input and output images, respectively. The neighborhood's local mean is m(i, j) [5], [6]. CHIO is utilized in this step to get the four parameters' ideal combinations (a, b, c, and k) according to a fitness function (find maximum value) shown in Equation 5.
where I(Z) is the modified image I(Z) was applied using Equation 4, F(Z) is the fitness function, and the value (E(I(Z))) denotes the intensity of the edges detected after  [4], [5].
Step 3: Herd immunity evolution In this step, the gene X = (a, b, c, k) either remains the same or is impacted by social distance, depending on the proportion of BRr [9].
Step 4: Update the herd immunity population The existing X=(a, b, c, k) vector is removed from the HIP, and the new X = (a, b, c, k) vector is added if the new X=(a, b, c, k) vector is better than the current [4], [9].
Step 5: Fatality condition If the immunity rate of the present infected instance does not increase after a specific number of iterations, x=(a,b,c,k) is recreated from scratch [9].
After completing all the steps and finding the current optimal solution for the image enhancement problem (vector x = a,b,c, and k), select the best value for the fitness function.

Fourth step: color space conversion from HSV to RGB
The modified underwater image is transformed back to the RGB color image. This step converts color space conversion from HSV to RGB; it is an opposing step to the second phase [5], [8].

Experimental Results
The proposed method used public datasets, including UIEB real-world underwater images and a large-scale EUVP dataset of underwater images, to find the experiment's results. A set of measures is used, such as entropy [8], [11], peak signal-to-noise ratio (PSNR) [12], and structural similarity index measure (SSIM) [13]. The experimental environment includes a 64-bit version of Windows 10. It is implemented using MATLAB R2020a programming.
The proposed method was applied to show the efficiency of the CHIO-UIE method in improving underwater images.  Table 1 shows four columns: the first column is the raw image; the second column is the entropy results for HE, imadjust, and CHIO-UIE, respectively; the third column is the PSNR results for HE, imadjust, and CHIO-UIE, respectively; and the last column is the SSIM results for HE, imadjust, and CHIO-UIE, respectively; the values in bold represent the best result.
The proposed method provided the best results (highest in entropy, PSNR, and SSIM) in all images compared to the standard enhancement methods.
Experimental results show that the CHIO algorithm we proposed has the maximum entropy value, which suggests that the proposed enhancement algorithm may increase the image contrast while maintaining a high level of visibility. It has the highest SSIM value, which shows that the proposed enhancement algorithm can improve the structural and contrast similarity between the output and reference images [13], [14], and the highest PSNR value, which shows that the proposed enhancement algorithm can improve the image's signal.

Conclusion
The primary purpose of the research is to explore the mysterious underwater world. This paper proposes a new metaheuristic algorithm, the CHIO algorithm, to improve underwater images. Experiments have shown that this algorithm can improve underwater images as it corrects the colors, details, and signals of the image in a significant way.
Although our algorithm has remarkable performance, there are some limitations, such as the fact that our method may not be able to correct images with predominantly green colors and the long time it takes to find the closest-to-optimal solution. Therefore, we will work in the future to study and solve these problems.