Abstract

Line scan cameras are widely used to acquire pavement images due to their imaging characteristics and low price, but the acquired pavement line array images often have uneven brightness. To eliminate the impact of image greyscale unevenness on subsequent processing, an automatic dodging method is proposed based on mask dodging algorithm. The main idea of the method is to chuck the images into sub-blocks with the approximate greyscale change degree by introducing the cumulative slope conception. The rules to determine the filter size and the parameters required to adjust the sub-block are self-adaptive. The contrast stretching method is improved to make it more suitable for pavement images. The method is compared with other classical dodging algorithms, and the results show that the proposed automatic dodging method is better than others intuitively and quantitatively. The image length has no significant influence on it. Moreover, the crack segmentation results indicate that the proposed dodging method is effective for line array images, and a more accuracy crack segmentation could be achieved if the images preprocessed by the proposed dodging methods.

1. Introduction

With the successful development of the transport industry, the total mileage of China’s roads is increasing year by year, while many roads are gradually turning to the maintenance and repair stage. The pavement cracks, which can threaten traffic safety and shorten the service life of roads, are the key inspection content of road maintenance. Traditional crack detection mainly relies on manual discrimination, the detection process is time-consuming and laborious, and the detection results are easily affected by the subjective factors of the inspector. Therefore, the automatic crack detection, combining the image acquisition and preprocessing, the crack identification and evaluation, has gradually become the mainstream method [1]. However, poor illumination of the acquisition environment or uneven distribution of fill light sources can lead to uneven distribution of greyscale and reduced contrast in the acquired pavement images [2], and bring about more difficult crack feature extraction and inaccurate crack assessment. Therefore, the homogenization of unevenly illuminated images is an essential step in automatic detection.

The existing dodging methods for nonuniform illuminated images can be divided into three categories. The first category is based on the additive model, in which the low-pass, morphological, and homomorphic filters are used to simulate the background image and achieve global grayscale correction [2]. Qingquan and Qingwu achieved the dodging of pavement images based on the principle of electronic print cameras [3]. Li et al. proposed a variational adaptive dodging method based on the Mask model to obtain the ideal image [4]. Zhen et al. improved the Mask dodging method based on wavelet transform to obtain more accurate background images [5]. The second category is based on the illumination-reflection model [6]. Jobson et al. proposed the single-scale Retinex (SSR) algorithm and the multiscale Retinex (MSR) algorithm to estimate illumination based on this model and eliminate the effect of uneven illumination [7]. Wang et al. proposed a nonlinear function transform-based image correction method based on this model and multiscale theory [8]. Jung et al. used adaptive smoothing based on Retinex theory to eliminate the effect of illumination [9]. Ng and Wang proposed a total variation model for Retinex to describe the reflection function [10]. A variational Bayesian model was also used to estimate the light component in the Retinex model [11]. The third category is based on the statistical features of the images. By improving the multiplier method proposed by Cheng and Miyojim [12], Ying and Salari divided the pavement image into smaller rectangles and used the mean and multiplier of each window to remove non-uniform backgrounds [13]. Khan et al. independently equalized the subhistograms obtained from the segmentation to improve the illumination unevenness [14]. Ruiz-del-Solar and Quinteros applied Illumination Plane Subtraction (IPS) together with histogram equalization (HE) to reduce the effects of extreme illumination [15]. Parrany and Mirzaei used the first-order statistics of each pixel’s local neighborhood to calculate a local adaptive threshold matrix to obtain background images [16]. Yu et al. used least squares (LS) and minimum mean square error (MMSE) to estimate the illumination deviation of the background image [17]. Singh et al. used the combined information across multiple images to complete a polynomial fit for the illumination correction function (ICF) [18]. The above methods have good results in processing images captured by photography, video technology, and surface array cameras [19]. However, they are less effective in dealing with images with stripe noise, which could be caused by auxiliary illumination or other reasons when line scan cameras are used. Line scan cameras are widely used in image acquisition because of their low cost, high accuracy, high acquisition rate, and flexible control of the acquisition range. So, the appropriate image dodging methods should be designed for these images.

For uneven illumination of line array images, Li and Liu used a sine function to complete a least-squares fit of the difference between each pixel point and the mean value of the pixels in that row. They completed the greyscale correction pixel by pixel based on the fitting results [20]. Carfantan and Idier proposed a statistical linear destriping (SLD) method for the stripe noise in these images [21]. By analyzing the various factors that cause uneven illumination of line array images, and calculating the multiplicative and additive components of the nonuniform correction coefficients for images, Song et al. applied correction coefficients on a pixel-by-pixel basis [22]. The existing methods operate directly on the pixel points but fail to accurately simulate the actual background greyscale of the line array image.

An automatic dodging method for uneven illumination of line-array sweep images is proposed in this study, by which the actual background greyscale of images could be acquired. Firstly, the greyscale distribution characteristics of the line array image describing the road surface are analyzed. The original image is reasonably subblocked according to this characteristic to obtain a more accurate background image. Secondly, the greyscale difference between the subblocks is adjusted, and the image’s contrast is stretched. Then, the results of the dodging process are evaluated in terms of subjective visual and objective indicators, showing that the processing effect of the method in this study is significant and better than other existing methods. Finally, the method is applied to the preprocessing step of crack segmentation to provide a good image basis for subsequent processing [23, 24].

2. Image Characterization

The line scan camera has a high acquisition rate and short imaging exposure time, and a line light source is required for fill light to ensure the shooting effect. The instantaneous field of view of a line scan camera is one-dimension, and the road images are acquired by the push broom method [21], so the line array images have the same lighting environment in the camera movement direction. However, stripes exist in the horizontal direction of acquired images due to the uneven energy distribution of the fill light source and the response difference of sensors [25], as shown in Figure 1. The width, number, and greyscale range of stripes depend on the energy distribution of the line light source. The images are usually saved as a grayscale pixel matrix in the computer, and the greyscale values can be defined by:where represents the pavement background, which is low-frequency, and could be considered as a fixed value; and represent the pavement cracks, and random noise respectively, both of them are high-frequency only appeared in some pixels; represents the auxiliary illumination of low-frequency high amplitude component, and it is considered as the image background.

Due to the complexity of the road environment, the acquired road images often contain other information shown in Figure 1, such as white lane lines, round or square manhole covers, etc. These unwanted interferences will certainly affect the dodging processing results. According to the acquisition and fill light methods of line array images, the uneven illumination phenomenon only occurs in the horizontal direction, which is perpendicular to the direction of motion. Thus, the two-dimensional image could be compressed into one dimension by averaging the greyscale values of each column, and the column-averaged greyscale can be obtained by:where is the greyscale matrix of the original image and is the number of column pixels.

According to equation (2), the greyscale distribution in the horizontal direction of each image in Figure 1 are shown in Figure 2. The greyscale distribution of the four images is approximately similar. The narrower and denser the stripes in the original image, the more the number of abrupt changes in the greyscale value at the corresponding location in Figure 2; the darkest or brightest local locations in the original image are reflected as abrupt changes in the greyscale value in Figure 2. The locations of the white lane lines in Figure 1(b) reflect an overall increase in greyscale values in this range; the square and round manhole covers in Figures 1(c) and 1(d) reflect an overall decrease in greyscale values in this range. A comparison of the original image with the greyscale distribution map shows that the greyscale distribution map provides a complete description of the greyscale characteristics of the original image.

3. Methodology

3.1. Mask Dodging Algorithm

The mask dodging algorithm is proposed for the sun printing of photographs [3] and is a more commonly used dodging method to eliminate the greyscale difference of images. According to the Mask principle, the original images contain two components, and is described aswhere represents an unevenly illuminated original image, represents an evenly illuminated image, and represents the background image.

This mathematical model assumes that the uneven illumination of an image is caused by the unevenness of the background image. Thus, an evenly illuminated image could be achieved by subtracting the background component as,where denotes the greyscale value offset to ensure that the greyscale value is between 0 and 255 after subtracting the background image from the input image, and it is selected as the mean greyscale value of the original image so that the grey level of the resultant image close to the original image.

The background image is acquired by using a Gaussian low-pass filter from the original image:where is the inverse discrete Fourier transform (IDFT), is the DFT of input image , and is a Gaussian low-pass filter aswhere is the distance from the centre of the frequency rectangle, u and are discrete frequency variables in the range of [0, p − 1] and [0, q − 1], respectively. For a digital image of m × n, p = 2m, q = 2n. is the filter scale, which represents the extension of the metric about the centre. Increasing the filter scale will improve the accuracy of the background image simulation. However, it can also misrepresent some features as background, and therefore the filter size should not be too large.

The subtraction operation in equation (4) will reduce the dynamic range of the greyscale values of the resulting image, so the contrast stretching method is used to increase the contrast of the image, which can be determined by:where is the contrast stretching parameter and takes a value (−127, 127); the larger the value of , the greater the stretching. But if the value of V is too larger, the pixel values outside the range (0, 255). So, it should be determined according to the actual situation of the image. To remove the greyscale values that exceed (0, 255), the greyscale values are regarded as 0 or 255 if they are less than 0 or greater than 255 respectively.

3.2. Improved Mask Dodging Algorithm

In the mask dodging algorithm, the filter scale is selected manually and there is a lack of self-adaptability. By directly applying the mask dodging algorithm to the line array images with pavement cracks, it was found that a better dodging effect could be acquired with an increasing filter window size, but the crack characteristics in the image will weaken, and it is adverse for the crack identification. Moreover, the contrast stretching effect is not obvious. To address the problems of the classical mask dodging method in processing line array images, an improved mask dodging algorithm is proposed and the main changes contain image chunking, filter size selection, greyscale adjustment between sub-block images, and contrast stretching.

3.2.1. Image Chunking

Due to the single greyscale change, the mask dodging algorithm has a very good effect on images with uneven illumination phenomenon of light in the middle and dark around. However, the greyscale distribution mutates many times perpendicularly to the direction of motion in the line array image, and these mutations will affect the dodging effect of the line array image. It is proposed to be divided into some sub-blocks with small grayscale differences in each and applying the dodging method on each sub-block.

As shown in Figure 3, the greyscale distribution curve I (x) contains many peaks and valleys, and it could be divided into segments with a knife-blade-shape by the adjacent peaks and valleys plus the two endpoints of the curve as demarcation points. Thus, the greyscale distribution curve I (x) could be formed by connecting the knife-blade curves, and the greyscale on each knife-blade curve could be fitted by a cosine function aswhere denotes the average greyscale of the xth pixel column; i denotes the ith demarcation point on the curve I (x), i = 1, 2, …, n + 1; n is the maximum number of peaks and valleys; A, ω, φ, and h denote the amplitude, angular frequency, initial phase, and offset, respectively.

As the peaks and valleys are located at the local extremum points of the curve I(x), the parameters of equation (8) could be calculated aswhere and are the greyscales at the pixel column xi and xi−1, respectively; xi and xi−1 are the pixel column of the ith and i − 1th demarcation points on curve I (x), respectively. Except x0 and xn+1, which are the two endpoints of the curve, the other demarcation points are the extremum points that belong to

As the knife-blade curves describe the greyscale distribution along x direction, the greyscale change degree could be reflected by the derivative of the knife-blade curve:

The maximum derivative of a knife-blade curve could be achieved aswhere is the maximum derivative of the knife-blade curve between the i − 1th and ith demarcation points, and is used to represent the greyscale change degree of this knife-blade curve.

To ensure each sub-block has the approximate greyscale change degree, the cumulative slope is introduced aswhere ki is the cumulative slope of the first i segments.

If the image is intended to be divided into m sub-block, the cumulative slope of each sub-block should bewhere is the cumulative slope of the first j sub-block, j is the sub-block number, j = 1, 2, …, m.

However, the actual cumulative slope of each sub-block cannot be exactly equal to calculated by equation (14), so the split point is selected aswhere is the jth sub-block split point, and are cumulative slopes adjacent with and as their positions.

3.2.2. Filter Size

The Gaussian low-pass filter is introduced in equation (5) when acquiring the background image, and the filter scale should be carefully selected to ensure a better leveling effect with no significantly weakened crack features. The concept of signal-to-noise ratio in image information is proposed to improve the adaptiveness of the method, defining:where is the signal-to-noise ratio of the ith sub-block image, is the sub-block image number; and are the average value and standard deviation of the greyscale values of the block image, respectively.

The signal-to-noise ratio is used as the filter window size when acquiring the background of the ith sub-block images.

3.2.3. Grayscale Adjustment between Sub-Block Images

After the dodging process of each sub-block images, there will be some greyscale differences between each sub-block image, and it is considered a greyscale adjustment problem between multiple images. The Wallis transform method is used to adjust the greyscale of each sub-block image [26]. The algorithm needs to select a suitable target image and use its mean and variance parameters to adjust the other images to achieve greyscale correction. The classical Wallis algorithm is given by:where and are the greyscale value of ith sub-block image at point before and after Wallis transformation. and are the average greyscale value and standard deviation of the ith sub-block image respectively; and are the target average greyscale value and target standard deviation.

By specifying the target average greyscale value and target standard deviation one desired, the original image could have the same average greyscale value and standard deviation as the target values after Wallis transformation. To improve the overall brightness of the image to be processed, the sub-block image with the largest average greyscale value was selected as the standard image.

3.2.4. Contrast Stretching

The contrast stretching method shown in equation (7) is suitable for remote sensing image processing, with the stretching parameter . When V < 0, the original image greyscale range shrinks toward the middle with 127 as the origin value; when V > 0, the original greyscale range extends to both ends with 127 as the original value. The overall greyscale value of the road image containing cracks is lower compared with the remote sensing image, so the original value of the transformation is reduced to make it more suitable for the contrast stretching of the road image. The adjusted contrast stretching method is:where is the greyscale threshold and is the contrast stretch parameter; the value of is selected as 0 if it is less than 0, and 255 if it is greater than 255. The greyscale threshold is defined by:where , are the mean and standard deviation of the greyscale values of the image to be processed; is the correlation coefficient, the larger the value of , the smaller the range of values for and the smaller the origin value used for stretching.

3.2.5. The Automatic Dodging Method Processing Process

The processing flow of the proposed dodging method is shown in Figure 4. The specific processing steps are as follows:(1)Obtain the grey distribution of the original image according to equation (2). Calculate the degree of greyscale change of each segment of the image according to equation (12).(2)To chunk the original image according to the calculation result of step 1 and the number of chunks to ensure that each sub-block image’s degree of grey change is approximate.(3)Determining the parameters of the Gaussian low-pass filter according to equation (16), completing the subtraction operation of the original image and the background image according to equation (4).(4)Selecting the sub-block with the maximum brightness as the standard image and adjusting the grayscale difference between the sub-blocks according to equation (17).(5)Completing the contrast stretching process of the image according to equation (18).(6)Evaluating the processing result quantitatively, and if this result meets the requirements, output the processing result; otherwise, increase the number of sub-blocks and repeat steps 2–5.

3.3. Crack Segmentation

To verify that the automatic dodging method proposed in this study can provide a good image base for the subsequent processing of pavement images and highlight the necessity and importance of the automatic dodging method, the crack segmentation process is performed on the images before and after dodging, and their crack segmentation results are compared. The crack segmentation methods used in this section are the improved minimum path selection method and the pixel-level segmentation method based on U-Net convolutional network.

3.3.1. Minimal Path Method

Amhaz et al. propose a minimal path selection (MPS) method for 2D crack images [27, 28]. This section focuses on some improvements to this method’s path endpoint selection strategy and adjusts the region growth quasi-measurement used for fracture width estimation.

The shortest path problem is a classical algorithmic problem in graph theory, which aims to find the shortest path between two nodes so that the sum of the weights of its constituent edges is minimized. As shown in Figure 5, (A, C, E, D, F) is the shortest path between vertices A and F in the weighted directed graph. The shortest path has nothing to do with the number of nodes passed, but with the weight of each edge and the use of the cost function to count the weights of each path.

