class_docstr: A class which extends Pinhole camera by considering radial, tangential and
  thin-prism distortion. For the fisheye camera model, k1, k2, ..., k_n_radial are
  polynomial coefficents to model radial distortions. Two common types of radial
  distortions are barrel and pincusion radial distortions.
  
  a = x / z, b = y / z, r = (a*a+b*b)^(1/2)
  th = atan(r)
  [x_r]  = (th+ k0 * th^3 + k1* th^5 + ...) [a/r]
  [y_r]                                     [b/r]                    [1]
  
  
  The tangential distortion parameters are p1 and p2. The primary cause is
  due to the lens assembly not being centered over and parallel to the image plane.
  tangentialDistortion = [(2 x_r^2 + rd^2)*p_0 + 2*x_r*y_r*p_1]
                         [(2 y_r^2 + rd^2)*p_1 + 2*x_r*y_r*p_0]      [2]
  where rd^2 = x_r^2 + y_r^2
  
  The thin-prism distortion is modeled with s1, s2, s3, s4 coefficients
  thinPrismDistortion = [s0 * rd^2 + s1 rd^4]
                        [s2 * rd^2 + s3 rd^4]                        [3]
  
  The projection
  proj = diag(f, f) * uvDistorted + [cu; cv]
  uvDistorted = [x_r]  + tangentialDistortion  + thinPrismDistortion [4]
                [y_r]
  f is the focal length and cu, cv are principal points in x, y axis.
class_docstr_tok: ["A","class","which","extends","Pinhole","camera","by","considering","radial",",","tangential","and","thin-prism","distortion",".","For","the","fisheye","camera","model",",","k1",",","k2",",","...",",","k_n_radial","are","polynomial","coefficents","to","model","radial","distortions",".","Two","common","types","of","radial","distortions","are","barrel","and","pincusion","radial","distortions",".","a","=","x","\/","z",",","b","=","y","\/","z",",","r","=","(","a","*","a+b","*","b",")","^","(","1\/2",")","th","=","atan","(","r",")","[","x_r","]","=","(","th+","k0","*","th^3","+","k1","*","th^5","+","...",")","[","a\/r","]","[","y_r","]","[","b\/r","]","[","1","]","The","tangential","distortion","parameters","are","p1","and","p2",".","The","primary","cause","is","due","to","the","lens","assembly","not","being","centered","over","and","parallel","to","the","image","plane",".","tangentialDistortion","=","[","(","2","x_r^2","+","rd^2",")","*","p_0","+","2","*","x_r","*","y_r","*","p_1","]","[","(","2","y_r^2","+","rd^2",")","*","p_1","+","2","*","x_r","*","y_r","*","p_0","]","[","2","]","where","rd^2","=","x_r^2","+","y_r^2","The","thin-prism","distortion","is","modeled","with","s1",",","s2",",","s3",",","s4","coefficients","thinPrismDistortion","=","[","s0","*","rd^2","+","s1","rd^4","]","[","s2","*","rd^2","+","s3","rd^4","]","[","3","]","The","projection","proj","=","diag","(","f",",","f",")","*","uvDistorted","+","[","cu",";","cv","]","uvDistorted","=","[","x_r","]","+","tangentialDistortion","+","thinPrismDistortion","[","4","]","[","y_r","]","f","is","the","focal","length","and","cu",",","cv","are","principal","points","in","x",",","y","axis","."]
docstr: Check if the shapes are broadcastable between points and transforms.
  Accept points of shape (P, 3) or (1, P, 3) or (M, P, 3). The batch_size
  for transforms should be 1 when points take (M, P, 3). The batch_size
  can be 1 or N when points take shape (P, 3).
  
  Args:
      points: tensor of shape (P, 3) or (1, P, 3) or (M, P, 3)
      batch_size: number of transforms
  
  Returns:
      Boolean value if the input shapes are compatible.
docstr_tok: ["Check","if","the","shapes","are","broadcastable","between","points","and","transforms",".","Accept","points","of","shape","(","P",",","3",")","or","(","1",",","P",",","3",")","or","(","M",",","P",",","3",")",".","The","batch_size","for","transforms","should","be","1","when","points","take","(","M",",","P",",","3",")",".","The","batch_size","can","be","1","or","N","when","points","take","shape","(","P",",","3",")",".","Args",":","points",":","tensor","of","shape","(","P",",","3",")","or","(","1",",","P",",","3",")","or","(","M",",","P",",","3",")","batch_size",":","number","of","transforms","Returns",":","Boolean","value","if","the","input","shapes","are","compatible","."]
code: def check_input(self, points: torch.Tensor, batch_size: int):
      """
      Check if the shapes are broadcastable between points and transforms.
      Accept points of shape (P, 3) or (1, P, 3) or (M, P, 3). The batch_size
      for transforms should be 1 when points take (M, P, 3). The batch_size
      can be 1 or N when points take shape (P, 3).
  
      Args:
          points: tensor of shape (P, 3) or (1, P, 3) or (M, P, 3)
          batch_size: number of transforms
  
      Returns:
          Boolean value if the input shapes are compatible.
      """
      if points.ndim > 3:
          return False
      if points.ndim == 3:
          M, P, K = points.shape
          if K != 3:
              return False
          if M > 1 and batch_size > 1:
              return False
      return True
  
file_path: pytorch3d/pytorch3d/renderer/fisheyecameras.py
imports: import math
  from typing import List, Optional, Tuple, Union
  import torch
  from pytorch3d.common.datatypes import Device
  from pytorch3d.renderer.cameras import _R, _T, CamerasBase
label_desc: Use image node_id 3 for calling the FishEyeCameras obj's underlying member method code with example usage: obj.check_input(points, batch_size) and returns: True, False, False, False