| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmarf.Storage.StorageManager
marf.Preprocessing.Preprocessing
marf.Preprocessing.Filter
marf.Preprocessing.FFTFilter.FFTFilter
public abstract class FFTFilter
FFTFilter class implements filtering using the FFT algorithm.
Derivatives must set frequency response based on the type of filter they are.
$Id: FFTFilter.java,v 1.37 2007/12/16 21:58:31 mokhov Exp $
| Field Summary | |
|---|---|
protected  double[] | 
adFreqResponse
Frequency response to be multiplied by the incoming value.  | 
static int | 
DEFAULT_FREQUENCY_RESPONSE_SIZE
Default size of the frequency response vector, 128.  | 
| 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 | |
|---|---|
FFTFilter()
Default constructor for reflective creation of Preprocessing clones.  | 
|
FFTFilter(IPreprocessing poPreprocessing)
Pipelined constructor.  | 
|
FFTFilter(Sample poSample)
FFTFilter Constructor.  | 
|
| Method Summary | |
|---|---|
 boolean | 
filter(double[][][] padSample,
       double[][][] padFiltered)
Applies two-dimensional filtering to every plane of the matrix.  | 
 boolean | 
filter(double[][] padSample,
       double[][] padFiltered)
Applies single-dimensional filtering to every row of the matrix.  | 
 boolean | 
filter(double[] padSample,
       double[] padFiltered)
Perform a filter by the following algorithm: (1) sample -> window -> FFT -> buffer (2) buffer * frequency response (3) buffer -> IFFT -> window -> sample.  | 
abstract  void | 
generateResponseCoefficients()
Creates frequency response coefficients and sets applies them to the frequency response vector.  | 
static java.lang.String | 
getMARFSourceCodeRevision()
Returns source code revision information.  | 
 boolean | 
preprocess()
FFTFilter implementation of preprocess(). | 
 void | 
setFrequencyResponse(double[] padPesponse)
Sets frequency response.  | 
| Methods inherited from class marf.Preprocessing.Preprocessing | 
|---|
backSynchronizeObject, clone, compress, compress, cropAudio, extractParameters, getSample, normalize, normalize, normalize, removeNoise, 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 | 
|---|
public static final transient int DEFAULT_FREQUENCY_RESPONSE_SIZE
protected transient double[] adFreqResponse
| Constructor Detail | 
|---|
public FFTFilter()
public FFTFilter(IPreprocessing poPreprocessing)
          throws PreprocessingException
poPreprocessing - the follow-up preprocessing module
PreprocessingException
public FFTFilter(Sample poSample)
          throws PreprocessingException
poSample - incoming sample
PreprocessingException| Method Detail | 
|---|
public boolean preprocess()
                   throws PreprocessingException
preprocess().
 It overrides the default of Filter to allow a check for the frequency
 response array validation.
 NOTE: it alters inner Sample by resetting its data array to the new
 filtered values.
preprocess in interface IPreprocessingpreprocess in class Filtertrue if there was something filtered out
PreprocessingException - primarily if the frequency response is nullIPreprocessing.removeNoise(), 
IPreprocessing.removeSilence()public final void setFrequencyResponse(double[] padPesponse)
padPesponse - desired frequency response coefficients
public final boolean filter(double[] padSample,
                            double[] padFiltered)
                     throws PreprocessingException
-responseSize/2, in order to avoid
 amplitude distortion of the first half of the first window.
padSample - incoming sample analog datapadFiltered - will contain data after the filter was applied.
 "filtered" must be at least as long as "sample".
true if some filtering actually happened
PreprocessingException - if the filtered and sample data
 arrays are not of the same size, the frequency response was not
 set, or there was an underlying FeatureExctractionException while
 executing the underlying FFT algorithm.
public boolean filter(double[][] padSample,
                      double[][] padFiltered)
               throws PreprocessingException
padSample - original sample to apply filtering to; should not be alteredpadFiltered - buffer for filtered data
true if filtering was successful and/or there were any changes
- Throws:
 PreprocessingException - if any error happened during filtering- Since:
 
  - 0.3.0.6
 
- See Also:
 IFilter.filter(double[][], double[][]), 
filter(double[], double[])
public boolean filter(double[][][] padSample,
                      double[][][] padFiltered)
               throws PreprocessingException
padSample - original sample to apply filtering to; should not be alteredpadFiltered - buffer for filtered data
true if filtering was successful and/or there were any changes
- Throws:
 PreprocessingException - if any error happened during filtering- Since:
 
  - 0.3.0.6
 
- See Also:
 IFilter.filter(double[][][], double[][][]), 
filter(double[][], double[][])public abstract void generateResponseCoefficients()
public static java.lang.String getMARFSourceCodeRevision()
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||