画图

#画线
blue = (0,0,255)
cv2.line(image, (300,0), (150,150), blue, 5)
show(image)

#画矩形
red = (255,0,0)
cv2.rectangle(image, (10,10), (60,60), red, 2)
show(image)

#画圆形
image = np.zeros((300,300,3),dtype='uint8')
(cX, cY) = image.shape[1]//2, image.shape[0]//2
white = (255,255,255)
for r in range(0,151,15):
    cv2.circle(image, (cX,cY), r, white, 2)
show(image)
原文地址:https://www.cnblogs.com/yunshangyue71/p/13584491.html