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 smoke data.
docstr_tok: ["Test","proper","setup","of","the","class","for","smoke","data","."]
code: def test_stereo_camera_attributes_smoke(batch_size, device, dtype):
      """Test proper setup of the class for smoke data."""
      tx_fx = -10
      (
          left_rectified_camera,
          right_rectified_camera,
      ) = _SmokeTestData._create_stereo_camera(
          batch_size, device, dtype, tx_fx
      )
  
      stereo_camera = StereoCamera(
          left_rectified_camera, right_rectified_camera
      )
  
      def _assert_all(x, y):
          assert torch.all(torch.eq(x, y))
  
      _assert_all(stereo_camera.fx, _TestParams.fx)
      _assert_all(stereo_camera.fy, _TestParams.fy)
      _assert_all(stereo_camera.cx_left, _TestParams.cx)
      _assert_all(stereo_camera.cy, _TestParams.cy)
      _assert_all(stereo_camera.tx, -tx_fx / _TestParams.fx)
  
      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 2 for calling the TestStereoCamera obj's underlying member method code with example usage: obj.test_stereo_camera_attributes_smoke(batch_size, device, dtype) without return types