Trait EdgeAwareInterpolatorTrait

Source
pub trait EdgeAwareInterpolatorTrait: EdgeAwareInterpolatorTraitConst + SparseMatchInterpolatorTrait {
Show 14 methods // Required method fn as_raw_mut_EdgeAwareInterpolator(&mut self) -> *mut c_void; // Provided methods fn set_cost_map(&mut self, _cost_map: &impl MatTraitConst) -> Result<()> { ... } fn set_k(&mut self, _k: i32) -> Result<()> { ... } fn get_k(&mut self) -> Result<i32> { ... } fn set_sigma(&mut self, _sigma: f32) -> Result<()> { ... } fn get_sigma(&mut self) -> Result<f32> { ... } fn set_lambda(&mut self, _lambda: f32) -> Result<()> { ... } fn get_lambda(&mut self) -> Result<f32> { ... } fn set_use_post_processing(&mut self, _use_post_proc: bool) -> Result<()> { ... } fn get_use_post_processing(&mut self) -> Result<bool> { ... } fn set_fgs_lambda(&mut self, _lambda: f32) -> Result<()> { ... } fn get_fgs_lambda(&mut self) -> Result<f32> { ... } fn set_fgs_sigma(&mut self, _sigma: f32) -> Result<()> { ... } fn get_fgs_sigma(&mut self) -> Result<f32> { ... }
}
Expand description

Required Methods§

Provided Methods§

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_k(&mut self, _k: i32) -> Result<()>

Parameter to tune the approximate size of the superpixel used for oversegmentation.

§See also

cv::ximgproc::createSuperpixelSLIC / 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.

Source

fn get_k(&mut self) -> Result<i32>

§See also

setK

Source

fn set_sigma(&mut self, _sigma: f32) -> Result<()>

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.

Source

fn get_sigma(&mut self) -> Result<f32>

§See also

setSigma

Source

fn set_lambda(&mut self, _lambda: f32) -> Result<()>

Lambda is a parameter defining the weight of the edge-aware term in geodesic distance, should be in the range of 0 to 1000.

Source

fn get_lambda(&mut self) -> Result<f32>

§See also

setLambda

Source

fn set_use_post_processing(&mut self, _use_post_proc: bool) -> Result<()>

Sets whether the fastGlobalSmootherFilter() post-processing is employed. It is turned on by default.

Source

fn get_use_post_processing(&mut self) -> Result<bool>

§See also

setUsePostProcessing

Source

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

Sets the respective fastGlobalSmootherFilter() parameter.

Source

fn get_fgs_lambda(&mut self) -> Result<f32>

§See also

setFGSLambda

Source

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

§See also

setFGSLambda

Source

fn get_fgs_sigma(&mut self) -> Result<f32>

§See also

setFGSLambda

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§