parameters: (self, bb3d)
return_statement: return X_3x8
docstring: Reconstructs the 3D world coordinates of all 3D bounding box corners.
  
  		Input:
  			bb3d: A BB3D class instance
  		Returns:
  			X_3x8 np.matrix of 3D world coordinates of the 8 bounding box corners in the following
  			      order: FBL FBR RBR RBL FTL FTR RTR RTL
docstring_summary: Reconstructs the 3D world coordinates of all 3D bounding box corners.
docstring_tokens: Reconstructs the 3D world coordinates of all 3D bounding box corners .
function: def reconstruct_bb3d(self, bb3d):
  		"""
  		Reconstructs the 3D world coordinates of all 3D bounding box corners.
  
  		Input:
  			bb3d: A BB3D class instance
  		Returns:
  			X_3x8 np.matrix of 3D world coordinates of the 8 bounding box corners in the following
  			      order: FBL FBR RBR RBL FTL FTR RTR RTL
  		"""
  		# Reconstruct the corners, which lie in the ground plane
  		FBL_3x1 = self.reconstruct_X_ground(bb3d.fblx, bb3d.fbly)
  		FBR_3x1 = self.reconstruct_X_ground(bb3d.fbrx, bb3d.fbry)
  		RBL_3x1 = self.reconstruct_X_ground(bb3d.rblx, bb3d.rbly)
  		RBR_3x1 = FBR_3x1 + (RBL_3x1-FBL_3x1)
  
  		# Top of the 3D bounding box - reconstruct FTL and then just move all the other points
  		# We do this by intersecting the ray to FTL with the front side plane of the bounding
  		# box - i.e. extract the front side plane equation and then use it to reconstruct the FTL
  		n_F_3x1 = FBL_3x1 - RBL_3x1  # Normal vector of the front side
  		d_F = - (n_F_3x1[0,0]*FBL_3x1[0,0] + n_F_3x1[1,0]*FBL_3x1[1,0] + n_F_3x1[2,0]*FBL_3x1[2,0])
  		# Front plane
  		fp_1x4 = np.asmatrix([n_F_3x1[0,0], n_F_3x1[1,0], n_F_3x1[2,0], d_F])
  
  		FTL_3x1 = geometry.reconstruct_X_in_plane(bb3d.fblx, bb3d.ftly, self.KR_3x3_inv, 
  												  self.C_3x1, fp_1x4)
  		# Bottom to top side vector
  		BT_3x1 = FTL_3x1 - FBL_3x1
  
  
  		# # Fix the coordinates to a rectangular cuboid
  		# CM_3x1 = (FBL_3x1 + RBR_3x1) / 2.0
  
  		# # Diagonals
  		# d1_3x1 = FBL_3x1 - CM_3x1
  		# d2_3x1 = FBR_3x1 - CM_3x1
  
  		# d1_l = np.linalg.norm(d1_3x1)
  		# d2_l = np.linalg.norm(d2_3x1)
  
  		# delta = abs(d1_l - d2_l) / 2.0
  
  		# if d1_l > d2_l:
  		# 	d1_new_3x1 = d1_3x1 * (1 - delta / d1_l)
  		# 	d2_new_3x1 = d2_3x1 * (1 + delta / d2_l)
  		# else:
  		# 	d1_new_3x1 = d1_3x1 * (1 + delta / d1_l)
  		# 	d2_new_3x1 = d2_3x1 * (1 - delta / d2_l)
  
  		# FBL_3x1 = CM_3x1 + d1_new_3x1
  		# FBR_3x1 = CM_3x1 + d2_new_3x1
  		# RBL_3x1 = CM_3x1 - d2_new_3x1
  		# RBR_3x1 = CM_3x1 - d1_new_3x1
  
  
  		FTL_3x1 = FBL_3x1 + BT_3x1
  		FTR_3x1 = FBR_3x1 + BT_3x1
  		RTL_3x1 = RBL_3x1 + BT_3x1
  		RTR_3x1 = RBR_3x1 + BT_3x1
  
  		# Combine everything to the output matrix
  		X_3x8 = np.asmatrix(np.zeros((3, 8)))
  		X_3x8[:,0] = FBL_3x1
  		X_3x8[:,1] = FBR_3x1
  		X_3x8[:,2] = RBR_3x1
  		X_3x8[:,3] = RBL_3x1
  		X_3x8[:,4] = FTL_3x1
  		X_3x8[:,5] = FTR_3x1
  		X_3x8[:,6] = RTR_3x1
  		X_3x8[:,7] = RTL_3x1
  
  		return X_3x8
