As-Conformal-As-Possible Surface Registration
{3.2. Conformal stiffness energy
LConformal(T)=∥T11−T22∥2+∥T22−T33∥2+∥T33−T11∥2+∥T12+T21∥2+∥T23+T32∥2+∥T31+T13∥2LConformal(T) =\lVert T_{11} - T_{22}\rVert^2+\lVert T_{22} - T_{33}\rVert^2+\lVert T_{33} - T_{11}\rVert^2+\lVert T_{12} + T_{21}\rVert^2+\lVert T_{23} + T_{32}\rVert^2+\lVert T_{31} + T_{13}\rVert^2
where
T = \begin{bmatrix} T_{11} &T_{12}&T_{13}\\ T_{21} &T_{22}&T_{23}\\ T_{31} &T_{32}&T_{33}\\ \end{bmatrix}
Minimizing this objective function is equivalent to the following equation set:
∥T11−T22∥=0\lVert T_{11} - T_{22}\rVert=0
∥T22−T33∥=0\lVert T_{22} - T_{33}\rVert=0
∥T33−T11∥=0\lVert T_{33} - T_{11}\rVert=0
∥T12+T21∥=0\lVert T_{12} + T_{21}\rVert=0
∥T23+T32∥=0\lVert T_{23} + T_{32}\rVert=0
∥T31+T13∥=0\lVert T_{31} + T_{13}\rVert=0
[see the fourth one in http://blog.csdn.net/seamanj/article/details/51803822 , which can be applied in following derivations]
which can be written in matrix form:
\begin{bmatrix} 1 &0&0&0&-1&0&0&0&0&0&0&0\\ 0 &0&0&0&1&0&0&0&-1&0&0&0\\ -1 &0&0&0&0&0&0&0&1&0&0&0\\ 0 &1&0&1&0&0&0&0&0&0&0&0\\ 0 &0&0&0&0&1&0&1&0&0&0&0\\ 0 &0&1&0&0&0&1&0&0&0&0&0\\ \end{bmatrix}\begin{bmatrix} T_{11} \\ T_{21} \\ T_{31} \\ T_{12} \\ T_{22} \\ T_{32} \\ T_{13} \\ T_{23} \\ T_{33} \\ t_{1} \\ t_{2} \\ t_{3} \\ \end{bmatrix}=\begin{bmatrix} 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \end{bmatrix}
}
{consist energe
∀i,∀j∈N(i)\forall i, \forall j\in N(i), ∥Ti(v0j−v0i)+v0i+ti−(v0j+tj)∥=0 \lVert T_i(v_j^0-v_i^0)+v_i^0+t_i-(v_j^0+t_j) \rVert=0
writing in matrix form leads to:
\begin{bmatrix} T_i(11) &T_i(12)&T_i(13)\\ T_i(21) &T_i(22)&T_i(23)\\ T_i(31) &T_i(32)&T_i(33)\\ \end{bmatrix}\begin{bmatrix} v_j^0(1)-v_i^0(1)\\ v_j^0(2)-v_i^0(2)\\ v_j^0(3)-v_i^0(3)\\ \end{bmatrix}+\begin{bmatrix} v_i^0(1)\\ v_i^0(2)\\ v_i^0(3)\\ \end{bmatrix}+\begin{bmatrix} t_i(1)\\ t_i(2)\\ t_i(3)\\ \end{bmatrix}-\begin{bmatrix} v_j^0(1)+t_j(1)\\ v_j^0(2)+t_j(2)\\ v_j^0(3)+t_j(3)\\ \end{bmatrix}\\ =\begin{bmatrix} T_i(11)(v_j^0(1)-v_i^0(1)) +T_i(12)(v_j^0(2)-v_i^0(2))+T_i(13)(v_j^0(3)-v_i^0(3))+v_i^0(1)+t_i(1)-v_j^0(1)-t_j(1)\\ T_i(21)(v_j^0(1)-v_i^0(1)) +T_i(22)(v_j^0(2)-v_i^0(2))+T_i(23)(v_j^0(3)-v_i^0(3))+v_i^0(1)+t_i(2)-v_j^0(2)-t_j(2)\\ T_i(31)(v_j^0(1)-v_i^0(1)) +T_i(32)(v_j^0(2)-v_i^0(2))+T_i(33)(v_j^0(3)-v_i^0(3))+v_i^0(1)+t_i(3)-v_j^0(3)-t_j(3)\\ \end{bmatrix}=\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}
Collecting all the unknown variables into a column vector yields us:
\begin{bmatrix} v_j^0(1)-v_i^0(1) &0&0&v_j^0(2)-v_i^0(2)&0&0&v_j^0(3)-v_i^0(3)&0&0&1&0&0\\ 0 &v_j^0(1)-v_i^0(1)&0&0&v_j^0(2)-v_i^0(2)&0&0&v_j^0(3)-v_i^0(3)&0&0&1&0\\ 0 &0&v_j^0(1)-v_i^0(1)&0&0&v_j^0(2)-v_i^0(2)&0&0&v_j^0(3)-v_i^0(3)&0&0&1\\ \end{bmatrix}\cdots\begin{bmatrix} -1 &0&0\\ 0 &-1&0\\ 0 &0&-1\\ \end{bmatrix} \begin{bmatrix} T_i(11) \\ T_i(21) \\ T_i(31) \\ T_i(12) \\ T_i(22) \\ T_i(32) \\ T_i(13) \\ T_i(23) \\ T_i(33) \\ t_i(1) \\ t_i(2) \\ t_i(3) \\ \vdots\\ t_j(1) \\ t_j(2) \\ t_j(3) \end{bmatrix}=\begin{bmatrix} v_j^0(1)-v_i^0(1)\\ v_j^0(2)-v_i^0(2)\\ v_j^0(3)-v_i^0(3)\\ \end{bmatrix}
}
{smooth energe
∀i,∀j∈N(i)\forall i, \forall j\in N(i), ∥Ti(v0j−v0i)+Tj(v0i−v0j)∥=0 \lVert T_i(v_j^0-v_i^0)+T_j(v_i^0-v_j^0) \rVert=0
writing in matrix form leads to:
\begin{bmatrix} T_i(11) &T_i(12)&T_i(13)\\ T_i(21) &T_i(22)&T_i(23)\\ T_i(31) &T_i(32)&T_i(33)\\ \end{bmatrix}\begin{bmatrix} v_j^0(1)-v_i^0(1)\\ v_j^0(2)-v_i^0(2)\\ v_j^0(3)-v_i^0(3)\\ \end{bmatrix}+\begin{bmatrix} T_j(11) &T_j(12)&T_j(13)\\ T_j(21) &T_j(22)&T_j(23)\\ T_j(31) &T_j(32)&T_j(33)\\ \end{bmatrix}\begin{bmatrix} v_i^0(1)-v_j^0(1)\\ v_i^0(2)-v_j^0(2)\\ v_i^0(3)-v_j^0(3)\\ \end{bmatrix}\\ =\begin{bmatrix} T_i(11)(v_j^0(1)-v_i^0(1)) +T_i(12)(v_j^0(2)-v_i^0(2))+T_i(13)(v_j^0(3)-v_i^0(3))+T_j(11)(v_i^0(1)-v_j^0(1)) +T_j(12)(v_i^0(2)-v_j^0(2))+T_j(13)(v_i^0(3)-v_j^0(3))\\ T_i(21)(v_j^0(1)-v_i^0(1)) +T_i(22)(v_j^0(2)-v_i^0(2))+T_i(23)(v_j^0(3)-v_i^0(3))+T_j(21)(v_i^0(1)-v_j^0(1)) +T_j(22)(v_i^0(2)-v_j^0(2))+T_j(23)(v_i^0(3)-v_j^0(3))\\ T_i(31)(v_j^0(1)-v_i^0(1)) +T_i(32)(v_j^0(2)-v_i^0(2))+T_i(33)(v_j^0(3)-v_i^0(3))+T_j(31)(v_i^0(1)-v_j^0(1)) +T_j(32)(v_i^0(2)-v_j^0(2))+T_j(33)(v_i^0(3)-v_j^0(3))\\ \end{bmatrix}=\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}
\begin{bmatrix} v_j^0(1)-v_i^0(1) &0&0&v_j^0(2)-v_i^0(2)&0&0&v_j^0(3)-v_i^0(3)&0&0\\ 0 &v_j^0(1)-v_i^0(1)&0&0&v_j^0(2)-v_i^0(2)&0&0&v_j^0(3)-v_i^0(3)&0\\ 0 &0&v_j^0(1)-v_i^0(1)&0&0&v_j^0(2)-v_i^0(2)&0&0&v_j^0(3)-v_i^0(3)\\ \end{bmatrix}\cdots\begin{bmatrix} v_i^0(1)-v_j^0(1) &0&0&v_i^0(2)-v_j^0(2)&0&0&v_i^0(3)-v_j^0(3)&0&0\\ 0 &v_i^0(1)-v_j^0(1)&0&0&v_i^0(2)-v_j^0(2)&0&0&v_i^0(3)-v_j^0(3)&0\\ 0 &0&v_i^0(1)-v_j^0(1)&0&0&v_i^0(2)-v_j^0(2)&0&0&v_i^0(3)-v_j^0(3)\\ \end{bmatrix} \begin{bmatrix} T_i(11) \\ T_i(21) \\ T_i(31) \\ T_i(12) \\ T_i(22) \\ T_i(32) \\ T_i(13) \\ T_i(23) \\ T_i(33) \\ \vdots\\ T_j(11) \\ T_j(21) \\ T_j(31) \\ T_j(12) \\ T_j(22) \\ T_j(32) \\ T_j(13) \\ T_j(23) \\ T_j(33) \end{bmatrix}=\begin{bmatrix} 0\\ 0\\ 0 \end{bmatrix}
}
At last, I would like release the matlab source of this paper:
clear;
consist = 1;
smooth = 1;
conformal = 1;
feature = 1;
closest = 1;X0=read_obj('sphere_before.obj');
V=X0.xyz'; % list of vertex positions
F=X0.tri'; % list of triangles indices
N=X0.vertex_mean_normal';
n = size(V,1); %number of verticesif( feature || closest )X1=read_obj('sphere_ffd.obj'); V_target=X1.xyz'; % list of vertex positionsF_target=X1.tri';
end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%finding neighbour%%%%%%%%%%%%%%%%%%%%%%%%%%%%
neighbour_matrix = zeros(n,n);
for i=1:nneighbour = find(F(:,1)==i | F(:,2)==i | F(:,3)==i);neighbour = F(neighbour,:);neighbour = setdiff(neighbour(:),i);neighbour_matrix(i,neighbour(:)) = ones(1,size(neighbour,2));
endneighbour_count = sum(sum(neighbour_matrix,2),1);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%consist%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if(consist)
E_consist_A=zeros(3*neighbour_count, 12*n);
E_consist_b=zeros(3*neighbour_count, 1);
tic
%%construct matrix for consist energe
count = 1;
for i = 1:nfor j = 1:nif( neighbour_matrix(i,j) && i~=j)E_consist_A((count-1)*3+1 : count*3, (i-1)*12 + 1 : i*12) = ...[eye(3)*(V(j,1)-V(i,1)) eye(3)*(V(j,2)-V(i,2)) eye(3)*(V(j,3)-V(i,3)) eye(3)];E_consist_A((count-1)*3+1 : count*3, (j-1)*12 + 10 : j*12) = ...-1 * eye(3);E_consist_b((count-1)*3+1 : count*3,1) = V(j,:)' - V(i,:)';count = count + 1;endend
end
t = toc;
fprintf('construction for consist energe completes: %gs\n',t);
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%smooth%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if(smooth)
E_smooth_A=zeros(3*neighbour_count, 12*n);
E_smooth_b=zeros(3*neighbour_count, 1);
tic
%construct matrix for smooth energe
count = 1;
for i = 1:nfor j = 1:nif( neighbour_matrix(i,j) && i~=j)% E_smooth_A_temp = sparse(3, 12*n);E_smooth_A( (count-1)*3+1 : count*3, (i-1)*12 + 1 : (i-1)*12 + 9) = ...[eye(3)*(V(j,1)-V(i,1)) eye(3)*(V(j,2)-V(i,2)) eye(3)*(V(j,3)-V(i,3))];E_smooth_A( (count-1)*3+1 : count*3, (j-1)*12 + 1 : (j-1)*12 + 9) = ...[eye(3)*(V(i,1)-V(j,1)) eye(3)*(V(i,2)-V(j,2)) eye(3)*(V(i,3)-V(j,3))];count = count + 1;endend
end
t = toc;
fprintf('construction for smooth energe completes: %gs\n',t);
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%conformal%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if(conformal)
tic
%construct matrix for linear conformal energe
E_lconformal_A = zeros(6*n, 12*n);
E_lconformal_b = zeros(6*n, 1);
for i = 1:nE_lconformal_A( (i-1)*6 + 1 : i*6, (i-1)*12 + 1 : (i-1)*12 + 9) = ...[ 1 0 0 0 -1 0 0 0 0;0 0 0 0 1 0 0 0 -1;-1 0 0 0 0 0 0 0 1;0 1 0 1 0 0 0 0 0;0 0 0 0 0 1 0 1 0;0 0 1 0 0 0 1 0 0]; end
t = toc;
fprintf('construction for linear conformal energe completes: %gs\n',t);
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%feature%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if(feature)
tic
%construct matrix for feature point constraintsfeature_matching_pairs = [1:200; 1:200]';E_feature_A = zeros(3*n, 12*n);
E_feature_b = zeros(3*n, 1);for i = 1:size(feature_matching_pairs,1)template_index = feature_matching_pairs(i,1);target_index = feature_matching_pairs(i,2);E_feature_A( (template_index-1)*3+1 : template_index*3, (template_index-1)*12+10 : template_index*12) = ...eye(3);E_feature_b((template_index-1)*3+1 : template_index*3) = V_target(target_index,:) - V(template_index,:);
end
t = toc;
fprintf('construction for feature point constraints completes: %gs\n',t);
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%closest%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if(closest)
tic
%construct matrix for closest point constraints
closest_matching_pairs = [1:200; 1:200]';
E_closest_A = zeros(3*n, 12*n);
E_closest_b = zeros(3*n, 1);
for i = 1:size(closest_matching_pairs,1)template_index = closest_matching_pairs(i,1);target_index = closest_matching_pairs(i,2);E_closest_A( (template_index-1)*3+1 : template_index*3, (template_index-1)*12+10 : template_index*12) = ...eye(3);VP = V_target(target_index,:) - V(template_index,:);Normal = N(template_index,:);E_closest_b((template_index-1)*3+1 : template_index*3) = dot(VP,Normal).*Normal;
end
t = toc;
fprintf('construction for cloest point constraints completes: %gs\n',t);
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%total%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
tic
%construct the total system
A=[];
b=[];
if(consist)A = [A; E_consist_A];b = [b; E_consist_b];
end
if(smooth)A = [A; E_smooth_A];b = [b; E_smooth_b];
end
if(conformal)A = [A; E_lconformal_A];b = [b; E_lconformal_b];
end
if(feature)A = [A; E_feature_A];b = [b; E_feature_b];
end
if(closest)A = [A; E_closest_A];b = [b; E_closest_b];
end
t = toc;
fprintf('construction for total system completes: %gs\n',t);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%solving%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
tic
%solve the whole system
%T=linsolve(A'*A,A'*b);%7.13842sT = (A'*A)\(A'*b);%6.63639s%T=pcg(A'*A,A'*b,1e-12,2000);%9.59388s
%pcg converged at iteration 649 to a solution with relative residual 8.8e-13.% A = sparse(A);
% b = sparse(b);
% [L,U,P,Q,R] = lu(A);
% T = Q*(U\(L\(P*(R\b))));%0.724697st = toc;
fprintf('solving completes: %gs\n',t);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%update%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for i = 1:nV(i,:) = V(i,:) + T((i-1)*12+10 : i*12)';
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%figure%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
hold on
trimesh(F,V(:,1),V(:,2),V(:,3),'EdgeColor','b');
%trimesh(F_target,V_target(:,1),V_target(:,2),V_target(:,3),'EdgeColor','r');
axis equal
view(3)
disp('done!')
>> acap
construction for consist energe completes: 0.0397842s
construction for smooth energe completes: 0.0420681s
construction for linear conformal energe completes: 0.0217301s
construction for feature point constraints completes: 0.0140695s
construction for cloest point constraints completes: 0.0417374s
construction for total system completes: 1.08451s
solving completes: 4.71639s
done!
>>
the figure after running seems like:
matlab 源代码
As-Conformal-As-Possible Surface Registration相关推荐
- 点云配准论文阅读笔记--(4PCS)4-Points Congruent Sets for Robust Pairwise Surface Registration
目录 点云配准系列 写在前面 Abstract摘要 1 Introduction引言 2 Background研究背景 RANSAC Randomized Alignment 3 Approximat ...
- 【论文阅读】4- 4-Points Congruent Sets for Robust Pairwise Surface Registration
[论文阅读]4- 4-Points Congruent Sets for Robust Pairwise Surface Registration 1.基础知识回顾 2.算法理解 2.1.算法综述: ...
- 4-Points Congruent Sets for Robust Pairwise Surface Registration——4PCS阅读笔记
4-Points Congruent Sets for Robust Pairwise Surface Registration--4PCS阅读笔记 2018年03月08日 10:18:14 Voda ...
- Hybrid Skeleton Driven Surface Registration for Temporally Consistent Volumetric Video
这篇文章主要讲给定不同视角下的一组人的视频, 然后如何重建出整个人物的动画 大致流程是, 先根据不同视角重建出不同时刻的三维模型 然后detect每帧的2d pose, 重建出3d pose, 可以算 ...
- 【点云配准-4PCS(2008)】4-Points Congruent Sets for Robust Pairwise Surface Registration
文章目录 1 背景 1.1 问题描述 1.2 相似性测度(Similarity Measure) 1.3 随机采样一致性(Random Sample Consensus,RANSAC) 1.4 Ran ...
- Optimal Step Nonrigid ICP Algorithms for surface registration
这篇paper的约束有三个: 距离, stiffness, landmark
- 《4-Points Congruent Sets for Robust Pairwise Surface Registration》论文研读
最近导师在逼着要出东西,奈何才真正定在点云配准这个方向半学期时间,来膜拜一下大牛的工作. 第一遍看的时候被震惊了,因为最近想做的就是一个低重叠率情况下的配准,发现这个共面四点集的全局配准已经效果不错了 ...
- 文章瞎读 4PCS ——4-POINTS CONGRUENT SETS FOR ROBUST SURFACE REGISTRATION 2008
- conformal mapping的理解
先来复习下高数里面的第二类积分变换 以前对conformal mapping的理解都是盲人摸象, 片面局部的. 因为看的资料都是从不同的角度对解释它的. 随着阅历的丰富和理解的深入, 现已能将原来零星 ...
最新文章
- [NOI2014]魔法森林题解
- python文本操作
- 算法----有效的括号
- idea maven中的profiles是干什么的
- html input font size,在移动端中Input大小随着font-size而变化
- 40. Combination Sum II **
- 静态库与动态库(一):概述
- [转]在资源管理器中使鼠标右键增加一个命令,运行cmd,同时使得当前路径为资源管理器当前的目录...
- 【Python】 子进程创建与使用subprocess
- 2018-2019-1 20165303 实验五 通讯协议设计
- Pytorch中的Batch Normalization操作
- php phar,PHP中phar(PHP Archive)包的创建并使用
- html5扑克游戏源码,Html5德州扑克 - WEB源码|其它源码|源代码 - 源码中国
- SSM框架:MyBatis
- linux数据库安装
- 基于深度学习的行人检测技术
- 深入了解人工智能的发展现状及前景
- 通过雷达图的面积进行总体对比分析是不可靠的!
- 李宏毅机器学习 Regression
- android个人记账本的实验报告,(会计登记账簿实验报告.doc
热门文章
- Qt Supported Databases
- C++传递数组给函数
- OpenCV模板匹配函数:matchTemplate()介绍
- axis1.4 java.sql_web Service问题。。。用axis1.4求帮助
- WIN7 IE 无法启动
- Windows 2008 R2 ServerCore学习点滴(1)
- oracle 存储结构 语法 第一阶段
- 最终幻想13 公布发售日期和主题曲
- 使用ActiveReports for .net 进行报表开发(十)--交叉变换背景 (转)
- 华为机试HJ108:求最小公倍数