在没有压缩的情况下在opencv中保存帧 [英] Saving frames in opencv without compression
问题描述
我正在尝试使用 imwrite() OpenCV 函数.我想用 .TIFF 扩展名保存帧.我的问题是保存的图像被压缩,所以我不能使用它们.知道如何摆脱这种压缩吗?
I'm trying to use the imwrite() OpenCV function. I want to save the frames with the .TIFF extension. The problem that I have is that the saved images are compressed so I can't use them. Any idea how I can escape this compression?
提前致谢
推荐答案
根据 文档 OpenCV 只公开了一组有限的用于写入图像文件的选项.其中不属于 TIFF 文件.
According to the documentation OpenCV only exposes a limited set of options for writing image files. Non of which belongs to TIFF-Files.
所以除非你想使用自己的函数或者修改OpenCV源码,这是不可能的.我建议使用另一种未压缩格式来保存帧,如 PXM 或 BMP,除非您有使用 TIFF 文件的某些特定原因.
So unless you want to use your own function or modify the OpenCV source, this is not possible. I would suggest using another uncompressed format for saving the frames like PXM or BMP, unless you have some specific reasons to use TIFF-Files.
这篇关于在没有压缩的情况下在opencv中保存帧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!