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

📄 translateaffine2.m

📁 mri_toolbox是一个工具用来MRI. 来自于SourceForge, 我上传这个软件,希望能结识对医疗软件感兴趣的兄弟.
💻 M
字号:
function Mout = translateAffine2(Min,x0,y0)
% Mout = translateAffine2(Min,x0,y0)
%
% Given an alignment matrix (Min, in homogeneous coords) computed
% from a section of an image that was offset from the upper
% left by (x0,y0), compute the alignment matrix (Mout) that should
% be applied to the original image.
%
% 8/13/97  dhb, eah  Wrote it.
% 8/31/97  dhb       Change name to translateAffine2.m

% Make offset vector in homogeneous coords
offsetVec0 = [x0-1 y0-1]';

% Compute offset
offsetVec = Min(1:2,1:2)*offsetVec0 - offsetVec0;

% Compute Mout
Mout = Min;
Mout(1,3) = Mout(1,3) - offsetVec(1);
Mout(2,3) = Mout(2,3) - offsetVec(2);

⌨️ 快捷键说明

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