Calculate an optical flow using "SimpleFlow" algorithm
flow = cv.calcOpticalFlowSF(from, to)
flow = cv.calcOpticalFlowSF(from, to, 'OptionName',optionValue, ...)
Input
- from First 8-bit 3-channel image.
- to Second 8-bit 3-channel image of the same size as
from
.
Output
- flow computed flow image that has the same size as
from
and type
single
(2-channels). Flow for (x,y)
is stored in the third dimension.
Options
- Layers Number of layers. default 3
- AveragingBlockSize Size of block through which we sum up when
calculate cost function for pixel. default 2
- MaxFlow maximal flow that we search at each level. default 4
- SigmaDist vector smooth spatial sigma parameter. default 4.1
- SigmaColor vector smooth color sigma parameter. default 25.5
- PostprocessWindow window size for postprocess cross bilateral filter.
default 18
- SigmaDistFix spatial sigma for postprocess cross bilateralf filter.
default 55.0
- SigmaColorFix color sigma for postprocess cross bilateral filter.
default 25.5
- OccThr threshold for detecting occlusions. default 0.35
- UpscaleAveragingRadius window size for bilateral upscale operation.
default 18
- UpscaleSigmaDist spatial sigma for bilateral upscale operation.
default 55.0
- UpscaleSigmaColor color sigma for bilateral upscale operation.
default 25.5
- SpeedUpThr threshold to detect point with irregular flow, where flow
should be recalculated after upscale. default 10
See [Tao2012], and site of
project.
References
[Tao2012]:
Michael Tao, Jiamin Bai, Pushmeet Kohli, and Sylvain Paris. "Simpleflow: A
non-iterative, sublinear optical flow algorithm". In Computer Graphics
Forum, volume 31, pages 345-353. Wiley Online Library, 2012.