Skip to main content
. Author manuscript; available in PMC: 2010 Aug 1.
Published in final edited form as: IEEE Trans Image Process. 2009 Apr 17;18(8):1817–1829. doi: 10.1109/TIP.2009.2021081
Algorithm 3 [Multiresolution multiscale active masks]
Input: Image f, initial number of masks M, initial resolution
level K, scale of the region-based lowpass filter a, scale of
the voting-based lowpass filter b, skewing factor α, harshness
of the threshold β, average border intensity γ.
Output: Collection of masks ψ and final iteration number i.

MRMSActiveMasks(f, M, K, a, b, α, β, γ)
  Initialization
  i = 0, k = K, j = 1, ψ0(k,j)(n)=rand(M), I = f
  Multiresolution block
  while k ≥ 0 do
   Compute coarse version of the image
   f(n) = Hk I (n)
   Multiscale block
   while j ≤ Jk do
    Basic block
    (ψp(k,j),p)=ActiveMasks(f,M,ψ0(k,j),ak,j,b,α,β,γ)
    Change of scale parameter at resolution k
    ψ0(k,j+1)(n)=ψp(k,j)(n)
    j = j + 1, i = i + p
    end while
    Lift mask ψ to the next higher resolution k − 1
    ψ1(k1,1)(n)=ψp(k,j1)(21n)
    k = k − 1
  end while
  return (ψ, i)