Abstract

Underwater structures are crucial for national economic and social development. However, because of their complex environment, they are susceptible to damage during service. This damage should be prevented to minimize casualties and economic loss. Therefore, this study investigates the problems of disease identification and area statistics of underwater structures. To this end, the Dark-Retinex (DR) algorithm that can enhance the image of underwater structure defects is proposed. The algorithm consists of a combination of a dark channel algorithm and the Retinex algorithm. This study analyzes the current research status of underwater image processing technology, designs the overall framework of the DR algorithm, and uses the underwater structure disease image to verify the algorithm. Comparing the effect of the image with only the dark channel defogging and DR algorithm processing, the DR algorithm is observed to achieve “defogging” processing of underwater structural disease images to achieve better enhancement effects. Moreover, for accurate disease area statistics, the binary morphology and optimal threshold segmentation theories are combined to perform disease edge screening and remove interference information. Finally, accurate statistics of the proportion of diseased pixels are achieved, as well as the quantitative detection of surface diseases of underwater structures. After actual operational verification, the improved image dehazing and parallel boundary screening algorithms can achieve better application results to detect underwater structure defects and disease statistics. The objective evaluation shows that the DR algorithm facilitates image processing, can obtain relatively high-quality target images, and can solve the problems of time-consuming and labor-intensive detection of underwater structures, with significant risks and limitations. This helps pave the way for (1) the actual engineering of surface structure detection of underwater structures, (2) future storage in the database and assessment of hazard levels, and (3) a guide for engineering technicians to take corresponding maintenance measures.

1. Introduction

The breach of the Oroville Dam, the highest dam in California, caused the evacuation of nearly 200,000 people. When the Fukushima underwater nuclear power plant in Japan leaked, many people were in danger, causing panic over nuclear radiation. In another case, the pier foundation of cross-sea bridges is mostly in the turbid waters of the bay, making it vulnerable to erosion and damage, thus risking lives and economic losses. Accurate and effective damage analysis and assessment are essential to ensure the safety of underwater structures [1]. In recent years, with the rapid developments in computer technology in combination with traditional visual inspection methods for underwater concrete apparent damage, photography and videography methods have been used for detecting underwater structure safety and health [2, 3]. The detection method provides objectivity, high diving efficiency, and safety in practical applications [4]. Improving the visibility of underwater images is a crucial step in underwater robot target recognition [5, 6]. Commonly used hazy image enhancement methods are histogram equalization [79], homomorphic filtering [10], and wavelet transforms [11]. These methods have low complexity and are relatively easy to implement; however, useful information in the image can be lost easily. Although improved methods, such as adaptive mean filtering and weighted median filtering, were later proposed, the effect is enhanced, and the problem of information loss has not yet been solved [12]. Prabhakar and Praveen Kumar proposed an adaptive image wavelet-based denoising method for underwater images. He first used homomorphic filtering to correct nonuniform illumination. After smoothing, he adopted an improved Bayesian shrinkage function to transform the wavelet sub-band threshold method adaptively. However, research shows that the use of wavelet denoising alone to suppress underwater noise is not sufficient [13]. Feifei et al. proposed a new denoising method combining wavelet decomposition and high-pass filter, which also has a specific suppression effect on noise. This method achieved satisfactory results but was time consuming [14]. van de Weijer et al. gave a more general color constancy hypothesis [15], which unified the hypotheses of “White Patch,” “Grey World,” and “Shades of Grey” [1618] in one expression. However, owing to the severe attenuation of light underwater, the classic color constancy assumption is typically ineffective. Grewe and Brooks used the wavelet method to fuse multiple foggy images; however, the obtained images could not realize the actual purpose of image dehazing [19]. Yitzhaky et al. used the atmospheric modulation transfer equation to process foggy degraded images; however, the premise of this method is that the fog concentration and the scene depth need to be known in advance [20]. However, these prerequisites are challenging to obtain in practical applications. Tarel and Hautiere supposed that the atmospheric light imaging function is constant in the local range [21]. This method can accomplish the requirements of fast dehazing, but a halo appears on the edges of the scene in the final restored image. He et al. proposed the dark channel priority rule, which accurately determined the fog concentration by estimating the atmospheric transmittance in advance [22]. The statistical results show that most of the outdoor photos use this rule to obtain a good defogging effect and a corresponding depth image. However, this method is prone to blocking effects and affects information discrimination. Through continuous development, the outdoor defogging effect has become very mature. Because the underwater image characteristics are very similar to the haze-day images on land, several scholars have begun to study the restoration of underwater images based on the land-based haze algorithm. Kansal et al. proposed a defogging technique based on color attenuation prior (CAP). Experimental results show that the proposed approach outperforms state-of-the-art fog removal techniques in terms of efficiency and the defogging effect. In the proposed work, an initial depth map is estimated by using the CAP technique. Because this depth estimation may fail in some cases (e.g., white objects), this method is not suitable for the detection of surface defects in underwater structures [23]. Zuote et al. proposed that the dark channel and Local Maximum Color Value (Local Maximum Color Value, LMCV) prior were directly used for underwater image restoration of ship lock detection. The results showed that the two methods could not be used for the limitation of turbid underwater ship lock detection [24]. The core classifier of LMCV is expressed as follows:

Nevertheless, few studies have addressed the detection methods of underwater structure diseases. Thus, an algorithm should be used which can not only restore the image of the structure disease taken under the turbid water but also alleviate the blocking effect generated when using only the dark channel algorithm for image restoration. Based on computer vision theory that eliminates the limitations of the dark channel algorithm in underwater image processing, this paper proposes a method based on dark channel defogging and the Dark-Retinex algorithm (Dark-Retinex, DR) to capture underwater structure images. The dam images and the underwater structure images of the bridges are processed to obtain the target image. Moreover, the target area obtained is subjected to boundary screening to perform the statistics of the disease area and quantitatively identify the damage of underwater structures.

The rest of this paper is organized as follows. Section 2 introduces the algorithm used in this study. Subsequently, the results are presented in Section 3 which shows the processing effect and disease statistical results of the algorithm, and it compares and analyzes the image processing effects and disease ratio statistical results. Finally, Section 4 provides the conclusions of the study and summarizes future research.

2. Methodology

2.1. Light Degradation in Water

Water contains a significant amount of dissolved matter and fine particles such that when light is transmitted, it is absorbed, reflected, and refracted by particles in the medium, causing its degradation during transmission [25]. The light degradation model in water is shown in Figure 1.

The underwater imaging model is very similar to the foggy imaging model used in foggy image restoration methods [26]. In the following sections, the image enhancement method of DR is introduced, as well as the disease boundary screening process. The verification of the image enhancement method of DR and the effect of the disease boundary screening process is demonstrated in the section describing the results.

2.2. DR Image Enhancement Model

Because the light is refracted or scattered in the water, in underwater images, problems such as ghosting and shadowing of the target object occur, making the target object unclear. Therefore, these ghosting and shadowing phenomena can be considered as a “layer of fog.” The DR image augmentation logic diagram is shown in Figure 2.

The traditional defogging model iswhere is the original image, which is the foggy image; is a fog-free image and the target image; describes the transmission rate of the medium; and is the transmittance. The term describes the direct attenuation caused by light scattering in the medium [27]. The term is water vapor [28] that is light scattered in water and will cause the color of the scene to shift. Direct attenuation is a multiplicative deformation to scene radiation, and air light is an additive deformation. To solve the target image , the unknown , A, and must be determined from the known , and equation (2) is an undefined equation; therefore, it is not solvable.

For any image I, in a certain area, the lowest pixel value of each channel of all pixels is close to 0 [29]. Therefore, the mathematical expression of the dark channel can be defined aswhere represents any of the three channels. The purpose of equation (3) is to take the minimum value of the gray value in the three channels of each pixel in an input image to obtain a gray image. In this gray image, a rectangular window of a specific size is taken as the central pixel, and the minimum value in the rectangular window is used to replace the gray value of the central pixel, thereby obtaining a dark channel image. The statistics and observations demonstrate that the grayscale value of the dark channel image is approximately 0, that is,(1)Estimated water light value A: in the dark channel map, the pixel with the largest pixel value in the top 0.15% of the picture and the pixel with the highest pixel value as the water light value A are selected. The estimation method is simple.Equation (2) is transformed into(2)Transmission estimation: after A is determined, supposing that is constant in each window, the function is redefined. Calculating the minimum value twice on both sides of equation (4), we obtain the following equation:Combined with equation (4), we obtain the following equation:Finally, we obtain equation (8) as follows:The final transmittance expression is shown as follows:where is a partial are of x.We obtain a reply image of dark channel defogging using the following equation:(3)Retinex defogging algorithm: because the underwater scene contains white scenes, the processed original image 1 (O1) in Figure 2 is prone to the blocking phenomenon and the halo effect, which makes the processing inefficient. Thus, we added a step of the Retinex defogging algorithm [30].

