No need conversion RGB to Gray scale. There is an option in imread that allows yo not to use a 3 channel image.

666TODO CHECK Histogram.cpp.
666TODO Start with EdgeDetection.cpp implementation, then with the Hough transform and then with the segmentation algorithm described in the notebook.