预览加载中,请您耐心等待几秒...
1/10
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

在线预览结束,喜欢就下载吧,查找使用更方便

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

functionjpeg %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %%THISWORKISSUBMITTEDBY: %% %%OHADGAL %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% closeall; %================== %section1.2+1.3 %================== %thefollowinguseofthefunction: % %plot_bases(base_size,resolution,plot_type) % %willplotthe64wantedbases.Iwilluse"zero-padding"forincreasedresolution %NOTETHATTHESEARETHESAMEBASES! %forreferenceIplotthefollowing3graphs: %a)3Dplotwithbasicresolution(64plotsof8x8pixels)using"surf"function %b)3Dplotwithx20resolution(64plotsof160x160pixels)using"mesh"function %c)2Dplotwithx10resolution(64plotsof80x80pixels)using"mesh"function %d)2Dplotwithx10resolution(64plotsof80x80pixels)using"imshow"function % %NOTE:matrixsizeofpictures(b),(c)and(d),cansupporthigherfrequency=higherbases %butIamnotaskedtodrawthese(higherbases)inthissection! %thezeropaddingisusedONLYforresolutionincrease! % %getallbasepictures(3Dsurfacefigure) plot_bases(8,1,'surf3d'); %getallbasepictures(3Dsurfacefigure),x20resolution plot_bases(8,20,'mesh3d'); %getallbasepictures(2Dmeshfigure),x10resolution plot_bases(8,10,'mesh2d'); %getallbasepictures(2Dmeshfigure),x10resolution plot_bases(8,10,'gray2d'); %================== %section1.4+1.5 %================== %foreachpicture{'0'..'9'}performa2dimensionaldcton8x8blocks. %savethedctinsideacellofthesize:10cellsof128x128matrix %showforeachpicture,it'sdct8x8blocktransform. foridx=0:9 %loadapicture switchidx case{0,1},input_image_128x128=im2double(imread(sprintf('%d.tif',idx),'tiff')); otherwise,input_image_128x128=im2double(imread(sprintf('%d.tif',idx),'jpeg')); end %performDCTin2dimensionoverblocksof8x8inthegivenpicture dct_8x8_imag