In my simple scene I have a very simple model and two cameras. From each camera I know the external parameters Pi (from
bpy.data.objects['Cam0'].matrix_world) and both have the same internal parameters K. Additionally, I have one rendered depthmap (z-buffer) per camera.
From the depthmap I should be able to generate a point cloud X, with Xi = Pi^-1 xi, where x are the pixel scaled with its depth. However, if I combine the point clouds, they do not match, because they one is rotated away from the other.
Is P the used projection matrix (excluding K), especially is the rotation of the camera correct in terms of what I want to achieve?
EDIT: I have uploaded a example that illustrates my problem. From the setting in the blend file I have generated two depthmaps (are both contained as exr and as ascii txt). Further, the Matlab example visualizes the rotation errror. Example