1 Introduction

Researchers have previously stated that some of the inherent limitations such as changing in color and scattering of light reduce the contrast of taken underwater images. Therefore, these issues result in visual impairment due to artifacts such as blurring of images, darkening, over-illumination and noise [1, 2]. As a result, it is very difficult to distinguish the image of objects from the background in these images. On the other hand, as the depth of the water increases the light will decrease and this will absorb some of the colors from the water and make the processing more difficult [3, 4].

It is clear that studies in recent years on exploiting the image processing techniques striking study by researchers in the field of automated processing. Identification, object and organism detection at the macro range and detecting in micro scale are some issues which have received considerable attention in recent years. Particular attention has been paid in recent years to the optical image processing [3, 5, 6] which is obviously facing many challenges and limitations in the field of machine vision. However, most researchers have tried to develop solutions to overcome these problems, but some inherent limitations such as artifacts, blurry images, noise, lack of water transparency, insufficient ambient light, reflection repeated exposure to sunlight in the water and other similar cases has led to underwater processing as an appropriate methods and strategies.

Subsequently, underwater images with outside images from the world have certain conditions and limitations taking into account during their collection and processing. Recently, the used equipment by researchers for better analyzing underwater targets has become more sophisticated. For example, cameras with underwater imaging capabilities can facilitate observation and detection. Sometimes optical image processing can also cope with certain limitations such as lack of the ambient light, the low noise and contrast, the non-uniform lighting, the shadowing, the suspended particles and the disturbing detection of objects and targets.

Incremental filter and wavelet integration for high visibility of far underwater image detection rates in underwater probes with imaging capability can be seen in [7]. In this research, they sharpened the input image and then deleted the background. Then, they have performed histogram mapping. In the next step, they have employed the wavelet fusion results and finally adapted local histogram specification. Also, they have used Fast Fourier Transform (FFT), Butterworth filtering, and photo Fourier transform in the background deletion phase.

One of the interesting ways for improving the quality of underwater images is using the super-resolution and image contrast enhancement to reduce the amount of light emitted by Lu et al. [8]. Selecting a weighting factor of α in estimating an image with high resolution have a significant impact on the quality which can enhance the effect of the edges in underwater images. It is not best to amplify the edges of the images, and other areas of the underwater image with likely noise in super resolution. Taking a high value of α eliminates noise, but results in smoothing of the image, blurring in the edges of the image and losing of image detail [8, 9].

Hu et al. [10] published a study for enhancing the resolution of underwater images with the purpose of correction in motion transfer.

Image quality restoration has also been one of the developed techniques by Wang et al. [11] as well as another researcher in [12] where identifying the attenuation of the image. Similar to [10,11,12], another study has conducted in recovering the underwater images based on blurriness in addition to light absorption [13]. This manner actually enhanced the image processing. Underwater imaging under a non-uniform light field based on polar imaging is another recent study by Hu et al. [14].

It is necessary to track a particular object or purpose. Thus, appropriate techniques and methods for the underwater images may be proposed and implemented. Feature extraction from underwater images and visual-based matching are the interesting investigations presented to detect the targets [15]. Definitely, time dimension is more important in detection. Due to the difficulty of registering and the need for real-time detecting in some special and complex situations, visual detection is required an accurate feature extraction from the image.

It is completely true for underwater images of objects. In the study [15], the Fourier transform structure is used for high volume images to observe the targets in images. Not only free controller approaches as a separate network enhances the image quality, but also able to deeply identify goals and objects appearing in the image [16]. In fact, an effort has been made in this field to create an unsupervised generative network in order to producing underwater-quality images with correcting the color images.

In fact, an effort has been made in this field to create an unsupervised generative network for the production of underwater quality images and for color correction of images. Some research also uses color space changes to reduce the intensity of excessive brightness and blurry referred to in underwater images as fog image [17]. Similar to [17, 18], a study by Li et al. [19] has employed the redshift channel restoration and correction by dehazing. They first improved the blue and green channels through the dehazing algorithm based on the Dark Channel Prior algorithm expansion and modification. Then, the red channel is corrected following the theory of universal hypothesis. Finally, to solve this problem in some areas of the image, maybe it is too bright or too dark to optimize an adaptive mapping. Their method improved significantly and increased contrast and reduced scattering.

In [20], an effective color correction strategy based on a piecewise linear conversion to color distortion response has introduced with an innovative method of contrast enhancement and ability to reduce artifacts to achieve low contrast. Since most of the computation operations are done for the pixel set, their proposed method was suitable for implementation and for real-time run [21].

Some researches have also used geometrical construction to improve the underwater-image quality, although some of them destroy image information during the image quality enhancement. Like these methods, multi-scale Rentinex [22], Pose estimation [23] and incoherent modulation instability [24] can be mentioned.

Most of the mentioned methods are similar to those proposed in the component. But the main difference between the proposed algorithm in the hybrid algorithm set and the improved performance is processing underwater images with different conditions and various constraints. Techniques may have been used in some previous researches, but it can improve contrast through adaptive modeling, reducing image quality errors by bee algorithm, adaptive color correction of images, and ultimately super resolution to exclude the sample algorithm from other similar solutions.

This research is concerned with improving the obtained quality of images from underwater for different objects in different environmental conditions. The first goal of the proposal is to implement an intelligent model of image processing with ability of providing the optimum quality of the sample image with minimal errors relying on the statistical learning techniques.

In presenting the system, several hypotheses are considered:

  1. 1.

    The system is non-interfering.

  2. 2.

    Images are accompanied by fogging, scattering and a percentage of noise and suffer from problems such as low contrast and indistinguishable from low resolution.

  3. 3.

    Separating different parts of the image after applying the proposed method can lead to a better understanding of underwater images and consequently improve imaging.

The article is organized in Sect. 2 by introducing the proposed methods. In Sect. 2, the algorithm is presented with combining adaptive-evolutionary and contrast-enhanced structure as well as super-resolution. In Sect. 3, the practical results and the findings of the work are discussed. Finally, last section discusses and interprets the results.

2 Methods

2.1 The first examined data

The first image used for contrast optimization was achieved from National Institute of Ocean Technology (NIOT), Chennai and web databases [25] (www.fish4knowledge.eu, www.fishdb.co.uk). These datasets are collected from NIOT and captured by using Remotely Operatable Submersibles-ROSUB 6000. Images have 1019 m depth for exploration of deep-sea minerals such as gas hydrate, polymetallic nodules and sea habitats in Krishna-Godavari basin (India). ROSUB 6000 was able to capture rare underwater coral, fishes, worm-like species, as oxygen levels and temperature is very low (oxygen less than 0.5 mg/l and temperature 5 °C) at such depth in water. 12 images were collected from NIOT, 120 images from fish4knowledge and 120 images from Fishdb website, out of which 152 images were used for training and 100 images were used for testing [26].

2.2 The second database

For the second underwater images, database was created in set of synthetic underwater images by using the physically-based rendering engine PBRT. They provided two 3D scenes and produced a total of 642 images in positioning from camera in different locations. They set the absorbing and scattering coefficients according to Mobley [27,28,29]. In the unsupervised phase, we used three datasets. The first dataset was composed of 40 images from the underwater-related scene categories of the SUN dataset and 60 images from Nascimento et al. [30].

2.3 The plane of signal processing

The main purpose of improving image underwater quality is to create a model which improves images dramatically. The images can be accessed in greater detail, and the information previously acquired and processed by an expert. The value of this model will become even more pronounced when there is a need for image quality at different levels of image blurring, especially deep water. Optimization of images is done in two stages by using the cost-effectiveness of the adaptive contrast enhancement in combination with the bee colony algorithm, which has a direct relationship with the contrast enhancement. Therefore, the better the contrast, the lower the objective function cost. In the second step, the high resolution makes the image more prominent, so that it has less errors than similar methods such as spline interpolation [31,32,33].

The flowchart of Fig. 1 analyzes the improvement of underwater image status. The steps are effective in minimizing visual errors in image quality including importing images, and adaptive contrast enhancement based on exploiting the bee colony algorithm as a evolutionary manner. In next phase, super-resolution is applied to the image and the resolution of the image is improved.

