diff --git a/src/SolARProjectOpencv.cpp b/src/SolARProjectOpencv.cpp index d176945a..ce51406a 100644 --- a/src/SolARProjectOpencv.cpp +++ b/src/SolARProjectOpencv.cpp @@ -49,7 +49,10 @@ FrameworkReturnCode projectCV(const std::vector & inputPoints, std: Transform3Df poseInv = pose.inverse(); cv::Mat rotMat, rvec; - rotMat = cv::Mat(3, 3, SolAROpenCVHelper::inferOpenCVType(), (void *)poseInv.rotation().data()); + rotMat = (cv::Mat_(3, 3) << poseInv(0, 0), poseInv(0, 1), poseInv(0, 2), + poseInv(1, 0), poseInv(1, 1), poseInv(1, 2), + poseInv(2, 0), poseInv(2, 1), poseInv(2, 2)); + cv::Mat tvec(3, 1, SolAROpenCVHelper::inferOpenCVType()); tvec.at(0, 0) = poseInv(0, 3); tvec.at(1, 0) = poseInv(1, 3);