Which function is used to draw line in OpenCV ?

devquora
devquora

Posted On: Feb 22, 2018

 

The cv2.line() method in the OpenCV is used to draw a line.

Syntax

cv2.line(image, start_point, end_point, color, thickness) 

Here the image is the source image where the line should be drawn. Start_point and end_point are the coordinates for the starting and ending point of the line. They are represented as a tuple value of x & y. color represents the color for the line. BGR represents the Blue Green Red color values of the line. Thickness represents the thickness of the line in px.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    OpenCV interview questions

    What is OpenCV?

    OpenCV is Open Source Computer Vision Library relaesed under BSD license, which is free for both commercial and academic..

    OpenCV interview questions

    Enlist different types of video filters available in OpenCV ?

    Blurring, Smoothing, Distortion, Warp Stabilizer, alpha extract, bilateral, color matrix, chrome hold are few video filters available in OpenCV....

    OpenCV interview questions

    What is use of Mat class in OpenCV?

    The primary use of the Mat class in OpenCV is to store and obtain the values of any image. This class is used in representing the n-dimensional array and is utilized in storing data of the image of gr...