When working with rendering images in Pybullet, one has to use getCameraImage which takes as inputs a view and projection matrices (pybullet also have functions to generate those matrices). In theory, the projection matrix should be P = K[R|t], it can be re-written as P = [M|-MC] so we could use in theory RQ decomposition with M where R is an upper triangular matrix. So we could recover K and [R|t] from the projection matrix (having in mind that the R from RQ decomposition is not the R from R|t). But when I use for example scipy.linalg.rq the result is not a valid K (intrinsic) matrix.
Can someone explain how is the projection matrix exactly defined and what is the view matrix in pybullet? and how we can retrieve the intrinsic and extrinsic parameters using those matrices?


