我尝试将ndarray转换为图片:
import numpy as np
import cv2
def main():
#...
data_array = []
data_array.append((255, 255, 255))
data_array.append((255, 255, 255))
# http://pastebin.com/iUs6ebBU
new_image = np.array(data_array).reshape((height, width, 3))
r,g,b = cv2.split(new_image)
img_bgr = cv2.merge([b,g,r])
cv2.imshow('image',img_bgr)
cv2.waitKey(0)
但我只看到黑色图像,而不是我的。有什么问题?