| Cv2BuildOpticalFlowPyramid Method (InputArray, OutputArray, Size, Int32, Boolean, BorderTypes, BorderTypes, Boolean) |
Constructs a pyramid which can be used as input for calcOpticalFlowPyrLK
Namespace:
OpenCvSharp
Assembly:
OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax public static int BuildOpticalFlowPyramid(
InputArray img,
OutputArray pyramid,
Size winSize,
int maxLevel,
bool withDerivatives = true,
BorderTypes pyrBorder = BorderTypes.Reflect101,
BorderTypes derivBorder = BorderTypes.Constant,
bool tryReuseInputImage = true
)
Public Shared Function BuildOpticalFlowPyramid (
img As InputArray,
pyramid As OutputArray,
winSize As Size,
maxLevel As Integer,
Optional withDerivatives As Boolean = true,
Optional pyrBorder As BorderTypes = BorderTypes.Reflect101,
Optional derivBorder As BorderTypes = BorderTypes.Constant,
Optional tryReuseInputImage As Boolean = true
) As Integer
public:
static int BuildOpticalFlowPyramid(
InputArray^ img,
OutputArray^ pyramid,
Size winSize,
int maxLevel,
bool withDerivatives = true,
BorderTypes pyrBorder = BorderTypes::Reflect101,
BorderTypes derivBorder = BorderTypes::Constant,
bool tryReuseInputImage = true
)
static member BuildOpticalFlowPyramid :
img : InputArray *
pyramid : OutputArray *
winSize : Size *
maxLevel : int *
?withDerivatives : bool *
?pyrBorder : BorderTypes *
?derivBorder : BorderTypes *
?tryReuseInputImage : bool
(* Defaults:
let _withDerivatives = defaultArg withDerivatives true
let _pyrBorder = defaultArg pyrBorder BorderTypes.Reflect101
let _derivBorder = defaultArg derivBorder BorderTypes.Constant
let _tryReuseInputImage = defaultArg tryReuseInputImage true
*)
-> int
Parameters
- img
- Type: OpenCvSharpInputArray
8-bit input image. - pyramid
- Type: OpenCvSharpOutputArray
output pyramid. - winSize
- Type: OpenCvSharpSize
window size of optical flow algorithm.
Must be not less than winSize argument of calcOpticalFlowPyrLK().
It is needed to calculate required padding for pyramid levels. - maxLevel
- Type: SystemInt32
0-based maximal pyramid level number. - withDerivatives (Optional)
- Type: SystemBoolean
set to precompute gradients for the every pyramid level.
If pyramid is constructed without the gradients then calcOpticalFlowPyrLK() will
calculate them internally. - pyrBorder (Optional)
- Type: OpenCvSharpBorderTypes
the border mode for pyramid layers. - derivBorder (Optional)
- Type: OpenCvSharpBorderTypes
the border mode for gradients. - tryReuseInputImage (Optional)
- Type: SystemBoolean
put ROI of input image into the pyramid if possible.
You can pass false to force data copying.
Return Value
Type:
Int32number of levels in constructed pyramid. Can be less than maxLevel.
See Also