import cv2
import os
import numpy as np
width = 500
height = 500
img = np.ones((width, height, 3), dtype=np.uint8)
img *= 255 # white background
cv2.rectangle(img, (20, 20), (150, 150), (255, 0, 0), 4)
cv2.imshow('result', img)
cv2.waitKey(0)
微信扫一扫
import cv2
import os
import numpy as np
width = 500
height = 500
img = np.ones((width, height, 3), dtype=np.uint8)
img *= 255 # white background
cv2.rectangle(img, (20, 20), (150, 150), (255, 0, 0), 4)
cv2.imshow('result', img)
cv2.waitKey(0)
相关推荐