-0.999807135425239 -0.0128154391194470 -0.0148814136745799
-0.0128154391194470 -0.148441438622958 0.988838158557669
-0.0148814136745799 0.988838158557669 0.148248574048196
0.0309
2.0499
2.3804
0.0309
-2.0499
-2.3804
% Solution by Mike Burl on Feb 27, 2007
% This is a better way to determine the signs of the
% entries of the rotation vector using a hash table on all
% the combinations of signs of a pairs of products (in the
% rotation matrix)
% Define hashvec and Smat
hashvec = [0; -1; -3; -9; 9; 3; 1; 13; 5; -7; -11];
Smat = [1,1,1; 1,0,-1; 0,1,-1; 1,-1,0; 1,1,0; 0,1,1; 1,0,1; 1,1,1; 1,1,-1; 1,-1,-1; 1,-1,1];
M = (R+eye(3,3))/2;
uabs = sqrt(M(1,1));
vabs = sqrt(M(2,2));
wabs = sqrt(M(3,3));
mvec = [M(1,2), M(2,3), M(1,3)];
syn = ((mvec > 1e-4) - (mvec < -1e-4)); % robust sign() function
hash = syn * [9; 3; 1];
idx = find(hash == hashvec);
svec = Smat(idx,:)';
out = theta * [uabs; vabs; wabs] .* svec;
Eigen::AngleAxisd poseVecEigen;
poseVecEigen.fromRotationMatrix(rotMatrix);
Eigen::Vector3d poseVec = poseVecEigen.axis()*poseVecEigen.angle();
--
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/219fc0b7-3348-460c-9390-f8ae17b3bb78%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thanks for reporting this. I will look at it shortly.Sameer
--The Eigen implementation works as well.
Eigen::AngleAxisd poseVecEigen;
poseVecEigen.fromRotationMatrix(rotMatrix);
Eigen::Vector3d poseVec = poseVecEigen.axis()*poseVecEigen.angle();
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/44c4d608-671e-46ee-8bcf-6b9c536b9adb%40googlegroups.com.To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver...@googlegroups.com.