How to find camera position and rotation from a 4x4 matrix?

Assuming your matrix is an extrinsic parameter matrix of the kind described in the Wikipedia article, it is a mapping from world coordinates to camera coordinates. So, to find the position $C$ of the camera, we solve

$$\begin{align*}0 &= RC + T\\ C &= -R^T T \approx (-2.604, 2.072, -0.427).\end{align*}$$

The orientation of the camera is given simply by $R^T.$ So if the "in" axis is the z-axis, for instance, then the vector pointing in the direction the camera is pointing is

$$R^T \left[\begin{array}{c}0\\0\\1\end{array}\right] = (0.718, -0.595, 0.36).$$


I am not familiar enough with this domain to know what the conventions are, but I can provide some general context.

A $4 \times 4$ homogeneous camera matrix transforms coordinates from world space to camera space. Apparently, this matrix does not include a perspective projection, so we're effectively talking about an affine transformation. The matrix itself can tell you where the camera is in world space and in what direction it's pointing, but it can't tell you anything else—you need other parameters of the camera for that.

Because we're just talking about a transformation here, we need conventions to tell us about the camera. The conventions that I'm used to are that in camera space, the camera is situated at the origin, and has axes that look like this:

camera axes

In other words, the camera is looking along the positive Z axis, and the Y axis is up. In this system, you can transform the vector $\left[0, 0, 1\right]$ by the transformation's inverse to get the camera's viewing vector in world space, and the point $\left[0, 0, 0\right]$ to get the camera's position in world space.

The general form of this is that the camera's position is $M^{-1} \, \left[\begin{array}{c} 0 \\ 0 \\ 0 \\ 1 \end{array} \right]$ and the camera's viewing vector is $M^{-1} \, \left[\begin{array}{c} 0 \\ 0 \\ 1 \\ 0 \end{array} \right]$, but if you have a matrix that looks like

$$\left[\begin{array}{cccc}\phantom{M}&&&\ \\ & R & & T \\ &&& \\ 0 & 0 & 0 & 1 \end{array} \right]$$

where $R$ is a $3 \times 3$ matrix and $T$ is a vector, then the camera position is just $-R^T T$ and the camera viewing direction is $R^T \, \left[\begin{array}{c} 0 \\ 0 \\ 1 \end{array} \right]$.

This tells you about as much as you can possibly get from the matrix. Everything else depends on the other properties of the camera.