【发布时间】:2019-05-16 10:10:08
【问题描述】:
我需要为视频的每一帧注册一些 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]
我尝试过使用matlab提供的imregtform函数和matlab的ABSOR工具。
tform = imregtform(frame1, frame2, 'affine','OnePlusOneEvolutionary','MeanSquares');
tform = absor(frame1, frame2)
使用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{:});
注意:ABSOR 没有找到仿射变换,它找到了相似变换。
【问题讨论】:
-
imregtform 需要图像数据,而不是控制点。
-
您可能正在寻找
estimateGeometricTransform函数。但是请注意,这需要Computer Vision Toolbox。无论如何,该函数是为 2D 数据创建的,因此您可能想了解执行此操作的算法,并尝试找到它们对 3d 数据的实现。也许OpenCV 有类似的东西。