" cvWriteFrame "使用垫子 - 图像类型的等效功能是什么?



"cvWriteFrame"使用Mat - image类型的等效函数是什么?

在IplImage中,可以使用如下命令:

CvVideoWriter *writer;
IplImage* frame = " IMAGE ";   
cvWriteFrame(writer, frame);

如何为Mat文件编写视频

Opencv doc

C++: VideoWriter& VideoWriter::operator<<(const Mat& image)
C++: void VideoWriter::write(const Mat& image)
Python: cv2.VideoWriter.write(image) → None
C: int cvWriteFrame(CvVideoWriter* writer, const IplImage* image)
Python: cv.WriteFrame(writer, image) → int

所以我猜应该是

cv::Mat image;
....
cv::VideoWriter writer;
writer.open(...);
if (writer.isOpened())
  writer << image;

相关内容

  • 没有找到相关文章