As per this link, the extrinsic parameters consist of a rotation, R, and a translation, t. The origin of the camera’s coordinate system is at its optical center and its x- and y-axis define the image plane.
However when I tried this example. The Z value of translation matrix 't' and Z value of 'cameraLocation' don't match.
Are they not the same? If not how do we define cameraLocation?