Quantizing dct2() coefficents in blockproc()
1 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!