| Algorithm 2. Steel wire rope surface defect detection method based on segmentation template and spatiotemporal gray sample set. |
|
Inputs: Sequence images, time-domain frames Output: Sequence Images containing defects 1: get ROI mask with Formula (1) and Formula (2) 2: 3: while sequence images are not empty 4: get ROI of the real-time image with ROI mask 5: get with RSCM (algorithm 1) 6: 7: if 8: use queues save 9: else 10: get of 11: if the gradient between and the current pixel 12: update by rule of FIFO (first in first out) 13: end if 14: get with Formula (12) 15: if and 16: 17: else 18: 19: end if 20: open operation of the morphological method for 21: analyse connected domain and remove small connected regions 22: end while 23: return |