Skip to main content

SACSegmentation

Struct SACSegmentation 

Source
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

  1. Supported algorithms: enum SacMethod in ptcloud.hpp.
  2. Supported models: enum SacModelType in ptcloud.hpp.

Implementations§

Source§

impl SACSegmentation

Source

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
Source

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

Source§

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

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

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

Return the underlying mutable raw pointer Read more
Source§

impl Debug for SACSegmentation

Source§

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

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

impl Drop for SACSegmentation

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl SACSegmentationTrait for SACSegmentation

Source§

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>

Execute segmentation using the sample consensus method. Read more
Source§

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<()>

Set the type of sample consensus method to use.
Source§

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<()>

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<()>

Set the maximum number of iterations to attempt.
Source§

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<()>

Set the number of models expected.
Source§

fn set_parallel(&mut self, is_parallel: bool) -> Result<()>

Set whether to use parallelism or not. The number of threads is set by cv::setNumThreads(int nthreads).
Source§

fn set_random_generator_state(&mut self, rng_state: u64) -> Result<()>

Set state used to initialize the RNG(Random Number Generator).
Source§

impl SACSegmentationTraitConst for SACSegmentation

Source§

fn as_raw_SACSegmentation(&self) -> *const c_void

Source§

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>

Get the type of sample consensus method used.
Source§

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<()>

Get the minimum and maximum radius limits for the model.
Source§

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

Get the maximum number of iterations to attempt.
Source§

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>

Get the expected number of models.
Source§

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

Get whether to use parallelism or not.
Source§

fn get_random_generator_state(&self) -> Result<u64>

Get state used to initialize the RNG(Random Number Generator).
Source§

impl Send for SACSegmentation

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.