[][src]Struct pico_detect::Detector

pub struct Detector { /* fields omitted */ }

Implements object detection using a cascade of decision tree classifiers.

Implementations

impl Detector[src]

pub fn classify_region(
    &self,
    image: &GrayImage,
    roi: &Point3<u32>
) -> Option<f32>
[src]

Estimate detection score for the region of interest.

Arguments

  • image - Target image.
  • roi - region of interest:
    • roi.x position on image x-axis,
    • roi.y position on image y-axis,
    • roi.z region size.

pub fn run_cascade_mut(
    &self,
    image: &GrayImage,
    detections: &mut Vec<Detection>,
    params: &CascadeParameters
)
[src]

Run cascade and push detections to the existing collection.

pub fn run_cascade(
    &self,
    image: &GrayImage,
    params: &CascadeParameters
) -> Vec<Detection>
[src]

Run cascade with a new empty detection collection.

pub fn find_clusters(
    &self,
    image: &GrayImage,
    params: &CascadeParameters,
    threshold: f32
) -> Vec<Detection>
[src]

Run cascade and clusterize resulted detections using Self::cluster_detections

pub fn cluster_detections(
    detections: Vec<Detection>,
    threshold: f32
) -> Vec<Detection>
[src]

Clusterize detections by intersection over union (IoU) metric.

Arguments

  • detections -- mutable collection of detections;
  • threshold -- if IoU is bigger then a detection is a part of a cluster.

pub fn from_readable(readable: impl Read) -> Result<Self, Error>[src]

Create a detector object from a readable source.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SetParameter for T

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,