org.openuat.features
Class QuantizedFFTCoefficients
java.lang.Object
org.openuat.features.QuantizedFFTCoefficients
public class QuantizedFFTCoefficients
- extends java.lang.Object
This class computes quantized FFT coefficients from time series / sensor
signals. There are 4 types that can be computed, a combination of:
- linear or exponential quantization bands
- quantize either FFT coefficients directly or their pairwise sums
- Version:
- 1.0
- Author:
- Rene Mayrhofer
|
Method Summary |
static int[][] |
computeFFTCoefficientsCandidates(double[] segment,
int offset,
int numFFTPoints,
int numFFTCoeffCompared,
int numQuantLevels,
int numCandidates,
boolean addPairwise,
boolean exponentialBands)
Computes cofficient vector candidates, quantized with different
offsets. |
static boolean[] |
quantizeAndCompare(double[] vector1,
double[] vector2,
int offset,
int numFFTPoints,
int numFFTCoeffCompared,
int numQuantLevels,
int numCandidates)
This is a helper function to compute and compare all 4 types. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
QuantizedFFTCoefficients
public QuantizedFFTCoefficients()
computeFFTCoefficientsCandidates
public static int[][] computeFFTCoefficientsCandidates(double[] segment,
int offset,
int numFFTPoints,
int numFFTCoeffCompared,
int numQuantLevels,
int numCandidates,
boolean addPairwise,
boolean exponentialBands)
- Computes cofficient vector candidates, quantized with different
offsets.
- Parameters:
segment - The segment to compute quantized FFT coefficients on.offset - Elements of segment will be used starting with this index.numFFTPoints - The number of FFT points for computing the
coefficients. This is the number of samples used
from segment.numFFTCoeffCompared - The number of FFT coefficients to output.numQuantLevels - The number of quantization levels to use.numCandidates - The number of candidates to generate with
different quantization offsets.doDirect - If true, the FFT coefficients will be used directly.doPairwise - If true, the FFT coefficients will be added pairwise.doLinear - If true, linear quantization bands will be used.doExponential - If true, exponential quantization bands will be used.
- Returns:
- An array of quantized FFT coefficients, which are the
multiple candidates. That is, the returned array has
numCandidates elements, which are arrays of len integers.
quantizeAndCompare
public static boolean[] quantizeAndCompare(double[] vector1,
double[] vector2,
int offset,
int numFFTPoints,
int numFFTCoeffCompared,
int numQuantLevels,
int numCandidates)
- This is a helper function to compute and compare all 4 types.
- Returns:
- An boolean array of 4 elements, true when the respective
type contains at least one match among the candidates.
2005-2006, Rene Mayrhofer.