Continue finishing grubcut algorithm (can not be compiled.