Change the procedure that overlaps the edges on the original image