ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I was doing a little bit research about this, and I could answer the question by myself. I just check the stereoRectify function implementation in OpenCV (this function is used to perform the rectification process in ROS).

I do the following to obtain them (python code):

// get un-rectified rotation matrix R_unrectified = R_left_rectified.dot(inv(R_right_rectified))

// get un-rectified translation vector fx = P_right_rectified[0][0] t_rectified = np.array(P_right_rectified[:,3]) / fx t_unrectified = inv(R_right_rectified).dot(t_rectified)

I was doing a little bit research about this, and I could answer the question by myself. I just check the stereoRectify function implementation in OpenCV (this function is used to perform the rectification process in ROS).

I do the following to obtain them (python code):

// get un-rectified rotation matrix matrix

R_unrectified = R_left_rectified.dot(inv(R_right_rectified))

// get un-rectified translation vector vector

fx = P_right_rectified[0][0] P_right_rectified[0][0]

t_rectified = np.array(P_right_rectified[:,3]) / fx fx

t_unrectified = inv(R_right_rectified).dot(t_rectified)