Trait LineMod_DetectorTraitConst

Source
pub trait LineMod_DetectorTraitConst {
Show 15 methods // Required method fn as_raw_LineMod_Detector(&self) -> *const c_void; // Provided methods fn match_( &self, sources: &Vector<Mat>, threshold: f32, matches: &mut Vector<LineMod_Match>, class_ids: &Vector<String>, quantized_images: &mut impl ToOutputArray, masks: &Vector<Mat>, ) -> Result<()> { ... } fn match__def( &self, sources: &Vector<Mat>, threshold: f32, matches: &mut Vector<LineMod_Match>, ) -> Result<()> { ... } fn get_modalities(&self) -> Result<Vector<Ptr<LineMod_Modality>>> { ... } fn get_t(&self, pyramid_level: i32) -> Result<i32> { ... } fn pyramid_levels(&self) -> Result<i32> { ... } fn get_templates( &self, class_id: &str, template_id: i32, ) -> Result<Vector<LineMod_Template>> { ... } fn num_templates(&self) -> Result<i32> { ... } fn num_templates_1(&self, class_id: &str) -> Result<i32> { ... } fn num_classes(&self) -> Result<i32> { ... } fn class_ids(&self) -> Result<Vector<String>> { ... } fn write(&self, fs: &mut impl FileStorageTrait) -> Result<()> { ... } fn write_class( &self, class_id: &str, fs: &mut impl FileStorageTrait, ) -> Result<()> { ... } fn write_classes(&self, format: &str) -> Result<()> { ... } fn write_classes_def(&self) -> Result<()> { ... }
}
Expand description

Constant methods for crate::rgbd::LineMod_Detector

Required Methods§

Provided Methods§

Source

fn match_( &self, sources: &Vector<Mat>, threshold: f32, matches: &mut Vector<LineMod_Match>, class_ids: &Vector<String>, quantized_images: &mut impl ToOutputArray, masks: &Vector<Mat>, ) -> Result<()>

\brief Detect objects by template matching.

Matches globally at the lowest pyramid level, then refines locally stepping up the pyramid.

\param sources Source images, one for each modality. \param threshold Similarity threshold, a percentage between 0 and 100. \param[out] matches Template matches, sorted by similarity score. \param class_ids If non-empty, only search for the desired object classes. \param[out] quantized_images Optionally return vector of quantized images. \param masks The masks for consideration during matching. The masks should be CV_8UC1 where 255 represents a valid pixel. If non-empty, the vector must be the same size as sources. Each element must be empty or the same size as its corresponding source.

§C++ default parameters
  • class_ids: std::vector()
  • quantized_images: noArray()
  • masks: std::vector()
Source

fn match__def( &self, sources: &Vector<Mat>, threshold: f32, matches: &mut Vector<LineMod_Match>, ) -> Result<()>

\brief Detect objects by template matching.

Matches globally at the lowest pyramid level, then refines locally stepping up the pyramid.

\param sources Source images, one for each modality. \param threshold Similarity threshold, a percentage between 0 and 100. \param[out] matches Template matches, sorted by similarity score. \param class_ids If non-empty, only search for the desired object classes. \param[out] quantized_images Optionally return vector of quantized images. \param masks The masks for consideration during matching. The masks should be CV_8UC1 where 255 represents a valid pixel. If non-empty, the vector must be the same size as sources. Each element must be empty or the same size as its corresponding source.

§Note

This alternative version of LineMod_DetectorTraitConst::match_ function uses the following default values for its arguments:

  • class_ids: std::vector()
  • quantized_images: noArray()
  • masks: std::vector()
Source

fn get_modalities(&self) -> Result<Vector<Ptr<LineMod_Modality>>>

\brief Get the modalities used by this detector.

You are not permitted to add/remove modalities, but you may dynamic_cast them to tweak parameters.

Source

fn get_t(&self, pyramid_level: i32) -> Result<i32>

\brief Get sampling step T at pyramid_level.

Source

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

\brief Get number of pyramid levels used by this detector.

Source

fn get_templates( &self, class_id: &str, template_id: i32, ) -> Result<Vector<LineMod_Template>>

\brief Get the template pyramid identified by template_id.

For example, with 2 modalities (Gradient, Normal) and two pyramid levels (L0, L1), the order is (GradientL0, NormalL0, GradientL1, NormalL1).

Source

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

Source

fn num_templates_1(&self, class_id: &str) -> Result<i32>

Source

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

Source

fn class_ids(&self) -> Result<Vector<String>>

Source

fn write(&self, fs: &mut impl FileStorageTrait) -> Result<()>

Source

fn write_class( &self, class_id: &str, fs: &mut impl FileStorageTrait, ) -> Result<()>

Source

fn write_classes(&self, format: &str) -> Result<()>

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

fn write_classes_def(&self) -> Result<()>

§Note

This alternative version of LineMod_DetectorTraitConst::write_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§