Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How would you get all the points on a line?

I have detected the presence of lines in an image using the HoughLinesP() function. However, as an output, only the start and end points (coordinates) of the line are calculated by the function. I would however like to store all the points that fall on this line.

I initially thought of iterating from the starting coordinate to the end coordinate. But that gets quite complicated depending on the orientation of the line (horizontal, vertical, diagonal).

Any ideas on how I can achieve this?