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

How to creat gt.info and gt.log files #73

Open
lcxiha opened this issue Jul 17, 2023 · 8 comments
Open

How to creat gt.info and gt.log files #73

lcxiha opened this issue Jul 17, 2023 · 8 comments

Comments

@lcxiha
Copy link

lcxiha commented Jul 17, 2023

Hello,
May I ask for how the files of gt.info, gt.log, and gt_overlap.log in OverlapPredator-main\configs\benchmarks\3DMatch\7-scenes-redkitchen generated? What information is required to generate these three files? I have been troubled by this place for a long time. Could you please help me answer it? I would greatly appreciate it!

@JosefT-TuDortmund
Copy link

I would also be interested in the details. Especially for the gt.info file.

@lcxiha
Copy link
Author

lcxiha commented Jul 21, 2023

Hello, do you know how the gt.log file is generated? Looking forward to your reply! @JosefT-TuDortmund

@JosefT-TuDortmund
Copy link

JosefT-TuDortmund commented Jul 21, 2023

Yes, I managed to generate them. I did it the following way:

  1. First as a prerequisite you need to have all the transformations that align your point clouds in the world coordinate system. For the 3DMatch dataset they are stored in the cloud_bin_{id}.info.txt files.
  2. The gt.log file essentially holds the pairwise relative transformations to align two point clouds. this can look like this:
    0 1 60
    9.96926560e-01 6.68735757e-02 -4.06664421e-02 -1.15576939e-01
    -6.61289946e-02 9.97617877e-01 1.94008687e-02 -3.87705398e-02
    4.18675510e-02 -1.66517807e-02 9.98977765e-01 1.14874890e-01
    0.00000000e+00 0.00000000e+00 0.00000000e+00 1.00000000e+00
    The Transformation aligns the first point cloud (here idx 0) with the second (here indx 1). The 60 is the total number of point clouds in the sequence. Lets say you have the transformations for point cloud 0 and point cloud 1 given as T0 and T1. Then you can calculate the relative transformation as:
    Trel = np.linalg.inv(T0) @ T1 # in python

For gt_info.log however, I am also clueless. Hope that this helps you :)

@lcxiha
Copy link
Author

lcxiha commented Jul 24, 2023

1.That is to say, if I have the rotation matrix and translation matrix of two frame point clouds in the world coordinate system, can I get the gt.log file? But I have another question: shouldn't the. log file be a log output file?
2.But I found out that the transformation matrix in the cloud_bin_{id}.info.txt files cannot correspond one-to-one with the transformation matrix in the gt.log file,and I am not quite sure about what does the first line in the cloud_bin_{id}.info.txt file mean.

@JosefT-TuDortmund
Copy link

Yes, the gt.log file corresponds to the relative transformations between the point clouds when they are aligned in the world coordinate system. Idk, how the original generation process of the .log files was. Perhaps the authors of the paper/code can bring some light into this discussion?

For me, the calculation of the relative transformations given the absolute poses within the cloud_bin_{id}.info.txt files worked fine as I described before.
For the first line, the first two numbers are indices for the point clouds. The third number is the total number of point clouds for the scene.

@lcxiha
Copy link
Author

lcxiha commented Jul 26, 2023

Thank you. So I can understand that the generation of the gt.log file is not related to the cloud_bin_{id}.info.txt file, right?

About the gt.info file, some materials say that it is the Covariance matrix of the transformation matrix, but I don't understand it. @JosefT-TuDortmund

@lcxiha
Copy link
Author

lcxiha commented Jul 26, 2023

And I also found a problem: when I visualized the 3DMatch.pkl file, I found that the corresponding rotation matrix and the rotation matrix of the same pair of point cloud keyframes in the gt.log file were not the same, shouldn't they be the same? @JosefT-TuDortmund

@wzm2256
Copy link

wzm2256 commented Apr 14, 2024

For anyone who wish to know the meaning of gt.log file, please see http://redwood-data.org/indoor/fileformat.html

For anyone who wish to know how to compute the relative pose, I provide a concrete example based on @JosefT-TuDortmund 's answer.

        src_trans = np.loadtxt(src_trans_path, skiprows=1, usecols=None) # load a  *.info.txt file 
        tgt_trans = np.loadtxt(tgt_trans_path, skiprows=1, usecols=None) # load a  *.info.txt file 

        trans_full = np.matmul(np.linalg.inv(tgt_trans), src_trans) 

        assert np.abs(trans_full[:3, :3] - rot).sum() < 1e-2 # rot is the true rotation provided in gt.log or configs/indoor/3DMatch.pkl 

@lcxiha So I can understand that the generation of the gt.log file is not related to the cloud_bin_{id}.info.txt file, right? The statement is not correct.

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

3 participants