Commit d0421adb authored by Guillaume HEUSCH's avatar Guillaume HEUSCH

test

parent 6844828f
Pipeline #25128 passed with stage
in 58 seconds
This diff is collapsed.
......@@ -95,7 +95,7 @@ def get_ltss(signal):
from scipy.fftpack import rfft
window_size = 30
nfft = 128
nfft = 64
window_stride = int(window_size / 2)
# log-magnitude of DFT coefficients
......@@ -107,8 +107,7 @@ def get_ltss(signal):
# n is even, as a consequence the fft is as follows [y(0), Re(y(1)), Im(y(1)), ..., Re(y(n/2))]
# i.e. each coefficient, except first and last, is represented by two numbers (real + imaginary)
fft = rfft(signal[w:w+window_size], n=nfft)
print(fft)
print(fft.shape)
# the magnitude is the norm of the complex numbers, so its size is n/2 + 1
mags = numpy.zeros((int(nfft/2) + 1), dtype=numpy.float64)
......@@ -137,7 +136,9 @@ def get_ltss(signal):
# build final feature
log_mags = numpy.array(log_mags)
mean = numpy.mean(log_mags, axis=0)
print(mean)
pyplot.hist(mean)
pyplot.show
#std = numpy.std(log_mags, axis=0)
#ltss = numpy.concatenate([mean, std])
......
{
"cells": [
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<bob.pad.face.preprocessor.LiPulseExtraction at 0x1c211055f8>"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from bob.pad.face.preprocessor import LiPulseExtraction\n",
"toto = LiPulseExtraction()\n",
"toto"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"import bob.pad.face\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.6"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment