Quantizing dct2() coefficents in blockproc()

1 Ansicht (letzte 30 Tage)
Lora
Lora am 2 Dez. 2014
Hi guys
I am trying to Quantize DCT coeficents. I have used blockproc() and dct2() and got the resultant image in say matrix ResBloc. Now my formula for quantization is round(a/stepSize)*stepSize where a is original coefficients and stepSize is 40. When i do this i get all zeros in my resultant image.This is how iam appying dct2() and blockproc() where I is my image
I=imread('myImage')
fun = @(block_struct) dct2(block_struct.data);
ResBloc= (blockproc(I,[8 8],fun));
now when i do QuantCoeff=round(ResBloc/40)*40; I get an all zero matrix Can any one give me a clue
Thanks

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by