cpp/cuda version for Curve-Hough-Transform