The pavement crack has a curve-like shape and its greyscale value is lower than the pavement background, so the pavement cracks are considered as paths consisting of pixel points with low greyscale value, and the greyscale value cost of the path is described using cost function [27]:where denotes the curve in the image with length , the first and second terms are the first and second-order derivatives of that curve, and and are the corresponding weighting coefficients. The third term is the external force. Here, we consider an external force based on grey levels. The first two terms are mainly to ensure the smoothness of the curve, but the actual pavement cracks are not very smooth. By omitting the first two terms, the cost function of equation (20) retains only the grey value weights:where and are the starting point and endpoint of the curve , respectively, and is the greyscale value at point on the curve . The start and end points are known, and the objective is to find the path with the lowest greyscale value, in which case Dijkstra’s algorithm works well [29, 30].

The crack image processing flow based on the improved minimum path method is:(1)Preprocessing: The line array image is firstly dodging processed using the improved mask dodging algorithm. Then the manhole cover region in the image is identified using the Hough transform method, and the manhole cover region is set to the average greyscale of the image to avoid its details interfering with the crack segmentation.(2)Selection of path endpoints: According to the characteristics of the linear-like distribution of cracks, the image is divided into strip sub-blocks of a certain size according to the horizontal and vertical directions. The pixel point with the lowest greyscale value in the sub-blocks is selected as the endpoint of the minimum path, and the set of endpoints is the subset of the crack pixel points,where is the set of pixel points with the lowest greyscale value for each horizontal sub-block and is the set of pixel points with the lowest greyscale value for each vertical sub-block. Here, indicates that the size of sub-block i is , n is the set size, and and h are the image width and height, respectively. However, there are certain pseudo-endpoints in this subset, whose grayscale value is the lowest locally but does not belong to the crack region. So the endpoints in this subset can be filtered by:where and are the mean and standard deviation of the greyscale of the image, and is the correlation coefficient, it is chosen according to the actual situation of the image.(3)To improve the efficiency of Dijkstra's algorithm, the search range is constrained within 2n pixels, where n is the set size of the sub-block image in the previous step.(4)Postprocessing: The obtained minimum path width is a single pixel, which does not match the actual situation of the crack. So, the pixel points of the path are used as seed points to aggregate the surrounding pixel points iteratively using the 8-neighborhood region growth method, and the improved region growth criterion is defined by:where is any point in the 8-neighbourhood, is the average of the greyscale of all seed points, and is the greyscale threshold. Finally, the smaller isolated noise areas are removed by the connected domain marking method [31, 32].

3.3.2. U-Net Convolutional Network Model

U-Net is a modified fully convolutional neural network model with no fully connected layers in the network structure, and which can process images of arbitrary sizes [33]. It was first proposed by Olaf et al. for the segmentation of neuronal structures and was mainly used to process medical images in the early days. In recent years, the U-Net networks have also been applied to remote sensing image segmentation, road detection, and other fields [34].

The U-Net network structure is U-shaped and is a typical encoder–decoder structure, as shown in Figure 6. The left side of the structure is the backbone feature extraction network, which extracts image features and obtains deep semantic information through four convolutional pooling operations. The right-hand side of the structure is used for feature recovery by up-sampling the restored pixels and fusing feature maps of the same resolution from the encoder network to improve the accuracy of the results by combining low-level semantic information with high-level semantic information.

The cross-entropy function is used as the loss function of this network model, and its learning rate is set to 0.0005, and the number of iterations is 100. The values of the loss function in the training and validation sets and the changes of mean pixel accuracy (MPA) and mean intersection over union (MIOU) in the validation set were recorded [35]. The results are shown in Figure 7.

4. Experimentation and Analysis

In this study, the proposed automatic dodging method is tested on a dataset containing line array pavement images acquired by a Laser Crack Measurement System (LCMS). The acquisition system uses line laser fill light, which can measure at speeds of up to 100 km/h and still guarantee millimeter resolution. To expand this dataset, we cropped some of the images in the dataset, and we used 243 of these images to test the dodging effect. The test program was written using python 3.7, and the experimental platform was an Intel i5-5200U processor with 8 GB of RAM and a Windows operating system.

