Skip to content

Commit 397cfd5

Browse files
committed
update positions and img size
1 parent 79b60a4 commit 397cfd5

File tree

1 file changed

+7
-22
lines changed

1 file changed

+7
-22
lines changed

openCvSymbolDrawing.py

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,17 @@
44
import numpy as np
55

66
#output image
7-
img = np.zeros((512,512,3), dtype="uint8")
8-
9-
##cv2.imshow("img",img)
10-
##cv2.waitKey(0)
11-
##cv2.destroyAllWindows()
12-
13-
##img = cv2.circle(img, (256,80), 60, (0,0,255), -1)
14-
##img = cv2.circle(img, (256, 80), 20, (0,0,0), -1)
15-
##img = cv2.circle(img, (176, 200), 60, (0,255,0), -1)
16-
##img = cv2.circle(img, (176, 200), 20, (0,0,0), -1)
17-
##img = cv2.circle(img, (336, 200), 60, (255,0,0), -1)
18-
##img = cv2.circle(img, (336, 200), 20, (0,0,0), -1)
19-
##font = cv2.FONT_HERSHEY_SIMPLEX
20-
##img = cv2.putText(img, "OpenCV", (196,296), font, 1, (255,255,255))
21-
##cv2.imshow("img",img)
22-
##cv2.waitKey(0)
23-
##cv2.destroyAllWindows()
7+
img = np.full((360, 512, 3), 255, dtype="uint8")
248

259
img = cv2.ellipse(img, (256, 80), (60,60), 120,0,300,(0,0,255),-1)
26-
img = cv2.ellipse(img, (256, 80), (20,20), 120,0,300,(0,0,0),-1)
10+
img = cv2.ellipse(img, (256, 80), (20,20), 120,0,300,(255,255,255),-1)
2711
img = cv2.ellipse(img, (176, 200), (60,60), 0,0,300,(0,255,0),-1)
28-
img = cv2.ellipse(img, (176, 200), (20,20), 0,0,300,(0,0,0),-1)
12+
img = cv2.ellipse(img, (176, 200), (20,20), 0,0,300,(255,255,255),-1)
2913
img = cv2.ellipse(img, (336, 200), (60,60), 300,0,300,(255,0,0),-1)
30-
img = cv2.ellipse(img, (336, 200), (20,20), 300,0,300,(0,0,0),-1)
14+
img = cv2.ellipse(img, (336, 200), (20,20), 300,0,300,(255,255,255),-1)
3115
font = cv2.FONT_HERSHEY_SIMPLEX
32-
img = cv2.putText(img, "OpenCV", (196,296), font, 1, (255,255,255), 4, cv2.LINE_AA)
33-
cv2.imshow("img", img)
16+
img = cv2.putText(img, "OpenCV", (196,296), font, 1, (0,0,0), 4, cv2.LINE_AA)
17+
cv2.imwrite('opencvlogo.png', img)
18+
cv2.imshow("OpenCV Logo", img)
3419
cv2.waitKey(0)
3520
cv2.destroyAllWindows()

0 commit comments

Comments
 (0)