MATLAB: Camera angle from perspective

camerahomogeneous matrixperspectiveprojection

Hello! How can the camera angles calculated from the perspective distortion? If the corresponding points of the object (let's take a simple flat, rectangular object in the 3D space) and it's corresponding points in the camera image are known, how can be the angle under which the image was taken, calculated? I already calculated the homogeneous matrix, but I would need to know the angles.