University course work. You can use it as example for your studies.
This program implements standart Hough transform algorithm. But it's not uses opencv hough lines function, I do it manualy. OpenCV library needed for standart functions.
Usage: [options]
Options:
-i - image path
-l - limit
$ make
$ ./prog -i lines.png -l 400
Test picture in Hough space: