[−][src]Trait opencv::hub_prelude::DenseRLOFOpticalFlow
Fast dense optical flow computation based on robust local optical flow (RLOF) algorithms and sparse-to-dense interpolation scheme.
The RLOF is a fast local optical flow approach described in Senst2012 Senst2013 Senst2014 and Senst2016 similar to the pyramidal iterative Lucas-Kanade method as proposed by Bouguet00. More details and experiments can be found in the following thesis Senst2019. The implementation is derived from optflow::calcOpticalFlowPyrLK().
The sparse-to-dense interpolation scheme allows for fast computation of dense optical flow using RLOF (see Geistert2016). For this scheme the following steps are applied: -# motion vector seeded at a regular sampled grid are computed. The sparsity of this grid can be configured with setGridStep -# (optinally) errornous motion vectors are filter based on the forward backward confidence. The threshold can be configured with setForwardBackward. The filter is only applied if the threshold >0 but than the runtime is doubled due to the estimation of the backward flow. -# Vector field interpolation is applied to the motion vector set to obtain a dense vector field.
For the RLOF configuration see optflow::RLOFOpticalFlowParameter for further details. Parameters have been described in Senst2012 Senst2013 Senst2014 and Senst2016.
Note: If the grid size is set to (1,1) and the forward backward threshold <= 0 than pixelwise dense optical flow field is computed by RLOF without using interpolation.
See also
optflow::calcOpticalFlowDenseRLOF(), optflow::RLOFOpticalFlowParameter
Required methods
pub fn as_raw_DenseRLOFOpticalFlow(&self) -> *const c_void
[src]
pub fn as_raw_mut_DenseRLOFOpticalFlow(&mut self) -> *mut c_void
[src]
Provided methods
pub fn set_rlof_optical_flow_parameter(
&mut self,
val: Ptr<RLOFOpticalFlowParameter>
) -> Result<()>
[src]
&mut self,
val: Ptr<RLOFOpticalFlowParameter>
) -> Result<()>
Configuration of the RLOF alogrithm.
See also
optflow::RLOFOpticalFlowParameter, getRLOFOpticalFlowParameter
pub fn get_rlof_optical_flow_parameter(
&self
) -> Result<Ptr<RLOFOpticalFlowParameter>>
[src]
&self
) -> Result<Ptr<RLOFOpticalFlowParameter>>
Configuration of the RLOF alogrithm.
See also
optflow::RLOFOpticalFlowParameter, getRLOFOpticalFlowParameter optflow::RLOFOpticalFlowParameter, setRLOFOpticalFlowParameter
pub fn set_forward_backward(&mut self, val: f32) -> Result<()>
[src]
Threshold for the forward backward confidence check For each grid point a motion vector is computed. * If the forward backward error * is larger than threshold given by this function then the motion vector will not be used by the following * vector field interpolation. denotes the backward flow. Note, the forward backward test * will only be applied if the threshold > 0. This may results into a doubled runtime for the motion estimation. * see also: getForwardBackward, setGridStep
pub fn get_forward_backward(&self) -> Result<f32>
[src]
Threshold for the forward backward confidence check For each grid point a motion vector is computed. * If the forward backward error * is larger than threshold given by this function then the motion vector will not be used by the following * vector field interpolation. denotes the backward flow. Note, the forward backward test * will only be applied if the threshold > 0. This may results into a doubled runtime for the motion estimation. * getForwardBackward, setGridStep
See also
setForwardBackward
pub fn get_grid_step(&self) -> Result<Size>
[src]
Size of the grid to spawn the motion vectors. For each grid point a motion vector is computed. Some motion vectors will be removed due to the forwatd backward * threshold (if set >0). The rest will be the base of the vector field interpolation. * see also: getForwardBackward, setGridStep
pub fn set_grid_step(&mut self, val: Size) -> Result<()>
[src]
Size of the grid to spawn the motion vectors. For each grid point a motion vector is computed. Some motion vectors will be removed due to the forwatd backward * threshold (if set >0). The rest will be the base of the vector field interpolation. * see also: getForwardBackward, setGridStep * see also: getGridStep
pub fn set_interpolation(&mut self, val: InterpolationType) -> Result<()>
[src]
Interpolation used to compute the dense optical flow. Two interpolation algorithms are supported * - INTERP_GEO applies the fast geodesic interpolation, see Geistert2016. * - INTERP_EPIC_RESIDUAL applies the edge-preserving interpolation, see Revaud2015,Geistert2016. * see also: ximgproc::EdgeAwareInterpolator, getInterpolation
pub fn get_interpolation(&self) -> Result<InterpolationType>
[src]
Interpolation used to compute the dense optical flow. Two interpolation algorithms are supported * - INTERP_GEO applies the fast geodesic interpolation, see Geistert2016. * - INTERP_EPIC_RESIDUAL applies the edge-preserving interpolation, see Revaud2015,Geistert2016. * see also: ximgproc::EdgeAwareInterpolator, getInterpolation * see also: ximgproc::EdgeAwareInterpolator, setInterpolation
pub fn get_epick(&self) -> Result<i32>
[src]
see ximgproc::EdgeAwareInterpolator() K value. K is a number of nearest-neighbor matches considered, when fitting a locally affine * model. Usually it should be around 128. However, lower values would make the interpolation noticeably faster. * see also: ximgproc::EdgeAwareInterpolator, setEPICK
pub fn set_epick(&mut self, val: i32) -> Result<()>
[src]
see ximgproc::EdgeAwareInterpolator() K value. K is a number of nearest-neighbor matches considered, when fitting a locally affine * model. Usually it should be around 128. However, lower values would make the interpolation noticeably faster. * see also: ximgproc::EdgeAwareInterpolator, setEPICK * see also: ximgproc::EdgeAwareInterpolator, getEPICK
pub fn get_epic_sigma(&self) -> Result<f32>
[src]
see ximgproc::EdgeAwareInterpolator() sigma value. Sigma is a 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 noise in the * output flow. * see also: ximgproc::EdgeAwareInterpolator, setEPICSigma
pub fn set_epic_sigma(&mut self, val: f32) -> Result<()>
[src]
see ximgproc::EdgeAwareInterpolator() sigma value. Sigma is a 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 noise in the * output flow. * see also: ximgproc::EdgeAwareInterpolator, setEPICSigma * see also: ximgproc::EdgeAwareInterpolator, getEPICSigma
pub fn get_epic_lambda(&self) -> Result<f32>
[src]
see ximgproc::EdgeAwareInterpolator() lambda value. Lambda is a parameter defining the weight of the edge-aware term in geodesic distance, * should be in the range of 0 to 1000. * see also: ximgproc::EdgeAwareInterpolator, setEPICSigma
pub fn set_epic_lambda(&mut self, val: f32) -> Result<()>
[src]
see ximgproc::EdgeAwareInterpolator() lambda value. Lambda is a parameter defining the weight of the edge-aware term in geodesic distance, * should be in the range of 0 to 1000. * see also: ximgproc::EdgeAwareInterpolator, setEPICSigma * see also: ximgproc::EdgeAwareInterpolator, getEPICLambda
pub fn get_fgs_lambda(&self) -> Result<f32>
[src]
see ximgproc::EdgeAwareInterpolator(). Sets the respective fastGlobalSmootherFilter() parameter. * see also: ximgproc::EdgeAwareInterpolator, setFgsLambda
pub fn set_fgs_lambda(&mut self, val: f32) -> Result<()>
[src]
see ximgproc::EdgeAwareInterpolator(). Sets the respective fastGlobalSmootherFilter() parameter. * see also: ximgproc::EdgeAwareInterpolator, setFgsLambda * see also: ximgproc::EdgeAwareInterpolator, ximgproc::fastGlobalSmootherFilter, getFgsLambda
pub fn get_fgs_sigma(&self) -> Result<f32>
[src]
see ximgproc::EdgeAwareInterpolator(). Sets the respective fastGlobalSmootherFilter() parameter. * see also: ximgproc::EdgeAwareInterpolator, ximgproc::fastGlobalSmootherFilter, setFgsSigma
pub fn set_fgs_sigma(&mut self, val: f32) -> Result<()>
[src]
see ximgproc::EdgeAwareInterpolator(). Sets the respective fastGlobalSmootherFilter() parameter. * see also: ximgproc::EdgeAwareInterpolator, ximgproc::fastGlobalSmootherFilter, setFgsSigma * see also: ximgproc::EdgeAwareInterpolator, ximgproc::fastGlobalSmootherFilter, getFgsSigma
pub fn set_use_post_proc(&mut self, val: bool) -> Result<()>
[src]
enables ximgproc::fastGlobalSmootherFilter
- see also: getUsePostProc
pub fn get_use_post_proc(&self) -> Result<bool>
[src]
enables ximgproc::fastGlobalSmootherFilter
- see also: getUsePostProc
- see also: ximgproc::fastGlobalSmootherFilter, setUsePostProc
pub fn set_use_variational_refinement(&mut self, val: bool) -> Result<()>
[src]
enables VariationalRefinement
- see also: getUseVariationalRefinement
pub fn get_use_variational_refinement(&self) -> Result<bool>
[src]
enables VariationalRefinement
- see also: getUseVariationalRefinement
- see also: ximgproc::fastGlobalSmootherFilter, setUsePostProc
pub fn set_ricsp_size(&mut self, val: i32) -> Result<()>
[src]
Parameter to tune the approximate size of the superpixel used for oversegmentation.
- see also: cv::ximgproc::createSuperpixelSLIC, cv::ximgproc::RICInterpolator
pub fn get_ricsp_size(&self) -> Result<i32>
[src]
Parameter to tune the approximate size of the superpixel used for oversegmentation.
- see also: cv::ximgproc::createSuperpixelSLIC, cv::ximgproc::RICInterpolator
- see also: setRICSPSize
pub fn set_ricslic_type(&mut self, val: i32) -> Result<()>
[src]
Parameter to choose superpixel algorithm variant to use:
- cv::ximgproc::SLICType SLIC segments image using a desired region_size (value: 100)
- cv::ximgproc::SLICType SLICO will optimize using adaptive compactness factor (value: 101)
- cv::ximgproc::SLICType MSLIC will optimize using manifold methods resulting in more content-sensitive superpixels (value: 102).
See also
cv::ximgproc::createSuperpixelSLIC, cv::ximgproc::RICInterpolator
pub fn get_ricslic_type(&self) -> Result<i32>
[src]
Parameter to choose superpixel algorithm variant to use:
- cv::ximgproc::SLICType SLIC segments image using a desired region_size (value: 100)
- cv::ximgproc::SLICType SLICO will optimize using adaptive compactness factor (value: 101)
- cv::ximgproc::SLICType MSLIC will optimize using manifold methods resulting in more content-sensitive superpixels (value: 102).
See also
cv::ximgproc::createSuperpixelSLIC, cv::ximgproc::RICInterpolator * setRICSLICType
Implementations
impl<'_> dyn DenseRLOFOpticalFlow + '_
[src]
pub fn create(
rlof_param: Ptr<RLOFOpticalFlowParameter>,
forward_backward_threshold: f32,
grid_step: Size,
interp_type: InterpolationType,
epic_k: i32,
epic_sigma: f32,
epic_lambda: f32,
ric_sp_size: i32,
ric_slic_type: i32,
use_post_proc: bool,
fgs_lambda: f32,
fgs_sigma: f32,
use_variational_refinement: bool
) -> Result<Ptr<dyn DenseRLOFOpticalFlow>>
[src]
rlof_param: Ptr<RLOFOpticalFlowParameter>,
forward_backward_threshold: f32,
grid_step: Size,
interp_type: InterpolationType,
epic_k: i32,
epic_sigma: f32,
epic_lambda: f32,
ric_sp_size: i32,
ric_slic_type: i32,
use_post_proc: bool,
fgs_lambda: f32,
fgs_sigma: f32,
use_variational_refinement: bool
) -> Result<Ptr<dyn DenseRLOFOpticalFlow>>
Creates instance of optflow::DenseRLOFOpticalFlow
Parameters
- rlofParam: see optflow::RLOFOpticalFlowParameter
- forwardBackwardThreshold: see setForwardBackward
- gridStep: see setGridStep
- interp_type: see setInterpolation
- epicK: see setEPICK
- epicSigma: see setEPICSigma
- epicLambda: see setEPICLambda
- ricSPSize: see setRICSPSize
- ricSLICType: see setRICSLICType
- use_post_proc: see setUsePostProc
- fgsLambda: see setFgsLambda
- fgsSigma: see setFgsSigma
- use_variational_refinement: see setUseVariationalRefinement
C++ default parameters
- rlof_param: Ptr
() - forward_backward_threshold: 1.f
- grid_step: Size(6,6)
- interp_type: InterpolationType::INTERP_EPIC
- epic_k: 128
- epic_sigma: 0.05f
- epic_lambda: 999.0f
- ric_sp_size: 15
- ric_slic_type: 100
- use_post_proc: true
- fgs_lambda: 500.0f
- fgs_sigma: 1.5f
- use_variational_refinement: false