📅  最后修改于: 2022-03-11 14:45:39.552000             🧑  作者: Mango
# use numpy to create an array of color
image_height = 300
image_width = 300
number_of_color_channels = 3
color = (255,0,255)
pixel_array = numpy.full((image_height, image_width, number_of_color_channels), color, dtype=numpy.uint8)
cv2.imshow('image',pixel_array)
cv2.waitKey(0)