pub struct SACSegmentation { /* private fields */ }Expand description
Sample Consensus algorithm segmentation of 3D point cloud model.
Example of segmenting plane from a 3D point cloud using the RANSAC algorithm: planeSegmentationUsingRANSAC
§See also
- Supported algorithms: enum SacMethod in ptcloud.hpp.
- Supported models: enum SacModelType in ptcloud.hpp.
Implementations§
Source§impl SACSegmentation
impl SACSegmentation
Sourcepub fn create(
sac_model_type: SacModelType,
sac_method: SacMethod,
threshold: f64,
max_iterations: i32,
) -> Result<Ptr<SACSegmentation>>
pub fn create( sac_model_type: SacModelType, sac_method: SacMethod, threshold: f64, max_iterations: i32, ) -> Result<Ptr<SACSegmentation>>
§C++ default parameters
- sac_model_type: SAC_MODEL_PLANE
- sac_method: SAC_METHOD_RANSAC
- threshold: 0.5
- max_iterations: 1000
Sourcepub fn create_def() -> Result<Ptr<SACSegmentation>>
pub fn create_def() -> Result<Ptr<SACSegmentation>>
§Note
This alternative version of SACSegmentation::create function uses the following default values for its arguments:
- sac_model_type: SAC_MODEL_PLANE
- sac_method: SAC_METHOD_RANSAC
- threshold: 0.5
- max_iterations: 1000
Trait Implementations§
Source§impl Boxed for SACSegmentation
impl Boxed for SACSegmentation
Source§unsafe fn from_raw(
ptr: <SACSegmentation as OpenCVFromExtern>::ExternReceive,
) -> Self
unsafe fn from_raw( ptr: <SACSegmentation as OpenCVFromExtern>::ExternReceive, ) -> Self
Wrap the specified raw pointer Read more
Source§fn into_raw(
self,
) -> <SACSegmentation as OpenCVTypeExternContainer>::ExternSendMut
fn into_raw( self, ) -> <SACSegmentation as OpenCVTypeExternContainer>::ExternSendMut
Return the underlying raw pointer while consuming this wrapper. Read more
Source§fn as_raw(&self) -> <SACSegmentation as OpenCVTypeExternContainer>::ExternSend
fn as_raw(&self) -> <SACSegmentation as OpenCVTypeExternContainer>::ExternSend
Return the underlying raw pointer. Read more
Source§fn as_raw_mut(
&mut self,
) -> <SACSegmentation as OpenCVTypeExternContainer>::ExternSendMut
fn as_raw_mut( &mut self, ) -> <SACSegmentation as OpenCVTypeExternContainer>::ExternSendMut
Return the underlying mutable raw pointer Read more
Source§impl Debug for SACSegmentation
impl Debug for SACSegmentation
Source§impl Drop for SACSegmentation
impl Drop for SACSegmentation
Source§impl SACSegmentationTrait for SACSegmentation
impl SACSegmentationTrait for SACSegmentation
fn as_raw_mut_SACSegmentation(&mut self) -> *mut c_void
Source§fn segment(
&mut self,
input_pts: &impl ToInputArray,
labels: &mut impl ToOutputArray,
models_coefficients: &mut impl ToOutputArray,
) -> Result<i32>
fn segment( &mut self, input_pts: &impl ToInputArray, labels: &mut impl ToOutputArray, models_coefficients: &mut impl ToOutputArray, ) -> Result<i32>
Execute segmentation using the sample consensus method. Read more
Source§fn set_sac_model_type(&mut self, sac_model_type: SacModelType) -> Result<()>
fn set_sac_model_type(&mut self, sac_model_type: SacModelType) -> Result<()>
Set the type of sample consensus model to use.
Source§fn set_sac_method_type(&mut self, sac_method: SacMethod) -> Result<()>
fn set_sac_method_type(&mut self, sac_method: SacMethod) -> Result<()>
Set the type of sample consensus method to use.
Source§fn set_distance_threshold(&mut self, threshold: f64) -> Result<()>
fn set_distance_threshold(&mut self, threshold: f64) -> Result<()>
Set the distance to the model threshold.
Considered as inlier point if distance to the model less than threshold.
Source§fn set_radius_limits(&mut self, radius_min: f64, radius_max: f64) -> Result<()>
fn set_radius_limits(&mut self, radius_min: f64, radius_max: f64) -> Result<()>
Set the minimum and maximum radius limits for the model.
Only used for models whose model parameters include a radius.
Source§fn set_max_iterations(&mut self, max_iterations: i32) -> Result<()>
fn set_max_iterations(&mut self, max_iterations: i32) -> Result<()>
Set the maximum number of iterations to attempt.
Source§fn set_confidence(&mut self, confidence: f64) -> Result<()>
fn set_confidence(&mut self, confidence: f64) -> Result<()>
Set the confidence that ensure at least one of selections is an error-free set of data points.
Source§fn set_number_of_models_expected(
&mut self,
number_of_models_expected: i32,
) -> Result<()>
fn set_number_of_models_expected( &mut self, number_of_models_expected: i32, ) -> Result<()>
Set the number of models expected.
Source§impl SACSegmentationTraitConst for SACSegmentation
impl SACSegmentationTraitConst for SACSegmentation
fn as_raw_SACSegmentation(&self) -> *const c_void
Source§fn get_sac_model_type(&self) -> Result<SacModelType>
fn get_sac_model_type(&self) -> Result<SacModelType>
Get the type of sample consensus model used.
Source§fn get_sac_method_type(&self) -> Result<SacMethod>
fn get_sac_method_type(&self) -> Result<SacMethod>
Get the type of sample consensus method used.
Source§fn get_distance_threshold(&self) -> Result<f64>
fn get_distance_threshold(&self) -> Result<f64>
Get the distance to the model threshold.
Source§fn get_radius_limits(
&self,
radius_min: &mut f64,
radius_max: &mut f64,
) -> Result<()>
fn get_radius_limits( &self, radius_min: &mut f64, radius_max: &mut f64, ) -> Result<()>
Get the minimum and maximum radius limits for the model.
Source§fn get_max_iterations(&self) -> Result<i32>
fn get_max_iterations(&self) -> Result<i32>
Get the maximum number of iterations to attempt.
Source§fn get_confidence(&self) -> Result<f64>
fn get_confidence(&self) -> Result<f64>
Get the confidence that ensure at least one of selections is an error-free set of data points.
Source§fn get_number_of_models_expected(&self) -> Result<i32>
fn get_number_of_models_expected(&self) -> Result<i32>
Get the expected number of models.
Source§fn is_parallel(&self) -> Result<bool>
fn is_parallel(&self) -> Result<bool>
Get whether to use parallelism or not.
Source§fn get_random_generator_state(&self) -> Result<u64>
fn get_random_generator_state(&self) -> Result<u64>
Get state used to initialize the RNG(Random Number Generator).
impl Send for SACSegmentation
Auto Trait Implementations§
impl !Sync for SACSegmentation
impl Freeze for SACSegmentation
impl RefUnwindSafe for SACSegmentation
impl Unpin for SACSegmentation
impl UnsafeUnpin for SACSegmentation
impl UnwindSafe for SACSegmentation
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