Android & OpenCV: Homography to Camera Pose considering Camera Intrinsics and Backprojection

回眸只為那壹抹淺笑 提交于 2019-12-03 16:03:28

Get it to work on another way. Instead of using findHomography()/getP erspectiveTransform() i found another function called solvePnP() which returns the camera pose based on world and images points and an intrinsic camera matrix.

Using that function in combination with the projectPoints() method - i was able to reproject the 3d points back to the image.

In case of the screen edges there are placed on the right spot in the image.

UPDATE:

I found a bug in my implementation - my camera intrinsic matrix was wrong. The camera pose from homography implementation above is working for me!

The relationship between Homography in calibrated case (H) and uncalibrated case (H') is

H′=𝐾𝐻𝐾^(−1), where K is intrinsic matrix of camera.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!