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 coordinate convention for the saved dataparser_transforms.json ? #3484

Open
AruniRC opened this issue Oct 16, 2024 · 5 comments
Open

Comments

@AruniRC
Copy link

AruniRC commented Oct 16, 2024

It is not clear if the dataparser_transforms.json "transform" matrix is in OpenCV or OpenGL convention, if the data pre-processing, say, was done using COLMAP (which would be using OpenCV).

This makes it hard to correctly apply this transformation, if I am trying to convert camera poses in the input coordinate system (ie. whatever COLMAP gives) into the coordinate system used by the trained Nerf.

@lyg1597
Copy link

lyg1597 commented Oct 22, 2024

Hope this answer helps with the relationship between colmap coordinate frame and trained nerf coordinate frame.
#3488 (comment)

@AruniRC
Copy link
Author

AruniRC commented Oct 22, 2024

Thank you for the response @lyg1597 .

However, I think one more bit of information is needed to correctly apply the transform you pointed out: we still do not know the coordinate convention of the transformation matrix and scale factor that are found in dataparser_transforms.json. That is, is it saved in the OpenCV format (which colmap uses) or the OpenGL format (which nerfstudio uses).

@lyg1597
Copy link

lyg1597 commented Oct 23, 2024

I am not that familar with the difference/conversion between OpenCV and OpenGL convention, but I can describe what I am doing. The steps that I am using is:

  1. Collecct images and camera poses from gazebo simulator.
  2. Use script from Problem using ORB-SLAM2 results instead of COLMAP for the data processing step #3101 (comment) (thanks for your solution) to perform the first coordinate transformation.
  3. Apply the second coordinate transformation I described in the previous comment Transform conversion from colmap transform.json to camera_path.json #3488 (comment).
  4. Render images at the resulting camera pose.

The images that I am getting from the last step looks exactly (except nerf artifect) the same as the images directly from the simulator. Hope this is helpful for your problem.

@AruniRC
Copy link
Author

AruniRC commented Oct 23, 2024

@lyg1597 - this is super helpful, thank you for the details. The step 4 that you mention is basically calling ns-render from the cmd line on the camera_path.json you generated in step 3?

@lyg1597
Copy link

lyg1597 commented Oct 23, 2024

No, I am using my own renderer because I want minimum code that can give me single images. But all functions I am using is from nerfstudio/ns-render.

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