Struct pico_detect::Localizer [−][src]
pub struct Localizer { /* fields omitted */ }Expand description
Implements object localization using decision trees.
Details available here.
Implementations
pub fn localize<I>(&self, image: &I, roi: Similarity2<f32>) -> Point2<f32> where
I: GenericImageView<Pixel = Luma<u8>>,
pub fn localize<I>(&self, image: &I, roi: Similarity2<f32>) -> Point2<f32> where
I: GenericImageView<Pixel = Luma<u8>>,
Estimate object location on the image
Arguments
image- Target image.roi– similarity transform as region of interest:roi.isometry.translationregion center position on image,- TODO
roi.isometry.rotationregion rotation (have no effect), roi.scalingregion size.
pub fn perturb_localize<I>(
&self,
image: &I,
initial_roi: Similarity2<f32>,
rng: impl RngCore,
nperturbs: usize
) -> Point2<f32> where
I: GenericImageView<Pixel = Luma<u8>>,
pub fn perturb_localize<I>(
&self,
image: &I,
initial_roi: Similarity2<f32>,
rng: impl RngCore,
nperturbs: usize
) -> Point2<f32> where
I: GenericImageView<Pixel = Luma<u8>>,
Estimate object location on the image with perturbation to increase accuracy.
Arguments
image- Target image.roi– similarity transform as region of interest:roi.isometry.translationregion center position on image,roi.isometry.rotationregion rotation (have no effect),roi.scalingregion size.
rng- Source for randomness.nperturbs- How many perturbations to make.
Create localizer from a readable source.
Auto Trait Implementations
impl RefUnwindSafe for Localizer
impl UnwindSafe for Localizer
Blanket Implementations
type Err = NoError
type Err = NoError
The error type produced by a failed conversion.
pub fn approx_from(
src: Src
) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
pub fn approx_from(
src: Src
) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
pub fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
pub fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
Mutably borrows from an owned value. Read more
Approximate the subject to a given type with the default scheme.
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
Approximate the subject to a given type with a specific scheme.
Attempt to convert the subject to a given type.
The inverse inclusion map: attempts to construct self from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self is actually part of its subset T (and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self to the equivalent element of its superset.
pub fn vzip(self) -> V
type Err = NoError
type Err = NoError
The error type produced by a failed conversion.
pub fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
pub fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
Convert the given value into an exactly equivalent representation.
type Err = <Dst as ValueFrom<Src>>::Err
type Err = <Dst as ValueFrom<Src>>::Err
The error type produced by a failed conversion.
pub fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>
pub fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>
Convert the subject into an exactly equivalent representation.