0

将图像帧转换为视频时出现以下错误-

回溯(最后一次调用):文件“C:/Python26/video_writer”,第 25 行,在 cv.WriteFrame(writer,frames[i]) TypeError: Argument 'image' must be IplImage

///////////////////////////////////////// /////

如何获得这个iplimage????

我使用了 cv.writer(writer,frames[i]) 其中 frames[] 是一个图像数组,即

帧=['c:\jay....',........'c:\jay....']

///////////////////////////////////////// /

4

1 回答 1

0

从你的代码中我可以看出,

frames=['c:\jay....',................'c:\jay.....']

声明类似于字符串数组strings != IplImage,同意吗?

IplImage当您从磁盘加载图像时,您可以使用cvLoadImage()

frame = cvLoadImage("some_image.jpg")
if not frame:
    print "Could not load frame from the disk"
于 2012-04-06T21:28:38.507 回答