---------------------------------------------------------------------- ---------------------------------------------------------------------- (en Français plus loin) PC - Windows format Table of CDF filters with boundaries handling ============================================== Cohen-Daubechies-Feauveau filters are among the most widely used filters in Wavelet Theory. From image processing to numerical analysis, these biorthogonal filters are often the most logical choice because of the optimally short primary filters (spline). This file contains CDF filters with boundary handling using the method described in the paper (includes an extended abstract in English): Gilles Deslauriers, Serge Dubuc, and Daniel Lemire, Une famille d'ondelettes biorthogonales sur l'intervalle obtenue par un schéma d'interpolation itérative, Ann. Sci. Math. Québec 23, no. 1, 37-48, 1999. (A family of biorthogonal wavelets on the interval obtained by an iterative interpolation scheme) A preprint is available at: http://www.ondelette.com/lemire/abstracts/ANNQC1999.html The upside to this approach is that no numerical computations are needed so that the filters are known exactly. Symbolic computations take about 5 minutes on a Pentium 90 Mhz. The letter n indicates the number of null moments for the primary (or spline) multiresolution. For example, n=1 means one is using the Haar scaling function. "ntilde" gives the number of null moments for the dual multiresolution. We note the filters with a set of vectors. The first vectors are the boundary filters and the last one is the standard CDF filter. (The boundary is assumed to be on the left-hand-side.) Note: Scaling filters were normalized so that the sums of the coefficients is two away from the boundaries. You may need to divide by the square root of two in order to use these filters with some software. (See Daubechies, Ten lectures on Wavelets, for details.) In all cases, please verify that the filters are properly normalized for your type of work and multiplying them by a constant if necessary. Programmers please recall: When entering fractions such a 1/2 in a C-like language, remember to type 1/2d to force double precision. SAMPLE JAVA CODE FOR TRANSFORM AND INVERSE TRANSFORM AT THE END OF THE FILE (EASILY PORTABLE TO C/C++). computed by Daniel Lemire, Ph.D. Biomedical Engineering Institute, University of Montreal Montreal, June 1998 email: lemire at ondelette dot com web: http://www.ondelette.com/acadia/ Bibliography ------------- A. Cohen, I. Daubechies and J.-C. Feauveau, Biorthogonal bases of compactly supported wavelets, Comm. Pure and Appl. Math. 45 (1992), 485-560. I. Daubechies, Ten Lectures on Wavelets, CBMF Conference Series in Applied Mathematics, 61, SIAM, Philadelphia (1992). Gilles Deslauriers, Serge Dubuc, and Daniel Lemire, Une famille d'ondelettes biorthogonales sur l'intervalle obtenue par un schéma d'interpolation itérative, Ann. Sci. Math. Québec 23, no. 1, 37-48, 1999. ---------------------------------------------------------------------- ---------------------------------------------------------------------- (in English above) format PC - Windows Tables de filtres de CDF avec adaptation aux bords ================================================== Les filtres de Cohen-Daubechies-Feauveau sont parmi les plus utilisés en théorie des ondelettes. Du traitement de l'image jusqu'à l'analyse numérique, ces filtres biorthogonaux sont souvent le choix le plus logique parce que les filtres d'échelle primaire (spline) ont une longueur optimale. Ce fichier contient les filtres de CDF adaptés aux bords par la méthode décrite dans l'article Gilles Deslauriers, Serge Dubuc, and Daniel Lemire, Une famille d'ondelettes biorthogonales sur l'intervalle obtenue par un schéma d'interpolation itérative, Ann. Sci. Math. Québec 23, no. 1, 37-48, 1999. Une prépublication est disponible à: http://www.ondelette.com/lemire/abstracts/ANNQC1999.html L'avantage de cette méthode est quelle ne nécessite pas de calcul numérique est que les filtres sont connus exactement. Les calculs symboliques prennent environ 5 minutes sur un Pentium 90 Mhz. La lettre n indique le nombre de moments nuls pour la multirésolution primaire (multirésolution des splines). Par exemple, n=1 signifie que l'on utilise la fonction d'échelle de Haar. "ntilde" donne le nombre de moments nuls de la multirésolution duale. On note les filtres par un ensemble de vecteurs. Les premiers vecteurs sont les filtres de bords alors que le dernier est le filtre de CDF standard. (On suppose que le bord est situé à gauche.) Note: Les coefficients d'échelle furent normalisées pour que leurs sommes donnent deux (loin des bords). Il est possible que vous deviez diviser par la racine de deux pour les utiliser dans certains logiciels. (Voir le livre de Daubechies, Ten lectures on Wavelets, pour des détails.) Dans tous les cas, vous devriez vous assurez que les filtres sont correctement normalisés dans le contexte de vos travaux et vous devriez les multiplier par une constante au besoin. Rappel aux programmeurs: Lorsque vous devez entrer des fractions telles que 1/2 dans un langage comme le C, il faut taper 1/2d pour imposer le stockage à double précision. EXEMPLE DE CODE EN JAVA POUR LA TRANSFORMÉE ET LA TRANSFORMÉE INVERSE À LA FIN DU FICHIER (FACILEMENT PORTABLE EN C/C++). calculés par Daniel Lemire Institut de génie biomédical, Université de Montréal Montréal, juin 1998 courriel: lemireAROBASondelette.com site Internet: http://www.ondelette.com/acadia/ Bibliographie ------------- A. Cohen, I. Daubechies et J.-C. Feauveau, Biorthogonal bases of compactly supported wavelets, Comm. Pure and Appl. Math. 45 (1992), 485-560. I. Daubechies, Ten Lectures on Wavelets, CBMF Conference Series in Applied Mathematics, 61, SIAM, Philadelphia (1992). Gilles Deslauriers, Serge Dubuc, and Daniel Lemire, Une famille d'ondelettes biorthogonales sur l'intervalle obtenue par un schéma d'interpolation itérative, Ann. Sci. Math. Québec 23, no. 1, 37-48, 1999. ---------------------------------------------------------------------- TABLE BEGIN HERE. LA TABLE COMMENCE ICI. ---------------------------------------------------------------------- ---------------------------------------------------------------------- Primary (or spline) scaling filters (lowpass) [1] Filtres d'échelle primaires (splines) (passe-bas) [1] ---------------------------------------------------------------------- Note: These filters do not depend on ntilde. Ces filtres ne dépendent pas de ntilde. ---------------------------------------------------------------------- n = 1 {{1, 1}} n = 2 {{1, 1/2}, {1/2, 1, 1/2}} n = 3 {{3/4, 1/4}, {1/4, 3/4, 3/4, 1/4}} ---------------------------------------------------------------------- Primary (or spline) wavelet filters (highpass) [1] Filtres d'ondelettes primaires (splines) (passe-haut) [1] ---------------------------------------------------------------------- n = 1; ntilde = 3 {{-5/8, 11/8, -1/2, -1/2, 1/8, 1/8}, {1/8, 1/8, -1, 1, -1/8, -1/8}} n = 1; ntilde = 5 {{-63/128, 193/128, -61/64, -61/64, 11/16, 11/16, -19/64, -19/64, 7/128, 7/128}, {7/128, 7/128, -49/64, 79/64, -13/32, -13/32, 9/64, 9/64, -3/128, -3/128}, {-3/128, -3/128, 11/64, 11/64, -1, 1, -11/64, -11/64, 3/128, 3/128}} n = 1; ntilde = 7 {{-429/1024, 1619/1024, -173/128, -173/128, 1619/1024, 1619/1024, -173/128, -173/128, 761/1024, 761/1024, -15/64, -15/64, 33/1024, 33/1024}, {33/1024, 33/1024, -165/256, 347/256,-691/1024, -691/1024, 29/64, 29/64, -229/1024, -229/1024, 17/256, 17/256, -9/1024, -9/1024}, {-9/1024, -9/1024, 3/32, 3/32, -849/1024, 1199/1024, -47/128,-47/128, 149/1024, 149/1024, -5/128, -5/128, 5/1024, 5/1024}, {5/1024, 5/1024, -11/256, -11/256, 201/1024, 201/1024, -1, 1, -201/1024, -201/1024, 11/256, 11/256, -5/1024, -5/1024}, {-5/1024, -5/1024, 5/128, 5/128, -149/1024, -149/1024, 47/128, 47/128, -1199/1024, 849/1024, -3/32, -3/32, 9/1024, 9/1024}, {0, 0, 0, 0, 5/1024, 5/1024, -11/256, -11/256, 201/1024, 201/1024, -1, 1, -201/1024, -201/1024, 11/256, 11/256, -5/1024, -5/1024}, n = 2; ntilde = 4 {{-35/64, 875/1536, -241/768, -53/512, 41/384, 67/1536, -5/256, -5/512}, {15/64, -45/512, -105/256, 345/512, -31/128, -53/512, 9/256, 9/512}, {0, 3/128, 3/64, -1/8, -19/64, 45/64, -19/64, -1/8, 3/64, 3/128}} n = 2; ntilde = 6 {{-231/512, 11319/20480, -4541/10240, -1763/20480, 1389/5120, 265/4096, -1453/10240, -977/20480, 119/2560, 203/10240, -7/1024, -7/2048}, {63/512, -1407/20480, -2667/10240, 13419/20480, -2197/5120, -529/4096, 1749/10240, 1241/20480, -127/2560, -219/10240, 7/1024, 7/2048}, {-35/512, 119/4096, 259/2048, -483/4096, -371/1024, 2765/4096, -589/2048, -1363/12288, 101/1536, 59/2048, -25/3072, -25/6144}, {35/512, -103/4096, -243/2048, 307/4096, 275/1024, -557/4096, -1107/2048, 7987/12288, -245/1536, -147/2048, 49/3072, 49/6144}, {0, 0, 0, -5/1024, -5/512, 17/512, 39/512, -123/1024, -81/256, 175/256, -81/256, -123/1024, 39/512, 17/512, -5/512, -5/1024}} n = 2; ntilde = 8 {{-6435/16384, 979407/1835008, -495241/917504, -77491/1835008, 208875/458752, 66811/1835008, -350939/917504, -17889/262144, 56429/229376, 127187/1835008, -98529/917504, -72855/1835008, 12837/458752, 22671/1835008, -429/131072, -429/262144}, {1287/16384, -498927/9175040, -859287/4587520, 5710419/9175040, -1302667/2293760, -199327/1835008, 1608699/4587520, 100673/1310720, -225997/1146880, -536883/9175040, 73421/917504, 55115/1835008, -9153/458752, -16227/1835008, 297/131072, 297/262144}, {-495/16384, 30987/1835008, 58707/917504, -165759/1835008, -112233/458752, 1208295/1835008, -402247/917504, -32869/262144, 43041/229376, 110239/1835008, -61925/917504, -47475/1835008, 7225/458752, 12875/1835008, -225/131072, -225/262144}, {315/16384, -2529/262144, -5049/131072, 10557/262144, 7803/65536, -30453/262144, -46059/131072, 175497/262144, -10147/32768, -29149/262144, 11439/131072, 9049/262144, -1195/65536, -2145/262144, 245/131072, 245/262144}, {-315/16384, 2369/262144, 4889/131072, -8733/262144, -6811/65536, 17749/262144, 31371/131072, -33385/262144, -16189/32768, 171261/262144, -26127/131072, -21753/262144, 2187/65536, 3969/262144, -405/131072, -405/262144}, {495/16384, -24939/1835008, -52659/917504, 85343/1835008, 69001/458752, -143175/1835008, -281177/917504, 22405/262144, 109503/229376, -183487/1835008, -621499/917504, 1112595/1835008, -50457/458752, -93291/1835008, 1089/131072, 1089/262144}, {0, 0, 0, 0, 0, 35/32768, 35/16384, -75/8192, -335/16384, 307/8192, 1563/16384, -949/8192, -5359/16384, 11025/16384, -5359/16384, -949/8192, 1563/16384, 307/8192, -335/16384, -75/8192, 35/16384, 35/32768}} n = 3; ntilde = 5 {{-7917/10240, 2877/10240, -26593/204800, -1139/204800, 3951/102400, 53/20480, -451/40960, -453/204800, 21/12800, 7/12800}, {6237/10240, -1197/10240, -38927/204800, 79779/204800, -22911/102400, -613/20480, 1971/40960, 2133/204800, -81/12800, -27/12800}, {-1405/2048, 205/2048, 5897/24576, -2183/8192, -813/4096, 5455/12288, -1395/8192, -337/8192, 9/512, 3/512}, {0, 0, 5/1024, 15/1024, -19/1024, -97/1024, 13/512, 175/512, -175/512, -13/512, 97/1024, 19/1024, -15/1024, -5/1024}}} n = 3; ntilde = 7 {{-395967/573440, 155727/573440, -38455703/240844800, 1266777/80281600, 2599507/40140800, -306557/24084480, -536227/16056320, 31597/11468800, 61351/4300800, 11373/10035200, -3139/802816, -2083/2408448, 99/200704, 33/200704}, {218691/573440, -52371/573440, -8663127/80281600, 26623179/80281600, -11859111/40140800, 87587/8028160, 1744311/16056320, -25881/11468800, -57041/1433600, -39729/10035200, 8079/802816, 1829/802816, -243/200704, -81/200704}, {-31455/114688, 6255/114688, 293543/3211264, -525531/3211264, -112041/1605632, 598945/1605632, -890115/3211264, -9367/458752, 4313/57344, 3897/401408, -13375/802816, -3125/802816, 375/200704, 125/200704}, {4781/16384, -861/16384, -299159/2949120, 142681/983040, 49651/491520, -68957/294912, -24899/196608, 415387/983040, -79079/368640, -4651/122880, 1801/49152, 1321/147456, -15/4096, -5/4096}, {-54603/114688, 9243/114688, 2702591/16056320, -3418707/16056320, -1390737/8028160, 461429/1605632, 753153/3211264, -761007/2293760, -73967/286720, 915057/2007040, -109755/802816, -28809/802816, 2187/200704, 729/200704}, {0, 0, 0, 0, -35/32768, -105/32768, 195/32768, 865/32768, -363/32768, -3489/32768, 307/32768, 11025/32768, -11025/32768, -307/32768, 3489/32768, 363/32768, -865/32768, -195/32768, 105/32768, 35/32768}}, n = 3; ntilde = 9 {{-41835079/66060288, 17330599/66060288, -29987141041/166471925760, 2179566959/55490641920, 2385038939/27745320960, -667254277/16647192576, -673077409/11098128384, 192351359/7927234560, 247028849/5945425920, -40663151/4624220160, -83002553/3699376128, 20616685/33294385152, 46851365/5549064192, 5741923/5549064192, -1314599/679477248, -105391/226492416, 715/3538944, 715/10616832}, {1980407/7340032, -538967/7340032, -1257789247/18496880640, 1763949473/6165626880, -1038029707/3082813440, 117589205/1849688064, 199010993/1233125376, -38112367/880803840, -60893377/660602880, 7533343/513802240, 18610633/411041792, -1236029/3699376128, -9942133/616562688, -1292435/616562688, 269335/75497472, 21791/25165824, -143/393216, -143/1179648}, {-9421555/66060288, 2214355/66060288, 1474677919/33294385152, -1224178241/11098128384, -117332501/5549064192, 5190148535/16647192576, -3761494165/11098128384, 42401743/1585446912, 161668513/1189085184, -10434367/924844032, -210858125/3699376128, -39539375/33294385152, 103675625/5549064192, 14509375/5549064192, -2673875/679477248, -218875/226492416, 1375/3538944, 1375/10616832}, {992453/9437184, -216293/9437184, -117545659/3397386240, 79414181/1132462080, 18222281/566231040, -50427223/339738624, -9042187/226492416, 405083987/1132462080, -253859683/849346560, -914789/94371840, 6934381/75497472, 3899983/679477248, -2969545/113246208, -457055/113246208, 3486595/679477248, 289835/226492416, -1715/3538944, -1715/10616832}, {-114561/1048576, 23841/1048576, 10821809/293601280, -19638093/293601280, -5610513/146800640, 3607301/29360128, 3873507/58720256, -8762493/41943040, -1008241/10485760, 29671911/73400320, -14133375/58720256, -1818349/58720256, 1535889/29360128, 268503/29360128, -76015/8388608, -19365/8388608, 105/131072, 35/131072}, {1527889/9437184, -308209/9437184, -1316672969/23781703680, 743440471/7927234560, 235319011/3963617280, -377189501/2378170368, -163583801/1585446912, 255539431/1132462080, 139663561/849346560, -189472279/660602880, -103131409/528482304, 2090169125/4756340736, -138191075/792723456, -28907989/792723456, 16117079/679477248, 1412191/226492416, -6655/3538944, -6655/10616832}, {-23342891/66060288, 4604171/66060288, 20283249811/166471925760, -10927289549/55490641920, -3671064209/27745320960, 5254969999/16647192576, 2498418019/11098128384, -3202222589/7927234560, -2035439699/5945425920, 1895537741/4624220160, 1482953387/3699376128, -12302336071/33294385152, -1955486447/5549064192, 2509138775/5549064192, -72621835/679477248, -6694259/226492416, 24167/3538944, 24167/10616832}, {0, 0, 0, 0, 0, 0, 63/262144, 189/262144, -469/262144, -1911/262144, 327/65536, 2297/65536, -285/65536, -7419/65536, -95/131072, 43659/131072, -43659/131072, 95/131072, 7419/65536, 285/65536, -2297/65536, -327/65536, 1911/262144, 469/262144, -189/262144, -63/262144}} ---------------------------------------------------------------------- Dual scaling filters (lowpass) [2] Filtres d'échelle duales (passe-bas) [2] ---------------------------------------------------------------------- n = 1; ntilde = 3 {{11/8, 5/8, 1/8, -1/8}, {-1/2, 1/2, 1, 1, 1/8, -1/8}, {1/8, -1/8, -1/8, 1/8, 1, 1, 1/8, -1/8}, {0, 0, 0, 0, -1/8, 1/8, 1, 1, 1/8, -1/8}} n = 1; ntilde = 5 {{193/128, 63/128, 7/128, -7/128, -3/128, 3/128}, {-61/64, 61/64, 79/64, 49/64, 11/64, -11/64, -3/128, 3/128}, {11/16, -11/16, -13/32, 13/32, 1, 1, 11/64, -11/64, -3/128, 3/128}, {-19/64, 19/64, 9/64, -9/64, -11/64, 11/64, 1, 1, 11/64, -11/64, -3/128, 3/128}, {7/128, -7/128, -3/128, 3/128, 3/128, -3/128, -11/64, 11/64, 1, 1, 11/64, -11/64, -3/128, 3/128}, {0, 0, 0, 0, 0, 0, 3/128, -3/128, -11/64, 11/64, 1, 1, 11/64, -11/64, -3/128, 3/128}} n = 1; ntilde = 7 {{1619/1024, 429/1024, 33/1024, -33/1024, -9/1024, 9/1024, 5/1024, -5/1024, -5/1024, 5/1024}, {-173/128, 173/128, 347/256, 165/256, 3/32, -3/32, -11/256, 11/256, 5/128, -5/128}, {1619/1024, -1619/1024, -691/1024, 691/1024, 1199/1024, 849/1024, 201/1024, -201/1024, -149/1024, 149/1024, 5/1024, -5/1024}, {-173/128, 173/128, 29/64, -29/64, -47/128, 47/128, 1, 1, 47/128, -47/128, -11/256, 11/256, 5/1024, -5/1024}, {761/1024, -761/1024, -229/1024, 229/1024, 149/1024, -149/1024, -201/1024, 201/1024, 849/1024, 1199/1024, 201/1024, -201/1024, -11/256, 11/256, 5/1024, -5/1024}, {-15/64, 15/64, 17/256, -17/256, -5/128, 5/128, 11/256, -11/256, -3/32, 3/32, 1, 1, 201/1024, -201/1024, -11/256, 11/256, 5/1024, -5/1024}, {33/1024, -33/1024, -9/1024, 9/1024, 5/1024, -5/1024, -5/1024, 5/1024, 9/1024, -9/1024, -201/1024, 201/1024, 1, 1, 201/1024, -201/1024, -11/256, 11/256, 5/1024, -5/1024}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11/256, -11/256, -201/1024, 201/1024, 1, 1, 201/1024, -201/1024, -11/256, 11/256, 5/1024, -5/1024}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -5/1024, 5/1024, 11/256, -11/256, -201/1024, 201/1024, 1, 1, 201/1024, -201/1024, -11/256, 11/256, 5/1024, -5/1024}} n = 2; ntilde = 4 {{93/64, 35/32, -5/16, -15/32, 15/64}, {-241/768, 241/384, 245/192, 105/128, -93/256, -3/32, 3/64}, {41/384, -41/192, -13/96, 31/64, 187/128, 19/32, -1/4, -3/32, 3/64}, {-5/256, 5/128, 1/64, -9/128, -67/256, 19/32, 45/32, 19/32, -1/4, -3/32, 3/64}, {0, 0, 0, 0, 3/64, -3/32, -1/4, 19/32, 45/32, 19/32, -1/4, -3/32, 3/64}} n = 2; ntilde = 6 {{793/512, 231/256, -21/64, -63/256, 7/128, 35/256, 0, -35/256, 35/512}, {-4541/10240, 4541/5120, 1659/1280, 2667/5120, -343/2560, -259/1024, 1/128, 243/1024, -243/2048}, {1389/5120, -1389/2560, -101/640, 2197/2560, 1547/1280, 371/512, -3/32, -275/512, 265/1024, 5/256, -5/512}, {-1453/10240, 1453/5120, 37/1280, -1749/5120, -299/2560, 589/1024, 75/64, 1107/1024, -951/2048, -39/256, 17/256, 5/256, -5/512}, {119/2560, -119/1280, -1/320, 127/1280, 31/1920, -101/768, -3/32, 245/768, 2341/1536, 81/128, -123/512, -39/256, 17/256, 5/256, -5/512}, {-7/1024, 7/512, 0, -7/512, -1/768, 25/1536, 1/128, -49/1536, -923/3072, 81/128, 175/128, 81/128, -123/512, -39/256, 17/256, 5/256, -5/512}, {0, 0, 0, 0, 0, 0, 0, 0, 39/512, -39/256, -123/512, 81/128, 175/128, 81/128, -123/512, -39/256, 17/256, 5/256, -5/512}, {0, 0, 0, 0, 0, 0, 0, 0, -5/512, 5/256, 17/256, -39/256, -123/512, 81/128, 175/128, 81/128, -123/512, -39/256, 17/256, 5/256, -5/512}} n = 2; ntilde = 8 {{26333/16384, 6435/8192, -1287/4096, -1287/8192, 99/2048, 495/8192, -45/4096, -315/8192, 0, 315/8192, 45/4096, -495/8192, 495/16384}, {-495241/917504, 495241/458752, 1459887/1146880, 859287/2293760, -70719/573440, -58707/458752, 5841/229376, 5049/65536, -5/4096, -4889/65536, -4609/229376, 52659/458752, -52659/917504}, {208875/458752, -208875/229376, -64573/573440, 1302667/1146880, 340461/286720, 112233/229376, -14403/114688, -7803/32768, 31/2048, 6811/32768, 5331/114688, -69001/229376, 69001/458752}, {-350939/917504, 350939/458752, -36499/1146880, -1608699/2293760, -50317/573440, 402247/458752, 277587/229376, 46059/65536, -459/4096, -31371/65536, -15395/229376, 281177/458752, -279217/917504, -35/8192, 35/16384}, {56429/229376, -56429/114688, 14037/286720, 225997/573440, -1349/143360, -43041/114688, -6997/57344, 10147/16384, 1225/1024, 16189/16384, -955/57344, -109503/114688, 104813/229376, 335/8192, -75/4096, -35/8192, 35/16384}, {-98529/917504, 98529/458752, -6277/229376, -73421/458752, 1437/114688, 61925/458752, 4537/229376, -11439/65536, -459/4096, 26127/65536, 257655/229376, 621499/458752, -533971/917504, -1563/8192, 307/4096, 335/8192, -75/4096, -35/8192, 35/16384}, {12837/458752, -12837/229376, 921/114688, 9153/229376, -241/57344, -7225/229376, -285/114688, 1195/32768, 31/2048, -2187/32768, -8787/114688, 50457/229376, 716995/458752, 5359/8192, -949/4096, -1563/8192, 307/4096, 335/8192, -75/4096, -35/8192, 35/16384}, {-429/131072, 429/65536, -33/32768, -297/65536, 9/16384, 225/65536, 5/32768, -245/65536, -5/4096, 405/65536, 171/32768, -1089/65536, -41783/131072, 5359/8192, 11025/8192, 5359/8192, -949/4096, -1563/8192, 307/4096, 335/8192, -75/4096, -35/8192, 35/16384}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1563/16384, -1563/8192, -949/4096, 5359/8192, 11025/8192, 5359/8192, -949/4096, -1563/8192, 307/4096, 335/8192, -75/4096, -35/8192, 35/16384}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -335/16384, 335/8192, 307/4096, -1563/8192, -949/4096, 5359/8192, 11025/8192, 5359/8192, -949/4096, -1563/8192, 307/4096, 335/8192, -75/4096, -35/8192, 35/16384}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35/16384, -35/8192, -75/4096, 335/8192, 307/4096, -1563/8192, -949/4096, 5359/8192, 11025/8192, 5359/8192, -949/4096, -1563/8192, 307/4096, 335/8192, -75/4096, -35/8192, 35/16384}} n = 3; ntilde = 5 {{8703/5120, 14851/5120, -7497/2560, -4137/2560, 4703/2560, 5799/2560, -3315/1024, 1105/1024}, {-983/5120, 2949/5120, 4977/2560, 1617/2560, -2423/2560, -2559/2560, 1515/1024, -505/1024}, {2897/51200, -8691/51200, -3863/25600, 23177/25600, 116611/76800, 22521/25600, -3153/2048, 2833/6144, 15/256, -5/256}, {-789/51200, 2367/51200, 531/25600, -4749/25600, -869/25600, 16323/25600, 4429/2048, -751/2048, -97/256, 19/256, 15/256, -5/256}, {7/3200, -21/3200, -3/1600, 37/1600, -3/1600, -99/1600, -55/128, 189/128, 175/128, -13/128, -97/256, 19/256, 15/256, -5/256}, {0, 0, 0, 0, 0, 0, 17/128, -51/128, -13/128, 175/128, 175/128, -13/128, -97/256, 19/256, 15/256, -5/256}, {0, 0, 0, 0, 0, 0, -5/256, 15/256, 19/256, -97/256, -13/128, 175/128, 175/128, -13/128, -97/256, 19/256, 15/256, -5/256}} n = 3; ntilde = 7 {{524253/286720, 721001/286720, -83061/28672, -13959/20480, 202779/143360, 14301/20480, -24429/28672, -27333/28672, 18279/28672, 51591/28672, -129789/57344, 43263/57344}, {-70933/286720, 212799/286720, 55341/28672, 4719/20480, -109539/143360, -6741/20480, 12389/28672, 13053/28672, -9039/28672, -24431/28672, 61749/57344, -20583/57344}, {6232087/60211200, -6232087/20070400, -277173/2007040, 5343019/4300800, 13677787/10035200, 65979/204800, -10930453/18063360, -3095567/6021120, 2419061/6021120, 17019007/18063360, -4859517/4014080, 1619839/4014080}, {-1033073/20070400, 3099219/20070400, 19401/2007040, -631901/1433600, 869881/10035200, 215577/204800, 8321507/6021120, 1222873/2007040, -1376899/2007040, -6935273/6021120, 6216979/4014080, -2026593/4014080, -105/8192, 35/8192}, {104521/5017600, -313563/5017600, 2403/501760, 54577/358400, -163437/2508800, -13629/51200, 31681/1505280, 401699/501760, 740863/501760, 1727501/1505280, -1814523/1003520, 506841/1003520, 865/8192, -195/8192, -105/8192, 35/8192}, {-3271/602112, 3271/200704, -235/100352, -1567/43008, 1889/100352, 113/2048, -16843/903168, -38657/301056, -10741/301056, 461425/903168, 916995/401408, -140633/401408, -3489/8192, 363/8192, 865/8192, -195/8192, -105/8192, 35/8192}, {33/50176, -99/50176, 9/25088, 15/3584, -59/25088, -3/512, 65/25088, 305/25088, -3/25088, -971/25088, -22901/50176, 74535/50176, 11025/8192, -307/8192, -3489/8192, 363/8192, 865/8192, -195/8192, -105/8192, 35/8192}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1263/8192, -3789/8192, -307/8192, 11025/8192, 11025/8192, -307/8192, -3489/8192, 363/8192, 865/8192, -195/8192, -105/8192, 35/8192}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -75/2048, 225/2048, 363/8192, -3489/8192, -307/8192, 11025/8192, 11025/8192, -307/8192, -3489/8192, 363/8192, 865/8192, -195/8192, -105/8192, 35/8192}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35/8192, -105/8192, -195/8192, 865/8192, 363/8192, -3489/8192, -307/8192, 11025/8192, 11025/8192, -307/8192, -3489/8192, 363/8192, 865/8192, -195/8192, -105/8192, 35/8192}} n = 3; ntilde = 9 {{63381473/33030144, 24698911/11010048, -2203487/786432, -4016155/16515072, 18060757/16515072, 1379807/5505024, -8635187/16515072, -4573459/16515072, 261385/786432, 841187/2359296, -628909/2359296, -473663/786432, 3512069/16515072, 23706925/16515072, -18658211/11010048, 18658211/33030144}, {-9573425/33030144, 9573425/11010048, 1482767/786432, 412555/16515072, -10132837/16515072, -659087/5505024, 4588067/16515072, 2300419/16515072, -135385/786432, -422867/2359296, 321469/2359296, 236783/786432, -1793429/16515072, -11787325/16515072, 9288851/11010048, -9288851/33030144}, {6200405459/41617981440, -6200405459/13872660480, -89089613/990904320, 6082853491/4161798144, 25008663823/20808990720, 691337933/6936330240, -9162677513/20808990720, -3742672681/20808990720, 49287983/198180864, 694997273/2972712960, -558639511/2972712960, -382797677/990904320, 3095720351/20808990720, 3747913835/4161798144, -14828606969/13872660480, 14828606969/41617981440}, {-1430327581/13872660480, 1430327581/4624220160, -15060413/330301440, -954500861/1387266048, 1868513503/6936330240, 3009413693/2312110080, 8295581767/6936330240, 1650659879/6936330240, -33875713/66060288, -368101687/990904320, 339506969/990904320, 197973283/330301440, -1825085329/6936330240, -1874721925/1387266048, 7486478551/4624220160, -7486478551/13872660480}, {462797849/6936330240, -462797849/2312110080, 9011257/165150720, 256696441/693633024, -788016947/3468165120, -558544057/1156055040, 642511237/3468165120, 3887379749/3468165120, 43705133/33030144, 239079083/495452160, -321547621/495452160, -136057127/165150720, 1566575741/3468165120, 1224541025/693633024, -4981450139/2312110080, 4963669019/6936330240, 189/65536, -63/65536}, {-141355351/4161798144, 141355351/1387266048, -3350519/99090432, -354338707/2080899072, 248340445/2080899072, 129451895/693633024, -249306347/2080899072, -665488459/2080899072, 5862193/99090432, 268064795/297271296, 431311115/297271296, 87485353/99090432, -1563343219/2080899072, -3840725387/2080899072, 3257451301/1387266048, -3146022949/4161798144, -1911/65536, 469/65536, 189/65536, -63/65536}, {33703043/2774532096, -33703043/924844032, 878755/66060288, 79450607/1387266048, -59237441/1387266048, -26364451/462422016, 59428135/1387266048, 118233095/1387266048, -2513573/66060288, -36538903/198180864, -4274119/198180864, 43326595/66060288, 2102477135/1387266048, 2091040327/1387266048, -2047583945/924844032, 1677059273/2774532096, 2297/16384, -327/16384, -1911/65536, 469/65536, 189/65536, -63/65536}, {-151151/56623104, 151151/18874368, -29161/9437184, -342155/28311552, 264293/28311552, 107023/9437184, -260515/28311552, -445955/28311552, 82415/9437184, 856645/28311552, -137387/28311552, -801673/9437184, -1363307/28311552, 11442365/28311552, 45218189/18874368, -19906445/56623104, -7419/16384, 285/16384, 2297/16384, -327/16384, -1911/65536, 469/65536, 189/65536, -63/65536}, {715/2654208, -715/884736, 143/442368, 1573/1327104, -1243/1327104, -473/442368, 1205/1327104, 1885/1327104, -385/442368, -3395/1327104, 925/1327104, 2855/442368, 2101/1327104, -32923/1327104, -418201/884736, 3957145/2654208, 43659/32768, 95/32768, -7419/16384, 285/16384, 2297/16384, -327/16384, -1911/65536, 469/65536, 189/65536, -63/65536}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5493/32768, -16479/32768, 95/32768, 43659/32768, 43659/32768, 95/32768, -7419/16384, 285/16384, 2297/16384, -327/16384, -1911/65536, 469/65536, 189/65536, -63/65536}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1641/32768, 4923/32768, 285/16384, -7419/16384, 95/32768, 43659/32768, 43659/32768, 95/32768, -7419/16384, 285/16384, 2297/16384, -327/16384, -1911/65536, 469/65536, 189/65536, -63/65536}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 329/32768, -987/32768, -327/16384, 2297/16384, 285/16384, -7419/16384, 95/32768, 43659/32768, 43659/32768, 95/32768, -7419/16384, 285/16384, 2297/16384, -327/16384, -1911/65536, 469/65536, 189/65536, -63/65536}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -63/65536, 189/65536, 469/65536, -1911/65536, -327/16384, 2297/16384, 285/16384, -7419/16384, 95/32768, 43659/32768, 43659/32768, 95/32768, -7419/16384, 285/16384, 2297/16384, -327/16384, -1911/65536, 469/65536, 189/65536, -63/65536}} ---------------------------------------------------------------------- Dual wavelet filters (highpass) [2] Filtres d'ondelettes duales (passe-haut) [2] ---------------------------------------------------------------------- ---------------------------------------------------------------------- Note: These filters do not depend on ntilde. Ces filtres ne dépendent pas de ntilde. ---------------------------------------------------------------------- n = 1 {{-1/2,1/2}} n = 2 {{-1/2,1,-1/2}} n = 3 {{-1/2, 3/2, -3/2, 1/2}} ---------------------------------------------------------------------- TABLE ENDS HERE. LA TABLE SE TERMINE ICI. ---------------------------------------------------------------------- ------------------------------------------------- SAMPLE JAVA CODE EXEMPLE DE CODE EN JAVA ------------------------------------------------- /********************************** * Cohen-Daubechies-Feauveau * with N=2 and * Ntilde=4 adapted to the interval * by Deslauriers-Dubuc-Lemire ***********************************/ public class FastCDF2_4 { static int FilterType = 1; static final float[] scale = {0.03314563036811941f , -0.06629126073623882f , -0.17677669529663687f , 0.41984465132951254f , 0.9943689110435824f , 0.41984465132951254f , -0.17677669529663687f , -0.06629126073623882f , 0.03314563036811941f}; static final float[] wavelet = {-0.5f , 1.0f , -0.5f}; static final float[][] scaleLeft = {{1.0275145414117017f , 0.7733980419227863f , -0.22097086912079608f , -0.3314563036811941f , 0.16572815184059705f}, {-0.22189158107546605f , 0.4437831621509321f , 0.902297715576584f , 0.5800485314420897f , -0.25687863535292543f , -0.06629126073623882f , 0.03314563036811941f}, {0.07549838028293866f , -0.15099676056587732f , -0.0957540432856783f , 0.34250484713723395f , 1.0330388131397217f , 0.41984465132951254f , -0.17677669529663687f , -0.06629126073623882f , 0.03314563036811941f}, {-0.013810679320049755f , 0.02762135864009951f , 0.011048543456039804f , -0.04971844555217912f , -0.18506310288866673f , 0.41984465132951254f , 0.9943689110435824f , 0.41984465132951254f , -0.17677669529663687f , -0.06629126073623882f , 0.03314563036811941f }}; static final float[][] scaleRight = {{ 0.03314563036811941f , -0.06629126073623882f , -0.17677669529663687f , 0.41984465132951254f , 0.9943689110435824f , 0.41984465132951254f , -0.18506310288866673f , -0.04971844555217912f , 0.011048543456039804f , 0.02762135864009951f , -0.013810679320049755f}, {0.03314563036811941f , -0.06629126073623882f , -0.17677669529663687f , 0.41984465132951254f , 1.0330388131397217f , 0.34250484713723395f , -0.0957540432856783f , -0.15099676056587732f , 0.07549838028293866f}, {0.03314563036811941f , -0.06629126073623882f , -0.25687863535292543f , 0.5800485314420897f , 0.902297715576584f , 0.4437831621509321f , -0.22189158107546605f}, {0.16572815184059705f , -0.3314563036811941f , -0.22097086912079608f , 0.7733980419227863f , 1.0275145414117017f}}; // static final float[] waveletLeft = null; // static final float[] waveletRight = null; static final float[] scalePrimary = { 0.35355339059327373f , 0.7071067811865475f , 0.35355339059327373f }; static final float[] waveletPrimary = { 0.0234375f , 0.046875f , -0.125f , -0.296875f , 0.703125f , -0.296875f , -0.125f , 0.046875f , 0.0234375f }; static final float[][] scalePrimaryLeft = {{0.7071067811865475f , 0.35355339059327373f}}; static final float[][] scalePrimaryRight = {{0.35355339059327373f , 0.7071067811865475f}}; static final float[][] waveletPrimaryLeft = {{-0.546875f , 0.5696614583333334f , -0.3138020833333333f , -0.103515625f , 0.10677083333333333f , 0.043619791666666664f , -0.01953125f , -0.009765625f }, {0.234375f , -0.087890625f , -0.41015625f , 0.673828125f , -0.2421875f , -0.103515625f , 0.03515625f , 0.017578125f}}; static final float[][] waveletPrimaryRight = {{ 0.017578125f , 0.03515625f , -0.103515625f , -0.2421875f , 0.673828125f , -0.41015625f , -0.087890625f , 0.234375f}, {-0.009765625f , -0.01953125f , 0.043619791666666664f , 0.10677083333333333f , -0.103515625f , -0.3138020833333333f , 0.5696614583333334f , -0.546875f}}; public FastCDF2_4() { } public void transform (float[] v) { int last; for (last = v.length;last >= 15; last = (last + FilterType) /2) { transform(v , last); } } public void invTransform(float[] v) { int last; for (last = v.length;last >= 15;last = last/2 + FilterType); for (;2 * last - FilterType <= v.length;last = 2 * last - FilterType) { invTransform(v,last); } } public static void transform (float[] v,int last) { float[] ans = new float[last]; int half = (last + FilterType) / 2; if (2* half - FilterType != last) throw new IllegalArgumentException ("Illegal subband : "+last+" within array of length "+v.length); //lowpass for(int k = 0; k < scaleLeft.length ; k++) { for(int l = 0;l