Trait LineMod_DetectorTrait

Source
pub trait LineMod_DetectorTrait: LineMod_DetectorTraitConst {
    // Required method
    fn as_raw_mut_LineMod_Detector(&mut self) -> *mut c_void;

    // Provided methods
    fn add_template(
        &mut self,
        sources: &Vector<Mat>,
        class_id: &str,
        object_mask: &impl MatTraitConst,
        bounding_box: &mut Rect,
    ) -> Result<i32> { ... }
    fn add_template_def(
        &mut self,
        sources: &Vector<Mat>,
        class_id: &str,
        object_mask: &impl MatTraitConst,
    ) -> Result<i32> { ... }
    fn add_synthetic_template(
        &mut self,
        templates: &Vector<LineMod_Template>,
        class_id: &str,
    ) -> Result<i32> { ... }
    fn read(&mut self, fn_: &impl FileNodeTraitConst) -> Result<()> { ... }
    fn read_class(
        &mut self,
        fn_: &impl FileNodeTraitConst,
        class_id_override: &str,
    ) -> Result<String> { ... }
    fn read_class_def(
        &mut self,
        fn_: &impl FileNodeTraitConst,
    ) -> Result<String> { ... }
    fn read_classes(
        &mut self,
        class_ids: &Vector<String>,
        format: &str,
    ) -> Result<()> { ... }
    fn read_classes_def(&mut self, class_ids: &Vector<String>) -> Result<()> { ... }
}
Expand description

Mutable methods for crate::rgbd::LineMod_Detector

Required Methods§

Provided Methods§

Source

fn add_template( &mut self, sources: &Vector<Mat>, class_id: &str, object_mask: &impl MatTraitConst, bounding_box: &mut Rect, ) -> Result<i32>

\brief Add new object template.

\param sources Source images, one for each modality. \param class_id Object class ID. \param object_mask Mask separating object from background. \param[out] bounding_box Optionally return bounding box of the extracted features.

\return Template ID, or -1 if failed to extract a valid template.

§C++ default parameters
  • bounding_box: NULL
Source

fn add_template_def( &mut self, sources: &Vector<Mat>, class_id: &str, object_mask: &impl MatTraitConst, ) -> Result<i32>

\brief Add new object template.

\param sources Source images, one for each modality. \param class_id Object class ID. \param object_mask Mask separating object from background. \param[out] bounding_box Optionally return bounding box of the extracted features.

\return Template ID, or -1 if failed to extract a valid template.

§Note

This alternative version of LineMod_DetectorTrait::add_template function uses the following default values for its arguments:

  • bounding_box: NULL
Source

fn add_synthetic_template( &mut self, templates: &Vector<LineMod_Template>, class_id: &str, ) -> Result<i32>

\brief Add a new object template computed by external means.

Source

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

Source

fn read_class( &mut self, fn_: &impl FileNodeTraitConst, class_id_override: &str, ) -> Result<String>

§C++ default parameters
  • class_id_override: “”
Source

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

§Note

This alternative version of LineMod_DetectorTrait::read_class function uses the following default values for its arguments:

  • class_id_override: “”
Source

fn read_classes( &mut self, class_ids: &Vector<String>, format: &str, ) -> Result<()>

§C++ default parameters
  • format: “templates_%s.yml.gz”
Source

fn read_classes_def(&mut self, class_ids: &Vector<String>) -> Result<()>

§Note

This alternative version of LineMod_DetectorTrait::read_classes function uses the following default values for its arguments:

  • format: “templates_%s.yml.gz”

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§