import cv2 as cv
import numpy as np

blank = np.zeros((500, 500, 3), dtype='uint8')
cv.imshow("blank", blank)

# 1. Point the image a certain colour
# blank[:] = 0, 0, 255
# cv.imshow("green", blank)

# 2. Draw a Rectangle
cv.rectangle(blank, (0, 0),
             (blank.shape[1]//2, blank.shape[0]//2), (0, 255, 0), thickness=-1)
cv.imshow('rectangle', blank)

# 3. Draw a Circle
cv.circle(blank, (blank.shape[1]//2,
                  blank.shape[0]//2), 40, (0, 0, 255), thickness=-1)
cv.imshow('circle', blank)

# 4. Draw a line
cv.line(blank, (0, 0),
        (blank.shape[1]//2, blank.shape[0]//2), (255, 255, 0), thickness=3)
cv.imshow('line', blank)

# 5. write text
cv.putText(blank, "Samir", (225, 225), cv.FONT_HERSHEY_TRIPLEX,
           1.0, (0, 255, 255), thickness=2)
cv.imshow('text', blank)


cv.waitKey(0)

bc1f9d51f94b866b68c6d28de8ddd63bd3adcfa3
<mask token>

<mask token>
cv.imshow('blank', blank)
cv.rectangle(blank, (0, 0), (blank.shape[1] // 2, blank.shape[0] // 2), (0,
    255, 0), thickness=-1)
cv.imshow('rectangle', blank)
cv.circle(blank, (blank.shape[1] // 2, blank.shape[0] // 2), 40, (0, 0, 255
    ), thickness=-1)
cv.imshow('circle', blank)
cv.line(blank, (0, 0), (blank.shape[1] // 2, blank.shape[0] // 2), (255, 
    255, 0), thickness=3)
cv.imshow('line', blank)
cv.putText(blank, 'Samir', (225, 225), cv.FONT_HERSHEY_TRIPLEX, 1.0, (0, 
    255, 255), thickness=2)
cv.imshow('text', blank)
cv.waitKey(0)

<mask token>
blank = np.zeros((500, 500, 3), dtype='uint8')
cv.imshow('blank', blank)
cv.rectangle(blank, (0, 0), (blank.shape[1] // 2, blank.shape[0] // 2), (0,
    255, 0), thickness=-1)
cv.imshow('rectangle', blank)
cv.circle(blank, (blank.shape[1] // 2, blank.shape[0] // 2), 40, (0, 0, 255
    ), thickness=-1)
cv.imshow('circle', blank)
cv.line(blank, (0, 0), (blank.shape[1] // 2, blank.shape[0] // 2), (255, 
    255, 0), thickness=3)
cv.imshow('line', blank)
cv.putText(blank, 'Samir', (225, 225), cv.FONT_HERSHEY_TRIPLEX, 1.0, (0, 
    255, 255), thickness=2)
cv.imshow('text', blank)
cv.waitKey(0)

import cv2 as cv
import numpy as np
blank = np.zeros((500, 500, 3), dtype='uint8')
cv.imshow('blank', blank)
cv.rectangle(blank, (0, 0), (blank.shape[1] // 2, blank.shape[0] // 2), (0,
    255, 0), thickness=-1)
cv.imshow('rectangle', blank)
cv.circle(blank, (blank.shape[1] // 2, blank.shape[0] // 2), 40, (0, 0, 255
    ), thickness=-1)
cv.imshow('circle', blank)
cv.line(blank, (0, 0), (blank.shape[1] // 2, blank.shape[0] // 2), (255, 
    255, 0), thickness=3)
cv.imshow('line', blank)
cv.putText(blank, 'Samir', (225, 225), cv.FONT_HERSHEY_TRIPLEX, 1.0, (0, 
    255, 255), thickness=2)
cv.imshow('text', blank)
cv.waitKey(0)

import cv2 as cv
import numpy as np

blank = np.zeros((500, 500, 3), dtype='uint8')
cv.imshow("blank", blank)

# 1. Point the image a certain colour
# blank[:] = 0, 0, 255
# cv.imshow("green", blank)

# 2. Draw a Rectangle
cv.rectangle(blank, (0, 0),
             (blank.shape[1]//2, blank.shape[0]//2), (0, 255, 0), thickness=-1)
cv.imshow('rectangle', blank)

# 3. Draw a Circle
cv.circle(blank, (blank.shape[1]//2,
                  blank.shape[0]//2), 40, (0, 0, 255), thickness=-1)
cv.imshow('circle', blank)

# 4. Draw a line
cv.line(blank, (0, 0),
        (blank.shape[1]//2, blank.shape[0]//2), (255, 255, 0), thickness=3)
cv.imshow('line', blank)

# 5. write text
cv.putText(blank, "Samir", (225, 225), cv.FONT_HERSHEY_TRIPLEX,
           1.0, (0, 255, 255), thickness=2)
cv.imshow('text', blank)


cv.waitKey(0)
