Closed TitansWhale closed 2 years ago
I did not convert the gravity direction to the coordinate system of the depth camera through the camera extrinsic parameters。 https://github.com/microsoft/Azure-Kinect-Samples/tree/master/body-tracking-samples/floor_detector_sample
I try to use gravity direction to align with point cloud y axis. But I found that the coordinate system of the gyroscope seems to be a little off from the coordinate system of the depth camera. To test this idea I placed the camera on the ground and looked at a vertical wall and used open3d to render the point cloud of the wall. I found that there is always some inclination angle between the aligned wall and the coordinate axis.
‘’‘ import numpy as np from typing import * import pykinect_azure as pykinect # https://github.com/ibaiGorordo/pyKinectAzure import cv2 import open3d as o3d
def to_depth_space(acc_direct: List): in_x, in_y, in_z = acc_direct[0], acc_direct[1], acc_direct[2]
def get_change_mat(acc: List): y = to_depth_space(acc) z = np.array([0, 0, 1]) x = np.cross(y, z) z = np.cross(x, y)
def get_change_xyz(xyzs_set: List, acc): mat = get_change_mat(acc) root_xyz = xyzs_set[250 * 250] ret = xyzs_set - root_xyz
def main():
Initialize the library, if the library is not found, add the library path as argument
if name == "main": main()
’‘’