I've seen several threads talking about this topic, but I still don't clompletely understand it. The problem is that I have 4 solutions obtained from decomposehomography() and I don't know what solutions to discard. I have read that 2 of them are gone when applying the condition that all points are in the same side of the plane. In my case I have a camera always facing down and I've seen that the camera z axis goes in the direction that is being captured. So, am I right if I say that if I knew the initial normal vector direction (up/down), it should have the same z sign as the true output from decomposehomography()? In that case, where is that normal pointing at, up or down? I am a bit lost about what restrictions it should meet to get to just one solution. Any help is welcome.
Example:Image
H: [0.4058233282965288, -0.07958859729484853, 150.0648508014208;
-0.05488467843473098, 0.4932282271598526, 73.28803658509402;
-0.0003855786154971386, -0.0002803735567991329, 1]
Decompose homography matrix:
Solution 0:
rvec from homography decomposition:
[0.9996827528312682, 0.02282527894303765, -0.01064895923882247;
-0.02196984959160948, 0.9969783938085188, 0.07450777132559888;
0.01231744294158488, -0.07425017791331294, 0.9971635731810606]
euler angles from homography decomposition:
[-0.0123178 -0.0743242 -0.0219733]
tvec from homography decomposition:
[0.0184687752803224;
-0.1102770385060996;
0.6298743667300836]
plane normal from homography decomposition:
[-0.4490593009362933;
-0.1944329054575339;
0.8720903562807866]
Solution 1:
rvec from homography decomposition:
[0.9996827528312682, 0.02282527894303765, -0.01064895923882247;
-0.02196984959160948, 0.9969783938085188, 0.07450777132559888;
0.01231744294158488, -0.07425017791331294, 0.9971635731810606]
euler angles from homography decomposition:
[-0.0123178 -0.0743242 -0.0219733]
tvec from homography decomposition:
[-0.0184687752803224;
0.1102770385060996;
-0.6298743667300836]
plane normal from homography decomposition:
[0.4490593009362933;
0.1944329054575339;
-0.8720903562807866]
Solution 2:
rvec from homography decomposition:
[0.9741176949586305, -0.03431318564475172, 0.2234218468713232;
0.02091760238809291, 0.9978538195670684, 0.06205004984482913;
-0.2250714781548696, -0.05577060216924512, 0.972744812196323]
euler angles from homography decomposition:
[0.227016 -0.0572705 0.0214701]
tvec from homography decomposition:
[-0.2251090986409735;
-0.08645790613690107;
0.5925324994640602]
plane normal from homography decomposition:
[-0.07672494208531609;
-0.2378736678040583;
0.9682610192646657]
Solution 3:
rvec from homography decomposition:
[0.9741176949586305, -0.03431318564475172, 0.2234218468713232;
0.02091760238809291, 0.9978538195670684, 0.06205004984482913;
-0.2250714781548696, -0.05577060216924512, 0.972744812196323]
euler angles from homography decomposition:
[0.227016 -0.0572705 0.0214701]
tvec from homography decomposition:
[0.2251090986409735;
0.08645790613690107;
-0.5925324994640602]
plane normal from homography decomposition:
[0.07672494208531609;
0.2378736678040583;
-0.9682610192646657]