marf.Preprocessing.Endpoint
Class Endpoint

java.lang.Object
  extended by marf.Storage.StorageManager
      extended by marf.Preprocessing.Preprocessing
          extended by marf.Preprocessing.Endpoint.Endpoint
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, IPreprocessing, IStorageManager

public class Endpoint
extends Preprocessing

Implements endpoint preprocessing in MARF.

Endpoints are considered to be the local minimum and maximum values of an amplitude. A few variations apply.

$Id: Endpoint.java,v 1.28 2007/12/18 03:45:56 mokhov Exp $

Since:
0.0.1; fully implemented as of 0.3.0.5
Version:
$Revision: 1.28 $
Author:
Serguei Mokhov
See Also:
Serialized Form

Field Summary
protected  boolean bCompress
          Indicates whether to compress or not the sample before extracting edpoints.
protected  boolean bConsiderEdges
          Indicates whether to consider or or not the edge points (at the beginning and the end of the sample) as endpoints.
private static long serialVersionUID
          For serialization versioning.
 
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.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
Endpoint()
          Default constructor for reflective creation of Preprocessing clones.
Endpoint(IPreprocessing poPreprocessing)
          Preprocessing pipeline constructor.
Endpoint(Sample poSample)
          Endpoint Constructor.
 
Method Summary
 boolean enableCompression(boolean pbEnable)
          Enables or disables sample compression prior endpoints extraction.
 boolean enableEdgeEndpoints(boolean pbEnable)
          Enables or disables consideration of the sample edges as endpoints.
static java.lang.String getMARFSourceCodeRevision()
          Returns source code revision information.
 boolean preprocess()
          Filters out sample points that are not endpoints.
protected  void processModuleParams()
          A common local routine for extraction endpointing parameters via the ModuleParams machinery.
 
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

bCompress

protected boolean bCompress
Indicates whether to compress or not the sample before extracting edpoints. Default is false.

Since:
0.3.0.5

bConsiderEdges

protected boolean bConsiderEdges
Indicates whether to consider or or not the edge points (at the beginning and the end of the sample) as endpoints. Default is true.

Since:
0.3.0.5

serialVersionUID

private static final long serialVersionUID
For serialization versioning. When adding new members or make other structural changes regenerate this number with the serialver tool that comes with JDK.

Since:
0.3.0.4
See Also:
Constant Field Values
Constructor Detail

Endpoint

public Endpoint()
Default constructor for reflective creation of Preprocessing clones. Typically should not be used unless really necessary for the frameworked modules.

Since:
0.3.0.5

Endpoint

public Endpoint(IPreprocessing poPreprocessing)
         throws PreprocessingException
Preprocessing pipeline constructor.

Parameters:
poPreprocessing - follow-up preprocessing module
Throws:
PreprocessingException
Since:
0.3.0.3

Endpoint

public Endpoint(Sample poSample)
         throws PreprocessingException
Endpoint Constructor.

Parameters:
poSample - incoming sample
Throws:
PreprocessingException
Method Detail

preprocess

public boolean preprocess()
                   throws PreprocessingException
Filters out sample points that are not endpoints. In general case, the endpoints are local minimums and maximums, edges, and continuous equality points. The latter two can be optionally eliminated if desired. First got implemented in 0.3.0.5.

Specified by:
preprocess in interface IPreprocessing
Overrides:
preprocess in class Preprocessing
Returns:
true if the preprocessing was successful.
Throws:
PreprocessingException - if the resulting endpoints array contains no data
See Also:
bCompress, bConsiderEdges

enableCompression

public boolean enableCompression(boolean pbEnable)
Enables or disables sample compression prior endpoints extraction.

Parameters:
pbEnable - true if the compression is desired
Returns:
the old value of the compression flag
Since:
0.3.0.5

enableEdgeEndpoints

public boolean enableEdgeEndpoints(boolean pbEnable)
Enables or disables consideration of the sample edges as endpoints.

Parameters:
pbEnable - true if the consideration is desired
Returns:
the old value of the flag
Since:
0.3.0.5

processModuleParams

protected void processModuleParams()
A common local routine for extraction endpointing parameters via the ModuleParams machinery.

Since:
0.3.0.5

getMARFSourceCodeRevision

public static java.lang.String getMARFSourceCodeRevision()
Returns source code revision information.

Returns:
revision string
Since:
0.3.0.2


SourceForge Logo