RICInterpolatorTrait

Trait RICInterpolatorTrait 

Source
pub trait RICInterpolatorTrait: RICInterpolatorTraitConst + SparseMatchInterpolatorTrait {
Show 28 methods // Required method fn as_raw_mut_RICInterpolator(&mut self) -> *mut c_void; // Provided methods fn set_k(&mut self, k: i32) -> Result<()> { ... } fn set_k_def(&mut self) -> Result<()> { ... } fn set_cost_map(&mut self, cost_map: &impl MatTraitConst) -> Result<()> { ... } fn set_superpixel_size(&mut self, sp_size: i32) -> Result<()> { ... } fn set_superpixel_size_def(&mut self) -> Result<()> { ... } fn set_superpixel_nn_cnt(&mut self, sp_nn: i32) -> Result<()> { ... } fn set_superpixel_nn_cnt_def(&mut self) -> Result<()> { ... } fn set_superpixel_ruler(&mut self, ruler: f32) -> Result<()> { ... } fn set_superpixel_ruler_def(&mut self) -> Result<()> { ... } fn set_superpixel_mode(&mut self, mode: i32) -> Result<()> { ... } fn set_superpixel_mode_def(&mut self) -> Result<()> { ... } fn set_alpha(&mut self, alpha: f32) -> Result<()> { ... } fn set_alpha_def(&mut self) -> Result<()> { ... } fn set_model_iter(&mut self, model_iter: i32) -> Result<()> { ... } fn set_model_iter_def(&mut self) -> Result<()> { ... } fn set_refine_models(&mut self, refine_modles: bool) -> Result<()> { ... } fn set_refine_models_def(&mut self) -> Result<()> { ... } fn set_max_flow(&mut self, max_flow: f32) -> Result<()> { ... } fn set_max_flow_def(&mut self) -> Result<()> { ... } fn set_use_variational_refinement( &mut self, use_variational_refinement: bool, ) -> Result<()> { ... } fn set_use_variational_refinement_def(&mut self) -> Result<()> { ... } fn set_use_global_smoother_filter(&mut self, use_fgs: bool) -> Result<()> { ... } fn set_use_global_smoother_filter_def(&mut self) -> Result<()> { ... } fn set_fgs_lambda(&mut self, lambda: f32) -> Result<()> { ... } fn set_fgs_lambda_def(&mut self) -> Result<()> { ... } fn set_fgs_sigma(&mut self, sigma: f32) -> Result<()> { ... } fn set_fgs_sigma_def(&mut self) -> Result<()> { ... }
}
Expand description

Required Methods§

Provided Methods§

Source

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
Source

fn set_k_def(&mut self) -> 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.

§Note

This alternative version of RICInterpolatorTrait::set_k function uses the following default values for its arguments:

  • k: 32
Source

fn set_cost_map(&mut self, cost_map: &impl MatTraitConst) -> 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

Source

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
Source

fn set_superpixel_size_def(&mut self) -> Result<()>

Get the internal cost, i.e. edge map, used for estimating the edge-aware term.

§See also

setCostMap

§Note

This alternative version of RICInterpolatorTrait::set_superpixel_size function uses the following default values for its arguments:

  • sp_size: 15
Source

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
Source

fn set_superpixel_nn_cnt_def(&mut self) -> Result<()>

Parameter defines the number of nearest-neighbor matches for each superpixel considered, when fitting a locally affine model.

§Note

This alternative version of RICInterpolatorTrait::set_superpixel_nn_cnt function uses the following default values for its arguments:

  • sp_nn: 150
Source

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
Source

fn set_superpixel_ruler_def(&mut self) -> Result<()>

Parameter to tune enforcement of superpixel smoothness factor used for oversegmentation.

§See also

cv::ximgproc::createSuperpixelSLIC

§Note

This alternative version of RICInterpolatorTrait::set_superpixel_ruler function uses the following default values for its arguments:

  • ruler: 15.f
Source

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
Source

fn set_superpixel_mode_def(&mut self) -> 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

§Note

This alternative version of RICInterpolatorTrait::set_superpixel_mode function uses the following default values for its arguments:

  • mode: 100
Source

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
Source

fn set_alpha_def(&mut self) -> Result<()>

Alpha is a parameter defining a global weight for transforming geodesic distance into weight.

§Note

This alternative version of RICInterpolatorTrait::set_alpha function uses the following default values for its arguments:

  • alpha: 0.7f
Source

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
Source

fn set_model_iter_def(&mut self) -> Result<()>

Parameter defining the number of iterations for piece-wise affine model estimation.

§Note

This alternative version of RICInterpolatorTrait::set_model_iter function uses the following default values for its arguments:

  • model_iter: 4
Source

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
Source

fn set_refine_models_def(&mut self) -> Result<()>

Parameter to choose wether additional refinement of the piece-wise affine models is employed.

§Note

This alternative version of RICInterpolatorTrait::set_refine_models function uses the following default values for its arguments:

  • refine_modles: true
Source

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
Source

fn set_max_flow_def(&mut self) -> 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.

§Note

This alternative version of RICInterpolatorTrait::set_max_flow function uses the following default values for its arguments:

  • max_flow: 250.f
Source

fn set_use_variational_refinement( &mut self, use_variational_refinement: bool, ) -> Result<()>

Parameter to choose wether the VariationalRefinement post-processing is employed.

§C++ default parameters
  • use_variational_refinement: false
Source

fn set_use_variational_refinement_def(&mut self) -> Result<()>

Parameter to choose wether the VariationalRefinement post-processing is employed.

§Note

This alternative version of RICInterpolatorTrait::set_use_variational_refinement function uses the following default values for its arguments:

  • use_variational_refinement: false
Source

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
Source

fn set_use_global_smoother_filter_def(&mut self) -> Result<()>

Sets whether the fastGlobalSmootherFilter() post-processing is employed.

§Note

This alternative version of RICInterpolatorTrait::set_use_global_smoother_filter function uses the following default values for its arguments:

  • use_fgs: true
Source

fn set_fgs_lambda(&mut self, lambda: f32) -> Result<()>

Sets the respective fastGlobalSmootherFilter() parameter.

§C++ default parameters
  • lambda: 500.f
Source

fn set_fgs_lambda_def(&mut self) -> Result<()>

Sets the respective fastGlobalSmootherFilter() parameter.

§Note

This alternative version of RICInterpolatorTrait::set_fgs_lambda function uses the following default values for its arguments:

  • lambda: 500.f
Source

fn set_fgs_sigma(&mut self, sigma: f32) -> Result<()>

Sets the respective fastGlobalSmootherFilter() parameter.

§C++ default parameters
  • sigma: 1.5f
Source

fn set_fgs_sigma_def(&mut self) -> Result<()>

Sets the respective fastGlobalSmootherFilter() parameter.

§Note

This alternative version of RICInterpolatorTrait::set_fgs_sigma function uses the following default values for its arguments:

  • sigma: 1.5f

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§