OpenCv的CreateImage功能不起作用
发布于 2021-01-29 18:01:28
我正在尝试使用opencv v 2.1创建图像,但出现此错误:
image=cv.CreateImage((w,h),no_of_bits,channels)
AttributeError:“模块”对象没有属性“ CreateImage”
该代码是
#!/usr/bin/python
import cv
from opencv import *
from opencv.cv import *
from opencv.highgui import *
import sys
import PIL
w=500
h=500
no_of_bits=8
channels=3
image=cv.CreateImage((w,h),no_of_bits,channels)
cv.ShowImage('WindowName',image)
cvWaitKey()
关注者
0
被浏览
164
1 个回答