Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mathutils.h

    r8e5c051 r83963b3  
    4141*/
    4242smpl_t fvec_mean (fvec_t * s);
     43
     44/** compute the mean of a vector channel
     45
     46  \param s vector to compute mean from
     47  \param i channel to compute mean from
     48
     49  \return the mean of v
     50
     51*/
     52smpl_t fvec_mean_channel (fvec_t * s, uint_t i);
    4353
    4454/** find the max of a vector
     
    195205*/
    196206smpl_t fvec_moving_thres (fvec_t * v, fvec_t * tmp, uint_t post, uint_t pre,
    197     uint_t pos);
     207    uint_t pos, uint_t channel);
    198208
    199209/** apply adaptive threshold to a vector
     
    208218
    209219*/
    210 void fvec_adapt_thres (fvec_t * v, fvec_t * tmp, uint_t post, uint_t pre);
     220void fvec_adapt_thres (fvec_t * v, fvec_t * tmp, uint_t post, uint_t pre,
     221    uint_t channel);
    211222
    212223/** returns the median of a vector
     
    221232
    222233  \param v vector to get median from
     234  \param channel channel to get median from
    223235
    224236  \return the median of v
    225237 
    226238*/
    227 smpl_t fvec_median (fvec_t * v);
     239smpl_t fvec_median_channel (fvec_t * v, uint_t channel);
    228240
    229241/** finds exact peak index by quadratic interpolation*/
    230 smpl_t fvec_quadint (fvec_t * x, uint_t pos);
     242smpl_t fvec_quadint (fvec_t * x, uint_t pos, uint_t channel);
    231243
    232244/** Quadratic interpolation using Lagrange polynomial.
Note: See TracChangeset for help on using the changeset viewer.