4.1. Quality Evaluation

The common methods used to deal with uneven illumination are the Mask dodging algorithm, the Retinex enhancement method, the homomorphic filtering method, and the Wallis transform. The Retinex method separates the illuminance component from the original image and retains the reflection component. In contrast, the homomorphic filtering method removes the corresponding multiplicative noise by estimating the low or high-frequency components by the filter function. Four selected line array images were processed by different methods to verify the dodging method proposed, and the results are shown in Figure 8.

4.1.1. Qualitative Evaluation

For the four different images shown in Figure 8, the Mask method eliminated the wider stripes in the original image and faded the narrow stripes slightly; however, the result is an overall darker image and the crack features are weakened. The Retinex enhancement method results in an overall brighter image but does not eliminate the narrow stripes in the original image, and its dodging effect is average. The result of the homomorphic filtering method is a moderately bright image, but there is a significant loss of the crack feature, which makes the image blurred. The apparent block could be seen with the images processed by the Wallis transform method, and the dodging effect is not obvious. The proposed method in this study removed the banding streaks in the original image, which has an apparent dodging effect, a clear image detail, and good retention of the fracture features.

4.1.2. Quantitative Evaluation

The mean of image, standard deviation, image entropy, average image gradient, and luminance distribution value is employed to quantitatively evaluate the image after dodging. The mean and standard deviation of the greyscale value determine the brightness and contrast of an image.

Image entropy is a statistical form of features that reflects how much average information is in an image. The one-dimensional entropy of an image represents the aggregation characteristics of the grayscale distribution in the image, and it is defined as [8]:where pi represents the proportion of pixels with a greyscale value of i in the image.

The average image gradient reflects the detail contrast and texture transformation. The larger the value, the clearer the image, and it is calculated by [8, 36]:where and are the first-order difference value of pixel in the x and y directions, respectively.

The luminance distribution value of an image is defined as the standard deviation of the average luminance of its sub-blocks and reflects the luminance differences of an image. The images were divided equally into 5 × 5 blocks in this study.

The quantitative evaluation parameters of the four original images and dodged images are listed in Table 1. It is shown that the Mask method has the closest greyscale range to the original image, but its standard deviation, image entropy, and average image gradient values are the smallest. The results indicate that the processed image is slightly blurred and some information is lost during processing. The Retinex enhancement method produced the brightest resultant images. Their luminance distribution values were low, but their image entropy and average image gradient values were low, i.e., the method results in a partial loss of information in the image. The homomorphic filtering method has the largest luminance distribution values, i.e., it is considered to have a more significant variation in the grey values in each region of the image, so its dodging effect is general. Even though the images dodged by the Wallis transform method have the smallest luminance distribution value, the existing block is beyond its ascendancy. Processed by the proposed method, the images are higher than the original image in the mean grey value, outperforming the other methods in terms of standard deviation, image entropy, and average image gradient value of the image, ensuring the dodging effect of the image and the contrast of the image.

4.2. Dodging Time

To verify the practical application value of the automatic dodging method in this study, the running time required to process 100 line array crack images of 701 × 525 pixels in size in the statistical data set, and compare the running time of this method with that of Mask method. The statistical results are shown in Table 2.

The proposed automatic dodging method is based on the Mask method with the addition of adaptive chunking and greyscale adjustment operations. So the running time of the method is longer than that of the Mask method.

4.3. Crack Segmentation Results
4.3.1. Improved Minimal Path Method

Following the process described in Section 3.3.1, the crack areas were segmented using the improved minimal path method for the pavement images before and after dodging. The results are shown in Figure 9, where the blue areas in the figures are the accurately extracted crack part, while the green areas are the pseudo cracks extracted for error. By comparing the crack segmentation results, it can be seen that the original image has few blue areas, in contrast, many green areas appear at the dark stripes, whose greyscale values are similar to the cracks, and they are easily misjudged as crack areas and also interfere with the segmentation of the actual crack areas. After dodging, the crack image has no noticeable dark stripes, so there are more blue areas in the image, which characterize the crack well, and fewer green areas.

