Study of Cavitation and Cavitation Erosion Quantitative Method Based on Image Processing Technique

Cavitation erosion on the wetted surface of hydraulic machinery is directly related to the cavitation behavior. In this paper, the cavitation behavior and cavitation erosion characteristics on the airfoil surface were observed experimentally, and then, image processing methods for quantifying cavitation structure and cavitation erosion were established. Laser-CCD system was used to obtain the cavitation structure on the airfoil surface and the microtopographies of the cavitation erosion at different magnifications were obtained by SEM. ,e distribution and shape of cavitation pits were analyzed. An image processing method based on statistical principle was used to analyze the distribution characteristics of the cavitation structure. ,e mean and mean square value of the cavitation structure were obtained. ,e average volume and the volume change rate of cavitation cloud in each position of the flow field during a cavitation period were described. According to the characteristics of cavitation pits, an image processingmethod based on background correction, edge detection, and binarymorphology processing was established, and then, the distribution characteristics and the area of the cavitation pits were obtained. Finally, the effectiveness of the methods is verified by the image processing of cavitation pit in different locations on the hydrofoil.


Introduction
Cavitation in hydraulic machinery leads to the problems such as cavitation erosion, vibration, pressure pulsation, and noise [1].Since cavitation and cavitation erosion in hydraulic machinery are unavoidable, the relationship between cavitation behavior in the flow field and cavitation erosion on solid surface is important for the current studies [2].
Cavitation behavior of hydraulic machinery generally contains the high-frequency periodic process of the cavitation structure growth, development, cavitation cloud separation, and collapse.Pressure waves generated by cavitation cloud collapse are considered to be an important factor for the cavitation erosion.Guennoun et al. used highfrequency sensor to gather and process the pressure wave on the hydrofoil surface, and its impact on cavitation erosion on the hydrofoil surface was analyzed [3].High-speed photography was used by Sato and Shimojo to observe the periodic behavior on the hydrofoil surface, and the positions of the cavitation erosion pits were analyzed by combining the images recorded by high-speed photography [4].Patella et al. pointed out that the power and consequently the magnitude of the emitted pressure wave are closely related to the change rate of the vapor cloud volume [5].An image processing technique on the experimental images was proposed in [6], which obtained the mean and standard deviation of the grey level of the cavitation structure images on the hydrofoil surface in the flow field.
Since the microjet formed when the cavitation cloud collapses was observed, the viewpoint that the cavitation erosion pits are formed by the impact of the microjet on the material surface has been confirmed by many studies [7].Since then, numerous studies discussed the cavitation erosion characteristics and laws of the material from different standpoints.Shuji et al. studied the computational model of the volume loss rate of cavitation erosion [8].Saito and Sato studied the relationship among the cavitation structure shedding frequency, the cavitation pulse number, and the number of the cavitation erosion pits [9].Recently, there is deeper research in the generation, morphology, and quanti cation of the cavitation erosion pits.Patella et al. used 3D laser pro lometry to measure the surface topography of cavitation erosion and built up a numerical algorithm to obtain the diameter, depth, volume, and other geometric parameters of the pits, respectively [10].Dular et al. used ultrasonic cavitation device to observe the formation of a single cavitation pit and reconstructed the pit by an image technique [11].Patella et al. proposed a method to calculate the weight of the cavitation erosion based on the oligocyclic fatigue approach physical model [12].Dular et al. obtained the cavitation erosion characteristics of the copper-coated specimens being characterized by brightness by using the image processing technology [6].Szala discussed the application of image analysis software ImagePro Plus and MetIlo for assessing cavitation erosion wear [13].Vyas et al. characterized individual microbubbles around ultrasonic scaler tips using high-speed imaging and image processing [14].
e phenomenon of pit clustering within the incubation period and the in uence of the already eroded surface on appearance of new pits were investigated in [6].Additionally, the possibility of self-ampli cation of the erosion due to the presence of small deformations (pits) was studied [15].
From the research status quo, cavitation erosion originates from the pressure wave and microjet phenomenon in the cavitation process.A great deal of researches are devoted to nding the relationship between cavitation and cavitation erosion.Based on the former studies, the cavitation behavior is observed and cavitation erosion date of airfoil surface is measured experimentally, and then, image processing methods for quantifying cavitation structure and cavitation erosion are proposed, respectively.

Experimental Setup
e experimental apparatus for the cavitation damage is a closed-loop test rig, and the test section is similar to the shape of contraction-divergence of the Venturi tube as shown in Figures 1 and 2. Valves were equipped in the front and rear of the test sections to adjust the inlet and outlet position pressures and the internal pressure distribution so as to e ectively control the cavitation conditions of the test section.Plexiglass was installed for observation in the upper and left side of the ow direction (Figure 2).Tap water was used as the liquid medium, and Raf61 hydrofoil specimen was used.e basic geometric parameters of the hydrofoil are 120 mm chord length with about 7 °di usion angle at the right side in the ow direction and 35 mm head width.Hydrofoil specimens were placed horizontally in the test section during the experiments.e hydrofoil material is rolled AlZn5MgCu(ISO) aluminum sheet.e surface of the hydrofoil specimen was polished by 500∼2000# sandpaper, the grinding direction is the airfoil chord direction, and its morphology is shown in  Advances in Civil Engineering Figure 3.It can be seen that the initial surface is smooth and dense, although there are some small local defects, but there are no common features in the shape and size.e PIV system produced by TSI was used, which consists of the following components: pulse laser with power of 120 mJ/pulse and with the Nd: Yag laser dual-chamber, light arms and film light lenses, special CCD with 1.3 K × 1 K resolution, synchronizer, and high-speed data interface board.e inlet pressure of the test section is 0.329 MPa, the outlet pressure is 0.072 MPa, and the average velocity at the throat of the test section is 25 m/s.CCD was used to take more than 400 cavitation structure images in the vertical direction of the light sheet at different times, and the position is 20 mm from the front side of the test section as shown in Figure 2. ere is a sharp demarcation in grey value between the unspoilt surface and the erosion pits.e erosion pits have different sizes which are as large as 6 μm or less than 1 μm, but mainly concentrated in the range of 1∼5 μm.

Images of Cavitation Structure and Cavitation Erosion
e depth of the Advances in Civil Engineering erosion pits (characterized by grey value) are not significantly related to size.In addition, it can be seen from Figure 4 that the distribution of erosion pits is significantly uneven.

Cavitation Structure Images.
More than 400 greyscale images with 8-byte resolutions for the cavitation structures on the test section were collected in the experiments, as shown in Figure 5. e figure with greyscale value of 0 indicates that cavitation did not occur in this location, which means that there is no reflected light received by CCD when the light passing through the location.e figure with greyscale value of 255 indicates that the light is totally reflected, which means that there is in the conditions of complete cavitation.
Figure 5 shows a sequence of six images of the cavitation structure on the hydrofoil.From A to C in Figure 5, the attached cavity grows from the leading edge to about 70 mm along the hydrofoil surface.From D to F, a united group of bubbles (cavitation cloud) which has been separated by reentrant jet from the hydrofoil surface travels with the main flow and collapses in the higher pressure region.is process will be repeated until the minimum cavitation cavity on the hydrofoil has been reached.e phenomenon of pressure wave and microjet will occur and then cause cavitation erosion during this stage.

Image Processing Method.
e image n with i × j pixels can be presented as a matrix with i × j elements where the location of the matrix element represents the location in the image, and the matrix element values are the grey level A(i, j, n): where A(i, j, n) ∈ 0, 1, . . ., 255 { }.Interesting parameters are the mean value of the grey level μ(i, j) of the ijth matrix element in the series of N images and the standard deviation of the grey level σ(i, j) of the ijth matrix element in the series of N images, that is From the physical sense, the mean value represents the mean degree of cavitation and the standard deviation represents the degree of deviation from the average.Meanwhile, the mean value and the standard deviation of the image processing result can be presented as a matrix.e contrast of the mean value and the standard deviation of the grey level calculated using different number of images is shown in Figures 6 and 7. Almost no change in the mean value of the grey level or in the standard deviation of the grey level can be seen after considering more than 45-50 images, so the convergence of the average value and the standard deviation of image was verified efficiently.

