Blurred Image after DCT image compression.
조회 수: 1 (최근 30일)
이전 댓글 표시
I'm building my own DCT compression code, and the resulting image is blurred and has visible blocks in it,something not present in the original image.
Here's the resulting image:
and here's the original image:
The code is as follows:
%Compression snippet
y = blockproc(x, [8,8], dct);
fun = @(block_struct) round(block_struct.data ./ m);
y = blockproc(y, [8,8], fun);
y = im2col(y, [8,8],'distinct');
% decompression snippet
x = col2im(z, [8 8], [xm xn], 'distinct');
fun = @(block_struct) (block_struct.data .* m);
y = blockproc(x, [8,8], fun);
size(y)
t = dctmtx(8);
dct = @(block_struct) t' * block_struct.data * t;
y = blockproc(y, [8,8], dct);
x = uint8(y + 128);
I didn't include all of the code.
댓글 수: 0
답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Denoising and Compression에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!