4.3.2. U-Net Convolutional Network Model

The convolutional network model trained in Section 3.3.2 was used to segment the cracked areas in the pavement images before and after dodging, and the segmentation results are shown in Figure 10.

The segmentation results in Figure 10 are very close, so the confusion matrix was used to quantitatively evaluate the crack segmentation results. The pixel points can be divided into four categories, TP (true positives): truly cracked pixels detected correctly; FP (false positives): noncracked pixels detected incorrectly; FN (false negatives): truly cracked pixels not detected; TN (true negatives): correctly labeled background pixels. The segmentation results were evaluated quantitatively using the accuracy P, recall R, and F1 score metrics [27], and the results are shown in Table 3.

The accuracy P reflects the proportion of falsely detected noncracked pixels.

Recall R reflects the proportion of actual cracks not detected by:

The F1 score represents the summed average of accuracy and recall.

Analysis of the data in Table 3 shows that the images after dodging have a higher crack segmentation accuracy and recall than the original images; the F1 value of the segmentation results can be improved by more than 5%.

Therefore, the analysis and observation of the crack segmentation results obtained by the improved minimum path method and the U-Net network model indicate that the proposed dodging method is effective for line array images. A more accurate crack segmentation could be achieved if the proposed dodging methods preprocess the images.

5. Discussion

Line scan cameras are commonly used to inspect continuous materials, where the length of the acquired image is determined by the acquisition time, and therefore the image length is flexible. In this section, the proposed automatic dodging method is used to process line array images with different lengths to investigate whether the length of the image has a significant effect on the effectiveness of this method. Images with length L equal to 300, 600, and 900 pixels were processed separately, and a set of the resulting images was selected for presentation, as shown in Figure 11. The resultant images were analyzed quantitatively, and the results of the evaluation parameters are shown in Table 4.

According to Figure 11, the dodging effect of the three images with different lengths is obvious; all of them eliminate the banding in the original image and retain the crack characteristics well. From a visual point of view, there is no significant difference in the dodging effect of the three images, and their greyscale is evenly distributed.

The evaluation parameters in Table 4 show that the greyscale range of the image after dodging is slightly higher. Moreover, the values of its standard deviation and the average image gradient are higher than those of the original image, which indicates that the contrast stretching effect of this method is significant. The image entropy is close to the original image, which means that the information loss during the dodging is small. The luminance distribution value is much smaller than the original image, and its dodging effect is obvious. The evaluation parameters of the different length images are close to each other, which indicates that the image length has no significant difference in the dodging effect.

6. Conclusions

The main contribution is an improved mask dodging method based on the idea of chunking to solve the uneven brightness of pavement line array images. There are three main points of improvement of the method.(1)The chunking of images into sub-block before mask dodging algorithm. After compressing the image to one dimension by averaging the greyscale values of each column, the image could be chucked into some sub-blocks with the approximate greyscale change degree by introducing the cumulative slope conception, which could reduce the dodging difficulty and improve the dodging effect.(2)The automatic dodging method proposed is highly adaptive, which is reflected in three aspects: the sub-block numbers could be auto-adjusted according to whether the dodging result meets the threshold for preset evaluation parameters, the filter size required to acquire the background image is determined by the signal-to-noise ratio of the image, and the parameters required to adjust the brightness difference among the sub-blocks are calculated by the statistics of sub-block images.(3)The contrast stretching method is improved to be more suitable for road images with lower greyscale value, thus improving the contrast between crack features and background.

The dodging evaluation of different pavement crack images shows that the automatic dodging method proposed is better than the other four methods, and the image length has no significant influence on it. Moreover, the crack segmentation results indicate that the proposed dodging method is effective for line array images, and a more accurate crack segmentation could be achieved if the images are preprocessed by the proposed dodging methods.

Data Availability

The data that support the findings of this study are available from the corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest.

Acknowledgments

This research was funded by National Natural Science Foundation of China, grant no. 52175145.