Commit 726f9757 authored by liyinhao's avatar liyinhao
Browse files

change docstrings

parent 1602973f
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
# #
# This source code is licensed under the MIT license found in the # This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree. # LICENSE file in the root directory of this source tree.
''' Ref: https://github.com/ScanNet/ScanNet/blob/master/BenchmarkScripts ''' """Ref: https://github.com/ScanNet/ScanNet/blob/master/BenchmarkScripts
"""
import csv import csv
import os import os
......
% Copyright (c) Facebook, Inc. and its affiliates. % Modified from
% % https://github.com/facebookresearch/votenet/blob/master/sunrgbd/matlab/extract_split.m
% This source code is licensed under the MIT license found in the % Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
% LICENSE file in the root directory of this source tree.
%% Dump train/val split. %% Dump train/val split.
% Author: Charles R. Qi % Author: Charles R. Qi
......
...@@ -167,14 +167,29 @@ class SUNRGBD_Calibration(object): ...@@ -167,14 +167,29 @@ class SUNRGBD_Calibration(object):
def rotz(t): def rotz(t):
"""Rotation about the z-axis.""" """Rotation about the z-axis.
Args:
t(float): Heading angle.
Returns:
ndarray: Transforation matrix
"""
c = np.cos(t) c = np.cos(t)
s = np.sin(t) s = np.sin(t)
return np.array([[c, -s, 0], [s, c, 0], [0, 0, 1]]) return np.array([[c, -s, 0], [s, c, 0], [0, 0, 1]])
def transform_from_rot_trans(R, t): def transform_from_rot_trans(R, t):
"""Transforation matrix from rotation matrix and translation vector.""" """Transforation matrix from rotation matrix and translation vector.
Args:
R(ndarray): Rotation matrix.
t(ndarray): Translation vector.
Returns:
ndarray: Transforation matrix.
"""
R = R.reshape(3, 3) R = R.reshape(3, 3)
t = t.reshape(3, 1) t = t.reshape(3, 1)
return np.vstack((np.hstack([R, t]), [0, 0, 0, 1])) return np.vstack((np.hstack([R, t]), [0, 0, 0, 1]))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment