src/experiments/babybot/soundlocalization/soundprocessing.cpp
double
SoundProcessing::correlation(double *channel1, double *channel2, int sizeChannel)
{
	double llScalar = scalarProduct(channel1, channel1, sizeChannel);
	double lrScalar = scalarProduct(channel1, channel2, sizeChannel);
	double rrScalar = scalarProduct(channel2, channel2, sizeChannel);

	return lrScalar/ (sqrt(llScalar * rrScalar));
}
//--------------------------------------------------------------------------------------
//       Class:  SoundProcessing
//      Method:  correlation
// Description:  Performs the temporal correlation 
//--------------------------------------------------------------------------------------
SoundProcessing
Method:  correlation
Description:  Performs the temporal correlation
SoundProcessing Method : correlation Description : Performs the temporal correlation
double
SoundProcessing::correlation(double *channel1, double *channel2, int sizeChannel)
{
	double llScalar = scalarProduct(channel1, channel1, sizeChannel);
	double lrScalar = scalarProduct(channel1, channel2, sizeChannel);
	double rrScalar = scalarProduct(channel2, channel2, sizeChannel);
	return lrScalar/ (sqrt(llScalar * rrScalar));
}
double SoundProcessing :: correlation ( double * channel1 , double * channel2 , int sizeChannel ) { double llScalar = scalarProduct ( channel1 , channel1 , sizeChannel ) ; double lrScalar = scalarProduct ( channel1 , channel2 , sizeChannel ) ; double rrScalar = scalarProduct ( channel2 , channel2 , sizeChannel ) ; return lrScalar / ( sqrt ( llScalar * rrScalar ) ) ; }
Class:  SoundProcessing
Method:  correlation
Description:  Performs the temporal correlation
Class : SoundProcessing Method : correlation Description : Performs the temporal correlation