如何在视觉上比较两个不同编解码器、大小、分辨率的相似视频
How to compare visually two look alike videos of different codec, size, resolution
是否可以务实地比较不同编解码器、大小和分辨率的两个看起来相似的视频。我使用了一些工具,例如 ffmpeg
opencv
。
或者在另一种情况下,让图像与视频进行比较,找出图像在给定视频中视觉呈现的确切时间。视频和图像的编解码器、大小和分辨率可能会有所不同。
是的,但这涉及到工作。所以,我在这里假设您将以编程方式使用 ffmpeg(libavformat,libavcodec),您也可以通过 opencv 等中间层来执行相同的操作。
首先,打开视频(使用 libavformat), decode the frame(s) (using libavcodec), and rescale them (using libswscale) so they're of identical size and picture format (e.g. yuv420p). Which of the two videos/images you rescale shouldn't matter, but if you're comparing an image to a video, I'd scale the image since that's a single instead of per-frame operation. Then, compare that image to each output frame (using the ssim of psnr filters in libavfilter),检查 lavfi.ssim.dB 或 lavfi.psnr.psnr_avg 的输出帧的元数据。图像最相似的帧是 PSNR 或 SSIM 分数最高的帧,这就是你问题的答案。
如果您选择使用这些库,您将找到每个库的教程和示例。
经过一些研究和浏览论坛后,我得到了 OpenSIFT library(depends on opencv)。在此,匹配算法满足task.In此算法任意两张不同大小的图片,codec可以进行比较。
对于视频比较,将视频转换为帧并将每个帧与参考图像进行比较。
如果有人在视频中搜索 image/frame 视觉 而不是原始帧比较
,我希望这会有所帮助
是否可以务实地比较不同编解码器、大小和分辨率的两个看起来相似的视频。我使用了一些工具,例如 ffmpeg
opencv
。
或者在另一种情况下,让图像与视频进行比较,找出图像在给定视频中视觉呈现的确切时间。视频和图像的编解码器、大小和分辨率可能会有所不同。
是的,但这涉及到工作。所以,我在这里假设您将以编程方式使用 ffmpeg(libavformat,libavcodec),您也可以通过 opencv 等中间层来执行相同的操作。
首先,打开视频(使用 libavformat), decode the frame(s) (using libavcodec), and rescale them (using libswscale) so they're of identical size and picture format (e.g. yuv420p). Which of the two videos/images you rescale shouldn't matter, but if you're comparing an image to a video, I'd scale the image since that's a single instead of per-frame operation. Then, compare that image to each output frame (using the ssim of psnr filters in libavfilter),检查 lavfi.ssim.dB 或 lavfi.psnr.psnr_avg 的输出帧的元数据。图像最相似的帧是 PSNR 或 SSIM 分数最高的帧,这就是你问题的答案。
如果您选择使用这些库,您将找到每个库的教程和示例。
经过一些研究和浏览论坛后,我得到了 OpenSIFT library(depends on opencv)。在此,匹配算法满足task.In此算法任意两张不同大小的图片,codec可以进行比较。 对于视频比较,将视频转换为帧并将每个帧与参考图像进行比较。
如果有人在视频中搜索 image/frame 视觉 而不是原始帧比较
,我希望这会有所帮助