Estimating rotation Matrix. OpenCV

asked 2016-10-18 06:43:13 -0500

salahuddin_12 gravatar image

I'm Quite new with OpenCv. What I'm trying to do is I'm trying to Stitch few images together using stitching_detailed.cpp. Problem which I'm facing is due to lack of feature it is dropping one image out. So for the dropped Image I have to manually calculate the camera angle.

Following are the camera Rotation Matrix:

cam1.jpg
[0.15191515, 0.032542922, 0.9878577;
-0.016061526, 0.99940717, -0.030453419;
-0.98826301, -0.011240158, 0.15234777]

cam3.jpg
[0.7509135, 0.0035269554, -0.66039109;
-0.021461653, 0.99958795, -0.019064991;
0.66005164, 0.028489247, 0.75067973]

cam4.jpg
[1, 4.1909516e-09, 0;
 7.9162419e-09, 1, 0;
 0, 3.7252903e-09, 0.99999994]

cam5.jpg
[0.75491911, 0.024605259, 0.65535617;
-0.01778595, 0.99969661, -0.017045438;
-0.65557659, 0.0012118071, 0.75512767]

As you can see Rotation Matrix for Cam 2 is missing. Can anyone help me in calculation Rotation matrix for Cam2

edit retag flag offensive close merge delete

Comments

What do you mean manually? Like by hand? I think the general idea here is to use the same camera for all the images, so the camera is moving, so the rotation matrix changes continuously, so you cannot do it by hand.

If you want to do it with opencv, you will always need some kind of features to know the cameras rotation.

benT gravatar imagebenT ( 2016-10-18 10:43:41 -0500 )edit

Actually my cameras are fixed. Im using a 7 rig Gopro.

salahuddin_12 gravatar imagesalahuddin_12 ( 2016-10-19 03:52:15 -0500 )edit

If the cameras are fixed, why don't you use something with lots of features so the matrixes are all generated? Afterwards you can use those matrixes for images with not many features.

benT gravatar imagebenT ( 2016-10-19 05:05:54 -0500 )edit

yes i think thats the only option i have with me right now. Thanks for replying.

salahuddin_12 gravatar imagesalahuddin_12 ( 2016-10-19 06:38:56 -0500 )edit