LineDetection code written in C++ (Qt) and OpenCV