-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
question about allocentric_to_egocentric #31
Comments
I think this link can help you. https://towardsdatascience.com/orientation-estimation-in-monocular-3d-object-detection-f850ace91411 |
I also want to know how allocentric_to_egocentric works, i tried to use this function to convert a quaternion which yaw=1.1035268306732178, pitch=0, roll=0 to its global angle yaw=0.599697574750902, pitch=0, roll=0 (this is computed by simplified method as mentioned above), and i get yaw_pitch_roll (1.1051701660724589, -0.503826789884737, 0.003403815156846349). The converted yaw doesn't match global yaw but i notice the pitch value very close to the difference between local yaw and global yaw groundtruth, more tries also prove this. So I wonder if different definition of coordinate influence the result of conversion? |
I also found update: The below code is a snipet to show an example to recover angles from a vector. import numpy as np
from scipy.spatial.transform import Rotation
# examle angles. roll should be zero.
pitch, yaw, roll = [66, 120, 0]
print("pitch, yaw, roll", pitch, yaw, roll)
rot_matrix = Rotation.from_euler("xyz", [pitch, yaw, roll], degrees=True).as_matrix()
# compute a ray represents allocentric-egocentric rotation
ray = rot_matrix @ [0, 0, 1]
def angle_in_sphere_coord(x, y, z):
r = np.sqrt(x**2 + y**2 + z**2)
theta = np.arccos(y / r) - np.pi / 2
phi = - np.sign(z) * np.arccos(x / np.sqrt(x**2 + z**2)) + np.pi / 2
return r, theta, phi
r, theta, phi = angle_in_sphere_coord(*ray)
print("theta, phi", np.degrees(theta), np.degrees(phi)) outputs:
|
Hi, actually i have some problem with this (allocentric_to_egocentric).
I can't really understand how 'R_local_to_global' come from after i read code and paper.
Could you help recommend some knowledge material about this question? I would really appreciate that
I think it's something like 'alpha' observation angle in KITTI.(To get rot_y, we need to consider 'alpha' and ray angle.)
But i can't exact reason this process in DD3D. (allocentric_to_egocentric)
The text was updated successfully, but these errors were encountered: