[−][src]Function opencv::video::build_optical_flow_pyramid
pub fn build_optical_flow_pyramid(
img: &dyn ToInputArray,
pyramid: &mut dyn ToOutputArray,
win_size: Size,
max_level: i32,
with_derivatives: bool,
pyr_border: i32,
deriv_border: i32,
try_reuse_input_image: bool
) -> Result<i32>
Constructs the image pyramid which can be passed to calcOpticalFlowPyrLK.
Parameters
- img: 8-bit input image.
- pyramid: output pyramid.
- winSize: 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: 0-based maximal pyramid level number.
- withDerivatives: set to precompute gradients for the every pyramid level. If pyramid is constructed without the gradients then calcOpticalFlowPyrLK will calculate them internally.
- pyrBorder: the border mode for pyramid layers.
- derivBorder: the border mode for gradients.
- tryReuseInputImage: put ROI of input image into the pyramid if possible. You can pass false to force data copying.
Returns
number of levels in constructed pyramid. Can be less than maxLevel.
C++ default parameters
- with_derivatives: true
- pyr_border: BORDER_REFLECT_101
- deriv_border: BORDER_CONSTANT
- try_reuse_input_image: true