Skip to main content
. 2017 Jan 22;17(1):207. doi: 10.3390/s17010207
Algorithm 1 Split Bregman for color-flattening.
  • 1:

    procedure COLORFLATTEN(ϵ,λp)

  • 2:

        Initial: z0=zin; d0,b0=0;

  • 3:

        while ||zkzk1||22>ϵ do

  • 4:

            A=βI3n×3n+λpLTL

  • 5:

            v=βzin+λpLT(dkbk)  

  • 6:

            Update zk+1 by solving Azk+1=v  

  • 7:

            dk+1=Shrink(Lzk+1+bk,1λp)  

  • 8:

            bk+1=bk+Lzk+1dk+1  

  • 9:

            k=k+1  

  • 10:

        end while 

  • 11:

        return zk  

  • 12:

    end procedure 

  • 13:

    procedure SHRINK(y,γ)  

  • 14:

        return y||y||×max(||y||γ,0)  

  • 15:

    end procedure