Click or drag to resize

CvOptFlowCalcOpticalFlowSparseToDense Method

Fast dense optical flow based on PyrLK sparse matches interpolation.

Namespace:  OpenCvSharp.OptFlow
Assembly:  OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax
public static void CalcOpticalFlowSparseToDense(
	InputArray from,
	InputArray to,
	OutputArray flow,
	int gridStep = 8,
	int k = 128,
	float sigma = 0.05f,
	bool usePostProc = true,
	float fgsLambda = 500f,
	float fgsSigma = 1.5f
)

Parameters

from
Type: OpenCvSharpInputArray
first 8-bit 3-channel or 1-channel image.
to
Type: OpenCvSharpInputArray
second 8-bit 3-channel or 1-channel image of the same size as from
flow
Type: OpenCvSharpOutputArray
computed flow image that has the same size as from and CV_32FC2 type
gridStep (Optional)
Type: SystemInt32
stride used in sparse match computation. Lower values usually result in higher quality but slow down the algorithm.
k (Optional)
Type: SystemInt32
number of nearest-neighbor matches considered, when fitting a locally affine model. Lower values can make the algorithm noticeably faster at the cost of some quality degradation.
sigma (Optional)
Type: SystemSingle
parameter defining how fast the weights decrease in the locally-weighted affine fitting. Higher values can help preserve fine details, lower values can help to get rid of the noise in the output flow.
usePostProc (Optional)
Type: SystemBoolean
defines whether the ximgproc::fastGlobalSmootherFilter() is used for post-processing after interpolation
fgsLambda (Optional)
Type: SystemSingle
see the respective parameter of the ximgproc::fastGlobalSmootherFilter()
fgsSigma (Optional)
Type: SystemSingle
see the respective parameter of the ximgproc::fastGlobalSmootherFilter()
See Also