Livox-SDK / livox_detection

Livox open source detection algorithm
Apache License 2.0
252 stars 54 forks source link

About 3D bounding box calculation problem #30

Open qulei123 opened 2 years ago

qulei123 commented 2 years ago

According to the calculation of the get_3d_box() function, the 8 corner coordinates of the detection box are obtained. Why is it necessary to use the T1 matrix for a transformation to get the correct corner coordinates? What does this T1 matrix mean?
(x,y,z) is not the reference radar coordinate system?

T1 = np.array([[0.0, -1.0, 0.0, 0.0],
               [0.0, 0.0, -1.0, 0.0],
               [1.0, 0.0, 0.0, 0.0],
               [0.0, 0.0, 0.0, 1.0]]
              )
box3d_pts_3d[:, 0:3] = self.get_3d_box((l, w, h), ry,(x,y,z))
box3d_pts_3d = np.dot(np.linalg.inv(T1), box3d_pts_3d.T).T
mrmouss commented 2 years ago

Hi, I'm not sure about the code but the above transformation matrix is a typical LiDAR (front-left-up) to camera (right-down-front) coordinates.