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

An example program with homography decomposition.

Check the corresponding tutorial for more details.