pub struct Mbss { /* private fields */ }
Expand description
Holds intermediate calculations that can be preserved when locating sound sources using the same array geometry multiple times.
Implementations§
source§impl Mbss
impl Mbss
sourcepub fn array_centroid(&self) -> Position
pub fn array_centroid(&self) -> Position
Returns the center of the microphone array.
sourcepub fn analyze(&self, audio: &Audio) -> Array2<f64>
pub fn analyze(&self, audio: &Audio) -> Array2<f64>
Analyzes input audio and produces [azimuth x elevation] matrix of intensities for each sound source location.
sourcepub fn directional_intensities(
&self,
intensities: ArrayView2<'_, f64>,
threshold: f64
) -> Vec<(Direction, f64)>
pub fn directional_intensities( &self, intensities: ArrayView2<'_, f64>, threshold: f64 ) -> Vec<(Direction, f64)>
Takes intensities
returned by Self::analyze
and returns, for those
satisfying the threshold, the Direction
along with the intensity.
sourcepub fn find_sources(
&self,
intensities: ArrayView2<'_, f64>,
nsrc: usize
) -> Vec<(Direction, f64)>
pub fn find_sources( &self, intensities: ArrayView2<'_, f64>, nsrc: usize ) -> Vec<(Direction, f64)>
Findes sound sources in intensities
returned by Self::analyze
,
i.e., Direction
s that are local maxima and at least
MbssConfig::min_angle
apart.
Auto Trait Implementations§
impl RefUnwindSafe for Mbss
impl Send for Mbss
impl Sync for Mbss
impl Unpin for Mbss
impl UnwindSafe for Mbss
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<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.