Example #1
0
    def __init__(self,
                 n_particles,
                 state_kappa,
                 observation_kappa,
                 outlier_prob=0,
                 *args,
                 **kwargs):
        """
    Localizes source using Von Mises particle filter
          x_t ~ VM(x_{t-1}, kappa_v)
          y_t ~ VM(x_t, kappa_w)

    :param n_particles: number of particles to use
    :param state_kappa: concentration parameter for state von mises distribution
    :param observation_kappa: concentration parameter for observation von mises
                              distribution
    :param outlier_prob: Probability that a given observation comes from a 
                         background uniform outlier von mises distribution. If
                         this is omitted, it will be set to 0, and the normal
                         particle filtering algorithm will be used
    
    All other parameters will be passed to TrackingLocalizer in the form of *args
    and **kwargs
    """
        TrackingLocalizer.__init__(self, *args, **kwargs)
        self._grid_size = self._n_theta * self._n_phi
        #self._process_search_space(search_space)
        self._setup_particle_filters(n_particles, state_kappa,
                                     observation_kappa, outlier_prob)
  def __init__(self, mic_positions, search_space, mic_forward, mic_above, 
               trans_mat, state_cov, emission_mat, emission_cov, dft_len=512, 
               sample_rate=44100, n_theta=20, n_phi=1):
    """
    Localizes source using Kalman Filter:
          x_t = A*x_{t-1} + u,  u ~ N(0,Q)
          y_t = B*x_t + v,  v ~ N(0,R)

    The state vectors x_t have 6 components: 3 coordinates and 3 velocities.
    So x = [c_1, c_2, c_3, v_1, v_2, v_3], where c_i is associated with v_i.
    Note that since x is expected to be on a source plane, c_3 and v_3 should
    be zero. However they are included for freedom and because this will make
    linear transforms among 6 dimensional spaces more easy

    :param mic_forward: length 3 vector indicating direction mic points forward
                        This should be the positive y direction from the mic's
                        point of view
    :param mic_up: length 3 vector indicating direction mic points up. This 
                    should be the positive z direction from the mics point of
                    view
    :param trans_mat: Transition matrix A (should be 6x6 matrix). 
    :param state_cov: State noise covariance matrix Q
    :param emission_mat: Emission matrix B
    :param emission_cov: Emission covariance matrix R
    """
    TrackingLocalizer.__init__(self, mic_positions, search_space, dft_len, 
                               sample_rate, n_theta, n_phi)
    self._grid_size = self._n_theta * self._n_phi
    self._process_search_space(search_space)
    self._setup_posterior_grid()
    self._setup_state_model(mic_forward, mic_above, trans_mat, state_cov, 
                            emission_mat, emission_cov)
  def __init__(self, mic_positions, search_space, source_cov, dft_len=512, sample_rate=44100,
                     n_theta=20, n_phi=1):
    """


    """
    TrackingLocalizer.__init__(self, mic_positions, search_space, dft_len, 
                               sample_rate, n_theta, n_phi)
    self._grid_size = self._n_theta * self._n_phi
    self._process_search_space(search_space)
    self._setup_posterior_grid()
    self._setup_state_model(source_cov)
    self._setup_structures()
    def __init__(self, n_particles, state_kappa, *args, **kwargs):
        """
    Localizes source using Von Mises particle filter
          x_t ~ VM(x_{t-1}, kappa_v)
          y_t ~ SRPLikelihood(x_t)

    :param n_particles: number of particles to use
    :param state_kappa: concentration parameter for state von mises distribution
    
    All other parameters will be passed to TrackingLocalizer in the form of *args
    and **kwargs
    """
        TrackingLocalizer.__init__(self, *args, **kwargs)
        self._grid_size = self._n_theta * self._n_phi
        self._setup_particle_filters(n_particles, state_kappa)
Example #5
0
    def __init__(self, n_particles, state_kappa, *args, **kwargs):
        """
    Localizes source using Von Mises particle filter
          x_t ~ VM(x_{t-1}, kappa_v)
          y_t ~ SRPLikelihood(x_t)

    :param n_particles: number of particles to use
    :param state_kappa: concentration parameter for state von mises distribution
    
    All other parameters will be passed to TrackingLocalizer in the form of *args
    and **kwargs
    """
        TrackingLocalizer.__init__(self, *args, **kwargs)
        self._grid_size = self._n_theta * self._n_phi
        self._setup_particle_filters(n_particles, state_kappa)
    def __init__(self,
                 mic_positions,
                 search_space,
                 source_cov,
                 dft_len=512,
                 sample_rate=44100,
                 n_theta=20,
                 n_phi=1):
        """


    """
        TrackingLocalizer.__init__(self, mic_positions, search_space, dft_len,
                                   sample_rate, n_theta, n_phi)
        self._grid_size = self._n_theta * self._n_phi
        self._process_search_space(search_space)
        self._setup_posterior_grid()
        self._setup_state_model(source_cov)
        self._setup_structures()
    def __init__(self,
                 mic_positions,
                 search_space,
                 mic_forward,
                 mic_above,
                 trans_mat,
                 state_cov,
                 emission_mat,
                 emission_cov,
                 dft_len=512,
                 sample_rate=44100,
                 n_theta=20,
                 n_phi=1):
        """
    Localizes source using Kalman Filter:
          x_t = A*x_{t-1} + u,  u ~ N(0,Q)
          y_t = B*x_t + v,  v ~ N(0,R)

    The state vectors x_t have 6 components: 3 coordinates and 3 velocities.
    So x = [c_1, c_2, c_3, v_1, v_2, v_3], where c_i is associated with v_i.
    Note that since x is expected to be on a source plane, c_3 and v_3 should
    be zero. However they are included for freedom and because this will make
    linear transforms among 6 dimensional spaces more easy

    :param mic_forward: length 3 vector indicating direction mic points forward
                        This should be the positive y direction from the mic's
                        point of view
    :param mic_up: length 3 vector indicating direction mic points up. This 
                    should be the positive z direction from the mics point of
                    view
    :param trans_mat: Transition matrix A (should be 6x6 matrix). 
    :param state_cov: State noise covariance matrix Q
    :param emission_mat: Emission matrix B
    :param emission_cov: Emission covariance matrix R
    """
        TrackingLocalizer.__init__(self, mic_positions, search_space, dft_len,
                                   sample_rate, n_theta, n_phi)
        self._grid_size = self._n_theta * self._n_phi
        self._process_search_space(search_space)
        self._setup_posterior_grid()
        self._setup_state_model(mic_forward, mic_above, trans_mat, state_cov,
                                emission_mat, emission_cov)
  def __init__(self, n_particles, state_kappa, observation_kappa, outlier_prob=0, 
               *args, **kwargs):
    """
    Localizes source using Von Mises particle filter
          x_t ~ VM(x_{t-1}, kappa_v)
          y_t ~ VM(x_t, kappa_w)

    :param n_particles: number of particles to use
    :param state_kappa: concentration parameter for state von mises distribution
    :param observation_kappa: concentration parameter for observation von mises
                              distribution
    :param outlier_prob: Probability that a given observation comes from a 
                         background uniform outlier von mises distribution. If
                         this is omitted, it will be set to 0, and the normal
                         particle filtering algorithm will be used
    
    All other parameters will be passed to TrackingLocalizer in the form of *args
    and **kwargs
    """
    TrackingLocalizer.__init__(self, *args, **kwargs)
    self._grid_size = self._n_theta * self._n_phi
    #self._process_search_space(search_space)
    self._setup_particle_filters(n_particles, state_kappa, observation_kappa, outlier_prob)