Skip to main content
. 2017 Jul 1;17(7):1544. doi: 10.3390/s17071544
Algorithm 1 Depth recovery by asynchronous cellular automata.
Input: color image: IcC; depth image: Idd;
Output: enhanced depth image: Idd;
Initialize: condition flag: ktrue;
1: for pP do
2: for qN(P) do
3:   NDMp,qg(CpCq2);
4: end for
5: end for
6: for pP do
7: if dp0 then
8:    θp1;
9:    bptrue;
10: else
11:    θp0;
12:    bpfalse;
13: end if
14: end for
15: while k=true do
16: kfalse;
17: for pP do
18:    if bptrue then
19:     for qN(p) do
20:      if NDMp,q·θq>θp then
21:       dpdq;
22:       θpNDMp,q·θq;
23:       ktrue;
24:      end if
25:     end for
26:    end if
27: end for
28: end while