Corrected line detection algorithm

- it was an error about the roll axis convention
- corrected also the algorithm to be cleaner and faster