Skip to main content
. 2018 Nov 30;18(12):4203. doi: 10.3390/s18124203
Algorithm 1 BIB algorithm.
Input: Region R, threshold T, the four coordinates (xA,yA), (xB,yB), (xC,yC), and (xD,yD), and the four sensor values fA, fB, fC, and fD of all Si, the heights and the widths of all Si
Output:C^T
1: fori1,mdo
2: SSi.
3:  Calculate a11, a10, a01, and a00 with reference to S.
4: if a110 then
5:   u^u+a01a11
6:   v^v+a10a11
7:   Qa00a11a01a10a11
8:   ETQa11
9:   Calculate HE(A^), HE(B^), HE(C^), HE(D^).
10:   SHE(A^)HE(B^)+HE(C^)HE(D^).
11:   if a11>0 then
12:    S^TW·H·S
13:   else
14:    S^TW·H·(1S)
15:   end if
16: else
17:   U{}
18:   for j[A,AB¯,B,BC¯,C,CD¯,D,DA¯] do
19:    if j in [A,B,C,D] then
20:     if f^(uj,vj)T then
21:      Add j to U.
22:     end if
23:    end if
24:    if j in [AB¯,BC¯,CD¯,DA¯] then
25:     if j is intersected with the line f^(u,v)=T then
26:      Add the intersection to the ordered set U.
27:     end if
28:    end if
29:   end for
30:   if U=, |S^T|=0 then
31:    |S^T|0
32:   else
33:    |S^T| is equal to the area of the polygon of which the vertexes are listed in set U.
34:   end if
35: end if
36: S^TiS^T
37: end for
38: C^T1R·i=1mS^Ti