書き換えるのは下記で紹介してるコード
import cv2 import numpy as np src = np.zeros((150, 220, 3), np.uint8) cv2.putText(src, "Hello World", (5, 50), cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 0, 200), 2, cv2.LINE_AA) cv2.line(src, (190, 25), (190, 45), (0, 200, 0), 3) for x in range(188, 192): for y in range(53, 57): for i in range(2): src[y, x][i] = 200 cv2.imshow("window", src) cv2.waitKey(0)