资源描述:
《数字图像处理课设xx》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、数字图像处理课程设计报告题目:基于图像的DCT编码解码的设计专业班级:通信0802学号:2008001314姓名:吴向禹基于图像的DCT编码解码的设计一、设计目的1.1熟悉和掌握MATLAB程序设计方法1.2掌握图像DCT的编码解码过程constructionqualityacceptanceandassessmentRegulation(ProfessionalEdition)(DL/T5210.2-2009~DL/T5210.8-2009);1.9thequalitycheckoutandevalu
2、ationofelectricequipmentinstallationengineeringcode(DL/T5161.1-2002~5161.17-2002);1.10thenormsofconstructionsupervision,theelectricpowerconstructionsupervisionregulations51.3学习和熟悉MATLAB图像处理工具箱1.4学会运用MATLAB工具箱对图像进行处理和分析二、设计环境WindowXP,MATLAB7.1三、具体设计:3.1%编
3、码程序functiony=jpegencode(x,quality)error(nargchk(1,2,nargin));ifnargin<2quality=1;endx=double(x)-128;[xm,xn]=size(x);t=dctmtx(8);y=blkproc(x,[88],'P1*x*P2',t,t');m=[1611101624405161;1212141926586055;1413162440576956;1417222951878062;182237566810910377;243
4、555648110411392;49647887103121120101;7292959811210010399]*quality;yy=blkproc(y,[88],'round(x./P1)',m);y=im2col(yy,[88],'distinct');xb=size(y,2);order=[1923101725181145121926334134272013671421283542495750433629221581623303744515859524538312432394653606154
5、4740485562635664];%z型扫描对变换系数重新排列y=y(order,:);eob=max(x(:))+1;num=numel(y)+size(y,2);r=zeros(num,1);count=0;forj=1:xbi=max(find(y(:,j)));ifisempty(i)i=0;endp=count+1;q=p+i;r(p:q)=[y(1:i,j);eob];count=count+i+1;endr((count+1):end)=[];r=r+128;constructionqu
6、alityacceptanceandassessmentRegulation(ProfessionalEdition)(DL/T5210.2-2009~DL/T5210.8-2009);1.9thequalitycheckoutandevaluationofelectricequipmentinstallationengineeringcode(DL/T5161.1-2002~5161.17-2002);1.10thenormsofconstructionsupervision,theelectricp
7、owerconstructionsupervisionregulations5r=uint8(r);savedatr;y.size=uint16([xm,xn]);y.numblocks=uint16(xb);y.quality=uint16(quality*100);保存为叫jpegencode的m文件,方便调用。3.2解码程序functionx=jpegdecode(y)error(nargchk(1,1,nargin));m=[1611101624405161;1212141926586055;1
8、413162440576956;1417222951878062;182237566810910377;243555648110411392;49647887103121120101;7292959811210010399];order=[192310172518114512192633413427201367142128354249575043362922158162330374451585952453831243239465360615