A very basic question : How to dequantize this matrix?
2 views (last 30 days)
Show older comments
Hello all,
I have quantized matrix L by Quantization matrix Q :
K = floor( L. / Q + 0.5 )
Now I want to dequantize the matrix K at the receiver end. It doesn't seem to be correct to do this :
L1 = Q.* (ceil(K - 0.5)) neither : L2 = ceil(Q.* (K - 0.5))
( Lets say L = [0.75 0.025 ; 1.34 10.09] and Q = [1.5 2.35 ; 0.07 5.09]; The reconstructed L would then be : L1 = [ 1 -1 ; 2 8] and L = [1.5000 0 ; 1.3300 10.1800] Both results are different from original L)
Is there any way to reconstruct L? Could anyone please give me a hint ?
0 Comments
Accepted Answer
the cyclist
on 8 Feb 2014
Edited: the cyclist
on 8 Feb 2014
You lose information when you apply the floor operator.
For example,
floor(4.1)
and
floor(4.2)
both give the answer 4. It is not possible to recover 4.1 or 4.2 from 4. The best you could hope to do would be to find the range of possible L which could have resulted in the value of K you found. Would that be helpful?
2 Comments
the cyclist
on 8 Feb 2014
You are only looking at a small number of cases. Instead, think about how to get MATLAB to calculate the error many times, and use the algorithm that gives the smallest error on average over those many times.
More Answers (1)
John D'Errico
on 8 Feb 2014
As the cyclist points out, once discarded, such information is impossible to recover.
However, if you knew additional information about the matrix, perhaps that the values represented a smooth function for example, then you might be able to try a recovery. For that case then you could attempt to find the smoothest function that was consistent with rounding to have yielded the values provided. This is not difficult to write, and is an idea we used in past years to smooth shapers in image processing applications.
Without such additional information however, you can never regain what was lost.
0 Comments
See Also
Categories
Find more on Cast and Quantize Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!