tomwalters@10: // Copyright 2008-2010, Thomas Walters tomwalters@0: // tomwalters@0: // AIM-C: A C++ implementation of the Auditory Image Model tomwalters@0: // http://www.acousticscale.org/AIMC tomwalters@0: // tomwalters@45: // Licensed under the Apache License, Version 2.0 (the "License"); tomwalters@45: // you may not use this file except in compliance with the License. tomwalters@45: // You may obtain a copy of the License at tomwalters@0: // tomwalters@45: // http://www.apache.org/licenses/LICENSE-2.0 tomwalters@0: // tomwalters@45: // Unless required by applicable law or agreed to in writing, software tomwalters@45: // distributed under the License is distributed on an "AS IS" BASIS, tomwalters@45: // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. tomwalters@45: // See the License for the specific language governing permissions and tomwalters@45: // limitations under the License. tomwalters@0: tomwalters@0: /*! \file ModuleGaussians.h tomwalters@0: * \brief Gaussian features tomwalters@0: */ tomwalters@0: tomwalters@10: /*! \author Thomas Walters tomwalters@0: * \date created 2008/06/23 tomwalters@23: * \version \$Id$ tomwalters@0: */ tomwalters@0: tomwalters@11: #ifndef AIMC_MODULES_FEATURES_GAUSSIANS_H_ tomwalters@11: #define AIMC_MODULES_FEATURES_GAUSSIANS_H_ tomwalters@0: tomwalters@0: #include tomwalters@0: tomwalters@0: #include "Support/Module.h" tomwalters@0: #include "Support/Parameters.h" tomwalters@0: #include "Support/SignalBank.h" tomwalters@0: tomwalters@0: namespace aimc { tomwalters@0: using std::vector; tomwalters@8: class ModuleGaussians : public Module { tomwalters@0: public: tomwalters@8: explicit ModuleGaussians(Parameters *pParam); tomwalters@0: virtual ~ModuleGaussians(); tomwalters@0: tomwalters@8: /*! \brief Process a buffer tomwalters@8: */ tomwalters@0: virtual void Process(const SignalBank &input); tomwalters@0: tomwalters@3: private: tomwalters@8: /*! \brief Reset the internal state of the module tomwalters@8: */ tomwalters@3: virtual void ResetInternal(); tomwalters@0: tomwalters@3: /*! \brief Prepare the module tomwalters@3: * \param input Input signal tomwalters@3: * \param output true on success false on failure tomwalters@3: */ tomwalters@0: virtual bool InitializeInternal(const SignalBank &input); tomwalters@0: tomwalters@0: bool RubberGMMCore(int iNumComponents, bool bDoInit); tomwalters@0: tomwalters@0: /*! \brief Number of Gaussian Components tomwalters@0: */ tomwalters@0: int m_iParamNComp; tomwalters@0: tomwalters@0: /*! \brief Constant variance of Gaussians tomwalters@0: */ tomwalters@8: float m_fParamVar; tomwalters@0: tomwalters@0: /*! \brief posterior probability expansion exponent tomwalters@0: */ tomwalters@8: float m_fParamPosteriorExp; tomwalters@0: tomwalters@0: /*! \brief Maximum Number of iterations tomwalters@0: */ tomwalters@1: int m_iParamMaxIt; tomwalters@0: tomwalters@0: /*! \brief convergence criterion tomwalters@0: */ tomwalters@8: float m_fParamPriorsConverged; tomwalters@0: tomwalters@0: /*! \brief The amplitudes of the components (priors) tomwalters@0: */ tomwalters@8: vector m_pA; tomwalters@0: tomwalters@0: /*! \brief The means of the components (priors) tomwalters@0: */ tomwalters@8: vector m_pMu; tomwalters@0: tomwalters@0: /*! \brief The spectral profile of the incoming buffer tomwalters@0: */ tomwalters@8: vector m_pSpectralProfile; tomwalters@0: tomwalters@0: int m_iNumChannels; tomwalters@0: }; tomwalters@0: } // namespace aimc tomwalters@0: tomwalters@11: #endif // AIMC_MODULES_FEATURES_GAUSSIANS_H_