We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I projected the 3D box onto the 2D pixel plane, but the orientation of the box was wrong. I did this:
step 1: Convert the orientation to a rotation matrix and then to a quaternion, using the corner points of the box.
def xyz2Quaternion(xyz): rot = np.array(xyz) rot_matrix = R.from_euler("xyz", rot, degrees=False).as_matrix() return Quaternion(matrix=rot_matrix)
step 2: Convert the orientation to a rotation matrix and then to a quaternion, using the corner points of the box. camera_intrinsic= [[640.0, 0.0, 640.0], [0.0, 640.0, 400.0], [0.0, 0.0, 1.0]]} view = np.eye(4) view[:3, :3] = np.array(camera_intrinsic) in_front = corners_3d[2, :] > 0.1 if all(in_front) is False: continue points = corners_3d points = np.concatenate((points, np.ones((1, points.shape[1]))), axis=0) points = np.dot(view, points)[:3, :] points /= points[2, :]
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I projected the 3D box onto the 2D pixel plane, but the orientation of the box was wrong. I did this:
step 1: Convert the orientation to a rotation matrix and then to a quaternion, using the corner points of the box.
def xyz2Quaternion(xyz):
rot = np.array(xyz)
rot_matrix = R.from_euler("xyz", rot, degrees=False).as_matrix()
return Quaternion(matrix=rot_matrix)
step 2: Convert the orientation to a rotation matrix and then to a quaternion, using the corner points of the box.
camera_intrinsic= [[640.0, 0.0, 640.0],
[0.0, 640.0, 400.0],
[0.0, 0.0, 1.0]]}
view = np.eye(4)
view[:3, :3] = np.array(camera_intrinsic)
in_front = corners_3d[2, :] > 0.1
if all(in_front) is False:
continue
points = corners_3d
points = np.concatenate((points, np.ones((1, points.shape[1]))), axis=0)
points = np.dot(view, points)[:3, :]
points /= points[2, :]
The text was updated successfully, but these errors were encountered: