Skip to content
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

What is the intrinsic and extrinsic params? #1119

Open
jeychandar opened this issue Oct 22, 2024 · 1 comment
Open

What is the intrinsic and extrinsic params? #1119

jeychandar opened this issue Oct 22, 2024 · 1 comment

Comments

@jeychandar
Copy link

@HongyiSun For v1.0 mini dataset when I extracted there is a calibration json file and lot of intrinsic params. I could not find extrinsic params. For scene 61 what is the intrinsic and extrinsic params. Could you please provide?. Thanks in advance

@whyekit-motional
Copy link
Collaborator

@jeychandar you can get the intrinsic and extrinsic params for any sensor in a sample of a scene by doing something like:

from nuscenes.nuscenes import NuScenes


nusc = NuScenes(version='v1.0-mini', dataroot='/data/sets/nuscenes', verbose=False)

my_scene = nusc.scene[0]
my_sample_from_scene = nusc.get("sample", my_scene["first_sample_token"])
my_sd_of_sample_from_scene = nusc.get("sample_data", my_sample_from_scene["data"]["CAM_FRONT"])
my_cs_of_sd_of_sample_from_scene = nusc.get("calibrated_sensor", my_sd_of_sample_from_scene["calibrated_sensor_token"])
print(my_cs_of_sd_of_sample_from_scene)

The above code snippet gives:

{'token': '1d31c729b073425e8e0202c5c6e66ee1',
 'sensor_token': '725903f5b62f56118f4094b46a4470d8',
 'translation': [1.70079118954, 0.0159456324149, 1.51095763913],
 'rotation': [0.4998015430569128,
  -0.5030316162024876,
  0.4997798114386805,
  -0.49737083824542755],
 'camera_intrinsic': [[1266.417203046554, 0.0, 816.2670197447984],
  [0.0, 1266.417203046554, 491.50706579294757],
  [0.0, 0.0, 1.0]]}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants