OpenCV  3.4.4
Open Source Computer Vision
samples/cpp/tutorial_code/features2D/Homography/pose_from_homography.cpp

An example program about pose estimation from coplanar points

Check the corresponding tutorial for more details