DSPRelated.com
Forums

Rate distortion plot how?

Started by A.E lover April 19, 2007
I need to test my compression program and what I need is to plot a
rate-distortion figure Specifically

my signal is f[n]=1 if n=0,1,.....,12.
and f[n]=0 otherwise. n is from 0 to 255.


My algorithm decompose the signal to 256 coefficients and using M bits
to encode each coefficient. (M can be changed)

Now to plot the rate_distortion, I guess I will:

1. Let M = some various numbers (5, 6, ...,100) and calculate the
corresponding distortions: ie: M1= 5, D1, M2=6, D2, ..... and so on.

Then plot this data (plot (M,D)) one axis is M and the other one is D.
Is this plot a RATE- DISTORTION?
If not please guide me how to do plot it.
Thanks

"A.E lover" <aelover11@gmail.com> writes:

> I need to test my compression program and what I need is to plot a > rate-distortion figure Specifically > > my signal is f[n]=1 if n=0,1,.....,12. > and f[n]=0 otherwise. n is from 0 to 255. > > > My algorithm decompose the signal to 256 coefficients and using M bits > to encode each coefficient. (M can be changed) > > Now to plot the rate_distortion, I guess I will: > > 1. Let M = some various numbers (5, 6, ...,100) and calculate the > corresponding distortions: ie: M1= 5, D1, M2=6, D2, ..... and so on. > > Then plot this data (plot (M,D)) one axis is M and the other one is D. > Is this plot a RATE- DISTORTION? > If not please guide me how to do plot it. > Thanks
Hi, The rate distortion function first requires three things to be defined: 1. A distortion measure d(x,y), where d(x,y) \in R and d(x,y) >= 0. 2. The average distortion over n symbols, D(x^n, y^n) = (1/n) sum_{i=1}^n (d(x_i,y_i)). 3. An input probability density function p(x). The rate distortion function r(delta) is then defined as the minimum rate r such that the average distortion D is less than delta. The performance of any encoder/decoder should fall on a point in the r(delta),delta plane between the delta axis and the r(delta) function. Do you mean you wish to determine which point your encoder/decoder falls on this plane? If so, then I would generate a source at the assumed input distribution and measure the resulting average distortion and rate. These two parameters define a point on the r(theta), theta plane, and hopefully it is close to the theoretical rate limit at the measured distortion. See [cover] for a reference. --Randy @book{cover, title = "Elements of Information Theory", author = "Thomas M. Cover and Joy A. Thomas", publisher = "John Wiley and Sons, Inc.", year = "1991"} -- % Randy Yates % "So now it's getting late, %% Fuquay-Varina, NC % and those who hesitate %%% 919-577-9882 % got no one..." %%%% <yates@ieee.org> % 'Waterfall', *Face The Music*, ELO http://home.earthlink.net/~yatescr
A.E lover wrote:
> I need to test my compression program and what I need is to plot a > rate-distortion figure Specifically > > my signal is f[n]=1 if n=0,1,.....,12. > and f[n]=0 otherwise. n is from 0 to 255. > > > My algorithm decompose the signal to 256 coefficients and using M bits > to encode each coefficient. (M can be changed) > > Now to plot the rate_distortion, I guess I will: > > 1. Let M = some various numbers (5, 6, ...,100) and calculate the > corresponding distortions: ie: M1= 5, D1, M2=6, D2, ..... and so on. > > Then plot this data (plot (M,D)) one axis is M and the other one is D. > Is this plot a RATE- DISTORTION? > If not please guide me how to do plot it.
By what criteria do you assess distortion? Jerry -- Engineering is the art of making what you want from things you can get. &macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;