MVOScaleRecovery
MVOScaleRecovery copied to clipboard
[Question] How to run correctly with cv2.recoverPose in thirdparty/visual_odometry.py
Hello, it's an excellent work. But I face a problem when I run visual_odometry.py. It seems that there is a problem with cv2.revocerPose function.

According to opencv document opencv, the code seems reasonable for using recoverPose. So, I try to use this function without output 'triangulatedPoints' to get Rotation and translation, and it worked. I am confused why it doesn't work with output 'triangulatedPoints'.
_, self.cur_R, self.cur_t, mask,points_3d = cv2.recoverPose(E, self.px_cur,\ self.px_ref,cameraMatrix=self.camera_matrix,distanceThresh=100)
@JEFFCHANG0501 Hi, thanks, and sorry for the late reply.
The reason for your problem may be the difference in the OpenCV version.
I tried OpenCV '4.5.5', where the following code worked
_, self.cur_R, self.cur_t, mask,points_3d = cv2.recoverPose(E, self.px_cur,\ self.px_ref,cameraMatrix=self.camera_matrix,distanceThresh=100)
@TimingSpace Thanks for the reply. I will try the OpenCV version you provided.