Could you please provide the code to calculate the theoretical ground of an image given both the intrinsic and extrinsic parameters of the camera?