opencv::ximgproc

Struct RICInterpolator

source
pub struct RICInterpolator { /* private fields */ }
Expand description

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.

Trait Implementations§

source§

impl AlgorithmTrait for RICInterpolator

source§

fn as_raw_mut_Algorithm(&mut self) -> *mut c_void

source§

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

Clears the algorithm state
source§

fn read(&mut self, fn_: &impl FileNodeTraitConst) -> Result<()>

Reads algorithm parameters from a file storage
source§

impl AlgorithmTraitConst for RICInterpolator

source§

fn as_raw_Algorithm(&self) -> *const c_void

source§

fn write(&self, fs: &mut impl FileStorageTrait) -> Result<()>

Stores algorithm parameters in a file storage
source§

fn write_1(&self, fs: &mut impl FileStorageTrait, name: &str) -> Result<()>

Stores algorithm parameters in a file storage Read more
source§

fn write_with_name(&self, fs: &Ptr<FileStorage>, name: &str) -> Result<()>

@deprecated Read more
source§

fn write_with_name_def(&self, fs: &Ptr<FileStorage>) -> Result<()>

👎Deprecated:

§Note

Deprecated: ## Note This alternative version of AlgorithmTraitConst::write_with_name function uses the following default values for its arguments: Read more
source§

fn empty(&self) -> Result<bool>

Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read
source§

fn save(&self, filename: &str) -> Result<()>

Saves the algorithm to a file. In order to make this method work, the derived class must implement Algorithm::write(FileStorage& fs).
source§

fn get_default_name(&self) -> Result<String>

Returns the algorithm string identifier. This string is used as top level xml/yml node tag when the object is saved to a file or string.
source§

impl Boxed for RICInterpolator

source§

unsafe fn from_raw( ptr: <RICInterpolator as OpenCVFromExtern>::ExternReceive, ) -> Self

Wrap the specified raw pointer Read more
source§

fn into_raw( self, ) -> <RICInterpolator as OpenCVTypeExternContainer>::ExternSendMut

Return the underlying raw pointer while consuming this wrapper. Read more
source§

fn as_raw(&self) -> <RICInterpolator as OpenCVTypeExternContainer>::ExternSend

Return the underlying raw pointer. Read more
source§

fn as_raw_mut( &mut self, ) -> <RICInterpolator as OpenCVTypeExternContainer>::ExternSendMut

Return the underlying mutable raw pointer Read more
source§

impl Debug for RICInterpolator

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Drop for RICInterpolator

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl From<RICInterpolator> for Algorithm

source§

fn from(s: RICInterpolator) -> Self

Converts to this type from the input type.
source§

impl From<RICInterpolator> for SparseMatchInterpolator

source§

fn from(s: RICInterpolator) -> Self

Converts to this type from the input type.
source§

impl RICInterpolatorTrait for RICInterpolator

source§

fn as_raw_mut_RICInterpolator(&mut self) -> *mut c_void

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. Read more
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. Read more
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. Read more
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. Read more
source§

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

Get the internal cost, i.e. edge map, used for estimating the edge-aware term. Read more
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. Read more
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. Read more
source§

fn set_superpixel_ruler(&mut self, ruler: f32) -> Result<()>

Parameter to tune enforcement of superpixel smoothness factor used for oversegmentation. Read more
source§

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

Parameter to tune enforcement of superpixel smoothness factor used for oversegmentation. Read more
source§

fn set_superpixel_mode(&mut self, mode: i32) -> Result<()>

Parameter to choose superpixel algorithm variant to use: Read more
source§

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

Parameter to choose superpixel algorithm variant to use: Read more
source§

fn set_alpha(&mut self, alpha: f32) -> Result<()>

Alpha is a parameter defining a global weight for transforming geodesic distance into weight. Read more
source§

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

Alpha is a parameter defining a global weight for transforming geodesic distance into weight. Read more
source§

fn set_model_iter(&mut self, model_iter: i32) -> Result<()>

Parameter defining the number of iterations for piece-wise affine model estimation. Read more
source§

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

Parameter defining the number of iterations for piece-wise affine model estimation. Read more
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. Read more
source§

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

Parameter to choose wether additional refinement of the piece-wise affine models is employed. Read more
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. Read more
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. Read more
source§

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

Parameter to choose wether the VariationalRefinement post-processing is employed. Read more
source§

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

Parameter to choose wether the VariationalRefinement post-processing is employed. Read more
source§

fn set_use_global_smoother_filter(&mut self, use_fgs: bool) -> Result<()>

Sets whether the fastGlobalSmootherFilter() post-processing is employed. Read more
source§

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

Sets whether the fastGlobalSmootherFilter() post-processing is employed. Read more
source§

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

Sets the respective fastGlobalSmootherFilter() parameter. Read more
source§

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

Sets the respective fastGlobalSmootherFilter() parameter. Read more
source§

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

Sets the respective fastGlobalSmootherFilter() parameter. Read more
source§

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

Sets the respective fastGlobalSmootherFilter() parameter. Read more
source§

impl RICInterpolatorTraitConst for RICInterpolator

source§

fn as_raw_RICInterpolator(&self) -> *const c_void

source§

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. Read more
source§

fn get_superpixel_size(&self) -> Result<i32>

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

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. Read more
source§

fn get_superpixel_ruler(&self) -> Result<f32>

Parameter to tune enforcement of superpixel smoothness factor used for oversegmentation. Read more
source§

fn get_superpixel_mode(&self) -> Result<i32>

Parameter to choose superpixel algorithm variant to use: Read more
source§

fn get_alpha(&self) -> Result<f32>

Alpha is a parameter defining a global weight for transforming geodesic distance into weight. Read more
source§

fn get_model_iter(&self) -> Result<i32>

Parameter defining the number of iterations for piece-wise affine model estimation. Read more
source§

fn get_refine_models(&self) -> Result<bool>

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

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. Read more
source§

fn get_use_variational_refinement(&self) -> Result<bool>

Parameter to choose wether the VariationalRefinement post-processing is employed. Read more
source§

fn get_use_global_smoother_filter(&self) -> Result<bool>

Sets whether the fastGlobalSmootherFilter() post-processing is employed. Read more
source§

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

Sets the respective fastGlobalSmootherFilter() parameter. Read more
source§

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

Sets the respective fastGlobalSmootherFilter() parameter. Read more
source§

impl SparseMatchInterpolatorTrait for RICInterpolator

source§

fn as_raw_mut_SparseMatchInterpolator(&mut self) -> *mut c_void

source§

fn interpolate( &mut self, from_image: &impl ToInputArray, from_points: &impl ToInputArray, to_image: &impl ToInputArray, to_points: &impl ToInputArray, dense_flow: &mut impl ToOutputArray, ) -> Result<()>

Interpolate input sparse matches. Read more
source§

impl SparseMatchInterpolatorTraitConst for RICInterpolator

source§

impl TryFrom<SparseMatchInterpolator> for RICInterpolator

source§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(s: SparseMatchInterpolator) -> Result<Self>

Performs the conversion.
source§

impl Send for RICInterpolator

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<Mat> ModifyInplace for Mat
where Mat: Boxed,

source§

unsafe fn modify_inplace<Res>( &mut self, f: impl FnOnce(&Mat, &mut Mat) -> Res, ) -> Res

Helper function to call OpenCV functions that allow in-place modification of a Mat or another similar object. By passing a mutable reference to the Mat to this function your closure will get called with the read reference and a write references to the same Mat. This is unsafe in a general case as it leads to having non-exclusive mutable access to the internal data, but it can be useful for some performance sensitive operations. One example of an OpenCV function that allows such in-place modification is imgproc::threshold. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.