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§
fn as_raw_LineMod_Detector(&self) -> *const c_void
Provided Methods§
Sourcefn 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_( &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
§C++ default parameters
- class_ids: std::vector
() - quantized_images: noArray()
- masks: std::vector
()
Sourcefn match__def(
&self,
sources: &Vector<Mat>,
threshold: f32,
matches: &mut Vector<LineMod_Match>,
) -> Result<()>
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
§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
()
Sourcefn get_modalities(&self) -> Result<Vector<Ptr<LineMod_Modality>>>
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.
Sourcefn get_t(&self, pyramid_level: i32) -> Result<i32>
fn get_t(&self, pyramid_level: i32) -> Result<i32>
\brief Get sampling step T at pyramid_level.
Sourcefn pyramid_levels(&self) -> Result<i32>
fn pyramid_levels(&self) -> Result<i32>
\brief Get number of pyramid levels used by this detector.
Sourcefn get_templates(
&self,
class_id: &str,
template_id: i32,
) -> Result<Vector<LineMod_Template>>
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).
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<()>
Sourcefn write_classes(&self, format: &str) -> Result<()>
fn write_classes(&self, format: &str) -> Result<()>
§C++ default parameters
- format: “templates_%s.yml.gz”
Sourcefn write_classes_def(&self) -> Result<()>
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.