# Defect Detection in Striped Images Using a One-Dimensional Median Filter
## 5 Conclusions  
This study proposed a defect detection method for striped images using a one-dimensional median filter. After pre-processing and horizontal alignment image rotation, images were segmented into blocks and intervals. Defects were then found for the blocks and the intervals, respectively. To identify block defects, we used a one-dimensional median filter to generate standard defect-free images. The difference between the standard image and the original image was then used to find the defects. To identify interval defects, we used the image binarization to highlight the defects. Finally, the defect detection results for the blocks and intervals were superposed to obtain all the defects in the entire image. The experiment results show that the proposed method achieved an accuracy of 97.2% based on the correctness of the defect regions. The results demonstrate that the algorithm proposed in this study can effectively detect defects and correctly mark their positions. The proposed method was compared with the deep learning method, and the results show that the average precision by using the proposed method was 0.91 and that by using the deep learning method was 0.74. The proposed method has better robustness in terms of finding the correct bounding boxes for the defects.  
The algorithm used in this paper was developed based on the stripe characteristics of the images. If the images do not have stripes, the algorithm cannot be used. In addition, the stains need to be small (less than m/2 as discussed in the paper), which is valid for the given images. For large stains, it may not be possible to apply the median filter to recover the defect-free images. However, as long as there are some columns in a block that are not affected by the large stains, we can still use the  
Figure 21: The detected defects in an image by using (**a**) the proposed method and (**b**) the deep learning method. The blue bounding box represents the ground truth; the green one represents the bounding box predicted correctly, and the red one represents the bounding box predicted incorrectly.  
periodic characteristics caused by the stripes along the \(y\)-direction in the stain-free columns to recover the defect-free images, which can be used to detect the large stains. However, a lot of noises will also be found. Then a particle analysis can help identify the large stains. This algorithm can be developed as a supplement to the algorithm proposed in the paper so that we can use the proposed algorithm in the paper to find the small defects and then use the supplement to find the large defects. The extension of the proposed algorithm to cover large defects and the optimization of the algorithm to reduce the processing time will be the topics for our future work.  
Conceptualization, W.-C.L., and P.-L.T.; methodology, W.-C.L., and P.-L.T.; software, P.-L.T.; validation, P.-L.T.; formal analysis, P.-L.T.; investigation, W.-C.L., and P.-L.T.; resources, W.-C.L.; data curation, P.-L.T.; writing--original draft preparation, W.-C.L., and P.-L.T.; writing--review and editing, W.-C.L.; visualization, W.-C.L., and P.-L.T.; supervision, W.-C.L.; project administration, W.-C.L.; funding acquisition, W.-C.L. All authors have read and agreed to the published version of the manuscript. This work was financially supported by the \"Center for Cyber-physical System Innovation\" from The Featured Areas Research Center Program within the framework of the Higher Education Sprout Project by the Ministry of Education (MOE) in Taiwan. The authors declare no conflict of interest.