python opencv create new image

Solutions on MaxInterview for python opencv create new image by the best coders in the world

showing results for - "python opencv create new image"
Sami
29 Feb 2017
1# use numpy to create an array of color
2image_height = 300
3image_width = 300
4number_of_color_channels = 3
5color = (255,0,255)
6pixel_array = numpy.full((image_height, image_width, number_of_color_channels), color, dtype=numpy.uint8)
7cv2.imshow('image',pixel_array)
8cv2.waitKey(0)