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@0: // This program is free software: you can redistribute it and/or modify
tomwalters@0: // it under the terms of the GNU General Public License as published by
tomwalters@0: // the Free Software Foundation, either version 3 of the License, or
tomwalters@0: // (at your option) any later version.
tomwalters@0: //
tomwalters@0: // This program is distributed in the hope that it will be useful,
tomwalters@0: // but WITHOUT ANY WARRANTY; without even the implied warranty of
tomwalters@0: // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
tomwalters@0: // GNU General Public License for more details.
tomwalters@0: //
tomwalters@0: // You should have received a copy of the GNU General Public License
tomwalters@0: // along with this program. If not, see .
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@0: * \version \$Id: ModuleGaussians.h 2 2010-02-02 12:59:50Z tcw $
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_