Borrar filtros
Borrar filtros

A very basic question : How to dequantize this matrix?

3 visualizaciones (últimos 30 días)
Negar
Negar el 8 de Feb. de 2014
Editada: Walter Roberson el 8 de Feb. de 2014
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 ?

Respuesta aceptada

the cyclist
the cyclist el 8 de Feb. de 2014
Editada: the cyclist el 8 de Feb. de 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 comentarios
Negar
Negar el 8 de Feb. de 2014
Thank you for the response, now I know the point of my assignment : Its discussing the lossy compression. But I have still a question: Im trying to find the best model ( among L_1, L_2 and L_3) to reconstruct L with least mean square error. But each time I run this code, a new model appears to be the best, due to the errors (E_1 , E_2 , and E_3). So how to choose the best model ?
clc
clear all
close all
L = 10* rand (2,2)
Q = [1.5 2.35 ; 0.07 5.09];
K = floor(L./Q + 0.5);
L_1 = ceil (Q.* (K - 0.5))
L_2 = Q.* (ceil (K - 0.5))
L_3 = Q.* (K - 0.5)
E_1 = 1/4 * sum((L(:)-L_1(:)).^2)
E_2 = 1/4 * sum((L(:)-L_2(:)).^2)
E_3 = 1/4 * sum((L(:)-L_3(:)).^2)
the cyclist
the cyclist el 8 de Feb. de 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.

Iniciar sesión para comentar.

Más respuestas (1)

John D'Errico
John D'Errico el 8 de Feb. de 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.

Categorías

Más información sobre Logical en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by