⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 prob9_12.m

📁 these m files contain the solution of some problems in the book "communication system" by Haykin
💻 M
字号:
%	Author: Xiaofeng Xu, Polytechnic University  4/21/2002


%Predict Motion Vectors 
[Target_Img,Anchor_Img,Predict_Img,ox,oy,px,py,PSNR]=Motion_Estimation_2D('foreman66.Y','foreman69.Y',352,288,[16,16],[-32,-32],[32,32],1);

%(a) a frame directly
%DCT
EImg_dct=blkproc(Anchor_Img,[8 8],'dct2');
%Quantization
QImg_dct0=blkproc(EImg_dct,[8 8],'quan_dct',1);
%caculate the number of DCT nonzero coefficients
I0=find(QImg_dct0);
size(I0)

%(b) the direct difference
Error_Img1=Anchor_Img-Target_Img;
%DCT
EImg_dct=blkproc(Error_Img1,[8 8],'dct2');
%Quantization
QImg_dct1=blkproc(EImg_dct,[8 8],'quan_dct',1);
%caculate the number of DCT nonzero coefficients
I2=find(QImg_dct1);
size(I2)

%(c) the MC error image
Error_Img=Anchor_Img-Predict_Img;
%DCT
EImg_dct=blkproc(Error_Img,[8 8],'dct2');
%Quantization
QImg_dct=blkproc(EImg_dct,[8 8],'quan_dct',1);
%caculate the number of DCT nonzero coefficients
I1=find(QImg_dct);
size(I1)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -