class_docstr: Test Cases for Camera FeatureConnector.
class_docstr_tok: ["Test","Cases","for","Camera","FeatureConnector","."]
docstr: Tests camera parameters with fixed focal length, aspect_ratio and skew.
docstr_tok: ["Tests","camera","parameters","with","fixed","focal","length",",","aspect_ratio","and","skew","."]
code: def test_camera_with_aspect_ratio_and_skew(self):
      """Tests camera parameters with fixed focal length, aspect_ratio and skew."""
  
      (
          expected_pose,
          expected_f,
          expected_center,
      ) = self.__get_camera_params()
      expected_aspect_ratio = expected_center[0] / expected_center[1]
      expected_skew = 0.6
      expected_intrinsics = np.asarray(
          [
              [expected_f, expected_skew, expected_center[0]],
              [
                  0,
                  expected_aspect_ratio * expected_f,
                  expected_center[1],
              ],
              [0, 0, 1],
          ],
          dtype=np.float32,
      )
  
      expected_camera = {
          "pose": expected_pose,
          "intrinsics": expected_intrinsics,
      }
      inputs = {
          "f": expected_f,
          "optical_center": expected_center,
          "skew": expected_skew,
          "aspect_ratio": expected_aspect_ratio,
          "pose": expected_pose,
      }
  
      self.assertFeature(
          feature=camera_feature.Camera(),
          shape={
              "pose": {"R": (3, 3), "t": (3,)},
              "intrinsics": (3, 3),
          },
          dtype={
              "pose": {"R": tf.float32, "t": tf.float32},
              "intrinsics": tf.float32,
          },
          tests=[
              tfds.testing.FeatureExpectationItem(
                  value=inputs,
                  expected=expected_camera,
              ),
          ],
      )
  
file_path: graphics/tensorflow_graphics/datasets/features/camera_feature_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import tensorflow
  import tensorflow_datasets
  from tensorflow_graphics.datasets.features import camera_feature
label_desc: Use image node_id 3 for calling the CameraFeatureTest obj's underlying member method code with example usage: obj.test_camera_with_aspect_ratio_and_skew() without return types