[−][src]Trait opencv::ximgproc::prelude::RICInterpolator
Sparse match interpolation algorithm based on modified piecewise locally-weighted affine estimator called Robust Interpolation method of Correspondences or RIC from Hu2017 and Variational and Fast Global Smoother as post-processing filter. The RICInterpolator is a extension of the EdgeAwareInterpolator. Main concept of this extension is an piece-wise affine model based on over-segmentation via SLIC superpixel estimation. The method contains an efficient propagation mechanism to estimate among the pieces-wise models.
Required methods
fn as_raw_RICInterpolator(&self) -> *const c_void
fn as_raw_mut_RICInterpolator(&mut self) -> *mut c_void
Provided methods
fn set_k(&mut self, k: i32) -> Result<()>
K is a number of nearest-neighbor matches considered, when fitting a locally affine model for a superpixel segment. However, lower values would make the interpolation noticeably faster. The original implementation of Hu2017 uses 32.
C++ default parameters
- k: 32
fn get_k(&self) -> Result<i32>
K is a number of nearest-neighbor matches considered, when fitting a locally affine model for a superpixel segment. However, lower values would make the interpolation noticeably faster. The original implementation of Hu2017 uses 32. * see also: setK
fn set_cost_map(&mut self, cost_map: &Mat) -> Result<()>
Interface to provide a more elaborated cost map, i.e. edge map, for the edge-aware term. This implementation is based on a rather simple gradient-based edge map estimation. To used more complex edge map estimator (e.g. StructuredEdgeDetection that has been used in the original publication) that may lead to improved accuracies, the internal edge map estimation can be bypassed here.
Parameters
- costMap: a type CV_32FC1 Mat is required.
See also
cv::ximgproc::createSuperpixelSLIC
fn set_superpixel_size(&mut self, sp_size: i32) -> Result<()>
Get the internal cost, i.e. edge map, used for estimating the edge-aware term.
See also
setCostMap
C++ default parameters
- sp_size: 15
fn get_superpixel_size(&self) -> Result<i32>
Get the internal cost, i.e. edge map, used for estimating the edge-aware term.
See also
setCostMap * setSuperpixelSize
fn set_superpixel_nn_cnt(&mut self, sp_nn: i32) -> Result<()>
Parameter defines the number of nearest-neighbor matches for each superpixel considered, when fitting a locally affine model.
C++ default parameters
- sp_nn: 150
fn get_superpixel_nn_cnt(&self) -> Result<i32>
Parameter defines the number of nearest-neighbor matches for each superpixel considered, when fitting a locally affine model. * see also: setSuperpixelNNCnt
fn set_superpixel_ruler(&mut self, ruler: f32) -> Result<()>
Parameter to tune enforcement of superpixel smoothness factor used for oversegmentation.
See also
cv::ximgproc::createSuperpixelSLIC
C++ default parameters
- ruler: 15.f
fn get_superpixel_ruler(&self) -> Result<f32>
Parameter to tune enforcement of superpixel smoothness factor used for oversegmentation.
See also
cv::ximgproc::createSuperpixelSLIC * setSuperpixelRuler
fn set_superpixel_mode(&mut self, mode: i32) -> Result<()>
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
C++ default parameters
- mode: 100
fn get_superpixel_mode(&self) -> Result<i32>
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 * setSuperpixelMode
fn set_alpha(&mut self, alpha: f32) -> Result<()>
Alpha is a parameter defining a global weight for transforming geodesic distance into weight.
C++ default parameters
- alpha: 0.7f
fn get_alpha(&self) -> Result<f32>
Alpha is a parameter defining a global weight for transforming geodesic distance into weight.
See also
setAlpha
fn set_model_iter(&mut self, model_iter: i32) -> Result<()>
Parameter defining the number of iterations for piece-wise affine model estimation.
C++ default parameters
- model_iter: 4
fn get_model_iter(&self) -> Result<i32>
Parameter defining the number of iterations for piece-wise affine model estimation.
See also
setModelIter
fn set_refine_models(&mut self, refine_modles: bool) -> Result<()>
Parameter to choose wether additional refinement of the piece-wise affine models is employed.
C++ default parameters
- refine_modles: true
fn get_refine_models(&self) -> Result<bool>
Parameter to choose wether additional refinement of the piece-wise affine models is employed.
See also
setRefineModels
fn set_max_flow(&mut self, max_flow: f32) -> Result<()>
MaxFlow is a threshold to validate the predictions using a certain piece-wise affine model. If the prediction exceeds the treshold the translational model will be applied instead.
C++ default parameters
- max_flow: 250.f
fn get_max_flow(&self) -> Result<f32>
MaxFlow is a threshold to validate the predictions using a certain piece-wise affine model. If the prediction exceeds the treshold the translational model will be applied instead. * see also: setMaxFlow
fn set_use_variational_refinement(
&mut self,
use_variational_refinement: bool
) -> Result<()>
&mut self,
use_variational_refinement: bool
) -> Result<()>
Parameter to choose wether the VariationalRefinement post-processing is employed.
C++ default parameters
- use_variational_refinement: false
fn get_use_variational_refinement(&self) -> Result<bool>
Parameter to choose wether the VariationalRefinement post-processing is employed.
See also
setUseVariationalRefinement
fn set_use_global_smoother_filter(&mut self, use_fgs: bool) -> Result<()>
Sets whether the fastGlobalSmootherFilter() post-processing is employed.
C++ default parameters
- use_fgs: true
fn get_use_global_smoother_filter(&self) -> Result<bool>
Sets whether the fastGlobalSmootherFilter() post-processing is employed.
See also
setUseGlobalSmootherFilter