# Revision history [back]

### Question about camera location computation

Hi everybody,

I have a question about the way to compute the camera location. Indeed, SolvePnP gives us the rotation and translation vectors of the object in the camera space, with cv::Rodrigues we can compute the rotation matrix and build the matrix M = [ R | T ].

So to have the camera location in the object space, I thought I had to compute the inverse of the matrix M, that is M' = [ M^t | -M^t * T ]. I did it with cv::invert but it clearly doesn't work!! The only formula that I have seen in samples and that works is this one M' = [ M^t | -T ]. Can somebody explain me why?

Many thanks.

### Question about camera Camera location computation

Hi everybody,

I have a question about the way to compute the camera location. Indeed, SolvePnP gives us the rotation and translation vectors of the object in the camera space, with cv::Rodrigues we can compute the rotation matrix and build the matrix M = [ R | T ].

So to have the camera location in the object space, I thought I had to compute the inverse of the matrix M, that is M' = [ M^t | -M^t * T ]. I did it with cv::invert but it clearly doesn't work!! The only formula that I have seen in samples and that works is this one M' = [ M^t | -T ]. Can somebody explain me why?

Many thanks.