# Damage Detection in Wind Turbine Blades Based on an Improved Broad Learning System Model
## 3 Damage Detection in Wind Turbine Blades Based on the CBNLM-BLS
### The CBNLM for Pre-Processing of Images  
Images are inevitably affected by noise during acquisition, storage, recording and transmission, which reduces the contrast of the image and seriously affects its application [28]. In image pre-processing algorithms, the method of mean filter denoising loses feature information in the image, tends to blur the image and is powerless against pretzel noise [29,30]. The above problems can be solved by NLMs. However, NLMs have the problem of a long running time [31]. Its main time-consuming point is the frequent calculation of the mean square error (MSE) of two patches. This paper proposed the use of a chunked, in-parallel approach to speed up the computation of the MSE for two patches, which improved the computational speed of the NLM.  
It is well known that for an image the prefix sums of all its rows are calculated separately to obtain the prefix-sum image. The prefix sum of all columns is then calculated separately for the image of the row prefix sum to obtain the integral image. The flowchart of the complete CBNLM is shown in Figure 3. The critical process of the CBNLM for m-row and n-column images consisted of the following nine steps.  
Step 1: Each row of data is divided into four data blocks, and m \(\times\) (n/4) threads are opened. Each thread computes the prefix sum of the four data blocks, and all threads are computed in parallel.  
Step 2: Each thread corresponds to a row of data and is responsible for calculating the prefix sum of the last data block in all the small blocks in that row, opening m threads.  
Step 3: A total of m \(\times\) (n/4) threads are opened, each corresponding to a small block. For each row, the number in each chunk (except the last number) is added to the last number of its previous chunk to obtain the prefix sum of all rows, starting with the second chunk.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline  & **The Number of Images** & **Images with Damage** & **Images without Damage** \\ \hline Training set & 556 & 266 & 290 \\ Testing set & 185 & 88 & 97 \\ Total & 741 & 354 & 384 \\ \hline \hline \end{tabular}
\end{table}
Table 1: The details of the image dataset.  
Figure 2: The collected images of wind turbine blades. (**a**) A wind turbine blade without damage; (**b**) a wind turbine blade with damage.  
Step 4: Each column of data is divided into chunks of four data blocks each and (m/4) \(\times\) n threads are opened. Each thread computes the prefix sum of the four data blocks in a chunk, and all threads are computed in parallel.  
Step 5: A total of n threads are opened. Each thread corresponds to a column of data and is responsible for calculating the prefix sum of the last data in all the small blocks in that column.  
Step 6: A total of (m/4) \(\times\) n threads are opened. Each thread corresponds to one chunk. For each column, starting with the second chunk, the number in each chunk (except the last number) is added to the last number of its previous chunk to obtain the prefix sum of all columns. This is the integral image of the original image.  
Step 7: Once the integration map is obtained, the neighborhood block area is acquired according to the position of the current point to be filtered on the integration map. The average of the pixel values of all points in the neighborhood block area is quickly calculated, which is the MSE similarity.  
Step 8: The Gaussian weights of the points to be filtered and any point in the search window are calculated from the MSE similarity of the neighborhood blocks.  
Step 9: The filter value is calculated as a weighted average of the pixel values of all points within the search window.  
The images before and after the CBNLM are shown in Figure 4.  
Figure 4: The image before and after the CBNLM. (**a**) The image before the CBNLM; (**b**) the image after the CBNLM.  
Figure 3: Flowchart of the complete CBNLM.