Depending on the size of the original image and depending on the kind of padding used during 2D discrete wavelet transform and reconstruction, the reconstructed image has a larger size.

Is there a general method given a mxn matrix and given some padding mode to crop the obtained pxq matrix to the mxn matrix (without trying every possibility in order to find the one with the least error)?

  • $\begingroup$ Since Wavelet Decomposition is just like Pyramid Decomposition, I also have the problem how to reconstruct the image. Moreover, things become harsher when you apply some processing to the different levels. $\endgroup$ – Royi Dec 3 '14 at 7:57
  • $\begingroup$ @Drazick I now even face an even worser problem for the wavelet packet transform. I construct my tree of coefficients and find the best basis given a certain cost function. But during reconstruction when I try to merge the CA, CH, CV, CD coefficients (each one resulted from a previous merge), the merge (idwt2) fails because CA can be of smaller size than CD. $\endgroup$ – Matthias Dec 4 '14 at 21:00
  • $\begingroup$ I'm not sure about the Wavelets Tree. Can you make it any equivalent to the pyramid? $\endgroup$ – Royi Dec 10 '14 at 16:26
  • $\begingroup$ @Drazick you said yourself they're equivalent? The discrete wavelet packet transform performs one step of a discrete wavelet transform of the original image resulting in four coefficient matrices CA, CH, CV, CD. This is repeated for each coefficient matrix etc. So you get 4, 16, 64, etc. coefficient matrices after 1, 2, 3, etc. decomposition steps. So the wavelet coefficients (CH, CV, CD) are also decomposed in comparison with the discrete wavelet transform which only decomposes the scaling (CA) coefficients. $\endgroup$ – Matthias Dec 10 '14 at 18:03
  • $\begingroup$ @Drazick when the tree is constructed, the optimal basis is retrieved given some additive cost function in 'O(n log n)'. During reconstruction 4 nodes of the tree are combined to their parent till we only have one node (the reconstruction). $\endgroup$ – Matthias Dec 10 '14 at 18:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.