From a15cdd1236370649b72164dc50e82c74f338a42a Mon Sep 17 00:00:00 2001 From: ariotte <ariotte@PC-EII16.admr.insa> Date: Mon, 18 Jun 2018 13:06:17 +0200 Subject: [PATCH] added Filter constants --- app/Algorithms/Pyramid.cpp | 31 +++++++++++++++++++++++++++---- app/Algorithms/Pyramid.h | 2 +- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/app/Algorithms/Pyramid.cpp b/app/Algorithms/Pyramid.cpp index d55aa4d..87eb029 100644 --- a/app/Algorithms/Pyramid.cpp +++ b/app/Algorithms/Pyramid.cpp @@ -29,12 +29,35 @@ using namespace Pyramid; const uint8_t tp6_filter_file_data[] = {0x74, 0x72, 0x69, 0x61, 0x6e, 0x67, 0x75, 0x6c, 0x61, 0x69, 0x72, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x80, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x67, 0x61, 0x75, 0x73, 0x73, 0x69, 0x65, 0x6e, 0x00, 0x00, 0xf8, 0x45, 0x26, 0x00, 0xf8, 0x45, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcd, 0xcc, 0xcc, 0x3e, 0x00, 0x00, 0x80, 0x3e, 0xcd, 0xcc, 0x4c, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x74, 0x72, 0x69, 0x6d, 0x6f, 0x64, 0x61, 0x6c, 0x00, 0x00, 0x00, 0x45, 0x26, 0x00, 0xf8, 0x45, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x99, 0x19, 0x3f, 0x00, 0x00, 0x80, 0x3e, 0xcd, 0xcc, 0x4c, 0xbd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x72, 0x65, 0x63, 0x74, 0x61, 0x6e, 0x67, 0x75, 0x6c, 0x61, 0x69, 0x72, 0x65, 0x00, 0x00, 0x00, 0xf8, 0x45, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xae, 0x47, 0xe1, 0x3d, 0xae, 0x47, 0xe1, 0x3d, 0xae, 0x47, 0xe1, 0x3d, 0xae, 0x47, 0xe1, 0x3d, 0xae, 0x47, 0xe1, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x71, 0x6d, 0x66, 0x00, 0x58, 0xec, 0x00, 0x00, 0xf8, 0x45, 0x26, 0x00, 0x00, 0x00, 0xf8, 0x45, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x88, 0x10, 0x3f, 0x16, 0xde, 0x95, 0x3e, 0x9c, 0xf9, 0x55, 0xbd, 0xae, 0xf0, 0x2e, 0xbd, 0x2f, 0x6e, 0xa3, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00}; -/*Pyramid::Filtre triang = { +Pyramid::Filtre triang = { "triangulaire", - {0.0, 5.78564e-39, -5.6938e-39, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 3.58732e-43}, - 0, + {0.0, 5.78564e-39, -5.6938e-39, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, + 256, +}; + +Pyramid::Filtre gauss = { + "gaussien", + {7.3826e-41, -4.98074e+07, -5.76763e-39, 4.95452e+07, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, + 256, +}; + +Pyramid::Filtre trimod = { + "trimodale", + {5.54592e-41, 9.87447e-24, -5.76763e-39, 9.90904e+07, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, + 512, +}; + +Pyramid::Filtre rect = { + "rectangulaire", + {6.25189e-41, -2.18687e+20, -2.18687e+20, -2.18687e+20, -2.18687e+20, -2.17902e+20, 0.0, 0.0, 0.0, 0.0 }, + 1024, +}; + +Pyramid::Filtre qmf = { + "qmf", + {2.92479e-41, 3.76857e-29, -3.8494e-26, 2.60699e+13, 8.60315e-11, -1.01915e-17, 0.0, 0.0, 0.0, 0.0}, + 1024, }; -*/ Pyramid::Filters::Filters() diff --git a/app/Algorithms/Pyramid.h b/app/Algorithms/Pyramid.h index 26d05f4..3a213df 100644 --- a/app/Algorithms/Pyramid.h +++ b/app/Algorithms/Pyramid.h @@ -30,7 +30,7 @@ namespace Pyramid return ( ( n > 0 ) && ( (n & (n - 1) ) == 0) ); } - typedef struct Filtre { + struct Filtre { char nom_f[30]; float coeff_f[10]; int taille_f; -- GitLab