Fig. 1
figure 1

Steps to improve underwater image quality by adaptive and evolutionary image resolution and super resolution models

2.3.1 Adaptive-evolutionary improvement of contrast

Images with non-uniform illumination have a number of visually limitations due to low exposure to the environmental light during imaging or excessive exposure to the light, fogging, hazing or combining these factors. The enhancement of these images represents a highly complex image processing technique. This is especially the case for the underwater environment where requires complicated processing.

Recently, in order to enhancing the resolution of images under various environmental conditions, a variational-based fusion model for non-uniform illumination method have been proposed [34]. Also, they have enhanced foggy and hazy images through the contrast optimization and color correction.

In first step, they have achieved globally enhanced image by a hue-preserving global contrast and adaptive enhancement algorithm. In the next step, locally improved image could be obtained via a hue-preserving local contrast adaptive enhancement procedure. In the final level, a variational-based fusion pattern with contrast optimization and color correction have been produced. This is repeated as long as the boundary of the mean square errors is generated, or while the output is obtained at an appropriate time interval. Also, the color balance between the big image at the global level and the local image is enhanced. This method examines the optimal visual images in terms of enhancing contrast and saturation. In Fig. 2, the algorithm steps have been shown [34].

Fig. 2
figure 2

Fusion steps with color correction and contrast enhancement to improve the image quality

We employ this rule and apply the contrast enhancement process by minimizing the cost function of the errors. Some of the error metrics include accuracy, mean square error (MSE), peak signal to noise ratio (PSNR) and the structural similarity index (SSIM). To reduce the errors, we use the artificial bee colony optimization algorithm (ABCOA). This fact also improves the performance of the variational-based fusion model for non-uniform illumination algorithm. The improvement is desirable and the method performance is greatly enhanced. In fact, the cost function of the ABCOA is the mean square error and peak relative to the signal to noise ratio obtained from the comparison of the ground truth image and the low image quality with the highest degree of fogging, hazing and scattering.

In the ABCOA, a local search is conducted along with a global search in using for both combinational and continuable optimization. The only condition for using ABCOA is that some topological distance measurements are defined among solutions. The effectiveness and capabilities of the bee algorithm have been demonstrated in some studies [35]. Each candidate solution is a food source (flower) and the population (colony) of n agents (bees) is recruited to search the solution space.

Every time an artificial bee visits a flower (finds a solution), it evaluates its adaptability. The bee algorithm contains the initial method of installing a main search cycle that is repeated T times for a given number, or until a consistent and desirable solution is reached. Each search cycle consists of five methods: recruiting, local searching, neighborhood shrinking, abandoning, and general searching. In Algorithm 1, the standard pseudo-code of bee optimization algorithm is displayed. Figure 3 shows the steps of implementing the hybrid model to improve adaptive-evolutionary contrast.

Fig. 3
figure 3

Steps of implement the hybrid code in improvement adaptive-evolutionary contrast, from left to right. First column of the original image with 10%, 30%, and 50% degradations. The second column of the image with adaptive improvement in recovery of 10%, 30%, and 50% degradations. The third column corrects the color correction in 10%, 30%, and 50% degradations, and the fourth column in the image after error minimization by evolutionary algorithm in 10%, 30%, and 50% degradations

Algorithm 1 Stages of implementing pseudo-code for the ABCOA.

figure a

2.3.2 Super resolution

Super resolution can provide better information for understanding the image ahead. Different approaches have been proposed for this work with its own advantages and disadvantages [36, 37]. In general, there are two basic methods for fixing low resolution images: one using reconstruction methods and the other learning methods. In methods based on reconstructing of the input image, they operate according to the contained information in the image itself and on the basis of rules such as extending the edge of the curvature retention and interpolation between pixels [37].

These methods generally consist of a recursive segment that performs the incremental or subtractive sampling process such that the reconstructed image is always in high agreement with the original image after resolving is reduced. One of the main factors in improving the quality of the resolution are the use of weighting factor α.

Choosing a weighting factor of α in estimating a high-resolution image will have a profound effect on the quality which enhance the effect of the edges in underwater sample images. It is not best to amplify the super-resolution, edges of the image and other underwater image areas of different objects that are also likely to have noise.

