(self, frames)
return
Postprocesses frames to ensure they satisfy certain properties,

    such as normalizing and standardizing all quaternions.

    Args:
      frames: Array containing frames to be processed. Each row of the array
        should represent a frame.
    Returns: An array containing the post processed frames.
Postprocesses frames to ensure they satisfy certain properties,
Postprocesses frames to ensure they satisfy certain properties
def _postprocess_frames(self, frames):
    """Postprocesses frames to ensure they satisfy certain properties,

    such as normalizing and standardizing all quaternions.

    Args:
      frames: Array containing frames to be processed. Each row of the array
        should represent a frame.
    Returns: An array containing the post processed frames.
    """
    num_frames = frames.shape[0]
    if num_frames > 0:
      first_frame = self._frames[0]
      pos_start = self.get_frame_root_pos(first_frame)

      for f in range(num_frames):
        curr_frame = frames[f]

        root_pos = self.get_frame_root_pos(curr_frame)
        root_pos[0] -= pos_start[0]
        root_pos[1] -= pos_start[1]

        root_rot = self.get_frame_root_rot(curr_frame)
        root_rot = pose3d.QuaternionNormalize(root_rot)
        root_rot = motion_util.standardize_quaternion(root_rot)

        self.set_frame_root_pos(root_pos, curr_frame)
        self.set_frame_root_rot(root_rot, curr_frame)

    return
def _postprocess_frames ( self , frames ) : num_frames = frames . shape [ 0 ] if num_frames > 0 : first_frame = self . _frames [ 0 ] pos_start = self . get_frame_root_pos ( first_frame ) for f in range ( num_frames ) : curr_frame = frames [ f ] root_pos = self . get_frame_root_pos ( curr_frame ) root_pos [ 0 ] -= pos_start [ 0 ] root_pos [ 1 ] -= pos_start [ 1 ] root_rot = self . get_frame_root_rot ( curr_frame ) root_rot = pose3d . QuaternionNormalize ( root_rot ) root_rot = motion_util . standardize_quaternion ( root_rot ) self . set_frame_root_pos ( root_pos , curr_frame ) self . set_frame_root_rot ( root_rot , curr_frame ) return