nerfstudio-project / nerfstudio

A collaboration friendly studio for NeRFs
https://docs.nerf.studio
Apache License 2.0
9.51k stars 1.3k forks source link

Why the `aspect` is constant 1 in the code for `ns-export cameras`? #2338

Open elenacliu opened 1 year ago

elenacliu commented 1 year ago

Describe the bug

  1. I find that in this repo, e.g. this code below:

https://github.com/nerfstudio-project/nerfstudio/blob/bc8341378a8001b2b116d3461c56453c13b1abac/nerfstudio/scripts/blender/nerfstudio_blender.py#L145-L175

just generates camera path with the fixed setting. : ) Maybe for each custom dataset, the camera intrinsics will be different. If the user wants to generate pictures just to compare with the ground truth depth or rgb image, he should keep the camera intrinsics fit with his original dataset.

  1. the fov_list contains fov in degrees, but my transforms.json (using instant-ngp-dataparser to parse) represents "camera_angle_x" in radians.

https://github.com/nerfstudio-project/nerfstudio/blob/bc8341378a8001b2b116d3461c56453c13b1abac/nerfstudio/data/dataparsers/instant_ngp_dataparser.py#L211-L219

When I was trying to manually create a camera path through the scripts provided in issue #1101, I directly used the radians from my transforms.json and it got weird results. And I transferred my camera_path.json's fov from radian to degree, then it worked out. Is there any way to remind the users of the difference?

kerrj commented 1 year ago

1) seems like a question for @cvachha . for 2), it's odd that camera_angle_x is radians and x_fov is degrees. Do you know if there's a difference between these parameters or are they functionally the same? if they're the same we should probably make both of them deg or both of them rad

elenacliu commented 1 year ago

for 2, I guess the effects of the them are the same, because when I set the fov=65 in camera_path.json, and the original corresponding transforms.json camera_angle_x = 65 * math.pi / 180, the results of ns-render are right.

chais-xp commented 6 months ago

hello,I want to generate pictures just to compare with the ground truth depth or rgb image, but I can not konw the camera intrinsics just have colmap camera intrinsics,if you can solve this question, thanks