# Distance between a robot and a line

I want to calculate the distance between the current position of my robot and the lines that are constructed with my function cv::line. My line is resultant of a hough transform with the function HoughLinesP. How can I calculate the distance? Or instead,how can I get the position of the robot and the lines?

Thanks! Any help will be appreciated.

If you have an explicit mathematical representation of the line: https://en.wikipedia.org/wiki/Distanc...