【计算机视觉基础】如何通过BFM模型得到人脸关键特征点的信息
前言
本文介绍BFM模型,从中提取68个关键特征点对应的立体信息以及可视化。
code
BFMpath = '01_MorphableModel.mat'; BFM = load(BFMpath); landmarkpath = 'Landmarks68_BFM.anl'; %landmarkpath = 'Landmarks21_BFM.anl'; idx = readLandmarks(landmarkpath); vertices = double(reshape(BFM.shapeMU,3,length(BFM.shapeMU)/3)'); faces = BFM.tl; showLandmarks(vertices,faces,idx); % shapeMU = BFM.shapeMU; shape = reshape(shapeMU, 3, 53490); shape = shape.'; x = shape(:, 1); y = shape(:, 2); z = shape(:, 3); figure scatter3(x, y, z, 1, 'filled'); hold on landmarks3d = zeros(68, 3); for i =1 : 68 scatter3(x(idx(i), y(idx(i)), z(idx(i)), 10, 'r'); text(double(x(idx(i))), double(y(idx(i))), double(z(idx(i))), int2str(i)); landmarks3d(i, :) = [x(idx(i), y(idx(i), z(idx(i))]; end save landmarks3d landmarks3d ld3d = landmarks3d/100.0;
在matlab中通过三维旋转可以查看三维图像各个角度的立体信息。
参考
完
各美其美,美美与共,不和他人作比较,不对他人有期待,不批判他人,不钻牛角尖。
心正意诚,做自己该做的事情,做自己喜欢做的事情,安静做一枚有思想的技术媛。
版权声明,转载请注明出处:https://www.cnblogs.com/happyamyhope/
心正意诚,做自己该做的事情,做自己喜欢做的事情,安静做一枚有思想的技术媛。
版权声明,转载请注明出处:https://www.cnblogs.com/happyamyhope/