[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
2D Wavelet Transformation
From: |
address@hidden |
Subject: |
2D Wavelet Transformation |
Date: |
Wed, 28 Sep 2022 10:56:16 +0000 |
Hello,
I want to perform a wavelet level filtering in a private project using. The GSL
and the functions gsl_wavelet2d_transform_forward + backward and
gsl_wavelet2d_transform_matrix.
I previously used the Python wavelet library but I want to switch to C/C++
code. In my old code I used wavedec2 + waverec2 with 8 levels. Afterwards I
looped over the coefficients of the 8 levels and set all except the levels I
wanted to filter to zero. So here are my questions:
How can I filter the levels of the returning data from
gsl_wavelet2d_transform_forward?
I tried to adapt the 1D example, but it seems not to work.
// looping over all of my data returned by the
gsl_wavelet2d_transform_forward(wavelet, data, tda, rows, cols, workspace)
for(int i = 0; i < rows * cols; ++i) {
coefficients[i] = fabs(data[i]);
}
gsl_sort_index(p, coefficients, 1, rows * cols);
for(int i = 0; i < rows * cols; ++i) {
// condition to only keep the values of level 8
data[p[i]] = 0;
}
How do I have to interpret the tda parameter? The documentation says it is the
physical row length, so this is equal to my image height?
Best regards
Marco
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 2D Wavelet Transformation,
address@hidden <=