Struct object_detector_rust::feature::BriefFeature
source · pub struct BriefFeature { /* private fields */ }Expand description
Struct for extracting BRIEF (Binary Robust Independent Elementary Features) from an image.
Implementations§
source§impl BriefFeature
impl BriefFeature
sourcepub fn new() -> BriefFeature
pub fn new() -> BriefFeature
Creates a new BriefFeature instance with default parameters.
Example
use object_detector_rust::feature::{BriefFeature, Feature};
let feature = BriefFeature::new();sourcepub fn new_with_threshold_and_length(threshold: u8, length: u32) -> BriefFeature
pub fn new_with_threshold_and_length(threshold: u8, length: u32) -> BriefFeature
Creates a new BriefFeature with the given threshold and length.
Parameters
threshold: The threshold value used for determining whether a pixel difference is significant. The default value is 12.length: The length of the descriptor, in pixels. The default value is 32.
Trait Implementations§
source§impl Debug for BriefFeature
impl Debug for BriefFeature
source§impl Default for BriefFeature
impl Default for BriefFeature
source§impl Feature for BriefFeature
impl Feature for BriefFeature
source§fn extract(&self, image: &DynamicImage) -> Result<Vec<f32>, String>
fn extract(&self, image: &DynamicImage) -> Result<Vec<f32>, String>
Extracts the feature descriptor from the given image
Arguments
image- The image to extract the feature descriptor from.
Returns
A vector of floating point values representing the feature descriptor.
Example
use image::{DynamicImage, GrayImage};
use imageproc::corners::{corners_fast9, Corner};
use object_detector_rust::feature::{Feature, BriefFeature};
let image = DynamicImage::new_rgb8(100, 100);
let gray_image = image.to_luma8();
let feature = BriefFeature::new();
let descriptor = feature.extract(&image).unwrap();source§impl PartialEq<BriefFeature> for BriefFeature
impl PartialEq<BriefFeature> for BriefFeature
source§fn eq(&self, other: &BriefFeature) -> bool
fn eq(&self, other: &BriefFeature) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for BriefFeature
Auto Trait Implementations§
impl RefUnwindSafe for BriefFeature
impl Send for BriefFeature
impl Sync for BriefFeature
impl Unpin for BriefFeature
impl UnwindSafe for BriefFeature
Blanket Implementations§
§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere Scheme: ApproxScheme,
§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere Dst: ApproxFrom<Src, Scheme>, Scheme: ApproxScheme,
§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
§impl<T> ConvUtil for T
impl<T> ConvUtil for T
§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, DefaultApprox>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where Self: Sized + ApproxInto<Dst, DefaultApprox>,
Approximate the subject to a given type with the default scheme.
§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where Self: Sized + ApproxInto<Dst, Scheme>, Scheme: ApproxScheme,
Approximate the subject to a given type with a specific scheme.
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.§impl<Src> TryFrom<Src> for Src
impl<Src> TryFrom<Src> for Src
§impl<Src, Dst> TryInto<Dst> for Srcwhere
Dst: TryFrom<Src>,
impl<Src, Dst> TryInto<Dst> for Srcwhere Dst: TryFrom<Src>,
§impl<Src> ValueFrom<Src> for Src
impl<Src> ValueFrom<Src> for Src
§fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
Convert the given value into an exactly equivalent representation.