Mercurial > hg > batch-feature-extraction-tool
comparison Source/ObservationData.h @ 10:73852457b624
We now have a the spectral contrast feature
author | Geogaddi\David <d.m.ronan@qmul.ac.uk> |
---|---|
date | Fri, 14 Aug 2015 18:21:43 +0100 |
parents | 25bf17994ef1 |
children | 761289a660c6 |
comparison
equal
deleted
inserted
replaced
9:262e084a15a9 | 10:73852457b624 |
---|---|
17 { | 17 { |
18 public: | 18 public: |
19 ObservationData(); | 19 ObservationData(); |
20 ~ObservationData(); | 20 ~ObservationData(); |
21 | 21 |
22 ObservationData(float rms, float peak, float crestfactor, float zcr, float centroid, float spread, float skewness, float kurtosis, float brightness, float rolloff85, float rolloff95, float spectralentropy, float flatness, float spectralcf, float spectralflux, std::vector<float> mfccs, float periodicity, float entropyofenergy) | 22 ObservationData(float rms, float peak, float crestfactor, float zcr, float centroid, float spread, float skewness, float kurtosis, float brightness, float rolloff85, float rolloff95, float spectralentropy, float flatness, float spectralcf, float spectralflux, std::vector<float> mfccs, std::vector<float> spectralContrast, std::vector<float> spectralValley, float periodicity, float entropyofenergy) |
23 { | 23 { |
24 m_peak = peak; | 24 m_peak = peak; |
25 m_rms = rms; | 25 m_rms = rms; |
26 m_crestFactor = crestfactor; | 26 m_crestFactor = crestfactor; |
27 m_zcr = zcr; | 27 m_zcr = zcr; |
35 m_spectralentropy = spectralentropy; | 35 m_spectralentropy = spectralentropy; |
36 m_flatness = flatness; | 36 m_flatness = flatness; |
37 m_spectralcf = spectralcf; | 37 m_spectralcf = spectralcf; |
38 m_spectralflux = spectralflux; | 38 m_spectralflux = spectralflux; |
39 m_mfccs = mfccs; | 39 m_mfccs = mfccs; |
40 m_spectralContrast = spectralContrast; | |
41 m_spectralValley = spectralValley; | |
40 m_periodicity = periodicity; | 42 m_periodicity = periodicity; |
41 m_entropyofenergy = entropyofenergy; | 43 m_entropyofenergy = entropyofenergy; |
42 }; | 44 }; |
43 | 45 |
44 ObservationData(float rms, float peak, float crestfactor, float zcr, float centroid, float spread, float skewness, float kurtosis, float brightness, float rolloff85, float rolloff95, float spectralentropy, float flatness, float spectralcf, float spectralflux, std::vector<float> mfccs, std::vector<float> dmfccs, float periodicity, float entropyofenergy) | 46 ObservationData(float rms, float peak, float crestfactor, float zcr, float centroid, float spread, float skewness, float kurtosis, float brightness, float rolloff85, float rolloff95, float spectralentropy, float flatness, float spectralcf, float spectralflux, std::vector<float> mfccs, std::vector<float> dmfccs, std::vector<float> spectralContrast, std::vector<float> spectralValley, float periodicity, float entropyofenergy) |
45 { | 47 { |
46 m_peak = peak; | 48 m_peak = peak; |
47 m_rms = rms; | 49 m_rms = rms; |
48 m_crestFactor = crestfactor; | 50 m_crestFactor = crestfactor; |
49 m_zcr = zcr; | 51 m_zcr = zcr; |
56 m_rolloff95 = rolloff95; | 58 m_rolloff95 = rolloff95; |
57 m_spectralentropy = spectralentropy; | 59 m_spectralentropy = spectralentropy; |
58 m_flatness = flatness; | 60 m_flatness = flatness; |
59 m_spectralcf = spectralcf; | 61 m_spectralcf = spectralcf; |
60 m_spectralflux = spectralflux; | 62 m_spectralflux = spectralflux; |
63 m_spectralContrast = spectralContrast; | |
64 m_spectralValley = spectralValley; | |
61 m_mfccs = mfccs; | 65 m_mfccs = mfccs; |
62 m_dmfccs = dmfccs; | 66 m_dmfccs = dmfccs; |
63 m_periodicity = periodicity; | 67 m_periodicity = periodicity; |
64 m_entropyofenergy = entropyofenergy; | 68 m_entropyofenergy = entropyofenergy; |
65 }; | 69 }; |
82 float GetPeriodicity(){return m_periodicity;} | 86 float GetPeriodicity(){return m_periodicity;} |
83 float GetEntropyOfEnergy(){return m_entropyofenergy;} | 87 float GetEntropyOfEnergy(){return m_entropyofenergy;} |
84 float GetLowEnergy(){return m_lowEnergy;} | 88 float GetLowEnergy(){return m_lowEnergy;} |
85 std::vector<float> GetMFCCs(){return m_mfccs;} | 89 std::vector<float> GetMFCCs(){return m_mfccs;} |
86 std::vector<float> GetDeltaMFCCs(){return m_dmfccs;} | 90 std::vector<float> GetDeltaMFCCs(){return m_dmfccs;} |
91 std::vector<float> GetSpectralContrast(){ return m_spectralContrast; } | |
92 std::vector<float> GetSpectralValley(){ return m_spectralValley; } | |
87 | 93 |
88 //WholeTrack Feature | 94 //WholeTrack Feature |
89 void SetLowEnergy(float lowEnergy){m_lowEnergy = lowEnergy;} | 95 void SetLowEnergy(float lowEnergy){m_lowEnergy = lowEnergy;} |
90 | 96 |
91 private: | 97 private: |
104 float m_flatness; | 110 float m_flatness; |
105 float m_spectralcf; | 111 float m_spectralcf; |
106 float m_spectralflux; | 112 float m_spectralflux; |
107 std::vector<float> m_mfccs; | 113 std::vector<float> m_mfccs; |
108 std::vector<float> m_dmfccs; | 114 std::vector<float> m_dmfccs; |
115 std::vector<float> m_spectralContrast; | |
116 std::vector<float> m_spectralValley; | |
109 float m_periodicity; | 117 float m_periodicity; |
110 float m_lowEnergy; | 118 float m_lowEnergy; |
111 float m_entropyofenergy; | 119 float m_entropyofenergy; |
112 }; | 120 }; |
113 | 121 |