필터 지우기
필터 지우기

A very basic question : How to dequantize this matrix?

조회 수: 3 (최근 30일)
Negar
Negar 2014년 2월 8일
편집: Walter Roberson 2014년 2월 8일
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 ?

채택된 답변

the cyclist
the cyclist 2014년 2월 8일
편집: the cyclist 2014년 2월 8일
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
Negar
Negar 2014년 2월 8일
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 2014년 2월 8일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

John D'Errico
John D'Errico 2014년 2월 8일
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.

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by