简体   繁体   中英

Find rotation and translation fron decomposeHomographyMat()

Please what is the best way to have the exact solution of rotation and translation from decomposeHomographyMat()? this function provide 4 possible solution. I am working on an application android in java.

Mat homography=Calib3d.findHomography(ReferencePoints2,ReferencePoints1,0,Calib3d.RANSAC);
    Calib3d.decomposeHomographyMat(Input homography,Input intrinsic,Output rotation,Output translation,Output normal);

I think you are asking how to use but in java instead of C++ or python. If that is the case, you need to modify the second line of your code. Just replace "Input" to "Mat" and replace "output" to "List"

Calib3d.decomposeHomographyMat(Mat homography,Mat intrinsic,List<Mat> rotation,List<Mat>translation,List<Mat> normal);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM