Problem 1010. Create a "map" of 2D wavelet coefficients
Generate a matrix that for an image of size r*2^S by c*2^S indicates index of the wavelet subbands after 2D Discrete Wavelet Transform. Subbands are indexed from the lowest to highest frequency clockwise.
As inputs number of scales S and size (r x c) of the lowest frequency subband are given.
For example (2 scales and r=1, c=1) :
w = createDWTBlockMap(2, 1, 1)
Should produce:
1 2 5 5 4 3 5 5 7 7 6 6 7 7 6 6
1 (or 1s) in the top-left corner indicating approximation band and then 2,3,4,..,3*S+1 the other bands.
Solution Stats
Solution Comments
Show commentsProblem Recent Solvers3
Suggested Problems
-
4493 Solvers
-
Given an unsigned integer x, find the largest y by rearranging the bits in x
1973 Solvers
-
362 Solvers
-
337 Solvers
-
Penny Flipping: Reverse subsets of a sequence of coins until you recover the original configuration
17 Solvers
More from this Author4
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!