converted houghlines to C++