我想从任何图像在 Ubuntu 上创建一个示例 YUV422 框架,以便我可以将 YUV422 编码为 RGB888 函数以进行学习。我真的很希望能够使用受信任的工具来创建样本并将其转换回 jpeg。
我试过 ImageMagick 但显然做错了什么:
convert -size 640x480 -depth 24 test.jpg -colorspace YUV -size 640x480 -depth 16 -sampling-factor 4:2:2 tmp422.yuv
convert -colorspace YUV -size 640x480 -depth 16 -sampling-factor 4:2:2 tmp422.yuv -size 640x480 -depth 24 -colorspace RGB test2.jpg
我还在 Ubuntu 上安装了 mpegtools 包,以便使用 jpeg2yuv:
>> jpeg2yuv -f 1 test.jpg
INFO: [jpeg2yuv] Reading jpeg filenames from stdin.
INFO: [jpeg2yuv] Parsing & checking input files.
**ERROR: [jpeg2yuv] System error while opening: "": No such file or directory
显然,还有其他问题。有人可以说明我如何做到这一点吗?谢谢 -