pub struct PPF3DDetector { /* private fields */ }
Expand description

Class, allowing the load and matching 3D models. Typical Use:

// Train a model
ppf_match_3d::PPF3DDetector detector(0.05, 0.05);
detector.trainModel(pc);
// Search the model in a given scene
vector<Pose3DPtr> results;
detector.match(pcTest, results, 1.0/5.0,0.05);

Implementations§

source§

impl PPF3DDetector

source

pub fn default() -> Result<PPF3DDetector>

\brief Empty constructor. Sets default arguments

source

pub fn new( relative_sampling_step: f64, relative_distance_step: f64, num_angles: f64 ) -> Result<PPF3DDetector>

Constructor with arguments

Parameters
  • relativeSamplingStep: Sampling distance relative to the object’s diameter. Models are first sampled uniformly in order to improve efficiency. Decreasing this value leads to a denser model, and a more accurate pose estimation but the larger the model, the slower the training. Increasing the value leads to a less accurate pose computation but a smaller model and faster model generation and matching. Beware of the memory consumption when using small values.
  • relativeDistanceStep: The discretization distance of the point pair distance relative to the model’s diameter. This value has a direct impact on the hashtable. Using small values would lead to too fine discretization, and thus ambiguity in the bins of hashtable. Too large values would lead to no discrimination over the feature vectors and different point pair features would be assigned to the same bin. This argument defaults to the value of RelativeSamplingStep. For noisy scenes, the value can be increased to improve the robustness of the matching against noisy points.
  • numAngles: Set the discretization of the point pair orientation as the number of subdivisions of the angle. This value is the equivalent of RelativeDistanceStep for the orientations. Increasing the value increases the precision of the matching but decreases the robustness against incorrect normal directions. Decreasing the value decreases the precision of the matching but increases the robustness against incorrect normal directions. For very noisy scenes where the normal directions can not be computed accurately, the value can be set to 25 or 20.
C++ default parameters
  • relative_distance_step: 0.05
  • num_angles: 30

Trait Implementations§

source§

impl Boxed for PPF3DDetector

source§

unsafe fn from_raw(ptr: *mut c_void) -> Self

Wrap the specified raw pointer Read more
source§

fn into_raw(self) -> *mut c_void

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

fn as_raw(&self) -> *const c_void

Return the underlying raw pointer. Read more
source§

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

Return the underlying mutable raw pointer Read more
source§

impl Debug for PPF3DDetector

source§

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

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

impl Drop for PPF3DDetector

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl PPF3DDetectorTrait for PPF3DDetector

source§

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

source§

fn set_search_params( &mut self, position_threshold: f64, rotation_threshold: f64, use_weighted_clustering: bool ) -> Result<()>

Set the parameters for the search Read more
source§

fn train_model(&mut self, model: &Mat) -> Result<()>

\brief Trains a new model. Read more
source§

fn match_( &mut self, scene: &Mat, results: &mut Vector<Pose3DPtr>, relative_scene_sample_step: f64, relative_scene_distance: f64 ) -> Result<()>

\brief Matches a trained model across a provided scene. Read more
source§

impl PPF3DDetectorTraitConst for PPF3DDetector

source§

impl Send for PPF3DDetector

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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<T, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.