i have a large log file that contains 4x4 matrices, i want to convert each matrix to 3x3 rotation matrix and 3x1 translation matrix and each matrix is specified by pose_numb