Draw a line on an image using equation of line rather than 2 points.

asked 2017-02-12 00:20:14 -0600

BhanuKiran gravatar image

updated 2017-02-12 12:17:42 -0600

I am using Visual Studio, OpenCV 3.2.0.

I want to draw a line on an image . I know the coefficients (a,b,c values in ax+by+c=0). Is there a way to draw a line rather than specifying two points?

edit retag flag offensive close merge delete

Comments

1

No. Calculate where the line crosses the x and y axes and then use those as your points. To my memory, the line endpoints need not be on the image.

Der Luftmensch gravatar imageDer Luftmensch ( 2017-02-12 12:16:52 -0600 )edit

Thanks, I didn't know that!!

BhanuKiran gravatar imageBhanuKiran ( 2017-02-12 14:08:59 -0600 )edit