資源簡介
MATLAB函數文件,本函數將利用DCT變換完成對輸入圖像進行壓縮。輸入為灰度圖像。
代碼片段和文件信息
function?comimage?=?dctcom(imagepermission)
f=imread(imagepermission);
m=rgb2gray(f);
f=double(m)/255;
T=dctmtx(8);
B=blkproc(f[8?8]‘P1*x*P2‘TT‘);
mask=[1?1?1?1?0?0?0?0
???????????1?1?1?0?0?0?0?0?
???????????1?1?0?0?0?0?0?0?
???????????1?0?0?0?0?0?0?0
???????????0?0?0?0?0?0?0?0
?????
評論
共有 條評論