zhiqingstudy

Be a young person with knowledge and content

Opencv's api for drawing ellipses is ellipses. Let's take a look at the attributes of ellipses.
Ellipse (img, center point, half of length and width, angle, which angle to start from and end to)
Img: select which picture to draw on
Center point: specify where the center point of the ellipse is
Half of the length and width: the ellipse is drawn in a rectangle. Here, fill in half of the length and width of the rectangle
Angle: rotation angle of rectangle
From which angle: if the angle is 360 degrees, the whole ellipse will be drawn. If the angle is not 360 degrees, the sector will be drawn
To which angle: specific ending angle
How does Opencv draw an ellipse? Drawing Method of Opencv Ellipse

import cv2
import numpy as np

# 绘制一个黑色背景图
img=np.zeros((480,640,3),np.uint8)

# 画椭圆
cv2.ellipse(img,(200,300),(100,50),0,0,360,(0,0,255))
# 显示
cv2.imshow('img',img)
cv2.waitKey(0)
comment
head sculpture
Code:
Related

Why you shouldn't stay at a job for more than 2 years?

3 harsh facts long-distance relationships

how to keep your girlfriend interested in a long-distance relationship




Unless otherwise specified, all content on this website is original. If the reprinted content infringes on your rights, please contact the administrator to delete it
Contact Email:2380712278@qq.com

Filing number:皖ICP备19012824号