function_tokens: def reconstruct_bb3d ( self , bb3d ) : # Reconstruct the corners, which lie in the ground plane FBL_3x1 = self . reconstruct_X_ground ( bb3d . fblx , bb3d . fbly ) FBR_3x1 = self . reconstruct_X_ground ( bb3d . fbrx , bb3d . fbry ) RBL_3x1 = self . reconstruct_X_ground ( bb3d . rblx , bb3d . rbly ) RBR_3x1 = FBR_3x1 + ( RBL_3x1 - FBL_3x1 ) # Top of the 3D bounding box - reconstruct FTL and then just move all the other points # We do this by intersecting the ray to FTL with the front side plane of the bounding # box - i.e. extract the front side plane equation and then use it to reconstruct the FTL n_F_3x1 = FBL_3x1 - RBL_3x1 # Normal vector of the front side d_F = - ( n_F_3x1 [ 0 , 0 ] * FBL_3x1 [ 0 , 0 ] + n_F_3x1 [ 1 , 0 ] * FBL_3x1 [ 1 , 0 ] + n_F_3x1 [ 2 , 0 ] * FBL_3x1 [ 2 , 0 ] ) # Front plane fp_1x4 = np . asmatrix ( [ n_F_3x1 [ 0 , 0 ] , n_F_3x1 [ 1 , 0 ] , n_F_3x1 [ 2 , 0 ] , d_F ] ) FTL_3x1 = geometry . reconstruct_X_in_plane ( bb3d . fblx , bb3d . ftly , self . KR_3x3_inv , self . C_3x1 , fp_1x4 ) # Bottom to top side vector BT_3x1 = FTL_3x1 - FBL_3x1 # # Fix the coordinates to a rectangular cuboid # CM_3x1 = (FBL_3x1 + RBR_3x1) / 2.0 # # Diagonals # d1_3x1 = FBL_3x1 - CM_3x1 # d2_3x1 = FBR_3x1 - CM_3x1 # d1_l = np.linalg.norm(d1_3x1) # d2_l = np.linalg.norm(d2_3x1) # delta = abs(d1_l - d2_l) / 2.0 # if d1_l > d2_l: # 	d1_new_3x1 = d1_3x1 * (1 - delta / d1_l) # 	d2_new_3x1 = d2_3x1 * (1 + delta / d2_l) # else: # 	d1_new_3x1 = d1_3x1 * (1 + delta / d1_l) # 	d2_new_3x1 = d2_3x1 * (1 - delta / d2_l) # FBL_3x1 = CM_3x1 + d1_new_3x1 # FBR_3x1 = CM_3x1 + d2_new_3x1 # RBL_3x1 = CM_3x1 - d2_new_3x1 # RBR_3x1 = CM_3x1 - d1_new_3x1 FTL_3x1 = FBL_3x1 + BT_3x1 FTR_3x1 = FBR_3x1 + BT_3x1 RTL_3x1 = RBL_3x1 + BT_3x1 RTR_3x1 = RBR_3x1 + BT_3x1 # Combine everything to the output matrix X_3x8 = np . asmatrix ( np . zeros ( ( 3 , 8 ) ) ) X_3x8 [ : , 0 ] = FBL_3x1 X_3x8 [ : , 1 ] = FBR_3x1 X_3x8 [ : , 2 ] = RBR_3x1 X_3x8 [ : , 3 ] = RBL_3x1 X_3x8 [ : , 4 ] = FTL_3x1 X_3x8 [ : , 5 ] = FTR_3x1 X_3x8 [ : , 6 ] = RTR_3x1 X_3x8 [ : , 7 ] = RTL_3x1 return X_3x8