Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
granger35 committed Mar 12, 2021
2 parents d4c097e + f77224f commit 9695a5b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/SolARProjectOpencv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ FrameworkReturnCode projectCV(const std::vector<cv::Point3f> & inputPoints, std:
Transform3Df poseInv = pose.inverse();

cv::Mat rotMat, rvec;
rotMat = cv::Mat(3, 3, SolAROpenCVHelper::inferOpenCVType<float>(), (void *)poseInv.rotation().data());
rotMat = (cv::Mat_<float>(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<float>());
tvec.at<float>(0, 0) = poseInv(0, 3);
tvec.at<float>(1, 0) = poseInv(1, 3);
Expand Down

0 comments on commit 9695a5b

Please sign in to comment.