The Implicate Order

Quantization Error and Artifact Reduction (QEAR)

The Quantization Error and Artifact Reduction algorithm was partially tested in an earlier incarnation of this website, with some promising results. Its White Paper and MATLAB code follows...

What follows is the MATLAB {.m} file for the QEAR algorithm:

function Q = qear(y,p)


aa=fft(y);

qs=size(aa);

q=qs(2:2);

dc=aa(1:1);

fc=aa(2:q);

zc=complex(0.0,0.0);

bb=[zc,fc];


a=ifft(bb);

b=rup(a,p);

fsamp = (2.00^(p));

fcuts = [0.49 0.59];

mags = [1 0];

devs = [0.005 ((0.005)/(2^p))];


[n,Wn,beta,ftype] = kaiserord(fcuts,mags,devs,fsamp);

hh = fir1(n,Wn,ftype,kaiser(n+1,beta),'noscale');


d=conv(b,hh);

f=downsample(d,(2^(p)));


CC=fft(f);

q2s=size(CC);

q2=q2s(2:2);

fc2=CC(2:q2);

dd=[0*dc,fc2];

Q=(real(ifft(dd)));


end