Skip to main content
. 2021 Aug 10;21(16):5401. doi: 10.3390/s21165401
Algorithm 1. Rope-strand segmentation and correction method based on steel wire rope segmentation template.
Inputs: wire rope image R(x,y), steel wire rope segmentation template ISEG(x,y)
Output: N(x,y) with strand edge markers
1: detect R(x,y)’s edge with FoGDbED detector and get edge image C(x,y)
2: d=1, Rmax=0, max=1
3: detect edge image C(x,y) with FoGDbED detector
4: ISEG(x,y) Shift distance 1 to get M1(x,y) with vector (dx,dy)
5: get S1(x,y) with Formula (7) and get R1 with Formula (8)
6: Rmax=R1, max=1
7: while dD
8:   d++;
9:   I(x,y) Shift distance d to get Mj(x,y) with vector (dx,dy)
10:   get Sj(x,y) with Formula (7) and get Rj with Formula (8)
11:  ifRmax<Rj
12:    Rmax=Rj,max=d
13:   end if
14: end while
15: N(x,y)=Mmax(x,y)
16: return N(x,y)