opencv生成一幅彩色图像,让其中的像素值均为随机数

import cv2
import numpy as np
img=np.random.randint(0,256,size=[256,256,3],dtype=np.uint8)
cv2.imshow('demo',img)
cv2.waitKey()
cv2.destroyAllWindows()

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qestion_yz_10086/article/details/107835423
今日推荐