Add Line Detection Algorithm