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

change docstrings

parent 1602973f
......@@ -2,7 +2,8 @@
#
# This source code is licensed under the MIT license found in the
# 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 os
......
% Copyright (c) Facebook, Inc. and its affiliates.
%
% This source code is licensed under the MIT license found in the
% LICENSE file in the root directory of this source tree.
% Modified from
% https://github.com/facebookresearch/votenet/blob/master/sunrgbd/matlab/extract_split.m
% Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
%% Dump train/val split.
% Author: Charles R. Qi
......
......@@ -167,14 +167,29 @@ class SUNRGBD_Calibration(object):
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)
s = np.sin(t)
return np.array([[c, -s, 0], [s, c, 0], [0, 0, 1]])
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)
t = t.reshape(3, 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