Result Analysis of Image Processing.
e equivalent greyscale contour figure of the mean value and the standard deviation of the cross section is presented in Figure 8. e distribution of the mean value from the side view reveals that the maximum of the grey level is closer from the forefront (about 15 mm from the head) to the midst (about 60 mm from the head) of the hydrofoil.
e reason is that the periodic behaviors of the cavitation cavity inception, development, and shedding occur at this position, so the cavitation cavity at this position remains nearly steady.
It also shows a significant region with higher values of the grey level in the rear of the hydrofoil, which suggests the cavitation cavity repeating shedding and collapsing in this region.
e distribution of the standard deviation grey value suggests that the maximum value of the grey level (about 50 to 70) is in the region close to the wall from the forefront to the midst of the hydrofoil (about 80 mm from the head).
e reason is higher volume change rate of the cavitation cloud caused by periodic growth and shedding of the cavitation cavity.e grey level maximum value of the standard deviation in the mainstream on the rear of the hydrofoil is a consequence of larger volume change rate of cavitation cloud caused by continuous shedding of the forefront cavitation cavity and collapsing at this position.e grey level of other positions is very small which indicates the activity of the cavitation cavity is very weak.

Histogram Analysis and Background Correction.
Histogram is statistical analysis on the number of all levels of the image pixels.e histogram of Figure 4(c) is shown in Figure 9. e grey value of each pixel distributes with a single peak and concentrates in the range of 70∼180, that is, the range of the grey value of object (pit) and the background has greater overlap.erefore, the direct segmentation of the pits and the background will lead to large errors.e result of increasing the contrast of the original image and amending the background is shown in Figure 10.e overlap of the grey level of the pits and the background is considerably reduced, and therefore, the error caused by the split operation can be reduced.

Edge Detection.
Edge is the region of mutation on the grey of the image which represents the beginning or the end of the pits [16].e background can be split from the pit edge by detecting the pit edge, and then, the information of the area of the pits and so on can be obtained.e Canny edge detection function is similar to the first derivative of the Gaussian function.e symmetry and the decomposability of the function make the calculation easier between directional derivative of either direction and convolution of the image.
Two-dimensional Gaussian function is supposed as where σ is distribution parameter for the Gaussian function.e first-order directional derivative in the n ⇀ direction is as follows: where n ⇀ is the direction vector and ∇G is the gradient vector.
Image f(x, y) and G n were calculated as convolution and the direction n ⇀ was changed, and n ⇀ is orthogonal to the direction of the detection edge when G n * f(x, y) is up to the maximum value.e direction n ⇀ corresponding to the maximum value is given by the following equation: 6 Advances in Civil Engineering where G n * f(x, y) gets the maximum output response in this direction: According to the definition of Canny, the central edge points are the maximum of the convolution of the operator G n and the image f(x, y) in the edge gradient direction, and the edge point can be determined according to whether the intensity is the maximum value for their neighborhood in the gradient direction of every point.e sketch after the Canny edge detection is shown in Figure 11.

Morphology Processing.
It was analyzed by the morphology method for the image processing after the image edge has been detected [17].All backgrounds which are contacted with pits were merged into pits by dilatation, and at the same time, the border spread outward to fill in the holes.Corrosion could eliminate the boundary points, and the border contracted inward to remove small and insignificant objects.
If A is indicated as a binary image and B is structure element, the dilatation and corrosion transformations of A on B are defined independently as follows: where  B is the reflection of B, A c is the complement of A, (B) x is the shifting of B by x point, and symbols ⊕ and Θ are the Minkowski sum and the difference transformation.Figure 12 is the result of the morphological processing of Figure 11.
Figure 12 is the binary image after morphological processing where D (i, j) is with the size of M × N, and in order to carry out the statistics, the area of cavitation pits only needs to count the number of the pixels where D (i, j) is equal to 1 in the figure: After testing, the pixel area of cavitation erosion pits is 86070, and the ratio of the total area of the pits to the whole picture is 24.98% as shown in Figure 4(c).In order to detect the effect of the algorithm, the edge contour image extracted from the original image as shown in Figure 11 was superimposed on Figure 4(c); then, a more complete outline of the cavitation erosion pits can be seen from Figure 13.

Choice of Cavitation Images.
e processing results of the cavitation erosion images on the airfoil surface at the same location with different magnification times are shown in Figure 14.It can be seen that meaningful results for Figure 14(a) magnified 500 times cannot be obtained by this    Advances in Civil Engineering processing method because large number of pits cannot be captured.Good results can be obtained for Figures 14(b)-14(d) with three different kinds of magnification times by this processing method.According to further analysis, many small pits in Figure 14(b) have not been flagged, and the parameters of the detection operator for Figure 14(d) are difficult to be controlled due to too high magnification.
erefore, images magnified 2000 times are selected for processing in this paper.

Cavitation Image Processing at Different Locations.
In order to observe the characteristics of the cavitation damage at different locations on the hydrofoil surface, the cavitation erosion morphology images along the flow direction from the front portion to the rear of the hydrofoil were processed, respectively (Figure 15).It is worth mentioning that, according to the research objectives of this paper, the specific location of the images is not concerned.
According to the marked results of the cavitation erosion pits shown in Figure 15, the cavitation damage characteristics of each image are similar.Some marked shapes are separated circular pits, and others are the superimposition results of individual pits which are connected to form bigger pits or strip-shaped pit.Bigger cavitation pits due to many cavitation erosion pits connected together are shown in Figures 15(a), 15(d), 15(e), and 15(g), and strip-shaped cavitation pits due to many cavitation pits connected along one direction are shown in Figures 15(b), 15(c), and 15(f).In addition, the distribution of the position of the cavitation erosion pits is irregular, which means the degree of cavitation erosion on a single image cannot represent the cavitation erosion characteristic at this position.e pixels area of the cavitation erosion images at seven positions and the percentage in the total area of Figure 15 are listed in Table 1.It can be seen that the cavitation erosion amount is different in different locations, and it is larger near the front and smaller developing to the tail.In fact, the actual area of a single picture is too small to reflect the cavitation erosion characteristics of this position due to the random distribution of cavitation erosion pit positions.

Conclusions
(1) e cavitation erosion tests of the Raf61 airfoil were carried out.e periodic cavity structure images of the airfoil surface cavitation process were obtained by laser-CCD system measurement.e micromorphology images of different magnifications of cavitation pits at different locations on the surface of the airfoil were obtained by SEM.
(2) Based on the analysis of cavitation structure and cavitation erosion characteristics, it is found that the cavitation erosion at different positions on the airfoil surface is directly related to the periodic distribution characteristics of the cavity structure.(3) By using the image processing method based on statistics theory established in this paper, the statistical mean and mean square difference of cavity structure distribution can be quantified, that is, the time-averaged value and change rate distribution of cavitation volume can be obtained.(4) By using the image processing method based on edge detection and morphological analysis established in this paper, the distribution characteristics and shape

3. 1 .
Cavitation Erosion Images.After 10 hours of cavitation erosion, SEM was used to observe the cavitation erosion morphology of the hydrofoil surface.Figures4(a)-4(d) are the grey images of cavitation erosion pits morphology with different magnifications.e cavitation erosion morphology appears as near-circular or oval pits and exists independently, around which the unspoilt surface becomes smoother and more compact than the original.

Figure 5 :
Figure 5: Sequence of cavitation structure on hydrofoil (flow right to left).

Figure 6 :Figure 7 :
Figure 6: Convergence verification of algorithm for cavitation structure mean value.

Figure 8 :Figure 9 :
Figure 8: Distribution of cavitation structure mean and standard deviation values.

Figure 11 :
Figure 11: e sketch after the Canny edge detection of Figure 4(c).

Table 1 :
Cavitation erosion area at different positions.