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

Opencv extrinsic instead of colmap #141

Closed
Duncan1115 opened this issue Feb 25, 2022 · 5 comments
Closed

Opencv extrinsic instead of colmap #141

Duncan1115 opened this issue Feb 25, 2022 · 5 comments

Comments

@Duncan1115
Copy link

Duncan1115 commented Feb 25, 2022

Hi, Thanks for your great work of nerf !
Actually, Using colmap to estimate camera extrinsic spends much time (the installation and runing reconstrusction code...). I tried to put a chessboard in my own llff data and then calibrate it by using Opencv. However, the camera parameters could not be correctly used in nerf.
I think may be Opencv and colmap have different coordinate systems which makes the camera extrinsic in Opencv can not be used in the code. If you know the answer about how to transform the extrinsic, please tell me.
THANK U very much !!

@Duncan1115
Copy link
Author

Already figured it out.... The important thing is to tranform the coordinate system from Opencv to Opengl. As follows:

  1. get the w2c_opencv from Opencv calibration.
  2. set a correctionMatrix, and then correctionMatrix multiplied by w2c_opencv to get w2c_opengl.
  3. inverse w2c_opengl to get c2w_opengl.
    I refer to this solution from this web: https://stackoverflow.com/questions/16265714/camera-pose-estimation-opencv-pnp/20373984#20373984

@ynma-hanvo
Copy link

great work and thanks for sharing. but how many cameras in your system.

@Duncan1115
Copy link
Author

Hi @ynma-hanvo , I use only one camera and one chessboard.

@ynma-hanvo
Copy link

@Duncan1115 ok, i see. it means you compute the postions of consective frames by opencv. that 's great.
but did you get satisfied result ?

@Duncan1115
Copy link
Author

@ynma-hanvo Sure, the NeRF result of opencv extrinsic was the same as the one of colmap. Altually the near and far bounds should be defined by myself, i.e., if camera is about 3 meters from chessboard, the near/far bound should be set as [0m,10m].

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

No branches or pull requests

2 participants