Added 90° angle check for line pixel