Closed HuskyRye closed 6 years ago
Hi Chenxuan, thanks for your suggestion. I haven't tested your codes, but I think there is no need to use cv::Rodrigues() because the angle can be calculated just by translation vector, it's simpler and easy to understand, please test this codes in practice. Let me know if you have any other questions.
According to my understanding, there is an angle between the camera coordinate and the world coordinate, as shown in the graph above, so I don't understand why the angle can be calculated just by the translation vector.
Our goal is to find a shooting point and calculate the coordinates of this point in the camera coordinate system (more specifically, the gimbal coordinate system), other than calculating coordinate transformation between world and camera.
The camera coordinate isn't always parallel to the world coordinate so you need to add the Euler angles. To compute the Euler angles, rotation vector must be turned into a rotation matrix using cv::Rodrigues().
See here: https://github.com/LiuChenxuan/RoboVision/blob/master/RoboVision.cpp#L58