annotate src/Modules/Features/ModuleGaussians.h @ 45:c5f5e9569863

- Modified licence from GPL 3 to Apache v2
author tomwalters
date Tue, 30 Mar 2010 22:06:24 +0000
parents 491b1b1d1dc5
children bee31e7ebf4b
rev   line source
tomwalters@10 1 // Copyright 2008-2010, Thomas Walters
tomwalters@0 2 //
tomwalters@0 3 // AIM-C: A C++ implementation of the Auditory Image Model
tomwalters@0 4 // http://www.acousticscale.org/AIMC
tomwalters@0 5 //
tomwalters@45 6 // Licensed under the Apache License, Version 2.0 (the "License");
tomwalters@45 7 // you may not use this file except in compliance with the License.
tomwalters@45 8 // You may obtain a copy of the License at
tomwalters@0 9 //
tomwalters@45 10 // http://www.apache.org/licenses/LICENSE-2.0
tomwalters@0 11 //
tomwalters@45 12 // Unless required by applicable law or agreed to in writing, software
tomwalters@45 13 // distributed under the License is distributed on an "AS IS" BASIS,
tomwalters@45 14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
tomwalters@45 15 // See the License for the specific language governing permissions and
tomwalters@45 16 // limitations under the License.
tomwalters@0 17
tomwalters@0 18 /*! \file ModuleGaussians.h
tomwalters@0 19 * \brief Gaussian features
tomwalters@0 20 */
tomwalters@0 21
tomwalters@10 22 /*! \author Thomas Walters <tom@acousticscale.org>
tomwalters@0 23 * \date created 2008/06/23
tomwalters@23 24 * \version \$Id$
tomwalters@0 25 */
tomwalters@0 26
tomwalters@11 27 #ifndef AIMC_MODULES_FEATURES_GAUSSIANS_H_
tomwalters@11 28 #define AIMC_MODULES_FEATURES_GAUSSIANS_H_
tomwalters@0 29
tomwalters@0 30 #include <vector>
tomwalters@0 31
tomwalters@0 32 #include "Support/Module.h"
tomwalters@0 33 #include "Support/Parameters.h"
tomwalters@0 34 #include "Support/SignalBank.h"
tomwalters@0 35
tomwalters@0 36 namespace aimc {
tomwalters@0 37 using std::vector;
tomwalters@8 38 class ModuleGaussians : public Module {
tomwalters@0 39 public:
tomwalters@8 40 explicit ModuleGaussians(Parameters *pParam);
tomwalters@0 41 virtual ~ModuleGaussians();
tomwalters@0 42
tomwalters@8 43 /*! \brief Process a buffer
tomwalters@8 44 */
tomwalters@0 45 virtual void Process(const SignalBank &input);
tomwalters@0 46
tomwalters@3 47 private:
tomwalters@8 48 /*! \brief Reset the internal state of the module
tomwalters@8 49 */
tomwalters@3 50 virtual void ResetInternal();
tomwalters@0 51
tomwalters@3 52 /*! \brief Prepare the module
tomwalters@3 53 * \param input Input signal
tomwalters@3 54 * \param output true on success false on failure
tomwalters@3 55 */
tomwalters@0 56 virtual bool InitializeInternal(const SignalBank &input);
tomwalters@0 57
tomwalters@0 58 bool RubberGMMCore(int iNumComponents, bool bDoInit);
tomwalters@0 59
tomwalters@0 60 /*! \brief Number of Gaussian Components
tomwalters@0 61 */
tomwalters@0 62 int m_iParamNComp;
tomwalters@0 63
tomwalters@0 64 /*! \brief Constant variance of Gaussians
tomwalters@0 65 */
tomwalters@8 66 float m_fParamVar;
tomwalters@0 67
tomwalters@0 68 /*! \brief posterior probability expansion exponent
tomwalters@0 69 */
tomwalters@8 70 float m_fParamPosteriorExp;
tomwalters@0 71
tomwalters@0 72 /*! \brief Maximum Number of iterations
tomwalters@0 73 */
tomwalters@1 74 int m_iParamMaxIt;
tomwalters@0 75
tomwalters@0 76 /*! \brief convergence criterion
tomwalters@0 77 */
tomwalters@8 78 float m_fParamPriorsConverged;
tomwalters@0 79
tomwalters@0 80 /*! \brief The amplitudes of the components (priors)
tomwalters@0 81 */
tomwalters@8 82 vector<float> m_pA;
tomwalters@0 83
tomwalters@0 84 /*! \brief The means of the components (priors)
tomwalters@0 85 */
tomwalters@8 86 vector<float> m_pMu;
tomwalters@0 87
tomwalters@0 88 /*! \brief The spectral profile of the incoming buffer
tomwalters@0 89 */
tomwalters@8 90 vector<float> m_pSpectralProfile;
tomwalters@0 91
tomwalters@0 92 int m_iNumChannels;
tomwalters@0 93 };
tomwalters@0 94 } // namespace aimc
tomwalters@0 95
tomwalters@11 96 #endif // AIMC_MODULES_FEATURES_GAUSSIANS_H_