wavelet_coeffs.hh

00001 // Copyright (C) 2001, 2002, 2003, 2004  EPITA Research and Development Laboratory
00002 //
00003 // This file is part of the Olena Library.  This library is free
00004 // software; you can redistribute it and/or modify it under the terms
00005 // of the GNU General Public License version 2 as published by the
00006 // Free Software Foundation.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU General Public License
00014 // along with this library; see the file COPYING.  If not, write to
00015 // the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
00016 // MA 02111-1307, USA.
00017 //
00018 // As a special exception, you may use this file as part of a free
00019 // software library without restriction.  Specifically, if other files
00020 // instantiate templates or use macros or inline functions from this
00021 // file, or you compile this file and link it with other files to
00022 // produce an executable, this file does not by itself cause the
00023 // resulting executable to be covered by the GNU General Public
00024 // License.  This exception does not however invalidate any other
00025 // reasons why the executable file might be covered by the GNU General
00026 // Public License.
00027 
00028 #ifndef OLENA_TRANSFORMS_WAVELET_COEFFS_HH
00029 # define OLENA_TRANSFORMS_WAVELET_COEFFS_HH
00030 
00031 // FIXME: this file has not been adjusted to the coding style since it
00032 // will be completely rewritten in next release.
00033 
00034 # include <ntg/basics.hh>
00035 # include <ntg/float.hh>
00036 # include <oln/transforms/dwt.hh>
00037 
00038 namespace oln {
00039 
00040   namespace transforms {
00041 
00045     Wavelet_coeffs_definition(haar, ntg::float_d, 2)
00046     {
00047       const ntg::float_d sqrt_2 = sqrt(2);
00048 
00049       Wavelet_coeffs_begin
00050         sqrt_2 * 1.0 / 2.0,
00051         sqrt_2 * 1.0 / 2.0
00052       Wavelet_coeffs_end
00053     };
00054 
00055 
00061     Wavelet_coeffs_definition(daub4, ntg::float_d, 4)
00062     {
00063       const ntg::float_d sqrt_3 = sqrt(3);
00064       const ntg::float_d denom = 4 * sqrt(2);
00065 
00066       Wavelet_coeffs_begin
00067         (1.0 + sqrt_3)/denom,
00068         (3.0 + sqrt_3)/denom,
00069         (3.0 - sqrt_3)/denom,
00070         (1.0 - sqrt_3)/denom
00071       Wavelet_coeffs_end
00072     };
00073 
00079     Wavelet_coeffs_definition(daub6, ntg::float_d, 6)
00080     {
00081       Wavelet_coeffs_begin
00082         0.332670552950,
00083         0.806891509311,
00084         0.459877502118,
00085         -0.135011020010,
00086         -0.085441273882,
00087         0.035226291882
00088       Wavelet_coeffs_end
00089     };
00090 
00096     Wavelet_coeffs_definition(daub8, ntg::float_d, 8)
00097     {
00098       Wavelet_coeffs_begin
00099         0.230377813309,
00100         0.714846570553,
00101         0.630880767930,
00102         -0.027983769417,
00103         -0.187034811719,
00104         0.030841381836,
00105         0.032883011667,
00106         -0.010597401785
00107       Wavelet_coeffs_end
00108     };
00109 
00115     Wavelet_coeffs_definition(daub10, ntg::float_d, 10)
00116     {
00117       Wavelet_coeffs_begin
00118         0.160102397974,
00119         0.603829269797,
00120         0.724308528438,
00121         0.138428145901,
00122         -0.242294887066,
00123         -0.032244869585,
00124         0.077571493840,
00125         -0.006241490213,
00126         -0.012580751999,
00127         0.003335725285
00128       Wavelet_coeffs_end
00129     };
00130 
00136     Wavelet_coeffs_definition(daub12, ntg::float_d, 12)
00137     {
00138       Wavelet_coeffs_begin
00139         0.111540743350,
00140         0.494623890398,
00141         0.751133908021,
00142         0.315250351709,
00143         -0.226264693965,
00144         -0.129766867567,
00145         0.097501605587,
00146         0.027522865530,
00147         -0.031582039318,
00148         0.000553842201,
00149         0.004777257511,
00150         -0.001077301085
00151       Wavelet_coeffs_end
00152     };
00153 
00159     Wavelet_coeffs_definition(daub20, ntg::float_d, 20)
00160     {
00161       Wavelet_coeffs_begin
00162         0.026670057901,
00163         0.188176800078,
00164         0.527201188932,
00165         0.688459039454,
00166         0.281172343661,
00167         -0.249846424327,
00168         -0.195946274377,
00169         0.127369340336,
00170         0.093057364604,
00171         -0.071394147166,
00172         -0.029457536822,
00173         0.033212674059,
00174         0.003606553567,
00175         -0.010733175483,
00176         0.001395351747,
00177         0.001992405295,
00178         -0.000685856695,
00179         -0.000116466855,
00180         0.000093588670,
00181         -0.000013264203
00182       Wavelet_coeffs_end
00183     };
00184 
00185 
00191     Wavelet_coeffs_definition(coiflet2, ntg::float_d, 6)
00192     {
00193       const ntg::float_d sqrt_2 = sqrt(2);
00194       const ntg::float_d sqrt_15 = sqrt(15);
00195 
00196       Wavelet_coeffs_begin
00197         sqrt_2 * (sqrt_15 - 3) / 32.0,
00198         sqrt_2 * (1 - sqrt_15) / 32.0,
00199         sqrt_2 * (6 - 2 * sqrt_15) / 32.0,
00200         sqrt_2 * (2 * sqrt_15 + 6) / 32.0,
00201         sqrt_2 * (sqrt_15 + 13) / 32.0,
00202         sqrt_2 * (9 - sqrt_15) / 32.0
00203       Wavelet_coeffs_end
00204     };
00205 
00211     Wavelet_coeffs_definition(coiflet4, ntg::float_d, 12)
00212     {
00213       Wavelet_coeffs_begin
00214         0.0011945726958388,
00215         -0.01284557955324,
00216         0.024804330519353,
00217         0.050023519962135,
00218         -0.15535722285996,
00219         -0.071638282295294,
00220         0.57046500145033,
00221         0.75033630585287,
00222         0.28061165190244,
00223         -0.0074103835186718,
00224         -0.014611552521451,
00225         -0.0013587990591632
00226       Wavelet_coeffs_end
00227     };
00228 
00234     Wavelet_coeffs_definition(coiflet6, ntg::float_d, 18)
00235     {
00236       Wavelet_coeffs_begin
00237         -0.0016918510194918,
00238         -0.00348787621998426,
00239          0.019191160680044,
00240          0.021671094636352,
00241         -0.098507213321468,
00242         -0.056997424478478,
00243          0.45678712217269,
00244          0.78931940900416,
00245          0.38055713085151,
00246         -0.070438748794943,
00247         -0.056514193868065,
00248          0.036409962612716,
00249          0.0087601307091635,
00250         -0.011194759273835,
00251         -0.0019213354141368,
00252          0.0020413809772660,
00253          0.00044583039753204,
00254         -0.00021625727664696
00255       Wavelet_coeffs_end
00256     };
00257 
00258   } // end of namespace transforms
00259 
00260 } // end of namespace oln
00261 
00262 #endif // ! OLENA_TRANSFORMS_WAVELET_COEFFS_HH

Generated on Thu Apr 15 20:13:15 2004 for Olena by doxygen 1.3.6-20040222