我需要注册为视频的每一帧提供的一些 3D 面部标志。对于此任务,我试图找出为连续帧给出的几个地标坐标之间的变换矩阵。例如,第 1 帧和第 2 帧中 3 个地标的 3D 坐标如下:
frame1 = [2 4 15; 4 15 14; 20 11 7]
frame2 = [16 5 12; 5 7 9; 11 6 19]
Run Code Online (Sandbox Code Playgroud)
我尝试过使用imregtformmatlab提供的函数和matlab的ABSOR工具。
tform = imregtform(frame1, frame2, 'affine','OnePlusOneEvolutionary','MeanSquares');
tform = absor(frame1, frame2)
Run Code Online (Sandbox Code Playgroud)
使用时出现如下错误imregtform:
Error using imregtform>parseInputs (line 261)
The value of 'MovingImage' is invalid. All dimensions of the moving image should be greater than 4.
Error in imregtform (line 124)
parsedInputs = parseInputs(varargin{:});
Run Code Online (Sandbox Code Playgroud)
注意:ABSOR 不查找仿射变换,它查找相似变换。