Figure-ground segmentation using metrics adaptation in levelset methods