marf.Preprocessing.CFEFilters
Class CFEFilter

java.lang.Object
  extended by marf.Storage.StorageManager
      extended by marf.Preprocessing.Preprocessing
          extended by marf.Preprocessing.Filter
              extended by marf.Preprocessing.CFEFilters.CFEFilter
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, IFilter, IPreprocessing, IStorageManager
Direct Known Subclasses:
BandPassFilter, BandStopFilter, LowPassFilter

public abstract class CFEFilter
extends Filter

General Continuous-Fraction Expansion (CFE) filter types. Based on the Masters Thesis work of Shivani Bhat in research of the 2D digital CFE filters.

This implementation in MARF is used for 2D version in the TestFilters application and the 1D version in SpeakerIdentApp. Look at the apps for the example usage. The exact meaning of the filter parameters is defined in Shivani's thesis.

$Id: CFEFilter.java,v 1.10 2007/12/16 21:58:30 mokhov Exp $

Author:
Serguei Mokhov, Shivani Haridas Bhat
See Also:
Serialized Form

Field Summary
protected  double a00
           
protected  double a01
           
protected  double a1
           
protected  double a10
           
protected  double a11
           
protected  double a2
           
protected  double b00
           
protected  double b01
           
protected  double b1
           
protected  double b10
           
protected  double b11
           
protected  double b2
           
static int DEFAULT_CHUNK_SIZE
           
static int DEFAULT_STEP_SIZE
           
protected  ComplexMatrix H
           
protected  int iChunkSize
           
protected  double k1
           
protected  double k2
           
protected  ComplexMatrix oZ1
           
protected  ComplexMatrix oZ2
           
protected  java.lang.String strConfig
           
 
Fields inherited from class marf.Preprocessing.Preprocessing
bRemoveNoise, bRemoveSilence, DEFAULT_SILENCE_THRESHOLD, dSilenceThreshold, oSample
 
Fields inherited from class marf.Storage.StorageManager
bDumpOnNotFound, iCurrentDumpMode, oObjectToSerialize, strFilename
 
Fields inherited from interface marf.Preprocessing.IFilter
FILTER_DIMENSIONALITY_1D, FILTER_DIMENSIONALITY_2D, FILTER_DIMENSIONALITY_3D, MARF_INTERFACE_CODE_REVISION
 
Fields inherited from interface marf.Preprocessing.IPreprocessing
MARF_INTERFACE_CODE_REVISION
 
Fields inherited from interface marf.Storage.IStorageManager
DUMP_BINARY, DUMP_CSV_TEXT, DUMP_GZIP_BINARY, DUMP_HTML, DUMP_SQL, DUMP_XML, MARF_INTERFACE_CODE_REVISION, STORAGE_FILE_EXTENSIONS
 
Constructor Summary
CFEFilter(Sample poSample)
          LowPassFilter Constructor.
 
Method Summary
 void backSynchronizeObject()
          Implementation of back-synchronization of Sample loaded object.
 boolean filter(double[][][] padSample, double[][][] padFiltered)
          Applies 3D filtering to the sample array and buffers the filtered data.
 boolean filter(double[][] padSample, double[][] padFiltered)
          Applies 2D filtering to the sample array and buffers the filtered data.
 boolean filter(double[] padSample, double[] padFiltered)
          Applies filtering to the sample array and buffers the filtered data.
abstract  ComplexMatrix h()
          Transfer function; must be implemented by concrete filters.
 boolean removeNoise()
          Overrides that of Preprocessing to invoke the CFE low-pass filter instead of the FFT one.
 
Methods inherited from class marf.Preprocessing.Filter
getMARFSourceCodeRevision, preprocess
 
Methods inherited from class marf.Preprocessing.Preprocessing
clone, compress, compress, cropAudio, extractParameters, getSample, normalize, normalize, normalize, removeSilence, removeSilence, setSample
 
Methods inherited from class marf.Storage.StorageManager
dump, dumpBinary, dumpCSV, dumpGzipBinary, dumpHTML, dumpSQL, dumpXML, enableDumpOnNotFound, equals, getDefaultExtension, getDefaultExtension, getDumpMode, getFilename, getObjectToSerialize, hashCode, restore, restoreBinary, restoreCSV, restoreGzipBinary, restoreHTML, restoreSQL, restoreXML, setDumpMode, setFilename, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

a00

protected double a00

a01

protected double a01

a10

protected double a10

a11

protected double a11

b00

protected double b00

b01

protected double b01

b10

protected double b10

b11

protected double b11

a1

protected double a1

a2

protected double a2

b1

protected double b1

b2

protected double b2

k1

protected double k1

k2

protected double k2

strConfig

protected java.lang.String strConfig

oZ1

protected ComplexMatrix oZ1

oZ2

protected ComplexMatrix oZ2

DEFAULT_STEP_SIZE

public static final int DEFAULT_STEP_SIZE
See Also:
Constant Field Values

DEFAULT_CHUNK_SIZE

public static final int DEFAULT_CHUNK_SIZE
See Also:
Constant Field Values

iChunkSize

protected int iChunkSize

H

protected ComplexMatrix H
Constructor Detail

CFEFilter

public CFEFilter(Sample poSample)
          throws PreprocessingException
LowPassFilter Constructor.

Parameters:
poSample - incoming sample
Throws:
PreprocessingException
Method Detail

filter

public boolean filter(double[] padSample,
                      double[] padFiltered)
               throws PreprocessingException
Description copied from interface: IFilter
Applies filtering to the sample array and buffers the filtered data.

Parameters:
padSample - original sample to apply filtering to; should not be altered
padFiltered - buffer for filtered data
Returns:
true if filtering was successful and/or there were any changes
Throws:
PreprocessingException - if any error happened during filtering
See Also:
IFilter.filter(double[], double[])

filter

public boolean filter(double[][] padSample,
                      double[][] padFiltered)
               throws PreprocessingException
Description copied from interface: IFilter
Applies 2D filtering to the sample array and buffers the filtered data.

Parameters:
padSample - original sample to apply filtering to; should not be altered
padFiltered - buffer for filtered data
Returns:
true if filtering was successful and/or there were any changes
Throws:
PreprocessingException - if any error happened during filtering
See Also:
IFilter.filter(double[][], double[][])

filter

public boolean filter(double[][][] padSample,
                      double[][][] padFiltered)
               throws PreprocessingException
Description copied from interface: IFilter
Applies 3D filtering to the sample array and buffers the filtered data.

Parameters:
padSample - original sample to apply filtering to; should not be altered
padFiltered - buffer for filtered data
Returns:
true if filtering was successful and/or there were any changes
Throws:
PreprocessingException - if any error happened during filtering
See Also:
IFilter.filter(double[][][], double[][][])

h

public abstract ComplexMatrix h()
Transfer function; must be implemented by concrete filters.

Returns:

removeNoise

public boolean removeNoise()
                    throws PreprocessingException
Overrides that of Preprocessing to invoke the CFE low-pass filter instead of the FFT one.

Specified by:
removeNoise in interface IPreprocessing
Overrides:
removeNoise in class Preprocessing
Returns:
boolean that sample has changed (noise removed)
Throws:
PreprocessingException - declared but never thrown
Since:
0.3.0.6
See Also:
LowPassFilter, Preprocessing.removeNoise()

backSynchronizeObject

public void backSynchronizeObject()
Description copied from class: Preprocessing
Implementation of back-synchronization of Sample loaded object.

Overrides:
backSynchronizeObject in class Preprocessing
See Also:
StorageManager.restore()


SourceForge Logo