Based on the basic image, image transformation into the logarithmic field is performed. Assuming that the essential attributes of the image are the causes of the blocking phenomenon and the halo effect of the image, the image model is shown as follows:

Equation (9) has logarithm on both sides; subsequently, equation (12) becomes

From equation (12), O2 and L can be obtained.

We selected pixels layer by layer using the image pyramid method. We established top-down layer-by-layer iterations to improve efficiency. The schematic of the pyramid is shown in Figure 3.

Logarithmic transformation is performed on each channel of the color image to obtain an initialization image and determine the number of pyramid layers.The number of pyramid layers is defined from top to bottom as follows: .From the top layer to the last layer, eight neighborhood comparison operations are performed. The operation rules are as follows:Combining equations (13) and (14), we obtain the following equation:After the calculation of the mth layer is finished, the calculation result of the mth layer is interpolated. Thus, the mth layer becomes twice the original size, which is the same size as the layer. The final reflectance isWhen the bottom layer is calculated, the final enhanced image is obtained. Table 1 shows the core procedure of Retinex defogging algorithm.
2.3. Boundary Filtering

In this section, disease edge screening is performed based on images processed by the DR algorithm, and disease ratio statistics are performed [31, 32]. The flowchart is shown in Figure 4.

(1)Image graying: eliminate image hue and saturation information for DR images while retaining brightness to convert images to grayscale images. The weighted average algorithm for R, G, and B components isIn particular, each pixel in the figure can be found in the corresponding three-dimensional space, which was established by R, G, and B as the axis. The point undergoing through the RGB space makes a vertical line to the R = G = B straight line and obtains an image represented by points on the straight line. Thus, the conversion from three-dimensional space to one-dimensional space is obtained.(2)Adjust the brightness value of the gray image. Map brightness in the grayscale image to the new value in :Among them, and represent the grayscale of , , respectively.(3)Global threshold processing and threshold estimation: use the maximum interclass variance method to find a reasonable threshold for the image , which is included in [33]. The solution process is as follows. Assume that the threshold has been selected, is the number of pixels including , and is the number of pixels including . The definition of the maximum interclass variance iswhere is the probability of the set occurrence, ; is the global mean; and is an integer representing all the possible gray levels in the image.(4)Divide the image and reverse the image: after the optimal threshold is obtained, binarization is performed usingThe image is converted into a binary image. After being inverted, the white pixels represent the diseased part.(5)Label the connected domain to remove interference information: the concept of the connected domain is used for regional segmentation. The small-area connecting domains in the binary image are deleted to remove interference information to obtain the final display of the disease area.(6)Statistics of the disease area: count the pixels in the white pixel area and carry out statistics on the area of the disease.

3. Results

To verify the effectiveness of the algorithm, the study focused on processing dam images [34] and bridge underwater structures [35]. The image information is shown in Table 2.

3.1. Image Processing Effect Verification

In this section, the six groups of pictures in Table 1 are processed by the DR algorithm, and the effects are displayed in Figure 5.

