[英]try to make black image but getting error for np.unit8
I have just started to learn OpenCV.我刚开始学习OpenCV。 trying to make a black window by the code:
试图通过代码制作黑色 window:
img=np.zeros((512,512,3),np.unit8)
but get the error:但得到错误:
module 'numpy' has no attribute 'unit8'
numpy has no datatype such as unit8
. unit8
没有诸如 unit8 之类的数据类型。
it must be uint8
.它必须是
uint8
。
have a look at numpy docs datatypes看看numpy 文档数据类型
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.