The following code examples show how the noise reduction functions can be used for EC noise filtering.
Code Example below demonstrates how to reduce noise in the signal that is distorted version of the original noisy signal:
void ReduceNoiseExample1(Ipp32f *pSig, Ipp32f *pSigDistorted, IppsFilterNoiseState_EC_32f *state1, IppsFilterNoiseState_EC_32f *state2)
{
Ipp64f fooPwr;
Ipp32f fooMean;
int flag;
IppsNrMode nMode;
/* Detect noise and update signal and noise statistic and noise pattern */
ippsNoiseDetect_EC_32f64f(pSig,&fooPwr,&fooMean,&flag,state1);
/* Filter noise out from distorted signal using noise pattern aligned with original signal noise statistic.
In noisy case update all statistics and noise pattern, otherwise update only statistic. */
nMode=sinNoiseFlag?ippsNrUpdateAll:ippsNrUpdate;
ippsFilterNoise_EC_32f_I(pSigDistorted,nMode,state2);
}
The following code Example demonstrates filtering of the orignal noisy signal.
void ReduceNoiseExample2(Ipp32f* pSig, IppsFilterNoiseState_EC_32f *state)
{
Ipp64f fooPwr;
Ipp32f fooMean;
int fooFlag;
/* Detect noise and update signal and noise statistic and noise pattern */
ippsNoiseDetect_EC_32f64f(pSig,&fooPwr,&fooMean,&fooFlag,state);
/* Filter noise out using existent noise pattern */
ippsFilterNoise_EC_32f_I(pSig, ippsNrNoUpdate,state);
}
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.