As shown in Figure 5, in Image 1(a), the fracture boundary is not clear. Image 1(d) was obtained after applying the DR algorithm, which significantly increased the contrast between the crack and the background. The part of the image surrounded by the orange box can be seen more clearly in Image 1(d) than in Image 1(a). In Image 2(a), the contrast of the image is low, and the color and brightness in the image are not uniform. After the image was processed by the DR algorithm (Image 2(d)), the contrast between the crack and the background was significantly increased. A portion of the crack is deep, and the background is lightened. The orange box highlights this for more clarity and detail. Image 3(a) shows uneven brightness with dark parts. Image 3(d), obtained after processing by the DR algorithm, shows that the color of the crack boundary is deep, but the contrast with the background increased significantly. Image 4(a) shows the blurred crack image. The contrast between the crack and the background image is relatively low, and it is accompanied by noise interference. However, in Image 4(d), the color of the crack boundary deepens, the contrast with the background is significantly increased, the color becomes uniform, and the noise is reduced. In Image 5(a), the color of the image is uneven, and the boundaries are difficult to identify, accompanied by noise. Image 5(d), obtained after processing by the DR algorithm, shows that the color of the exposed border is deepened, the contrast with the background is increased, the brightness is uniform, and the noise was reduced. The features in Image 5(d) are surrounded by the red and orange frames, which are more visible than those in Image 5(a). The image enhancement effect is visible to the naked eye. Image 6(a) is blurred. Image 6(d), obtained after processing by the DR algorithm, shows the main picture. The detail enclosed by the red box in the image is enhanced, the contrast with the background is increased, the picture is bright, and the noise is reduced. Furthermore, subjective visible image enhancement is satisfactory.

3.2. Comparison of the Image after Defogging in the Dark Channel and Image Processing by the DR Algorithm

In this section, for comparison purposes, the six groups of pictures listed in Table 1 are processed by the D, Tarel, Joost, and DR algorithms. The results are displayed in Figure 6.

From the results shown in Figure 6, Image 1, with only dark channel defogging, is compared with the image processed by the DR algorithm. The contrast at the image boundary is low, and the small stone blocks in the frame have a blocky effect boundary. The Tarel algorithm not only reduces the brightness and contrast of the image but also makes the image appear the phenomenon of “halo artifact.” This phenomenon exists not only in image 1 but also in image 2–4. The Joost algorithm reduces the brightness of the image by a small margin, but the disease boundary is not clear and the contrast is low, which also exists in Image 2–6(d). Image 2, after the defogging of only the dark channel, still has noise, contrast floor, and insufficient brightness compared with the image processed by the DR algorithm. The gravels in the frame are not prominent because of the blocky effect. Images 3 and 4 still have insufficient contrast and brightness after the defogging of the dark channel. After only defogging the dark channel, compared with the image processed by the DR algorithm, Image 5 illustrates that the frame part is due to the blocky effect. Although the image processed by the Tarel algorithm contains more information, the boundary of the disease is blurred and messy, which makes the contrast decrease. The image also has a small decrease in brightness, which also exists in Image 6. The right corner of Image 6 outlines that the defogging of the dark channel fails to highlight the details owing to the blocky effect.

Using the DR image enhancement method, we obtained brighter, more informative, and clearer target images with high contrast compared with those obtained after defogging in the dark channel. Meanwhile, the DR algorithm presented performed better than the Tarel and Joost algorithms. Because the underwater scene contains white scenes, the image processed by the simple dark channel defogging algorithm is prone to blocky and halo effects, which make the processing unsatisfactory. After adding a step to use the defogging algorithm, the lumpy and halo effects are relieved. The DR algorithm can satisfy the requirements for restoring the diseased images of the structures obtained in the turbid water; it also relieves the blocky effect caused by the dark channel algorithm for image restoration. Moreover, after the boundary filtering of the obtained target images, the diseased part is prominent, which can help identify and improve the statistics of damage on underwater structures.

3.3. Objective Evaluation of Image Effects

The original images of the six samples processed only by dark channel defogging, Tarel’s algorithm, Joost’s algorithm, and the DR algorithm were used for an objective evaluation using the mean, standard deviation, entropy analysis, and execution time.

