Optimization of extra perimeters detection