Skip to content

Instantly share code, notes, and snippets.

@takahub1
Created September 8, 2018 11:34
Show Gist options
  • Save takahub1/ae7604a261d3f6bc81e98f130fd4f344 to your computer and use it in GitHub Desktop.
Save takahub1/ae7604a261d3f6bc81e98f130fd4f344 to your computer and use it in GitHub Desktop.
import cv2
import numpy as np
import random
img = np.full((240, 240, 3), 255, dtype=np.uint8)
cv2.ellipse(img, ((random.randint(60, 180), random.randint(60, 180)),
(random.randint(10, 60), random.randint(10, 60)), random.randint(0, 90)), (0, 0, 0),
thickness=-1)
cv2.imwrite('opencv_draw_etc.png', img)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment