’,,,*
1.Collaborative Innovation Center of Steel Technology,University of Science and Technology,Beijing 100083,P.R.China;2.China General Nuclear Power Corporation Inspection Technology Co.,Ltd,Suzhou 215000,P.R.China;3.School of Electrical and Information Engineering,Anhui University of Technology,Maanshan 243002,P.R.China
(Received 1 June 2021;revised 12 September 2021;accepted 15 October 2021)
Abstract:Visual inspection of the key components of nuclear power plants(NPPs)is important for NPP operation and maintenance.However,the underwater environment and existing radiation will lead to image degradation,thus making it difficult to identify surface defects.In this study,a method for improving the quality of underwater images is proposed.By analyzing the degradation characteristics of underwater detection image,the image enhancement technology is used to improve the color richness of the image,and then the improved dark channel prior(DCP)algorithm is used to restore it.By modifying the estimation formula of transmittance and background light,the correction of insufficient brightness in DCP restored image is realized.The proposed method is compared with other state-of-the-art methods.The results show that the proposed method can achieve higher scores and improve the image quality by correcting the color and restoring local details,thus effectively enhancing the reliability of visual inspection of NPPs.
Key words:image quality improvement;visual inspection;nuclear power plant;underwater image
The surface defects may cause equipment failures and increase the risk of leakage.Generally,videos/images are used to detect surface defects for monitoring the condition of nuclear power plants(NPPs).Inspectors make judgments by observing these videos/images,which are acquired by a camera[1-2].An inspector’s assessment depends on the image quality.Therefore,improving the quality of the underwater images can enhance the inspector’s ability to detect defects.
Due to radiation,the in-service inspection of most key components needs to be carried out underwater.The boric acid water,as well as radiation in the primary loop often cause image degradation,thus affecting defect detection.So,it is necessary to study image quality improvement methods for visual inspection of NPPs,to enhance the inspection capability and reliability.
Methods for improving the quality of underwater images can be divided into two categories:Image-based enhancement methods and physics-based restoration methods.Conventional image-based enhancement methods can improve the visibility and correct the color,but are rarely effective for restoring details.Physics-based image restoration refers to the mathematical modeling of the degradation process of underwater image,and the clear underwater image is obtained by estimating the model parameters and inverting the degradation process.Normally,the prior knowledge is required for image restoration methods.However,the lack of prior knowledge will limit the application of this kind of methods[3].
To enhance the images,the use of Haar wavelet decomposition was reported in Ref.[4]to enhance image contrast and visibility.An automatic underwater image preprocessing filter to improve the quality of underwater images was proposed in Ref.[5].However,it was not effective for seriously degraded images.An efficient enhancement method,based on the multi-scale Retinex,for underwater images/videos was proposed in Ref.[6].The Retinex method processes images according to HSV color space,similar to the way humans perceive color.The automatic color enhancement(ACE)algorithm integrates the“l(fā)ateral inhibition”“gray world”and“white patch”mechanisms of human visual system(HVS)[7].A brightness function is introduced to calculate the differences between a pixel and its neighboring pixels to adapt local image contrast,and the weights are calculated by the distance function.The algorithm comprehensively considers the spatial relationship and characteristics of the image pixels,and expands the dynamic range of images.The underwater image enhancement methods do not take into account the image degradation model at all.Hence,they have common shortcomings,for example,some methods are easy to cause color cast,and the range of application is relatively narrow[3].
Underwater image restoration methods usually use an effective degradation model at first,and then estimate the key parameters,such as background light and transmission map.Dark channel prior(DCP)and related methods based on DCP have achieved satisfactory results in defogging applications[8-9].Peng et al.[10]extended DCP to generalized DCP(GDCP)for underwater single-image restoration by using the fuzzy method to estimate the distance between a scenic spot and the camera.In the underwater environment,the transmission map of different color channels should be different.However,there is no effective image restoration method to accurately calculate these differences.In this case,the image restoration method has poor correction effect on image color distortion[3]..
In recent years,deep learning has made significant progress in improving the quality of underwater images[11].However,the irregularity of defects and the lack of samples limit the application of deep learning in the field of defect detection.So far,there is no available public underwater image dataset of NPP visual inspection.Hence,conventional methods can be used to build up datasets to solve the problem of insufficient samples.
In this study,the image enhancement technology is used to improve the color richness of the image,and then the improved DCP algorithm is used to restore the details of the image and improve the visibility of degraded images.
The illumination conditions of underwater visual inspection of NPPs are complex,mainly with near-field illumination(its own light source),supplemented by far-field illumination.Due to the camera and the light source separated by a small distance under near-field illumination,usually backscatter is saturated,resulting in heavy hazed images.When the far-field illumination is strong,the images often appear greenish.
Due to the harsh underwater environment,the color depth of the camera used is generally low.In addition,irradiation may introduce noise.
Therefore,the image enhancement technology should be adopted to improve the color richness firstly.After that,it is necessary to suppress the presence of noise.Moreover,a dehazed method is necessary to restore it as well.
Existing algorithms are based on public datasets,which are different from the underwater NPP environment.So,a real-world dataset for underwater inspection images,including a diversity of inspection scenes,different characteristics of quality degradation,and a broad range of image content should be constructed.
A new underwater image quality improvement method is proposed based on the following aspects:
(1)Underwater images with low color richness will cause the loss of image details[12].Thus,the underwater image is preprocessed by the ACE algorithm to correct color.In addition,a bilateral filter is used to suppress the presence of image noise caused by radiation before calculating the dark channel.
(2)To dehaze the underwater images,we apply the DCP algorithm.
We further correct the brightness of the whole image via adjusting the background light by incorporating the mean value of the dark channel and modifying the transmission map according to the grayscale distribution of it.
To develop and evaluate the performance of the proposed method,a real-world dataset for underwater inspection images,which contains 1 580 images of degraded underwater images has been constructed.
It is challenging to enhance the underwater images.We have made comparisons among existing approaches for color correction and enhancement.For example,the results show that it is prone to color distortion after grayscale world processing.And the image is over-rendered after the histogram is equalized.Compared with other methods,the ACE algorithm demonstrates advantage in terms of color correction.Moreover,there is no over/under saturation.Therefore,the ACE algorithm was used in this study to enhance the underwater images.ACE is a two-stage algorithm.The chromatic/spatial adaptation(corresponding to color constancy)is conducted at first.Secondly,the output range of image pixels is configured so that the output has an accurate tone mapping,corresponding to lightness constancy.
The ACE algorithm has two main steps:
(1)Adjust the chromatic spatial domain.Every pixel in the intermediate imageRis recalculated to correct the image chromatic aberration.This step is analogous to the function of human visual lateral inhibition,which mainly fine-tunes the output range of the image so that the output image has more accurate color mapping and the dynamic range of the image is maximized.

whereIc(x,y)-Ic(x′,y′)represents the lateral inhibition mechanism,cthe channel,the three channels of the image,andΩthe selected subset involved in the calculation.Rcandrare the intermediate result and the chromatic adaptation function accounting for the relative lightness appearance,respectively.d((x,y),(x′,y′))is the distance function between two points,which is the weight for the contribution of every pixel.
We have chosen the Manhattan distance to calculate as follows

And the chromatic adaptation functionris shown as

whereTis the slope value and can be dynamically adjusted according to the actual situation.In this study,Tis set as 20.
(2)Maximize the image dynamic,and then map the intermediate image to the final output image.For color images,it is necessary to process the three channels separately before merging the results.The white patch/gray world mapping adjustment formula is used to realize dynamic mapping

whereOc(x,y)is the final output andscthe slope of the segment in the range[(0,mc),(255,Mc)](Mc=.
A bilateral filter is used to suppress the presence of image noise before calculating the dark channel.Bilateral filtering is not only effective to remove low-frequency noise,but also effective for edge-preserving.
We assume that the image noise model is as follows

whereOc(x,y)represents the preprocessed underwater image,O′c(x,y) the denoised image,andn(x,y) the white Gaussian noise with a mean value of 0.
To remove the white Gaussian noise,the pixel value can be weighted by bilateral filtering,and the calculating is as follows

whereS(X,Y)is a local patch centered at(X,Y)with the size of(2N+1)×(2N+1).After filtering,the gray scale of the pixel is equivalent to the weighted average of the pixels in this patch.The weight coefficient can be expressed as follows

wherews(x,y)represents the spatial proximity factor,andwr(x,y) the gray similarity factor.
The image degradation model proposed by Mc-Glamery and Jaffe[13]is described as

whereO′c(x,y)is the degraded image after bilateral filtering,Jc(x,y) the real image to be restored,Acthe global background light,andtc(x,y) the transmission map.
The DCP proposed by He et al.[8]is widely used for image dehazing,based on the observation that the radiance of an object in a natural scene has exceedingly low intensities(close to zero)in at least one channel.Since red light attenuates more seriously than green and blue when it propagates in water,in the dark channel was calculated from the green and blue channels[14].Underwater visual inspection in NPPs can be divided into far-field and near-field illuminations.The attenuation of a single channel under near-field lighting condition is not significant.Therefore,the dark channel can be calculated from the three channels of the image.Under farfield lighting condition,we use green and blue channels for calculation.
The dark channel is calculated after bilateral filtering

whereCrepresents the channel,Ω(x,y)a local patch centered at pixel(x,y),O′c(x,y) the image after bilateral filtering,and(x,y) the obtained dark channel image.
Conventional DCP methods cannot guarantee the performance under complex illuminations.Statistics of the gray values in the dark channel indicate that they are significantly higher than expected.DCP fails to deal with image brightness in most underwater scenes.The DCP based methods depend on two optical parameters:The background light and the transmission map[15].Therefore,it is necessary to revise the background light calculation and transmission map estimation.The mean value of the dark channel can adjust the background light to prevent it from being exceedingly low due to complex illumination[15].Therefore,we add the mean value of the dark channel to the original background light estimation as follows

whereA′represents the original background light value,and avg(·) the average function.
Moreover,to prevent the image from appearing exceedingly dark,the transmission is modified by incorporating an offset value,which related to the grayscale distribution of the whole image.The revised transmission is as follows

The coarse transmission map may lead to the halo effect.In this study,inspired by the work by He et al.[8],the guide filter is used to obtain the fine transmittance map,shown as

According to the underwater image model,a restored underwater image is obtained as follows

The flow chart of the proposed algorithm is shown in Fig.1.Firstly,give the input images,use the ACE algorithm to solve the problem of image color cast,and then filter the noise via bilateral filtering.Next,estimateAandtby using the modified DCP and the guided filtering is used to refine the transmittance.Finally,the image quality improvement can be completed using the underwater image model.

Fig.1 Flow chart of the proposed algorithm
A typical NPP visual inspection system consists of light sources,an image sensor,and carrying tools,as shown in Fig.2.Under appropriate lighting conditions,the image sensor obtains videos/images of the inspected object,which an inspector uses to judge the surface condition of the object.Pan/tilt is widely used to adjust the camera’s viewing angle so that it is proper to view the inspected surface.Usually,the visual inspection system is mounted on carrying tools.The carrying tools will send cameras to different areas,and inspectors can observe the videos/images to find defects.

Fig.2 Schematic of underwater NPP visual inspection
The surface defects to be detected include mechanical defects(such as foreign objects,scratches,or damages caused by foreign objects),metallurgical defects(such as cracks),and corrosion pitting or depositions.Qualitative and quantitative assessment of defects should be conducted.The shape and color of defects are important for the analysis.For example,the arc damage caused during welding process is dangerous and prone to cracking during NPP operation.While,this kind of defects can be determined only by analyzing the color and shape.However,due to the complex and harsh underwater environment in the NPP’s primary loop,where images are degraded,such as color cast and image blurriness,it is challenging to the detection of such defects.
We construct a real-world dataset for underwater inspection images,which contains 1 580 images of degraded underwater images.Inspired by the method of constructing an benchmark dataset proposed by Li et al.[16],we first collect a large number of underwater inspection images,and then refine them,because a diversity of inspection scenes,different characteristics of quality degradation,and a broad range of image content should be covered.After data refinement,1 580 images are remaining.Fig.3 shows some examples of the images in the constructed dataset.

Fig.3 Comparison results improved with different methods
Using the constructed dataset,we evaluate the proposed method,and compare it with other stateof-the-art methods both qualitatively and quantitatively.The experiment platform consists of a Windows 10,64 b operating system,Intel(R)Core(TM)i5-8265U CPU,Intel 1.6 GHz CPU clock frequency,and 8 GB RAM.The VS2019 C++and Python 3.5.6 programming languages are used to implement the algorithm.
We compare our method with the DCP based methods:DCP[8],underwater dark channel prior(UDCP)[14],and GDCP(or Peng)[10].We also compare it with the classical methods:contrast limited adaptive histogram equalization(CLAHE)[17],underwater light attenuation prior(ULAP)[18],as well as the relative global histogram stretching(RGHS)[19].For convenience,the proposed method is represented by“Proposed”.In addition,we use the test set of 60 real underwater images from Ref.[16],to evaluate the proposed method.
Fig.3 includes both near-field and far-field lighting condition scenes of inspection.The image content includes a sensitivity test,foreign object,corrosion,and defect.
The performance of different methods can be observed in Fig.3.Generally,the Proposed,RGHS,GDCP and the CLAHE methods can dehaze the underwater images effectively,and are superior to others in terms of visual perception,especially for color and clarity.CLAHE,RGHS and the Proposed lead to visually pleasing results,by enhancing the contrast and restoring local details.However,the improved images in the second and fourth columns of Fig.3 enhanced by RGHS are too bright unnaturally.Moreover,the Proposed is the better choice for processing greenish images,with far-field illumination conditions.It also shows good effect on the greenish image.The DCP-based methods often fail to deal with image brightness.In particular,the results of DCP and UDCP appear too dark.GDCP has increased the brightness,however,they often look unnatural.The color correction of ULAP affects in a wrong way.As shown in Fig.3,it causes noticeable reddish color cast.
With no reference,the performance comparisons for underwater NPP image cannot use mean square error(MSE),peak signal to noise(PSNR),or structural similarity(SSIM),which are not suitable because all of these are reference metrics.
Underwater image quality measure(UIQM),a set of non-reference underwater image quality metrics that comprises three attribute measures,a colorfulness measure,a sharpness measure and a contrast measure,was proposed in Ref.[20].Each presented attribute measure is inspired by the properties of the human visual system.Therefore,we use it to quantitatively evaluate the performance.
We present the average scores of different methods on the 1 580 images of NPPs in Table 1.A higher UIQM score indicates a better performance[20].As shown in Table 1,the proposed method performs the best.
The different algorithms vary in the quality improvement of underwater NPP inspection images.Generally,the Proposed,CLAHE,RGHS algorithms are better for visual perception.The CLAHE algorithm can significantly improve the visibility besides greenish scenes,and it also produces good UIQM scores.GDCP produces good UIQM scores as well,partly because it increases the image brightness excessively,as shown in Fig.3,which affect the scores.Considering the aforementioned factors,the performance of the Proposed is the best in processing underwater NPP inspection images.
Moreover,we evaluate the proposed method on public underwater image data set.We use the test set of 60 real underwater images in Ref.[16].Some of the results are presented in Fig.4.We also present the average scores of different methods in Table 2.The proposed method performs the best,too.

Table 1 UIQM analysis of the results of different algorithms based on the dataset for underwater inspection images

Table 2 UIQM analysis of the results of different algorithms based on the test set in Ref.[16]

Fig.4 Comparison results improved with different methods based on the test set in Ref.[16]
The method described in this paper has been applied to data from underwater inspection for an NPP.The extracted images include both near-field(Fig.5(a—d))and far-field lighting scenes(Fig.5(e))of an NPP,and the three columns in Fig.5 from left to right show the original images,the ACE preprocessing results,and final results after the proposed method,respectively.The image content includes a sensitivity test,foreign body inspection,weld state inspection,and defect detection.
It can be observed that the color cast and blurriness of the original images are corrected to some extent after preprocessing.Then,the bilateral filter suppresses image noise(Fig.5(d))and effectively maintain edges.The final result is obtained by the improved DCP,which further promotes the image quality.
The presence of foreign objects often causes changes in the primary circuit medium,thereby affecting nuclear safety.Figs.5(a—c)show the foreign body inspection images.The effect of haze on underwater images has been removed.Compared with original images,the final results can lead to visually pleasing results,and can improve the contrast and local details.The foreign objects in Fig.5(a)are the metal gasket parts.The letters on the white foreign object in Fig.5(b)are more easily to be identified in the final result,which helps to trace the source of the foreign object.It is easy to confuse the foreign object with a filament in Fig.5(c)due to the effect of haze and the image blurriness.By contrast,in the output image it can be distinguished as irregularly shaped and translucent piece.Our result achieves better visual quality by removing the effect of haze,correcting the color,and improving contrast,so that the foreign objects can be determined,which allowing evaluating the nature and severity of them.

Fig.5 Effect of the proposed method on underwater inspection images
Fig.5(d)shows defect images inside the nozzle.The original image is blurred due to the effects of radiation and water,which makes it difficult to identify the authenticity of the indication.Our result shows changes in the surface shape,which helps identify it as a real defect.
Fig.5(e)shows the sensitivity test in the visual inspection of NPPs.The sensitivity test card used includes seven color blocks,line segments with different widths,and letters of different sizes.It can be observed that the Proposed can improve the quality of the degraded underwater images.It shows color cast(greenish color)under the far-field lighting in the original image.
Our result has a noticeable improvement in terms of visual quality especially the color and clarity.The Proposed can promote the ability to identify the image information,thereby improving the capability of visual inspection.
Aiming at improving the underwater images’quality for visual inspection of NPPs,this paper combines the ACE algorithm with an improved DCP method to propose an underwater images’quality improvement method.The conclusions are drawn as follows:
(1)This paper proposes an underwater image quality improvement method based on the characteristics of the inspection image,which is determined in this paper according to the complex and harsh environment of NPPs.
(2)An improved DCP algorithm is developed to dehaze and restore the underwater inspection images.The background light is adjusted via incorporating the mean value of the dark channel.Meanwhile,the transmission map is modified according to the grayscale distribution of it.The main advantage is that it is effective to guide the brightness of the whole image.
(3)The effectiveness of the proposed method is verified for underwater inspection images under various conditions.The results show more superior performance compared with other state-of-the-art methods.Moreover,the method has been applied in the field,and it is proved that it improves the image quality by correcting the color and restoring local details,thus effectively enhancing the reliability of visual inspection of NPPs.
Transactions of Nanjing University of Aeronautics and Astronautics2021年6期