The average value of the image is used to indicate the average brightness change after the image enhancement. Thus, the larger the average brightness, the better the image quality. The more dispersed the image, the better the image quality. Entropy is used to evaluate the ability of the image to provide details. From the perspective of information theory, the amount of information in the image is measured. Execution time is used to estimate program speed.(1)Image evaluation using the mean: the mean value was calculated for the original groups of images after the defogging of the dark channel, Tarel’s algorithm, and Joost’s algorithm were applied (hereinafter referred to as the D image, Tarel image, and Joost image), and the images were processed by using the DR algorithm.The data in Table 3 indicate that the average value of the DR enhancement effect map has mostly increased compared to that of the original, D, Tarel, and Joost images. Among them, the increased ratio of the average value of the DR image (compared to that of the original, D, Tarel, and Joost images) is calculated for Image 1 (34.08%, 73.92%, 159.70%, 78.03%), Image 2 (146%, 153%, 299.03%, 32.52%), Image 3 (100.82%, 118.58%, 612.34%, 165.30%), Image 4 (72.73%, 97.66%, 108.68%, 88.62%), Image 5 (12.15%, 18.22%, 53.01%, 12.75%), and Image 6 (17.83%, 36.84%, 38.45%, 18.46%), respectively. Through comparison, the brightness of the DR image improved significantly.(2)Image evaluation using standard deviation: the standard deviation was calculated on the six sets of images for the original images, D images, Tarel images, Joost images, and images processed by the DR algorithmThe data in Table 4 indicate that the standard deviation of the DR enhancement effect map has increased compared to that of the original, D, Tarel, and Joost images. Among them, the increased ratio in the standard deviation of the DR image (compared to that of the original, D, Tarel, and Joost images) is calculated for Image 1 (8.40%, 0.12%, 300.12%, 291.57%), Image 2 (9.48%, 1.97%, 265.96%, 290.55%), Image 3 (7.52%, 0%, 279.10%, 296.75%), Image 4 (2.36%, 0.38%, 336.77%, 328.40%), Image 5 (2.07%, 0.33%, 336.22%, 356.26%), and Image 6 (0.55%, 1.96%, 448.49%, 473.69%), respectively. Through comparison, the DR image presents a small increase, and the image enhancement effect is slightly evident.(3)Image evaluation using entropy: the entropy was calculated on the six sets of images for the original images, D images, Tarel images, Joost images, and images processed by the DR algorithm.The data in Table 5 indicate that the entropy value of the DR enhancement effect map increases compared to that of the original, D, Tarel, and Joost images. Among them, the increased ratio of the entropy value of the DR image (compared to that of the original, D, Tarel, and Joost image) is calculated for Image 1 (0.18%, 0.18%, −9.92%, 14.90%), Image 2 (4.02%, 1.97%, −8.48%, −8.16%), Image 3 (1.53%, 1.30%, −7.54%, 5.48%), Image 4 (1.62%, 0.80%, −28.84%, 4.37%), Image 5 (3.12%, 39.16%, −11.87%, -2.51%), and Image 6 (1.24%, 0.77%, −11.52%, −3.40%), respectively. Through comparison, the entropy values of the Tarel and Joost images are higher; however, the brightness and contrast are too low. The DR image presents a small increase in obtaining image details, and the image enhancement effect is good.The original six sets of example images, D images, and images processed by the DR algorithm are evaluated objectively. The images were processed by the DR algorithm for brightness, contrast, and details. All of them improved and met the expected effect of image enhancement. Therefore, the image processed by the DR algorithm can be used to calculate the disease ratio after boundary selection.(4)Execution time: the total time required to execute the technique to obtain a final defogged image (O2) from a foggy image (I) is measured in seconds and is given in Table 6. The results shown in the table indicate that the proposed technique is slightly slower than that of the D algorithm, but it is faster than that of the Tarel algorithm and comparable to that of the Joost algorithm, which can meet the work demand.

Therefore, it can be concluded that the proposed technique is better than the other three techniques in achieving high speed while maintaining the overall image quality, as shown in Tables 35.

In summary, for the Tarel and Joost algorithms, the standard deviation data is far lower than the original, D, and DR images; therefore, the contrast of the picture is reduced, and the effect of boundary screening cannot be compared with the dark channel algorithm and the DR algorithm processing. However, the mean, standard deviation, and entropy of the image processed by the dark channel algorithm and the DR algorithm are within one order of magnitude, which means the boundary screening results can be compared separately.

3.4. Disease Edge Screening

In this section, the six images processed by the DR algorithms are used for disease edge screening and verification.

3.4.1. Screening of Disease Edges in Images

