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)
Test proper setup of the class for real data.
tests/geometry/camera/test_stereo.py