class_docstr: Test class for :class:`~kornia.geometry.camera.stereo.StereoCamera`
class_docstr_tok: ["Test","class","for",":","class",":","`","~kornia.geometry.camera.stereo.StereoCamera","`"]
docstr: Test proper setup of the class for real data.
docstr_tok: ["Test","proper","setup","of","the","class","for","real","data","."]
code: def test_stereo_camera_attributes_real(batch_size, device, dtype):
      """Test proper setup of the class for real data."""
      (
          left_rectified_camera,
          right_rectified_camera,
      ) = _RealTestData._get_real_stereo_camera(
          batch_size, device, dtype
      )
  
      stereo_camera = StereoCamera(
          left_rectified_camera, right_rectified_camera
      )
      assert_close(stereo_camera.fx, left_rectified_camera[..., 0, 0])
      assert_close(stereo_camera.fy, left_rectified_camera[..., 1, 1])
      assert_close(
          stereo_camera.cx_left, left_rectified_camera[..., 0, 2]
      )
      assert_close(stereo_camera.cy, left_rectified_camera[..., 1, 2])
      assert_close(
          stereo_camera.tx,
          -right_rectified_camera[..., 0, 3]
          / right_rectified_camera[..., 0, 0],
      )
  
      assert stereo_camera.Q.shape == (batch_size, 4, 4)
      assert stereo_camera.Q.dtype in (
          torch.float16,
          torch.float32,
          torch.float64,
      )
  
imports: import pytest
  import torch
  from kornia.geometry.camera import StereoCamera
  from kornia.testing import assert_close
label_desc: Use image node_id 3 for calling the TestStereoCamera obj's underlying member method code with example usage: obj.test_stereo_camera_attributes_real(batch_size, device, dtype) without return types