code: def perspective_camera_for_template(
      img_shape,
      focal_length_mult=2,
      pose_angle_deg=[0, 0, 0],
      cam_dist=7,
  ):
      f = np.array(img_shape).max() * focal_length_mult
      rot_z = rotation_z(180 + pose_angle_deg[2])
      rot_y = rotation_y(180 + pose_angle_deg[1])
      rot_x = rotation_x(pose_angle_deg[0])
      rotation = rot_z.compose_before(rot_y).compose_before(rot_x)
  
      translation = Translation([0, 0, +cam_dist])
      projection = PerspectiveProjection(f, img_shape)
      return PerspectiveCamera(rotation, translation, projection)
  
file_path: insightface/reconstruction/ostec/utils/image_rasterization.py
imports: from menpo3d.rasterize import rasterize_barycentric_coordinate_images, rasterize_mesh_from_barycentric_coordinate_images
  from menpo.transform import Rotation, Translation, Scale
  from menpo3d.camera import PerspectiveProjection, PerspectiveCamera
  import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: perspective_camera_for_template(img_shape, focal_length_mult, pose_angle_deg, cam_dist) and returns: PerspectiveCamera