话不多说,上代码,看结果。
import cv2
import numpy as np
img = np.zeros((512, 512, 3), np.uint8)
cv2.line(img, (0, 0), (100, 100), [255, 0, 0], 20, cv2.LINE_AA)
cv2.circle(img, (200, 200), 50, [200, 200, 200], 2, cv2.LINE_AA)
cv2.circle(img, (300, 300), 50, [200, 200, 200], -1, cv2.LINE_AA)
cv2.imshow('img', img)
if cv2.waitKey(0) & 0xFF == 27:
exit(0)
cv2.destroyAllWindows()