|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object marf.Storage.StorageManager marf.Preprocessing.Preprocessing marf.Preprocessing.Filter marf.Preprocessing.FFTFilter.FFTFilter marf.Preprocessing.FFTFilter.HighFrequencyBoost
public class HighFrequencyBoost
HighFrequencyBoost class implements filtering using high frequency booster on top of the FFTFilter.
$Id: HighFrequencyBoost.java,v 1.30 2007/12/18 03:45:56 mokhov Exp $
Field Summary | |
---|---|
static double |
BASE_BOOST_COEFFICIENT
Default boost rate of 5*PI to be applied to amplitude values. |
protected double |
dBoostCoefficient
Current boost coefficient. |
static int |
DEFAULT_HIGH_FREQUENCY_CUTOFF
Create a response that boosts all frequencies above 1000 Hz. |
protected double |
dHighFrequencyCutoff
Current high frequency cut off. |
Fields inherited from class marf.Preprocessing.FFTFilter.FFTFilter |
---|
adFreqResponse, DEFAULT_FREQUENCY_RESPONSE_SIZE |
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 | |
---|---|
HighFrequencyBoost()
Default constructor for reflective creation of Preprocessing clones. |
|
HighFrequencyBoost(IPreprocessing poPreprocessing)
Pipelined preprocessing constructor. |
|
HighFrequencyBoost(Sample poSample)
HighFrequencyBoost Constructor. |
Method Summary | |
---|---|
boolean |
cropAudio(double pdStartingFrequency,
double pdEndFrequency)
Stub implementation of cropAudio() . |
void |
generateResponseCoefficients()
Creates high-frequency boost response coefficients and sets applies them to the frequency response vector. |
double |
getBoostCoefficient()
Retrieves the current boost coefficient value. |
double |
getHighFrequencyCutoff()
Retrieves the current boost coefficient value. |
static java.lang.String |
getMARFSourceCodeRevision()
Returns source code revision information. |
boolean |
preprocess()
Overrides FFTFilter's preprocess() with extra normalization after the boost. |
protected void |
processModuleParams()
A common local routine for extraction filter parameters via the ModuleParams machinery. |
void |
setBoostCoefficient(double pdBoostCoefficient)
Allows to override the current boost coefficient. |
void |
setHighFrequencyCutoff(double pdHighFrequencyCutoff)
Allows to override the current boost coefficient. |
Methods inherited from class marf.Preprocessing.FFTFilter.FFTFilter |
---|
filter, filter, filter, setFrequencyResponse |
Methods inherited from class marf.Preprocessing.Preprocessing |
---|
backSynchronizeObject, clone, compress, compress, 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 int DEFAULT_HIGH_FREQUENCY_CUTOFF
public static final double BASE_BOOST_COEFFICIENT
protected double dBoostCoefficient
BASE_BOOST_COEFFICIENT
.
BASE_BOOST_COEFFICIENT
protected double dHighFrequencyCutoff
DEFAULT_HIGH_FREQUENCY_CUTOFF
.
DEFAULT_HIGH_FREQUENCY_CUTOFF
Constructor Detail |
---|
public HighFrequencyBoost()
public HighFrequencyBoost(IPreprocessing poPreprocessing) throws PreprocessingException
poPreprocessing
- follow-up preprocessing module
PreprocessingException
public HighFrequencyBoost(Sample poSample) throws PreprocessingException
poSample
- incoming sample
PreprocessingException
Method Detail |
---|
public final boolean preprocess() throws PreprocessingException
preprocess()
with extra normalization after the boost.
TODO: Normalization should only be applied to the boosted part.
preprocess
in interface IPreprocessing
preprocess
in class FFTFilter
true
if there were changes to the sample
PreprocessingException
- if there were problems during
underlying super.preprocess()
or normalize()
.IPreprocessing.removeNoise()
,
IPreprocessing.removeSilence()
public final boolean cropAudio(double pdStartingFrequency, double pdEndFrequency) throws PreprocessingException
cropAudio()
.
cropAudio
in interface IPreprocessing
cropAudio
in class Preprocessing
pdStartingFrequency
- unusedpdEndFrequency
- unused
false
PreprocessingException
- never thrownpublic void generateResponseCoefficients()
generateResponseCoefficients
in class FFTFilter
FFTFilter.generateResponseCoefficients()
public void setBoostCoefficient(double pdBoostCoefficient)
pdBoostCoefficient
- the new boost coefficient to setpublic double getBoostCoefficient()
public void setHighFrequencyCutoff(double pdHighFrequencyCutoff)
pdHighFrequencyCutoff
- the new boost coefficient to setpublic double getHighFrequencyCutoff()
protected void processModuleParams()
public static java.lang.String getMARFSourceCodeRevision()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |