How to apply a quantization step to a 2D transformed image?
조회 수: 4 (최근 30일)
이전 댓글 표시
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
채택된 답변
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
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 Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!