[][src]Struct akaze::Akaze

pub struct Akaze {
    pub num_sublevels: u32,
    pub max_octave_evolution: u32,
    pub base_scale_offset: f64,
    pub initial_contrast: f64,
    pub contrast_percentile: f64,
    pub contrast_factor_num_bins: usize,
    pub derivative_factor: f64,
    pub detector_threshold: f64,
    pub descriptor_channels: usize,
    pub descriptor_pattern_size: usize,
}

Contains the configuration parameters of AKAZE.

The most important parameter to pay attention to is detector_threshold. [Config::new] can be used to set this threshold and let all other parameters remain default. You can also use the helpers [Config::sparse] and [Config::dense]. The default value of detector_threshold is 0.001.

Fields

num_sublevels: u32

Default number of sublevels per scale level

max_octave_evolution: u32

Maximum octave evolution of the image 2^sigma (coarsest scale sigma units)

base_scale_offset: f64

Base scale offset (sigma units)

initial_contrast: f64

The initial contrast factor parameter

contrast_percentile: f64

Percentile level for the contrast factor

contrast_factor_num_bins: usize

Number of bins for the contrast factor histogram

derivative_factor: f64

Factor for the multiscale derivatives

detector_threshold: f64

Detector response threshold to accept point

descriptor_channels: usize

Number of channels in the descriptor (1, 2, 3)

descriptor_pattern_size: usize

Actual patch size is 2pattern_sizepoint.scale

Implementations

impl Akaze[src]

pub fn extract_descriptors(
    &self,
    evolutions: &[EvolutionStep],
    keypoints: &[KeyPoint]
) -> Vec<BitArray<64>>
[src]

Extract descriptors from keypoints/an evolution

Arguments

  • evolutions - the nonlinear scale space
  • keypoints - the keypoints detected.
  • options - The options of the nonlinear scale space.

Return value

A vector of descriptors.

impl Akaze[src]

pub fn detector_response(&self, evolutions: &mut Vec<EvolutionStep>)[src]

Compute the detector response - the determinant of the Hessian - and save the result in the evolutions.

Arguments

  • evolutions - The computed evolutions.
  • options - The options

impl Akaze[src]

pub fn allocate_evolutions(&self, width: u32, height: u32) -> Vec<EvolutionStep>[src]

Allocate and calculate prerequisites to the construction of a scale space.

Arguments

width - The width of the input image. height - The height of the input image. options - The configuration to use.

impl Akaze[src]

pub fn detect_keypoints(
    &self,
    evolutions: &mut Vec<EvolutionStep>
) -> Vec<KeyPoint>
[src]

Detect keypoints in an image given a nonlinear scale space. Detects scale space extrema and performs sub-pixel refinement.

Arguments

  • evolutions - The fully-constructed non-linear scale space.
  • options - The options to use.

Return value

The resulting keypoints.

impl Akaze[src]

pub fn new(threshold: f64) -> Self[src]

This convenience constructor is provided for the very common case that the detector threshold needs to be modified.

pub fn sparse() -> Self[src]

Create a Config that sparsely detects features.

Uses a threshold of 0.01 (default is 0.001).

pub fn dense() -> Self[src]

Create a Config that densely detects features.

Uses a threshold of 0.0001 (default is 0.001).

impl Akaze[src]

pub fn extract(
    &self,
    image: &DynamicImage
) -> (Vec<KeyPoint>, Vec<BitArray<64>>)
[src]

Extract features using the Akaze feature extractor.

This performs all operations end-to-end. The client might be only interested in certain portions of the process, all of which are exposed in public functions, but this function can document how the various parts fit together.

Arguments

  • image - The input image for which to extract features.
  • options - The options for the algorithm. Set this to None for default options.

Returns the keypoints and the descriptors.

Example

use std::path::Path;
let akaze = akaze::Akaze::default();
let (keypoints, descriptors) = akaze.extract(&image::open("res/0000000000.png").unwrap());

pub fn extract_path(
    &self,
    path: impl AsRef<Path>
) -> ImageResult<(Vec<KeyPoint>, Vec<BitArray<64>>)>
[src]

Extract features using the Akaze feature extractor from an image on disk.

This performs all operations end-to-end. The client might be only interested in certain portions of the process, all of which are exposed in public functions, but this function can document how the various parts fit together.

Arguments

  • path - The input image path for which to extract features.
  • options - The options for the algorithm. Set this to None for default options.

Returns an ImageResult of the keypoints and the descriptors.

Examples

use std::path::Path;
let akaze = akaze::Akaze::default();
let (keypoints, descriptors) = akaze.extract_path("res/0000000000.png").unwrap();

Trait Implementations

impl Clone for Akaze[src]

impl Copy for Akaze[src]

impl Debug for Akaze[src]

impl Default for Akaze[src]

Auto Trait Implementations

impl RefUnwindSafe for Akaze

impl Send for Akaze

impl Sync for Akaze

impl Unpin for Akaze

impl UnwindSafe for Akaze

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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>,