光流

http://docs.opencv.org/3.1.0/d7/d8b/tutorial_py_lucas_kanade.html#gsc.tab=0


calcOpticalFlowFarneback

Computes a dense optical flow using the Gunnar Farneback’s algorithm.

double  pyrScale, int  levels, int  winsize, int  iterations, int  polyN, double  polySigma, int  flags )
Python:   cv2. calcOpticalFlowFarneback (prevImg, nextImg, pyr_scale, levels, winsize, iterations, poly_n, poly_sigma, flags [, flow ] ) → flow
Parameters:
  • prevImg – First 8-bit single-channel input image.   输入单通道图片
  • nextImg – Second input image of the same size and the same type asprevImg . 下一帧图片。
  • flow – Computed flow image that has the same size as prevImg and typeCV_32FC2 .输出的双通道flow
  • pyrScale – Parameter specifying the image scale (<1) to build pyramids for each image. pyrScale=0.5 means a classical pyramid, where each next layer is twice smaller than the previous one.金字塔上上下两层之间的尺度关系。
  • levels – Number of pyramid layers including the initial image.levels=1 means that no extra layers are created and only the original images are used. 金字塔层数
  • winsize – Averaging window size. Larger values increase the algorithm robustness to image noise and give more chances for fast motion detection, but yield more blurred motion field.均值窗口大小,越大越能denoise并且能够检测快速移动目标,但是会引起模糊运动区域。
  • iterations – Number of iterations the algorithm does at each pyramid level.迭代次数。
  • polyN – Size of the pixel neighborhood used to find polynomial expansion in each pixel. Larger values mean that the image will be approximated with smoother surfaces, yielding more robust algorithm and more blurred motion field. Typically, polyN =5 or 7.
  • polySigma – Standard deviation of the Gaussian that is used to smooth derivatives used as a basis for the polynomial expansion. ForpolyN=5 , you can set polySigma=1.1 . For polyN=7 , a good value would be polySigma=1.5 .

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值