91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 13KB
    文件類型: .m
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-06-11
  • 語(yǔ)言: Matlab
  • 標(biāo)簽: JPEF??MATLAB??

資源簡(jiǎn)介

用MATLAB實(shí)現(xiàn)JPEG圖像壓縮算法,包括DCT變換,霍夫曼變換

資源截圖

代碼片段和文件信息

function?jpeg

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%??????THIS?WORK?IS?SUBMITTED?BY:
%%
%%??????OHAD?GAL
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
close?all;

%?==================
%?section?1.2?+?1.3
%?==================
%?the?following?use?of?the?function:????
%
%????plot_bases(?base_sizeresolutionplot_type?)
%
%?will?plot?the?64?wanted?bases.?I?will?use?“zero-padding“?for?increased?resolution
%?NOTE?THAT?THESE?ARE?THE?SAME?baseS?!
%?for?reference?I?plot?the?following?3?graphs:
%?a)?3D?plot?with?basic?resolution?(64?plots?of?8x8?pixels)?using?“surf“?function
%?b)?3D?plot?with?x20?resolution?(64?plots?of?160x160?pixels)?using?“mesh“?function
%?c)?2D?plot?with?x10?resolution?(64?plots?of?80x80?pixels)?using?“mesh“?function
%?d)?2D?plot?with?x10?resolution?(64?plots?of?80x80?pixels)?using?“imshow“?function
%
%?NOTE:?matrix?size?of?pictures?(b)(c)?and?(d)?can?support?higher?frequency?=?higher?bases
%???????but?I?am?not?asked?to?draw?these?(higher?bases)?in?this?section?!
%???????the?zero?padding?is?used?ONLY?for?resolution?increase?!
%
%?get?all?base?pictures?(3D?surface?figure)
plot_bases(?81‘surf3d‘?);

%?get?all?base?pictures?(3D?surface?figure)?x20?resolution
plot_bases(?820‘mesh3d‘?);

%?get?all?base?pictures?(2D?mesh?figure)?x10?resolution
plot_bases(?810‘mesh2d‘?);???

%?get?all?base?pictures?(2D?mesh?figure)?x10?resolution
plot_bases(?810‘gray2d‘?);???



%?==================
%?section?1.4?+?1.5
%?==================
%?for?each?picture?{‘0‘..‘9‘}?perform?a?2?dimensional?dct?on?8x8?blocks.
%?save?the?dct?inside?a?cell?of?the?size:?10?cells?of?128x128?matrix
%?show?for?each?picture?it‘s?dct?8x8?block?transform.

for?idx?=?0:9
???
???%?load?a?picture
???switch?idx
???case?{01}?input_image_128x128?=?im2double(?imread(?sprintf(?‘%d.tif‘idx?)‘tiff‘?)?);
???otherwise?input_image_128x128?=?im2double(?imread(?sprintf(?‘%d.tif‘idx)‘jpeg‘?)?);
???end???
???
???%?perform?DCT?in?2?dimension?over?blocks?of?8x8?in?the?given?picture
???dct_8x8_image_of_128x128{idx+1}?=?image_8x8_block_dct(?input_image_128x128?);

???if?(mod(idx2)==0)
??????figure;
???end?????
???subplot(22mod(idx2)*2+1);????????????
???imshow(input_image_128x128);
???title(?sprintf(‘image?#%d‘idx)?);
???subplot(22mod(idx2)*2+2);?????????????
???imshow(dct_8x8_image_of_128x128{idx+1});
???title(?sprintf(‘8x8?DCT?of?image?#%d‘idx)?);
end



%?==================
%?section?1.6
%?==================
%?do?statistics?on?the?cell?array?of?the?dct?transforms
%?create?a?matrix?of?8x8?that?will?describe?the?value?of?each?“dct-base“?
%?over?the?transform?of?

評(píng)論

共有 條評(píng)論