We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
您可以先尝试一些简单的方法,我最近在这里建议了一些方法: 使用 OpenCV 进行视频稳定
在您的情况下(没有平移,没有缩放,静态场景),相位相关可能已经足够了,而且非常简单(例如参见维基百科)。
如果我没记错的话,有几个可用于 avisynth 的使用相位相关的视频稳定滤波器/插件 - 您可以先尝试一下。
根据我的需要,我实现了一个简单的工具,可以采用 SURF/Homography 路线来对齐多个图像(对齐图像,而不是视频)。您可能想尝试一下,看看这是否也能满足您的需求: http://web.archive.org/web/20101004234404/http://ioctl.eu/wiki/applications/ImageAlign(呵呵,我希望代码仍然可以运行...... )
You can try some simple approaches first, I've suggested some recently here: Video Stabilization with OpenCV
In your case (no pan, no zoom, static scene), phase-correlation might be already sufficient and it's quite easy (see e.g. wikipedia on that).
If I recall correctly, there are several video stabilization filters/plug-ins available for avisynth that use phase-correlation - you can try them out first.
For my needs, I've implemented a simple tool that goes the SURF/Homography route to align several images (aligns images, not videos). You might want to try that out to see if this suffices your needs as well: http://web.archive.org/web/20101004234404/http://ioctl.eu/wiki/applications/ImageAlign (Heh, I hope that code still runs...)
我编写了一个简单的函数来稳定视频帧的三个缓冲区,一个用于红色、绿色和蓝色。它不是最快的,但对于 NTSC DVD 帧 (720x480),它可以在 E-machines t6412 上以每秒约 1.7 帧的速度运行。您所要做的就是在图像中心选择一个点,并通过累积每个像素匹配的位数将其与最后一帧进行比较。在嵌套循环中,每次循环迭代将最近帧的搜索区域偏移一个像素。我尝试了模拟 FIR 相关,但效果不如选择具有最匹配位的对齐偏移那么好。而且该算法还使输出视频填满屏幕,而不是随着相机抖动而挥舞着黑条。
要使用它,请使用图像的红色通道填充 *redbuf,使用绿色通道填充 *greenbuf,使用蓝色通道填充 *bluebuf,并调用 digital_image_stabilization 函数。一旦函数完成,缓冲区将具有稳定的图像。我使用 96 作为 search_len,使用 32 作为 twiddle。
I wrote a simple function that stabilizes three buffers of a video frame, one for Red, Green, and Blue. It's not the fastest, but for an NTSC DVD frame (720x480) it can run at about 1.7 frames per second on an E-machines t6412. All you have to do is pick a spot in the center of the image and compare it to the last frame by accumulating how many bits in each pixel match. In a nested loop offset the search area of the most recent frame by one pixel for each loop iteration. I tried analog FIR correlation but that didn't work nearly as good as picking the alignment offset with the most matching bits. And this algorithm also makes the output video fill the screen instead of waving black bars that follow the camera shake.
To use it, fill *redbuf with the red channel of the image, *greenbuf with the green channel, *bluebuf with the blue channel and call the digital_image_stabilization function. Once the function finishes the buffers will have the stabilized image. I used 96 for the search_len and 32 for the twiddle.