docstr: Test BlenderCamera.
docstr_tok: ["Test","BlenderCamera","."]
code: def test_blender_camera(self):
      """
      Test BlenderCamera.
      """
      # Test get_world_to_view_transform.
      T = torch.randn(10, 3)
      R = so3_exp_map(torch.randn(10, 3) * 3.0)
      RT = get_world_to_view_transform(R=R, T=T)
      cam = BlenderCamera(R=R, T=T)
      RT_class = cam.get_world_to_view_transform()
      self.assertTrue(
          torch.allclose(RT.get_matrix(), RT_class.get_matrix())
      )
      self.assertTrue(isinstance(RT, Transform3d))
  
      # Test getting camera center.
      C = cam.get_camera_center()
      C_ = -torch.bmm(R, T[:, :, None])[:, :, 0]
      self.assertTrue(torch.allclose(C, C_, atol=1e-05))
  
imports: import json
  import os
  import unittest
  import numpy
  import torch
  from PIL import Image
  from pytorch3d.datasets import BlenderCamera, collate_batched_R2N2, R2N2, render_cubified_voxels
  from pytorch3d.renderer import FoVPerspectiveCameras, look_at_view_transform, PointLights, RasterizationSettings
  from pytorch3d.renderer.cameras import get_world_to_view_transform
  from pytorch3d.transforms import Transform3d
  from pytorch3d.transforms.so3 import so3_exp_map
  from torch.utils.data import DataLoader
  from .common_testing import get_tests_dir, load_rgb_image, TestCaseMixin
label_desc: Use image node_id 6 for calling the TestR2N2 obj's underlying member method code with example usage: obj.test_blender_camera() without return types