From the results in Figure 7, the black pixel interference information can be obtained from the binarized image in Images 1–4(c), and Image 6(c), leading to an increase in the disease statistics. The details of the picture in Image 5(c) are more complicated to visualize. The interference information of white pixels in the damaged part reduces the statistical ratio of Image 5(c). Moreover, Images 1–6(d) are obtained after the screening has removed the interference information in the orange frame. In Images 1–4(d), the crack direction is consistent with Image (a), the boundaries are clear, and the image processing effect is good. In Image 4(d), although there are still “burrs” in the crack boundary, overall, the improvement effect is significant.

3.4.2. Disease Ratio Statistics

The study considers that slight differences in brightness will be present depending on the degree of damage; thus, the brightness 225–235, 235–245, and 245–255 are defined as white, very white, and pure white, respectively, and the ratio statistics are performed. Table 7 summarizes the core procedure of the DR image disease ratio statistics.

Based on the images of Figure 7(d), the disease ratio was performed. Table 8 lists the statistical results.

3.4.3. Comparison of the Filtering Effect between the Image after the Defogging of the Dark Channel and the Image Processed by the DR Algorithm

As shown in Figure 8, the cracks in Images 1–4 have poor visibility owing to the low surrounding brightness and the blocky effect. When the disease boundary is screened, the low-luminance pixel portion is included in the diseased pixels, resulting in an increase in the statistical results. The image of the underwater structure of the bridge in Images 5–6 has a blocky effect. This increases the brightness of the diseased part and does not count into the diseased pixels, resulting in a reduction in the statistical results.

3.4.4. Comparison of the Statistical Ratio of Disease after Filtering between the Dark Channel Dehazed Image and the Image Processed by the DR Algorithm

According to the results shown in Figure 9, only the dark channel defogged image is compared with the image boundary processed by the DR algorithm to calculate the disease ratio statistics after filtering: Image 1, +19.03%; Image 2, +28.5%; Image 3, +6.61%; Image 4, +10.16%; Image 5, 1.36%; and Image 6, −13.57%. There is a significant difference in the statistical data of the two. These results, along with the comparison of the border screening effect, show that the image processed by the DR algorithm is satisfactory, and the border screening statistics are more accurate than considering only defogging of the dark channel.

4. Conclusions

This paper proposes a DR algorithm based on the combination of the dark channel and Retinex algorithms to achieve the purpose of restoration and accurate statistics of disease images on the surface of underwater structures. Unlike other methods, the DR algorithm not only can recover the structure disease images obtained in turbid water but also can alleviate the blocky effect caused by the dark channel algorithm for image restoration. The enhancement effect is satisfied, which is reflected in the obtained results. After filtering through the boundary, the image processed by the DR image algorithm filters the interference information better, and the percentage of diseased pixels is more accurate than considering only defogging of the dark channel. It can achieve the purpose of quantitative detection of surface diseases on underwater structures.

Through practical verification, the following conclusions are reached:(1)The image processed by the proposed algorithm has precise details and prominent features. It shows specific advantages for visual and objective evaluation, which can provide a reference for the study of image dehazing algorithms.(2)The DR parallel boundary screening algorithm can be applied to detect surface diseases of underwater structures quantitatively. Moreover, it can provide practical guidance for the detection of underwater structures in the future.

Although the DR algorithm provides a significant enhancement in image processing, the following improvements are required for the practical application of the algorithm:(1)Although the DR algorithm achieves satisfactory enhancements and outstanding details, it may fail when the model is not valid. First, when the color of the diseased part is very similar to the background color, the disease is difficult to reflect. Second, when the uneven illumination of the picture causes different brightness of the left and right parts of the picture, the water light value estimation would be incorrect.(2)Although the DR algorithm achieves the purpose of enhancing the contrast of the image, the colors of the objects in the DR recovery image are not vivid and need to be further improved in future research.

Data Availability

The data used to support the findings of this study are included in the article.

Conflicts of Interest

The authors declare no conflicts of interest regarding the publication of this paper.

Acknowledgments

This study was funded by the National Key R&D Program of China (Grant nos. 2018YFC0809600 and 2018YFC080960). The authors would like to thank Editage (http://www.editage.cn) for their English language editing service.