Package org.jamdev.jpamutils.spectrogram
Class GaussianFilter
java.lang.Object
org.jamdev.jpamutils.spectrogram.GaussianFilter
public class GaussianFilter extends Object
Kernel smoothing for the spectrogram.
This is almost a carbon copy from PAMGuard (www.pamguard.org)
- Author:
- Jamie Macaulay
-
Constructor Summary
Constructors Constructor Description GaussianFilter() -
Method Summary
Modifier and Type Method Description double[][]generateKernal(double sigma)Generate the Kernel for a sigma valueStringgetDescription()booleaninitialise(int channelMap)Initialise the channelMap storeComplexArray[]runFilter(ComplexArray[] complexArray)Run the Gaussian filter on a spectrogram.booleanrunNoiseReduction(ComplexArray fftDataUnit)booleanrunNoiseReduction(ComplexArray fftDataUnit, int sigma)Run the noise reduction.voidsetKernel(double[][] kernel)
-
Constructor Details
-
GaussianFilter
public GaussianFilter()
-
-
Method Details
-
generateKernal
public double[][] generateKernal(double sigma)Generate the Kernel for a sigma value- Parameters:
sigma-- Returns:
-
setKernel
public void setKernel(double[][] kernel) -
runFilter
Run the Gaussian filter on a spectrogram. Convenience function. This will reset the current channel processes.- Parameters:
complexArray- - the spectrogram including the complex number.- Returns:
- the complex array out.
-
getDescription
-
initialise
public boolean initialise(int channelMap)Initialise the channelMap store- Parameters:
channelMap- - the channel map of expected input units.- Returns:
- the channel map.
-
runNoiseReduction
-
runNoiseReduction
Run the noise reduction.- Parameters:
fftDataUnit- - the FFT data unit.sigma- - the sigma value.- Returns:
- true if success.
-