Distance transforms of sampled functions