2

My ultimate goal is to get meaningful snapshots from MP4 videos that are either 30 min or 1 hour long. "Meaningful" is a bit ambitious, so I have simplified my requirements.

The image should be crisp - non-overlapping, and ideally not blurry. Initially, I thought getting a keyframe would work, but I had no idea that keyframes could have overlapping images embedded in them like this:enter image description here

Of course, some keyframe images look like this and those are much better:

enter image description here

I was wondering if someone might have source code to:

Take a sequence of say 10-15 continuous keyframes (jpg or png) and identify the best keyframe from all of them.

This must happen entirely programmatically. I found this paper: http://research.microsoft.com/pubs/68802/blur_determination_compressed.pdf

and felt that I could "rank" a few images based on the above paper, but then I was dissuaded by this link: Extracting DCT coefficients from encoded images and video given that my source video is an MP4. Of course, this confuses me because the input into the system is just a sequence of jpg images.

Another link that is interesting is:

Detection of Blur in Images/Video sequences

However, I am not sure if this will work for "overlapping" images.

4

1 回答 1

1

第一张图片来自场景转换时的隔行扫描视频。这两个字段属于不同的场景。对视频进行去隔行扫描会有所帮助,请尝试使用 ffmpeg 过滤器-filter:v yadif。我不确定 yadiff 是如何工作的,但如果它提取两个字段并将它们缩放到原始大小,它会起作用。另一种方法是检测两个字段(提取交替行并形成具有一半高度的图像并区分它们)是否彼此非常不同并忽略这些图像。

于 2013-02-15T01:42:26.000 回答