Skip to main content
. 2017 Jan 23;4(1):011009. doi: 10.1117/1.JMI.4.1.011009

Algorithm 1.

Pseudocode for GrowCut algorithm.

//for every cell p
for all p in the image
//copy the previous state
   label_new = label;
   strength_new = strength;
// all neighbors q of p attack
    for all q neighbors
    if [attack_force*strength (q)>strength_new (p)]
    label_new (p) = label (q)
    strength_new (p) = strength_new (q)
    end if
end for
end for