Update: We look 5 pixels up and down instead of 3 to correct line merging