How to apply a quantization step to a 2D transformed image?

9 ビュー (過去 30 日間)
Said BOUREZG
Said BOUREZG 2016 年 2 月 5 日
コメント済み: Walter Roberson 2016 年 2 月 6 日
Hi all of you, I need some help here, my problem is how can i use quantization to the result of that code below?,knowing that the result (XDFT) is complex arry, example: XDFT(1,1)=125+ i*2562. So how values like XDFT(1,1) will be on an interval between 0 and 255.
[filename, pathname] = uigetfile('*.bmp', 'open image');% getting a Bitmap image.
[X,MAP]=imread(fullfile(pathname, filename));%Image reading.
R=input('R=');%bloc size(8*8 or 16*16 or 32*32).
XDFT= blkproc(X,[R R],'fft2');%DFT Transformation of X.
  3 件のコメント
Said BOUREZG
Said BOUREZG 2016 年 2 月 5 日
編集済み: Said BOUREZG 2016 年 2 月 5 日
Thank you Matt J .
Matt J
Matt J 2016 年 2 月 5 日
編集済み: Matt J 2016 年 2 月 5 日
You're welcome, but I hope you will also learn to do this.

サインインしてコメントする。

採用された回答

Matt J
Matt J 2016 年 2 月 5 日
Why not quantize the real and imaginary parts? Or, like in JPEG compression, why not use the DCT, instead of the DFT, so that the block spectra are real-valued?
  2 件のコメント
Said BOUREZG
Said BOUREZG 2016 年 2 月 6 日
I don't have a problem with DCT or DWT, my problem with DFT coefficients if I separate real and imaginary parts and I quantize them, the compression of them can't give a good results.
Walter Roberson
Walter Roberson 2016 年 2 月 6 日
Why is it not possible for the compression to give good results? If you keep 5 real components and 5 imaginary components, that is as good a compression as keeping 10 real components.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDenoising and Compression についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by