pub struct HogSpec { /* private fields */ }Expand description
HoG options plus values calculated from these options and the desired image dimensions. Validation must occur when instances of this struct are created - functions receiving a spec will assume that it is valid.
Implementations§
Source§impl HogSpec
impl HogSpec
Sourcepub fn from_options(
width: u32,
height: u32,
options: HogOptions,
) -> Result<HogSpec, String>
pub fn from_options( width: u32, height: u32, options: HogOptions, ) -> Result<HogSpec, String>
Returns an error message if image dimensions aren’t compatible with the provided options.
Sourcepub fn descriptor_length(&self) -> usize
pub fn descriptor_length(&self) -> usize
The total size in floats of the HoG descriptor with these dimensions.
Trait Implementations§
impl Copy for HogSpec
impl Eq for HogSpec
impl StructuralPartialEq for HogSpec
Auto Trait Implementations§
impl Freeze for HogSpec
impl RefUnwindSafe for HogSpec
impl Send for HogSpec
impl Sync for HogSpec
impl Unpin for HogSpec
impl UnsafeUnpin for HogSpec
impl UnwindSafe for HogSpec
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§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 moreSource§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).Source§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.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.