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

📄 test_motion_compensate.m

📁 用matlab写的仿真H.263标准的程序
💻 M
字号:
%h263运动搜索测试

% % 测试1,输入16x16全零亮度宏块数组
% TestY = uint8(zeros(16,16));
% TestU = uint8(zeros(8,8));
% TestV = uint8(zeros(8,8));
% TestWindowsY = uint8(zeros(48,48));
% TestWindowsU = uint8(zeros(24,24));
% TestWindowsV = uint8(zeros(24,24));
% 
% 
% [vectorr,vectorc] = MacroMotionSearch(TestY,TestWindowsY,48,48);
% [ResY,ResU,ResV] =  MotionCompensate(TestWindowsY,TestY,TestWindowsU,TestU,...
%                     TestWindowsV,TestV,vectorr,vectorc);
% [ReconY,ReconU,ReconV] = ReconMB(TestWindowsY,ResY,TestWindowsU,ResU,...
%                     TestWindowsV,ResV,vectorr,vectorc);
% TestEqual(ReconY,TestY);
% TestEqual(ReconU,TestU);
% TestEqual(ReconV,TestV);
% TestEqual(vectorr,0);
% TestEqual(vectorc,0);


% % %测试3,
TestY = uint8(rand(16,16)*20);
TestU = uint8(rand(8,8)*20);
TestV = uint8(rand(8,8)*20);
TestWindowsY = uint8(rand(48,48)*20);
TestWindowsU = uint8(rand(24,24)*20);
TestWindowsV = uint8(rand(24,24)*20);


[vectorr,vectorc] = MacroMotionSearch(TestY,TestWindowsY,48,48);
[ResY,ResU,ResV] =  MotionCompensate(TestWindowsY,TestY,TestWindowsU,TestU,...
                    TestWindowsV,TestV,vectorr,vectorc);
[ReconY,ReconU,ReconV] = ReconMB(TestWindowsY,ResY,TestWindowsU,ResU,...
                    TestWindowsV,ResV,vectorr,vectorc);

TestEqual(ReconY,TestY);
TestEqual(ReconU,TestU);
TestEqual(ReconV,TestV);

⌨️ 快捷键说明

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