habitat-sim icon indicating copy to clipboard operation
habitat-sim copied to clipboard

iPhone camera parameters

Open arjung128 opened this issue 3 years ago • 1 comments

Habitat-Sim version

vx.x.x

Habitat is under active development, and we advise users to restrict themselves to stable releases. Are you using the latest release version of Habitat-Sim? Your question may already be addressed in the latest version. We may also not be able to help with problems in earlier versions because they sometimes lack the more verbose logging needed for debugging.

Main branch contains 'bleeding edge' code and should be used at your own risk.

Docs and Tutorials

Did you read the docs? https://aihabitat.org/docs/habitat-sim/

Did you check out the tutorials? https://aihabitat.org/tutorial/2020/

Perhaps your question is answered there. If not, carry on!

❓ Questions and Help

Hi, I am trying to use the iPhone camera parameters in Habitat.

With the default hfov being equal to 90 degrees, the focal length f = 1 / np.tan(hfov / 2.) = 1. What units are these in? The iPhone seems to have a focal length of 26mm, so I'm trying to calculate the corresponding hfov to set this in the configs.

Additionally, I was planning on changing config['SIMULATOR']['RGB_SENSOR']['HFOV'] to match the iPhone's focal length, but there doesn't seem to be a vertical field of view -- with the height and width being different for an iPhone, would it be possible to set the hfov and vfov separately?

Any help will be much appreciated, thanks!

arjung128 avatar Apr 18 '23 07:04 arjung128

Hey @arjung128, Check out this thread for some related discussion: https://github.com/facebookresearch/habitat-sim/issues/402

Also, I believe that vfov becomes a function of hfov given settings for the height and width of the virtual view plane.

aclegg3 avatar May 18 '23 15:05 aclegg3