function [A,R,T]=doCalib(width,height,imPoints,objPoints,A,RGuess,TGuess)
if isempty(RGuess) || isempty(TGuess)
[A,R,T]=calib(width,height,imPoints,objPoints,A,0,1); %extrinsic only
else
[A,R,T]=calib(width,height,imPoints,objPoints,A,0,2,RGuess,TGuess); %extrinsic only + use guess
end
inside = calcInside(A, R, T, width, height,objPoints);
if (inside==0)
T=-T;
t=pi;
RRz180=[cos(t) -sin(t) 0;sin(t) cos(t) 0;0 0 1];
R=RRz180*R;
end
end
用一个图片或者多个图片来重建三维模型
width ---width of image height --height of image
imPoints--- 是图片中的二维landmark点,objPoints - 是三维的点
(0,1)(0,2)的意思是 extrinsic only 和extrinsic only + use guess的意思吧。