OpenCV Drawing Fucntions cv.line(), cv.circle() , cv.rectangle(), cv.ellipse(), cv.putText()

cv.line()

This is used to draw a line on passed MAT(window part) actually it changes the color of the window pixel from given point to ending given points with adjesting the color and thickness by passing as argument along with MAT and other import attributes
 

 cv.circle()

Similarly it is also USed to create the shape which Circle we passes here the radius and the middle point to the circle


similarly for other functions,  can take information about the argument passed in these functions from official website of the OpenCV but some common arguments are,MAT,  color, thickness, radius, size, initial point, ending point 


cv.ellipse() 

Used to create the ellipse with different different attributes 
To draw the ellipse, we need to pass several arguments. One argument is the center location (x,y). Next argument is axes lengths (major axis length, minor axis length). angle is the angle of rotation of ellipse in anti-clockwise direction. startAngle and endAngle denotes the starting and ending of ellipse arc measured in clockwise direction from major axis. i.e. giving values 0 and 360 gives the full ellipse. For more details, check the documentation of cv.ellipse(). Below example draws a half ellipse at the center of the image.


cv.putText()

it put the Text on given MAT and display it

Comments

Pageviews