Selecting a high value of α causes the pixel distortion and sometimes noise, but results in smoothing of the image, blurring in the edges of the image and losing of image detail.

If α is selected on the edges of the small image, and the areas of the large image smoothly which the edges are preserved simultaneously and noise is eliminated. In the proposed process, an edge index matrix called \(I_{g}^{n}\) is used for estimating from the HR image. This is repeated at each step and calculated according to the magnitude of its gradients. Edge index matrix \(I_{g}^{n}\), which is a diagonal matrix containing either edge information or smoothness per pixel \(X_{H}^{n}\). If it is equal to zero, it is in the high-frequency region like the edge.

On the other hands, depending on the nature of the neighboring pixels, it may also have values between zero and one. On the other hand, we use the Sobel operator to construct the Ig edge matrix of the index and, for this purpose, calculate the edges extracted from \(X_{H}^{n}\) along the x and y gradient vectors, and then using the sigmoid function. Normalized by the Eq. 1 in the interval 0–1:

$$Sigmoid\left( x \right) = \frac{1}{{\left( {1 + e^{ - \alpha x} } \right)}}$$
(1)

Eventually, the diagonal matrix Ig is obtained which the diagonal elements are obtained from normalizing the large gradient matrix. Accordingly, the matrix αn is chosen as (2):

$$\alpha^{n} = 1 - I_{g}^{n}$$
(2)

As a result, if the pixel is in the smooth region, a larger α is selected, otherwise a smaller α is obtained. This results in a super-resolution technique and the visual quality of the image is greatly improved. Figure 4 shows applying super resolution results to sample image.

Fig. 4
figure 4

Applying super resolution results to sample image. The first column on the left represents the color channels of the contrast enhancement image and the right image, the sample super resolution image

3 Results

In the first evaluation step, MSE, PSNR and SSIM benchmarks are evaluated. In fact, it is clear that, in most previous studies, mean square error has been used as one of the most popular and common benchmarks. Each of these equations are represented by Eqs. (3) and (4):

$$MSE = \frac{1}{x \cdot y}\sum\limits_{i = 1}^{x} {\sum\limits_{j = 1}^{y} {\left( {p(i,j) - q(i,j)} \right)^{2} } }$$
(3)
$${PSNR = 10\log_{10} \left( {\frac{{x \times y \times 255^{2} }}{{\sum\nolimits_{i = 1}^{x} {\sum\nolimits_{j = 1}^{y} {\left( {p(i,j) - q(i,j)} \right)^{2} } } }}} \right)}$$
(4)

where x and y are the dimensions of the processed images (q) and the reference (p), and in the third equation, μp, μq, σp and σq, respectively are named the mean image brightness intensities, mean compressed image brightness intensities, baseline image standard deviation, and finally the standard deviation of the base image. Also, C1 and C2 are arbitrary values. This analyzes measures the position of the points in the base image corresponding to the converted image points of the processed image. An important metric for comparing the solutions is the effective measure enhancement (EME) which is calculated according to (5):

$$\begin{aligned} & \mathop {EME = \hbox{max} \,\chi \left( {EME(\phi )} \right)}\limits_{{\phi \in \{ \phi \} }} \\ & \quad \quad \;\, = \hbox{max} \,\chi \left( {\frac{1}{{k_{1} k_{2} }}\sum\limits_{l = 1}^{{k_{2} }} {\sum\limits_{k = 1}^{{k_{1} }} {20\log \frac{{I_{\hbox{max} ;k,l}^{\omega } }}{{I_{\hbox{min} ;k,l}^{\omega } }}} } } \right) \\ \end{aligned}$$
(5)

where \(I_{\hbox{min} ;k,l}^{\omega }\) is the maximum image in X(n,m), \(I_{\hbox{min} ;k,l}^{\omega }\) is the minimum image in X(n,m), in wk, block.

It is assumed that the image x(n,m) multiplies in wk,l(i,j) with l2 × l2. The orthogonal transforms are used for image enhancement with improving parameters.

In image processing metrics such as PSNR are used as a means of comparing the original signal and the same signal if they are mixed with noise. As it is known, the rate of change of these metrics is in dB. The appropriate values of an image after each case vary between 20 and 50 dB. But less than this level indicates poor image quality of the reconstructed, compressed, or noisy image compared to the original image.

Time An important factor because the expert does not want to spend too much time compressing the sample image. Matlab software’s tic-toc function is used to calculate the time taken to compress sample images at different volumes.

In addition to the sample images about 84 additional images are added to the entire set of images. The images are made in three formats: Tiff, Jpeg and Gray-Level and in total more than 200 images are analyzed. All images are divided into 24 random groups and named groups 1–24 with the average share of each group being 14 images. The average performance of the algorithm is then applied to each group of 8 images by using three formats of MSE, PSNR, and time. The algorithm is evaluated for 4 dimensions of images. The average performance of the algorithm over the set of about 320 sample images is shown in Tables 1, 2 and 3.

Table 1 Analyze of adaptive-evolutionary and super-resolution contrast enhancement parameters for sample images by category into 8 random groups and different image dimensions
Table 2 Analyze of adaptive-evolutionary and super-resolution contrast enhancement parameters for sample images by category into 8 random groups and different image dimensions
Table 3 Analyze of adaptive-evolutionary and super-resolution contrast enhancement parameters for sample images by category into 8 random groups and different image dimensions

By calculating the average of these three tables, the MSE, PSNR and time factors will be 36.55, 34.87 dB and 90.74 s, respectively. Sample image sets with more than 300 images were divided into four sections 32 × 32, 64 × 64, 128 × 128, 256 × 256 and in other words, approximately 1290 images were studied. To investigate their performance, 600 random images were selected, divided into 8 separate groups, and their horizontal and vertical columns represent the number of sample images for comparing in dB, respectively.

4 Discuss on results

We compare the proposed method with some well-known algorithms in the field. The set of Fig. 5 shows the final results of the first step implemented as compared to similar solutions. In Fig. 6, after applying the first method, the super resolution is operational and the output is displayed in the form of optimized high resolution (Figs. 7, 8).

Fig. 5
figure 5

Qualitative comparison between similar solutions to improve the quality of underwater images. From left to right, respectively, without fogging the original image, second column, He et al. [38], Third column, Drews et al. [39], Fourth column, Tarel et al. [40]., Fifth column, Ancuti et al. [29], sixth column, Barbosa et al. [41] method and last column, proposed method

Fig. 6
figure 6

From left to right, the main image, the Bicubic interpolation super resolution image with a PSNR of 28.24 dB, and the right image of super-resolution proposed with a PSNR equal to 32.78 dB

Fig. 7
figure 7

From left to right, the main image [25], the Bicubic interpolation super resolution image with a PSNR of 30.11 dB, and the right image, the super-resolution proposed by the PSNR equal to 35.63 dB

Fig. 8
figure 8

From left to right, the main image [30], the Bicubic interpolation super resolution image with a PSNR of 25.65 dB, and the right image, the super-resolution proposed by the PSNR equal to 32.06 dB

Table 4 also comperes small values for two images and solutions of He et al. [38], Drews et al. [39], Ancuti et al. [29], Barbosa et al. [41], and finally the proposed method has been compared with each other. In more cases the performance of the proposed method has been reported to be more desirable.

Table 4 Quantitative comparison of the amount of EME for the proposed method compared to several same methods

5 Conclusion

The need for an efficient system with the ability to automatically characterize the various parts of underwater images is necessary. In this paper, a hybrid approach is proposed that combines adaptive-evolutionary improvement of contrast and super resolution including two separate steps. This is presented in order to being time-saving and having acceptable performance factors. It seems that the results of the present study could be used in the future for systems requiring several functions underwater imaging. Also, results of the current study will have a significant positive effect on the improvement of imaging systems and affect their multiple capabilities. Sometimes due to the high volume of images, it can be very complicated and time-consuming to apply the proposed algorithm, but it can optimize the processing speed and accuracy of the separation. In the future, we intend to optimize the results and separated parts of the image with the aim of optimizing image quality.