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
impl AlgorithmTrait for RICInterpolator
source§impl AlgorithmTraitConst for RICInterpolator
impl AlgorithmTraitConst for RICInterpolator
fn as_raw_Algorithm(&self) -> *const c_void
source§fn write(&self, fs: &mut impl FileStorageTrait) -> Result<()>
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<()>
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<()>
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<()>
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>
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<()>
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>
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
impl Boxed for RICInterpolator
source§unsafe fn from_raw(
ptr: <RICInterpolator as OpenCVFromExtern>::ExternReceive,
) -> Self
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
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
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
fn as_raw_mut( &mut self, ) -> <RICInterpolator as OpenCVTypeExternContainer>::ExternSendMut
Return the underlying mutable raw pointer Read more
source§impl Debug for RICInterpolator
impl Debug for RICInterpolator
source§impl Drop for RICInterpolator
impl Drop for RICInterpolator
source§impl From<RICInterpolator> for Algorithm
impl From<RICInterpolator> for Algorithm
source§fn from(s: RICInterpolator) -> Self
fn from(s: RICInterpolator) -> Self
Converts to this type from the input type.
source§impl From<RICInterpolator> for SparseMatchInterpolator
impl From<RICInterpolator> for SparseMatchInterpolator
source§fn from(s: RICInterpolator) -> Self
fn from(s: RICInterpolator) -> Self
Converts to this type from the input type.
source§impl RICInterpolatorTrait for RICInterpolator
impl RICInterpolatorTrait for RICInterpolator
fn as_raw_mut_RICInterpolator(&mut self) -> *mut c_void
source§fn set_cost_map(&mut self, cost_map: &impl MatTraitConst) -> Result<()>
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<()>
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<()>
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<()>
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<()>
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<()>
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<()>
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<()>
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<()>
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<()>
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<()>
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<()>
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<()>
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<()>
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<()>
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<()>
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<()>
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<()>
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<()>
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<()>
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<()>
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<()>
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<()>
fn set_fgs_lambda_def(&mut self) -> Result<()>
Sets the respective fastGlobalSmootherFilter() parameter. Read more
source§impl RICInterpolatorTraitConst for RICInterpolator
impl RICInterpolatorTraitConst for RICInterpolator
fn as_raw_RICInterpolator(&self) -> *const c_void
source§fn get_superpixel_size(&self) -> Result<i32>
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>
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>
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>
fn get_superpixel_mode(&self) -> Result<i32>
Parameter to choose superpixel algorithm variant to use: Read more
source§fn get_alpha(&self) -> Result<f32>
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>
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>
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>
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>
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>
fn get_use_global_smoother_filter(&self) -> Result<bool>
Sets whether the fastGlobalSmootherFilter() post-processing is employed. Read more
source§impl SparseMatchInterpolatorTrait for RICInterpolator
impl SparseMatchInterpolatorTrait for RICInterpolator
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<()>
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
impl SparseMatchInterpolatorTraitConst for RICInterpolator
fn as_raw_SparseMatchInterpolator(&self) -> *const c_void
impl Send for RICInterpolator
Auto Trait Implementations§
impl Freeze for RICInterpolator
impl RefUnwindSafe for RICInterpolator
impl !Sync for RICInterpolator
impl Unpin for RICInterpolator
impl UnwindSafe for RICInterpolator
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Mat> ModifyInplace for Matwhere
Mat: Boxed,
impl<Mat> ModifyInplace for Matwhere
Mat: Boxed,
source§unsafe fn modify_inplace<Res>(
&mut self,
f: impl FnOnce(&Mat, &mut Mat) -> Res,
) -> Res
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