gpt4 book ai didi

python - 光流: get fast motion with Farneback not possible?

转载 作者:塔克拉玛干 更新时间:2023-11-03 06:36:33 26 4
gpt4 key购买 nike

我想你们中有些人知道这个函数

flow = cv2.calcOpticalFlowFarneback(prvs,next, None, 0.5, 3, 15, 3, 5, 1.2, 0)

来自 OpenCV,它使用 Gunner Farneback 的算法来计算密集光流。

我对这个算法有疑问,希望有人能给我一个答案。

我可以完美地计算出序列中两张图片中平滑或慢动作的密集光流。

为什么这不适用于快 Action ?有人有想法吗?有人能告诉我为什么这行不通吗?

提前致谢。

最佳答案

calcOpticalFlowFarneback函数有两个与物体位移直接相关的参数(运动越快位移越大)

  1. 级别:根据原始 Gunner Farneback paper :

The problem of too large displacements can be reduced...Start at a coarse scale to get a rough but reasonable displacement estimate and propagate this through finer scales to obtain increasingly more accurate estimates. A drawback is that we need to recompute the polynomial expansion coefficients for each scale, but this cost can be reduced by subsampling between scales.

  1. winsize :平均窗口大小;较大的值会增加算法对图像噪声的鲁棒性,并为快速运动检测提供更多机会,但会产生更模糊的运动场。

因此,为了更快的移动,应该优化这些值,但要以牺牲性能和算法稳健性为代价。

关于python - 光流: get fast motion with Farneback not possible?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56867896/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com